-
Notifications
You must be signed in to change notification settings - Fork 31
Adding Translations to Dashboards
Iván Perdomo edited this page Dec 12, 2019
·
2 revisions
Below, we describe the different steps in the process to add new translation keys.
- In the code, we use translatable string keys starting with an underscore, such as
_please_click_save
- After the code is saved, we generate translation strings by scanning the whole code for such strings, and put the resulting keys in the file
GAE/src/locale/ui-strings.properties
in alphabetical order. The translate process also creates theen.properties
file from all key-value pairs inui-strings.properties
.
docker-compose exec akvo-flow /app/src/ci/run-as-user.sh bash
cd GAE
mvn exec:java -Dexec.mainClass="services.TranslationGenerator" -Dexec.args="/app/src/Dashboard/app /app/src/GAE/src/locale"
- When this is complete, the text value for the key (in this case
Please click save
) is added manually to theui-strings.properties
file. - After adding the value, we run the translate process again again, so the newly added values are copied to the
en.properties
file - In the Transifex translation ui, the resource file en.properties is reloaded, and new translation keys can be translated by native speakers. This process results in new translation files, in this case
fr.properties
andes.properties
. The whole process is described in the Transifex section below. - The new translation files
fr.properties
andes.properties
are added to theGAE/src/locale
folder and committed to the repo.
- In the Transifex home screen, click on the
Akvo-FLOW
project - Click
Resource
on the top right. - Click on
Akvo FLOW Admin ui
in the list. This will display all three languages - Click one of the languages, and select
View strings online
. This will show a translation user interface with all translatable strings on the left - Select
Untranslated
at the top. This will show only the untranslated strings - Select an item in the left column, and provide a translation in the middle column. When done, save it.
- Click the
Akvo FLOW project
, and select one of the languages, for example Spanish - Click 'Akvo FLOW admin ui', and select 'Download for use'. this will download a
for_use_akvo-flow_akvo-flow-admin-ui_es.properties.properties
file for that language. - Rename the file to just the two-letter code (
es.properties
), and store it in theGAE/src/locale
folder. - Repeat 1..3 for all languages, except the source language
- Commit the new translations to the repo.
No idea.
About Akvo Flow
Akvo Flow API
Developer Guides
- Deployments
- Development tools
- Android emulator setup
- Creating New Dashboard Instances
- Disabling Dashboard Instances
- Adding Translations to Dashboards
- Setup your development environment with IntelliJ IDEA
- Setup your development environment on Windows OS
Technical Specification
Regression Tests