[Archivesspace_Users_Group] how to add a new locale to ArchivesSpace?

Ron Van den Branden Ron.VandenBranden at antwerpen.be
Wed Dec 6 09:51:14 EST 2023


Hi all,
We're in the process of customizing the ArchivesSpace (3.4.1) staff interface for use in a Dutch-speaking context. We would like to translate the back-end user interface to Dutch. So far, in order to gain speed, we've resorted to tweaking the en.yml localization files with Dutch labels. In the longer run, hijacking "English" for another language feels like a hack, though.
The documentation for "customizing text" at https://archivesspace.github.io/tech-docs/customization/locales.html  does mention where strings can be customized in current locales, but not how new locales can be added. Simply adding new locale files for new languages, with according names and language codes, at the right locations doesn't seem to do the trick:

  *   either the language is not being offered in the list of available languages
  *   when additionally the new language is specified explicitly in the config/config.rb file as AppConfig[:locale] = :nl , this yields following error at startup:

JSONModel::ValidationException: #<:ValidationException: {:errors=>{"defaults/locale"=>["Invalid value 'nl'.  Must be one of: en, fr, de, ja, es"]}}>

                      validate at uri:classloader:/jsonmodel_type.rb:385

            with_validator_for at uri:classloader:/validator_cache.rb:41

...so there must be more to adding a new locale. Yet, we can't find where in the ArchivesSpace distribution code such a list of default locales can be found or edited.
We did find the file in the ArchivesSpace source tree at https://github.com/archivesspace/archivesspace/blob/master/common/aspace_i18n.rb#L28 which defines above list of locales This file can't be found in the distribution code, however, so it's not clear how it relates to the distribution code. The commit history also shows commits from the Weblate project at https://hosted.weblate.org/projects/archivesspace-interfaces/#languages, which contains additional languages Portuguese and Italian.
This leads to following questions:

  *   what's the mechanism for adding a new locale to an ArchivesSpace instance?
  *   if our translations would reach a stage of being of broader interest, what would be the procedure for contributing them?

Kind regards,
Ron


Ron Van den Branden | functioneel analist - applicatiebeheerder Letterenhuis

Stad Antwerpen | Talentontwikkeling en Vrijetijdsbeleving |  Boeken en Letteren

Minderbroedersstraat 22, 2000 Antwerpen

Grote Markt 1, 2000 Antwerpen

gsm +32 0485 02 80 50 | tel. +32 3 222 93 30

letterenhuis.be<http://www.letterenhuis.be/> | instagram<https://www.instagram.com/letterenhuis/> | facebook<https://www.facebook.com/Letterenhuis>



Proclaimer

Vergissen is menselijk. Dus als deze e-mail, samen met eventuele bijlagen, niet voor u bestemd is, vragen we u vriendelijk om dat te melden aan de afzender. Deze e-mail en de bijlagen zijn namelijk officiële documenten van de stad Antwerpen. Ze kunnen vertrouwelijke of persoonlijke informatie bevatten. Als stad nemen we privacy heel serieus en willen we als een goede huisvader waken over de vertrouwelijkheid van documenten. Als u dit bericht per vergissing hebt ontvangen of ergens hebt gevonden, wees dan zo eerlijk om het meteen te verwijderen en het niet verder te verspreiden of te kopiëren.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20231206/9ab3101f/attachment-0001.html>


More information about the Archivesspace_Users_Group mailing list