-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Config parameter: Change inferred i18n key for add-ons + alternative key #4305
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a mismatch between the actual scheme name and the required scheme name?
IICR, this was introduced when you introduced the addon.xml file with new features. In OH 4.0 I believe |
But why don't we fix the config description scheme naming if it should be |
Yes, that looks like a good idea. It is probably coming from the XML tag named "type" in all addon.xml. To be confirmed. |
The other option would be to update the i18n keys to use "binding.config.xxx" instead of *addon config.xxx". But that would be even more work and a disaster as it would require to translate again all bindings parameters. |
I could also rather fix where the description uri is built, rather than where the i18n key is inferred from it. |
I am counting 85 entries in english properties files having "addon.config.xxx". It concerns 21 bindings. So another solution, probably the cleaner, would be to fix manually the 85 wrong entries and then start again their translations in Crowdin. Note that I found wrong entries also for two persistence services (entries should probably start with "persistence.config.xxx"):
|
IMO |
If we do that, we have probably less bindings to update, only io/voice/persistence/transform bindings having parameters.
We can of course change the keys but then you have to provide a new translation. |
In fact, it is largely more entries to change: So it would be easier to fix entries for the 19 standard bindings and 2 persistence bindings. |
Or we go with my proposed workaround and we don't have to update bindings. Only 2 lines changed in the core framework. PS: the 2 persistence services should be fixed anyway. |
I also found one binding using "binding.config.xxx":
|
If my proposal is accepted, I will have to take a look to failing integration tests. |
I am going to enhance my proposal to support both keys, that is |
90358aa
to
9a2b320
Compare
9a2b320
to
811e7b0
Compare
@J-N-K : please look at the last version, I believe it is a good compromise supporting both i18n keys. No changes in add-ons should then be required. |
811e7b0
to
776dfa3
Compare
Close)re-open to trigger a rebuild |
Go |
I am going to reverse the logic, making |
776dfa3
to
7bee99d
Compare
7bee99d
to
aa12beb
Compare
e127b01
to
af88c55
Compare
Fix openhab/openhab-webui#2641 The i18n key for add-on configuration parameter should now start with addon.config.<param>. To maintain compatibility with hundreds of existing translations, an alternative key starting with <type>.config.<param> is still accepted for an add-on parameter Signed-off-by: Laurent Garnier <lg.hc@free.fr>
af88c55
to
22f8ac7
Compare
Ok, finished. I changed the title and the content of the initial message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@J-N-K @kaikreuzer : please backport to branch 4.2.x before building 4.2.1. |
…key (openhab#4305) Fix openhab/openhab-webui#2641 The i18n key for add-on configuration parameter should now start with addon.config.<param>. To maintain compatibility with hundreds of existing translations, an alternative key starting with <type>.config.<param> is still accepted for an add-on parameter Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo Done! |
…key (#4305) Fix openhab/openhab-webui#2641 The i18n key for add-on configuration parameter should now start with addon.config.<param>. To maintain compatibility with hundreds of existing translations, an alternative key starting with <type>.config.<param> is still accepted for an add-on parameter Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Now it is cherry-picked to the OH repo. |
Fix openhab/openhab-webui#2641
The i18n key for add-on configuration parameter should now start with
addon.config.<param>
.To maintain compatibility with hundreds of existing translations, an alternative key starting with
<type>.config.<param>
is still accepted for an add-on parameterSigned-off-by: Laurent Garnier lg.hc@free.fr