@@ -23,7 +23,7 @@ export const GOOGLE_ANALYTICS_KLARO_KEY = 'google-analytics';
2323
2424/**
2525 * Klaro configuration
26- * For more information see https://kiprotect.com /docs/klaro /annotated-config
26+ * For more information see https://klaro.org /docs/integration /annotated-configuration
2727 */
2828export const klaroConfiguration : any = {
2929 storageName : ANONYMOUS_STORAGE_NAME_KLARO ,
@@ -53,21 +53,30 @@ export const klaroConfiguration: any = {
5353
5454 htmlTexts : true ,
5555
56+ /*
57+ Force Klaro to use our custom "zy" lang configs defined below.
58+ */
59+ lang : 'zy' ,
60+
5661 /*
5762 You can overwrite existing translations and add translations for your app
5863 descriptions and purposes. See `src/translations/` for a full list of
5964 translations that can be overwritten:
60- https://github.com/KIProtect /klaro/tree/master/src/translations
65+ https://github.com/klaro-org /klaro-js /tree/master/src/translations
6166 */
6267 translations : {
6368 /*
64- The `zz` key contains default translations that will be used as fallback values.
65- This can e.g. be useful for defining a fallback privacy policy URL.
66- FOR DSPACE: We use 'zz' to map to our own i18n translations for klaro, see
69+ For DSpace we use this custom 'zy' key to map to our own i18n translations for klaro, see
6770 translateConfiguration() in browser-klaro.service.ts. All the below i18n keys are specified
6871 in your /src/assets/i18n/*.json5 translation pack.
72+ This 'zy' key has no special meaning to Klaro & is not a valid language code. It just
73+ allows DSpace to override Klaro's own translations in favor of DSpace's i18n keys.
74+ NOTE: we do not use 'zz' as that has special meaning to Klaro and is ONLY used as a "fallback"
75+ if no other translations can be found within Klaro. Currently, a bug in Klaro means that
76+ 'zz' is never used as there's no way to exclude translations:
77+ https://github.com/klaro-org/klaro-js/issues/515
6978 */
70- zz : {
79+ zy : {
7180 acceptAll : 'cookies.consent.accept-all' ,
7281 acceptSelected : 'cookies.consent.accept-selected' ,
7382 close : 'cookies.consent.close' ,
0 commit comments