[NB: All of the following works only on Linux or macOS]


1/  Clean-up all .pyc files in rtds_dev/src:
    find . -name '*.pyc' | xargs rm


2/  Run PragmaDev Studio:
  - Open example Studio/Demo;
  - Open everything in it;
  - Open example Developer/Tutorial;
  - Open everything in it.


3/  Get all .pyc files and write the name of their corresponding .py file in a temporary file; in rtds_dev/src:
    find . -name '*.pyc' | sed -e 's/pyc$/py/' > translation_files.txt

  
4/  Still in rtds_dev/src, search in all these files the calls to _() and collate them in a second temporary file:
    grep "\b_\b[(]'[^']*'[)]" `cat translation_files.txt` | sed -e "s:^.*\b_\b[(]'\([^']*\)'[)].*$:\1:" >  .../rtds_rel/share/gui/lang/phrases-raw.txt
    grep '\b_\b[(]"[^"]*"[)]' `cat translation_files.txt` | sed -e 's:^.*\b_\b[(]"\([^"]*\)"[)].*$:\1:' >> .../rtds_rel/share/gui/lang/phrases-raw.txt

  
5/  Get new phrases to translate via:
    python extract-new-phrases.py XX.lang phrases-raw.txt > new-phrases-XX.txt
    in .../rtds_rel/share/gui/lang, with XX being the name of the language file you want to complete.


6/  Translate the phrases in new-phrases-XX.txt, replacing all the markers ######, then copy the whole contents of this file
    and paste it at the end of XX.lang, before the </dictionary> end tag.


7/  Optional, but highly recommended: sort the contents of the XX.lang file with:
    mv XX.lang XX-old.lang
    python sort_language_file.py XX-old.lang > XX.lang
    There should NOT be any message printed by the last command, or it means there are duplicate translations somewhere in the file.
    If there is, correct the issue: look for the duplicate translations in XX-old.lang, choose the best one and delete all the others.


8/  This misses a few strings, especially the menus => switch Studio to language XX, quit, then run it again with the proper environment variable to gather them:
    RTDS_UNKNOWN_WORDS_FILE=.../menu_entries.txt python runPragmadevStudio-xxx.py

  
9/  Do the same operations as in step 2; only the missing menu entries will be stored in menu_entries.txt


10/ Add the missing menu entries to the .lang file with their translation. Careful: the entries in the 'history' menus will appear in the file, but obviously do
    not need to be translated. Some already translated entries might also appear, so it's better to redo step 7 after that, removing all duplicates if there are
    any.
