Skip to content

Translation procedure

Henriette Steenhoff edited this page Sep 11, 2019 · 17 revisions

This page describes the procedure one has to go through in order to add a new field to the translation sheet and successfully update the translation sheet within ClimApp.

As the procedure is not finalized yet, this page will be updated continuously during the following days

Structure of the translation sheet

Panes

Pane Description Needed to update translations?
template An overview of the content of the translation sheet -
planning The master file including all information about the different text used in ClimApp and suggested ids ✔️
text All single word text in ClimApp ✔️
toasts All toast text ClimApp ✔️
wheels All text related to wheels in ClimApp ✔️
list_options Option to choose from (used in planning) -

Planning sheet content

planning

Field Description Comments
text type select by using drop down
page name select by using drop down
wheel name this is done to make it easier to identify the place in the code that needs to be updated
text the actual text to be added in the application
current_id
suggested_id
static/API/system select by using drop down
concatednated text?
logic dependent on text?

How to add new text

  • Open the translation sheet
  • Go to the pane planning and fill out:
    • text type - use the drop down menu
    • page name - the page where the information currently exist (use the drop down menu)
    • wheel name (optional) only if the content you are creating is for a new wheel
    • text - the actual text you want to add
    • current_id - the ID (if it exist) used in the code base
    • suggested_id (auto-filled) the suggested ID based on the information you provided
    • static/API/system - and indication of what type of text you are filling out
      • static - text that is not changed
      • API - text field that will be updated by third-party (API)
      • system - a text value only used within the system
    • Concatenated_text? (0/1) - an indication of whether the text will be concatednated with other text (as this might increase the complexity of the implementation)
    • Logic dependent on text? (1/0) - an indication of whether the raw text is used directly in conjunction with any part of the code logic (if so, it is important that, if the text is changed, the dependet code is also changed)
  • Based on whether your new text is for a wheel, general text or a toast, add the text to the associated pane strings, toasts or wheels
  • Add the translations for all languages available
  • If the translations has not already been approved, get the translations approved by xx

Updating the ClimApp JSON translation file

For developers

  • Convert the pane(s) with new information to a .csv-file by clicking File -> Download -> Comma separated values (.csv)
  • Save the file in the xx folder
  • Run the convertTranslationstoJSONfromCSV.py file (it will generate a translations.json file.
  • Before moving the file to the ClimApp project
    • Move the current translations.json file from ClimAppPath/translations to ClimAppPath/translations/arhcive
    • Copy the generated translations.json to path in ClimAppPath/translations
  • Run the application to test that the new translation have been added as expected

Clone this wiki locally