Browse Source
Merge pull request #9184 from ArtemDzhereleiko/AD/bug-fix/translation/missing-handler
Fixed doubled error message for missing translate
pull/9210/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
ui-ngx/src/app/core/translate/missing-translate-handler.ts
|
|
@ -20,7 +20,8 @@ import { customTranslationsPrefix } from '@app/shared/models/constants'; |
|
|
export class TbMissingTranslationHandler implements MissingTranslationHandler { |
|
|
export class TbMissingTranslationHandler implements MissingTranslationHandler { |
|
|
handle(params: MissingTranslationHandlerParams) { |
|
|
handle(params: MissingTranslationHandlerParams) { |
|
|
if (params.key && !params.key.startsWith(customTranslationsPrefix)) { |
|
|
if (params.key && !params.key.startsWith(customTranslationsPrefix)) { |
|
|
console.warn('Translation for ' + params.key + ' doesn\'t exist'); |
|
|
console.warn('Translation for \'' + params.key + '\' doesn\'t exist'); |
|
|
|
|
|
params.translateService.set(params.key, params.key); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|