Skip to content

3. 🌐 i18n & l10n development workflows

Romek Goj edited this page Feb 22, 2024 · 3 revisions

Introduction

This page describes some of the development workflows for internationalisation (i18n) and localisation (l10n) in Maptio. It is intended for developers. For an overview of localisation geared towards translators, please see the 🌎 Translating Maptio page.

Current status of translations in Maptio

We currently have 5 localised versions of Maptio:

  • English,
  • French,
  • German,
  • Japanese,
  • and Polish.

None of them are perfect translations, but large sections of the app are already fully translated.

Over time, we want to reach a point where the app is fully translated. Our current approach is to maintain all of the i18n-related code and add internationalise any new code. For now, we agreed not to spend significant amounts of time maintaining translations as the source strings change as this would consume a significant amount of time, slowing the development process.

That said, we do want to make sure that at any point in time, the app is ready to accept translations, i.e. should the need arise for a new language to be added or translations for an existing language improved, this should be easy for a translator to do in Weblate (see below) with minimal development effort (i.e. only downloading the translations, testing and deploying the app).

Current workflow

Maptio has two main components that are internationalised:

  • the Maptio app itself
  • the emails that are sent to users.

We use the standard Angular workflow for inernationalising the app, i.e. the @angular/localize package.

To facilitate the localisation work, we use the open source service Weblate. We have instructions for using Weblate here.

We've got a number of scripts to make the i18n development experience better.

Here is a typical i18n workflow:

  • Extract translatable strings from the app with npm run i18n:extract
  • Examine the resulting messages.xlf file and commit it
  • Upload the messages.xlf file to Weblate with npm run i18n:upload
  • Ask translators for translations of any new / changed strings
  • Download the translations from Weblate with npm run i18n:download
  • Commit the downloaded messages files, test, and deploy the app