]> source.dussan.org Git - gitea.git/commit
Improve update-locales script and fix locale processing bug (#23240)
authorwxiaoguang <wxiaoguang@gmail.com>
Thu, 2 Mar 2023 18:33:36 +0000 (02:33 +0800)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2023 18:33:36 +0000 (12:33 -0600)
commitd72462dae62b6d76ddd47f6bbadbfe0352e03f89
tree2e4dca6e4af5ad54a37477380b122ba0e6915b82
parentce73492d6fabcf4523be95189692c98153023a63
Improve update-locales script and fix locale processing bug (#23240)

The locales of Gitea has been broken for long time, till now, it's still
not fully fixed.

One of the root problems is that the `ini` library is quite quirky and
the `update-locales` script doesn't work well for all cases.

This PR fixes the `update-locales` script to make it satisfy `ini`
library and the crowdin.

See the comments for more details.

The `locale_zh-CN.ini` is an example, it comes from crowdin and is
processed by the new `update-locales.sh`. Especially see the `feed_of`:
https://github.com/go-gitea/gitea/pull/23240/files#diff-321f6ca4eae1096eba230e93c4740f9903708afe8d79cf2e57f4299786c4528bR268
build/update-locales.sh
options/locale/locale_zh-CN.ini