Open gvethon opened 3 years ago
So, what is the use case in the first place, what would be achieved with custom locales ?
The usecase may be adding custom links to or overriding header in base/head_navbar.tmpl. I want to allow to translate that links like others. I am using gitea in my project as repository to store users projects and want to unify headers and footers as in the main application.
If by adding custom locales you mean a "drop-in" locale file to overwrite existing translation partially i would appreciate that as well.
I think it is very nice to have, because you can customise the startpage and still have all the language switching functionality supported. Otherwise you would just be stuck with one language as soon as you modify the home.tmpl.
We would also benefit from this functionality.
In the meantime, we achieved this by writing a go script that replaces and adds custom locale k/v's to the ones extracted from the binary at build time using docker.
https://github.com/WycliffeAssociates/WACS/blob/prod/wacs-gitea/Dockerfile
https://github.com/WycliffeAssociates/WACS/blob/prod/wacs-gitea/merge-locale/merge.go
sorry about the cruft in that repo, it's still WIP.
Feature Description
In short: allow to add custom locales without overriding whole locale*.ini file. Use case: adding custom locales texts to Gitea requires placing an altered locale file in GITEA_CUSTOM directory. This file is a copy of locale file from Gitea source code. Is it possible to allow definig custom locale properties and add it to Gitea defined locales? Overriding locales may produce many problems while upgrading.
Screenshots
No response