[FIX] Translations were not unique per app allowing conflicts among apps#11878
Merged
[FIX] Translations were not unique per app allowing conflicts among apps#11878
Conversation
Contributor
|
LGTM :) Just one small thing: When I first installed my new packed apps, the translations on the settings page were not rendered (auto redirect after install). A refresh fixed the problem. This behavior does not occur when I delete and reinstall the app. It must be a never before installed App version to reproduce (App 1 & 2). App 1: |
Member
Author
|
Thanks @kaiiiiiiiii it was fixed by my latest commit 1e6ecd2 |
graywolf336
approved these changes
Aug 27, 2018
Contributor
graywolf336
left a comment
There was a problem hiding this comment.
👍 glad to see this technical debt finally erased
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

To prevent conflicts among apps translations we added a unique key for the apps strings changing the keys in runtime to add
apps-${ id }-in front of them.Example for an app with id
my-app-id:Registered key:
param_descriptionWill be registered internally as:
apps-my-app-id-param_descriptionThe slashcomands will require app developers to provide the translation since it will not allow fallback to the i18n strings of the project, but the settings will try to find the translation first in the app and then in the project strings (using only the last part eg:
param_description).The app developer need to do nothing, it's just an internal change.