Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gab0rka
Copy link

@gab0rka gab0rka commented Jul 22, 2023

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
Copy link

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

@alecpl
Copy link
Member

alecpl commented Feb 11, 2024

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
Copy link
Member

pabzm commented May 6, 2024

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

@DoobleD
Copy link

DoobleD commented Aug 22, 2024

I'm encountering the same need, and making merging the default behavior would make sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants