readme.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. lang_upgrade - scripts for migration to new multilanguage support design
  2. upgrade.sh - entire process:
  3. Run scripts: clean.sh, make_msgs.sh, find_msgs.sh, make_source.sh.
  4. Backup (move) all language*.h and language*.cpp files from source to folder '../lang_backup'.
  5. Copy folder ./source/*.* to ../Firmware, new files will be messages.h, messages.c, language.h, language.c and other source will be replaced.
  6. After this step should be source compilable in english version, LANG_MODE in config.h is set to 0 (primary language only)
  7. 0. clean.sh
  8. delete all output files
  9. 1. make_msgs.sh
  10. Process all language_xx.h files and extract informations to msgs_xx.txt files in simple format.
  11. Every line in msgs_en.txt has following format: MSG_xx c=cc r=rr "text".
  12. Every line in other msgs_xx.txt has simpler format: MSG_xx "text".
  13. MSG_xx is original message identifier, cc is column count (originaly length) and rr is row count (originaly lines).
  14. Output files msgs_xx.txt are sorted by message identifier (ascending order).
  15. make_msgs.sh also reports number of messages in each language_xx.h file and total number of characters in program memory.
  16. 2. find_msgs.sh
  17. Find usage of each message and output listing in to file msgs_usage.txt in format: MSG_xx nn.
  18. MSG_xx is identifier, nn is number of occurrences. Output is sorted by number of occurrences (ascending order).
  19. Generate filtered msgs_en.txt and msgs_common.txt files. Each file is sorted to three output files - unused, used once and used more.
  20. Output files will be:
  21. msgs_common_unused.txt, msgs_common_used_more.txt, msgs_common_used_once.txt
  22. msgs_en_unused.txt, msgs_en_used_more.txt, msgs_en_used_once.txt
  23. 3. make_source.sh
  24. Copy all source files to folder ./source
  25. Replace all messages used once in all ./source/*.c* files directly with the english version string constant and comment at end of line.
  26. Generate messages.h and messages.c source files with messages used twice and more.
  27. Replace line '' in Marlin_main.cpp with comment.