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
description: Frontend translation workflow using Lingui - extracting, adding, and compiling translations for all supported languages
4
+
---
5
+
6
+
# Frontend Translation Workflow (Lingui)
7
+
8
+
IMPORTANT: Always update translations as you develop features. When adding new translatable strings, immediately add translations for all supported languages.
9
+
10
+
## Core Commands
11
+
12
+
```bash
13
+
cd frontend
14
+
15
+
# Extract translatable strings (use --clean for accurate counts)
16
+
yarn messages:extract --clean
17
+
18
+
# Compile translations for production
19
+
yarn messages:compile
20
+
21
+
# Check for untranslated strings
22
+
cd scripts && ./list_untranslated_strings.sh
23
+
```
24
+
25
+
## Process
26
+
27
+
1.**Extract**: `yarn messages:extract --clean`
28
+
2.**Check**: Look at the output table for missing translation counts
29
+
3.**Add translations**: Update the `.po` files for each language
30
+
4.**Verify**: Run extract again to confirm 0 missing
31
+
5.**Compile**: `yarn messages:compile`
32
+
33
+
## Adding Translations
34
+
35
+
Add entries to each locale's `.po` file in `frontend/src/locales/`:
36
+
37
+
```po
38
+
#: src/path/to/component.tsx:123
39
+
msgid "Your English String"
40
+
msgstr "Translated String"
41
+
```
42
+
43
+
## Supported Languages
44
+
45
+
| Code | Language |
46
+
|------|----------|
47
+
| en | English (source - no translation needed) |
48
+
| de | Deutsch |
49
+
| es | Espanol |
50
+
| fr | Francais |
51
+
| pt | Portugues |
52
+
| pt-br | Portugues do Brasil |
53
+
| it | Italiano |
54
+
| nl | Nederlands |
55
+
| zh-cn | Simplified Chinese |
56
+
| zh-hk | Traditional Chinese (HK) |
57
+
| vi | Tieng Viet |
58
+
| ru | Russian (currently untranslated) |
59
+
60
+
## Troubleshooting
61
+
62
+
-**Counts seem wrong**: Use `--clean` flag to remove obsolete entries
63
+
-**Translation not appearing**: Run `yarn messages:compile` after adding
64
+
-**Syntax errors**: Check for proper escaping of quotes in `.po` files
description: Frontend translation workflow using Lingui - extracting, adding, and compiling translations for all supported languages
4
-
---
5
-
6
-
# Frontend Translation Workflow (Lingui)
7
-
8
-
IMPORTANT: Always update translations as you develop features. When adding new translatable strings, immediately add translations for all supported languages.
9
-
10
-
## Core Commands
11
-
12
-
```bash
13
-
cd frontend
14
-
15
-
# Extract translatable strings (use --clean for accurate counts)
16
-
yarn messages:extract --clean
17
-
18
-
# Compile translations for production
19
-
yarn messages:compile
20
-
21
-
# Check for untranslated strings
22
-
cd scripts && ./list_untranslated_strings.sh
23
-
```
24
-
25
-
## Process
26
-
27
-
1.**Extract**: `yarn messages:extract --clean`
28
-
2.**Check**: Look at the output table for missing translation counts
29
-
3.**Add translations**: Update the `.po` files for each language
30
-
4.**Verify**: Run extract again to confirm 0 missing
31
-
5.**Compile**: `yarn messages:compile`
32
-
33
-
## Adding Translations
34
-
35
-
Add entries to each locale's `.po` file in `frontend/src/locales/`:
36
-
37
-
```po
38
-
#: src/path/to/component.tsx:123
39
-
msgid "Your English String"
40
-
msgstr "Translated String"
41
-
```
42
-
43
-
## Supported Languages
44
-
45
-
| Code | Language |
46
-
|------|----------|
47
-
| en | English (source - no translation needed) |
48
-
| de | Deutsch |
49
-
| es | Espanol |
50
-
| fr | Francais |
51
-
| pt | Portugues |
52
-
| pt-br | Portugues do Brasil |
53
-
| it | Italiano |
54
-
| nl | Nederlands |
55
-
| zh-cn | Simplified Chinese |
56
-
| zh-hk | Traditional Chinese (HK) |
57
-
| vi | Tieng Viet |
58
-
| ru | Russian (currently untranslated) |
59
-
60
-
## Troubleshooting
61
-
62
-
-**Counts seem wrong**: Use `--clean` flag to remove obsolete entries
63
-
-**Translation not appearing**: Run `yarn messages:compile` after adding
64
-
-**Syntax errors**: Check for proper escaping of quotes in `.po` files
1
+
see @../../../.agents/skills/translations/SKILL.md
0 commit comments