mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
Fix Klaro translations by forcing Klaro to use a 'zy' language key which DSpace will translate
(cherry picked from commit 6076423907
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
ce010725ac
commit
4353c57cd0
@@ -91,7 +91,7 @@ export class BrowserKlaroService extends KlaroService {
|
||||
initialize() {
|
||||
if (!environment.info.enablePrivacyStatement) {
|
||||
delete this.klaroConfig.privacyPolicy;
|
||||
this.klaroConfig.translations.zz.consentNotice.description = 'cookies.consent.content-notice.description.no-privacy';
|
||||
this.klaroConfig.translations.zy.consentNotice.description = 'cookies.consent.content-notice.description.no-privacy';
|
||||
}
|
||||
|
||||
const hideGoogleAnalytics$ = this.configService.findByPropertyName(this.GOOGLE_ANALYTICS_KEY).pipe(
|
||||
@@ -238,12 +238,12 @@ export class BrowserKlaroService extends KlaroService {
|
||||
*/
|
||||
addAppMessages() {
|
||||
this.klaroConfig.services.forEach((app) => {
|
||||
this.klaroConfig.translations.zz[app.name] = {
|
||||
this.klaroConfig.translations.zy[app.name] = {
|
||||
title: this.getTitleTranslation(app.name),
|
||||
description: this.getDescriptionTranslation(app.name)
|
||||
};
|
||||
app.purposes.forEach((purpose) => {
|
||||
this.klaroConfig.translations.zz.purposes[purpose] = this.getPurposeTranslation(purpose);
|
||||
this.klaroConfig.translations.zy.purposes[purpose] = this.getPurposeTranslation(purpose);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -257,7 +257,7 @@ export class BrowserKlaroService extends KlaroService {
|
||||
*/
|
||||
this.translateService.setDefaultLang(environment.defaultLanguage);
|
||||
|
||||
this.translate(this.klaroConfig.translations.zz);
|
||||
this.translate(this.klaroConfig.translations.zy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user