Browse Source
Merge pull request #25801 from chandralk/fix-localization
Fix localization
pull/25813/head
sumeyye
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
11 additions and
9 deletions
-
npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.html
-
npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html
-
npm/ng-packs/packages/core/src/lib/utils/localization-utils.ts
|
|
|
@ -162,11 +162,7 @@ |
|
|
|
@if (prop().displayTextResolver) { |
|
|
|
{{ prop().displayTextResolver(data()) | abpLocalization }} |
|
|
|
} @else { |
|
|
|
@if (prop().isExtra) { |
|
|
|
{{ '::' + prop().displayName | abpLocalization }} |
|
|
|
} @else { |
|
|
|
{{ prop().displayName | abpLocalization }} |
|
|
|
} |
|
|
|
{{ prop().displayName | abpLocalization }} |
|
|
|
} |
|
|
|
{{ asterisk() }} |
|
|
|
@if (prop().tooltip) { |
|
|
|
|
|
|
|
@ -136,7 +136,7 @@ |
|
|
|
*abpVisible="prop.columnVisible(getInjected)" |
|
|
|
[width]="columnWidths()[i] || 200" |
|
|
|
[canAutoResize]="!columnWidths()[i]" |
|
|
|
[name]="(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization" |
|
|
|
[name]="prop.displayName | abpLocalization" |
|
|
|
[prop]="prop.name" |
|
|
|
[sortable]="prop.sortable" |
|
|
|
> |
|
|
|
|
|
|
|
@ -13,11 +13,17 @@ export function createLocalizer(localization: ApplicationLocalizationConfigurati |
|
|
|
return (resourceName: string, key: string, defaultValue: string | null) => { |
|
|
|
if (resourceName === '_') return key; |
|
|
|
|
|
|
|
const resource = localization?.values?.[resourceName]; |
|
|
|
const resource = localization?.resources?.[resourceName]; |
|
|
|
|
|
|
|
if (!resource) return defaultValue; |
|
|
|
if (!resource) { |
|
|
|
const fallbackResource = localization?.values?.[resourceName]; |
|
|
|
|
|
|
|
return resource[key] || defaultValue; |
|
|
|
if (!fallbackResource) return defaultValue; |
|
|
|
|
|
|
|
return fallbackResource[key] || defaultValue; |
|
|
|
} |
|
|
|
|
|
|
|
return resource.texts?.[key] || defaultValue; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|