-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: master
Are you sure you want to change the base?
Conversation
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. |
@alecpl Do you suggest to make merging the default? Or what does "overwrite mode" mean? |
I'm encountering the same need, and making merging the default behavior would make sense to me. |
Still interested in this being merged, or even better making override the default behavior. |
@Neustradamus No, it is just a reminder. |
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 theskins/$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 examplelocalization_merge
with a boolean value, and parse it in theload_skin()
method. The default behavior should be adding, so nothing changes without explicitly adding the variable to meta.json.