-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
partial translation with custom i18n namespase #738
Comments
Pull Request are welcome if you think that you have a fix. I never used the prefix so I'm not the best person to look into this |
simple way is check that translationPrefix already contains but imho true way remove prefix from all *Menu sources, and save it in translateMenuItemsFromTitleKey. what is your opinion? |
hmm I`m not sure that adding string check of the prefix for every single translation key is necessary a good thing. I would rather fix the source of the duplicate prefix. The thing is that as I said I never used it myself and the person who opened this issue in Aurelia-Slickgrid, which I've added the feature for him, never came back to me to confirm if it works as expected. So I'm not necessarily surprised about this new issue you opened, So I still think fixing the source is ideal |
I checked the code history. I think previously it worked as expected. my new idea - simply remove prefix from translateMenuItemsFromTitleKey then internal keys still contains prefix, if it is set |
Describe the bug
with custom namespace some items in menu not translated - duplicate namespace in key string
@slickgrid-universal\common\dist\esm\extensions\extensionUtility.js -> translateMenuItemsFromTitleKey(items)
this method add translationPrefix to item.titleKey before translate, but titleKey already contains translationPrefix:
@slickgrid-universal\common\dist\esm\extensions\slickGridMenu.js -> addGridMenuCustomCommands(originalCommandItems)
fix translateMenuItemsFromTitleKey to remove duplicate translationPrefix, or check, that the titleKey not already starts with translationPrefix
Reproduction
Environment Info
Validations
The text was updated successfully, but these errors were encountered: