Skip to content

Commit

Permalink
fix(common): duplicate translation namespace prefix, fixes #738 (#739)
Browse files Browse the repository at this point in the history
fix(common): duplicate translation namespace prefix, fixes #738
  • Loading branch information
someusersomeuser authored Aug 11, 2022
1 parent c8acb65 commit ed6b0cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/common/src/extensions/extensionUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ export class ExtensionUtility {
* @param {Object} gridOptions - Grid Options
*/
translateMenuItemsFromTitleKey(items: Array<MenuCommandItem | MenuOptionItem | GridMenuItem | 'divider'>) {
const translationPrefix = getTranslationPrefix(this.sharedService.gridOptions);
for (const item of items) {
if (typeof item === 'object' && item.titleKey) {
item.title = this.translateWhenEnabledAndServiceExist(`${translationPrefix}${item.titleKey}`, `TEXT_${item.titleKey}`);
item.title = this.translateWhenEnabledAndServiceExist(`${item.titleKey}`, `TEXT_${item.titleKey}`);
}
}
}
Expand Down

0 comments on commit ed6b0cc

Please sign in to comment.