Problem with Internationalization (i18n)

305 views
Skip to first unread message

Maksim Donchenko

unread,
Jun 16, 2023, 3:24:18 AM6/16/23
to DSpace Technical Support
Hi to all. I added a new translation language to /src/assets/i18n using this guide: https://wiki.lyrasis.org/pages/viewpage.action?pageId=117735441. Everything was localized well, except for the Cookie notification. I have attached a screenshot of the problem below. Maybe someone has encountered something similar and can help? I use Dspace 7.4.

Thank you and kind regards Maksim

cookie.png

Mark H. Wood

unread,
Jun 16, 2023, 8:36:34 AM6/16/23
to dspac...@googlegroups.com
On Fri, Jun 16, 2023 at 12:24:18AM -0700, Maksim Donchenko wrote:
> Hi to all. I added a new translation language to /src/assets/i18n using
> this guide:
> https://wiki.lyrasis.org/pages/viewpage.action?pageId=117735441. Everything
> was localized well, except for the Cookie notification. I have attached a
> screenshot of the problem below. Maybe someone has encountered something
> similar and can help? I use Dspace 7.4.

There is another layer of mapping for cookie messages. The keys that
Klaro should be looking up are named in
'src/app/shared/cookies/klaro-configuration.ts'. The first thing I
would check is whether this file's mapping corresponds to the keys in
your 'uk' message catalog.

However: this is the second time today that I've seen a message from
someone having trouble specifically with translating cookie messages.
There may be a deeper problem. And all that I really know about Klaro
is that it seems to take care of cookie management.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Alan Orth

unread,
Jun 16, 2023, 8:59:55 AM6/16/23
to dspac...@googlegroups.com
Dear Maksim,

I just tried using Ukrainian and the Klaro popup is working for me, but I am using the default Ukrainian i18n strings. Are you using a custom theme? If so, you need to merge your theme's i18n keys to the main i18n files after updating them in your theme. For example, if your theme is called "mytheme":

$ yarn merge-i18n -s src/themes/mytheme/assets/i18n

Then check to see if the `src/assets/i18n/uk.json5` file is sane. I've noticed that the merge script has one small bug¹ that causes it to unquote the `title` key, so you will have to quote it again manually.

Hope that helps,


--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ZIxXTmmCIaamzHZm%40IUPUI.Edu.


--
Screenshot 2023-06-16 at 15-52-36 CGSpace Репозитарій Львівської політехніки Головна.png

DSpace Technical Support

unread,
Jun 16, 2023, 10:22:13 AM6/16/23
to DSpace Technical Support
All,

There was a bug with the translation messages of the Cookie notification accidentally introduced in DSpace 7.4.  See this ticket: https://github.com/DSpace/dspace-angular/issues/2027
It was fixed in 7.5.  So, it no longer exists if you upgrade. 

Tim

Maksim Donchenko

unread,
Jun 19, 2023, 3:02:49 AM6/19/23
to DSpace Technical Support
Version 7.5 has another bug with search filters, so I can't update it yet. Is it possible to somehow fix the bug with the translation messages of the Cookie notification?

Maksim Donchenko


пятница, 16 июня 2023 г. в 17:22:13 UTC+3, DSpace Technical Support:

DSpace Technical Support

unread,
Jul 5, 2023, 1:10:19 PM7/5/23
to DSpace Technical Support
Hi,

Yes, it would be possible to *manually* patch the Cookie notification bug in DSpace 7.4, if you cannot upgrade.  You'd have to manually apply the changes in the bug fix at https://github.com/DSpace/dspace-angular/pull/2031.   The changes should be visible at https://github.com/DSpace/dspace-angular/pull/2031/files

Tim

Reply all
Reply to author
Forward
0 new messages