You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/instructions/gui_translation_instructions.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,19 +34,25 @@ then translated into language-specific `.po` files, which are compiled into bina
34
34
1.**Extract missing translations**: Execute `python extract_missing_translations.py` in the project root directory.
35
35
The script automatically detects all existing languages and creates/updates `missing_translations_<lang_code>.txt` files in the root directory.
36
36
37
-
1.**Translate strings**: Open each `missing_translations_<lang_code>.txt` file and translate the strings from English to the target language.
37
+
1.**Translate strings in-place**: Open each `missing_translations_<lang_code>.txt` file and **directly replace**the English text with the target language translation.
38
38
Follow the translation guidelines defined below.
39
39
40
-
**IMPORTANT**: The translation files contain lines in the format `line_number:English text`.
41
-
You must replace the English text with the translated text, keeping the line number and colon.
40
+
**CRITICAL**: Do NOT create new files. You must edit the original `missing_translations_<lang_code>.txt` files in-place.
41
+
The translation files contain lines in the format `line_number:English text`.
42
+
You must replace the English text with the translated text, keeping the line number and colon exactly as they are.
42
43
43
44
Example:
44
45
45
46
```text
46
-
Original: 3614:Copy vehicle image from template
47
-
Correct: 3614:Copiar imagem do veículo do modelo
47
+
Before: 3614:Copy vehicle image from template
48
+
After: 3614:Copiar imagem do veículo do modelo
48
49
```
49
50
51
+
**Do NOT do this**:
52
+
- Creating files with names like `missing_translations_<lang_code>_translated.txt`
53
+
- Changing the line numbers
54
+
- Removing the colon separator
55
+
50
56
1.**Insert translations**: Execute `python insert_missing_translations.py` in the project root directory.
51
57
The script automatically processes all language files and inserts the translated strings into their respective `.po` files in `ardupilot_methodic_configurator/locale/<lang_code>/LC_MESSAGES/`.
0 commit comments