roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.59k stars 1.6k forks source link

Add option to skins to decide adding or merging localization #9076

Open gab0rka opened 10 months ago

gab0rka commented 10 months ago

Hi,

It would be a nice feature if there was an option in the skin's meta.json to decide the method of adding (or merging) the localized strings to the system. In my case, I extended the elastic skin just to completely change the login page and I wanted to change the "Username" label to "E-mail address", to provide a bit more information to the user what to write to that field. I found out that I only can do that changing the text in the program/localization/$lang/labels.inc file. Putting it in the skins/$skin/localization/$lang.inc cannot override the system's label, only adds new ones. The load_language() function already supports merging the additional texts besides the adding. I think it would be a good way defining a new variable in the skins's meta.json, for example localization_merge with a boolean value, and parse it in the load_skin() method. The default behavior should be adding, so nothing changes without explicitly adding the variable to meta.json.

Neustradamus commented 4 months ago

@gab0rka: Interesting, what do you think @alecpl?

alecpl commented 3 months ago

I don't like the idea of a new option, but I think that maybe "overwrite mode" would be a better solution for skin localization.

pabzm commented 3 weeks ago

@alecpl Do you suggest to make merging the default? Or what does "overwrite mode" mean?