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: .claude/rules/frontend/translations.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,16 @@ Guidelines for implementing translations and internationalization in the fronten
14
14
3. Always use plain English text in translation markers
15
15
4. Don't hardcode text without proper translation wrappers
16
16
5. Use "Sentence case" for everything (buttons, menus, headings, etc.)
17
-
6.**Lingui macros work in `shared-webapp/ui` components**. The SWC plugin runs in source-build mode across all workspace packages, and each self-contained system's `createLinguiConfig()` includes `shared-webapp/ui/**/*.{ts,tsx}` in its extraction scope. This means every shared UI component auto-generates catalog entries in every self-contained system (main, account, back-office) independently. Prefer macros over threading translatable text through props -- only accept a text prop when a consumer genuinely needs to override the default (e.g., context-specific wording). Note: shared strings must be translated in every self-contained system's `*.po` files -- translation workflow must keep all three self-contained systems in sync
17
+
6.**Catalogs are split between the shared component library and each self-contained system**:
18
+
- Markers in `application/shared-webapp/ui/**` extract to `application/shared-webapp/ui/translations/locale/{locale}.po` — one shared catalog used by every app
19
+
- Markers in `application/<system>/WebApp/**` extract to that system's `shared/translations/locale/{locale}.po`
20
+
- At runtime, `createFederatedTranslation` merges them: shared underneath, system on top, federated remote (e.g. account loaded into main) on top of that
21
+
- Translate each shared string **once** in the shared catalog, not in every system's catalog
22
+
- Prefer Lingui macros inside `shared-webapp/ui` components over threading translatable text through props -- only accept a text prop when a consumer genuinely needs to override the default (e.g., context-specific wording)
18
23
7. Translation workflow:
19
-
- Translation files are in `shared/translations/locale/` (e.g., `da-DK.po`, `en-US.po`)
20
-
- After adding/changing `<Trans>` or t\`\` markers, the `*.po` files are auto-generated/updated by the build system
21
-
- Don't manually add or remove entries to `*.po` files
22
-
- After auto-generation, translate all new/updated entries in `*.po` files for all supported languages
23
-
- Only translate `msgstr` values—never change `msgid` values
24
+
- After adding/changing `<Trans>` or t\`\` markers, the `*.po` files are auto-regenerated on build
25
+
- Don't manually add or remove `msgid` entries -- only translate `msgstr` values
26
+
- After auto-generation, translate all new/updated entries for all supported languages
24
27
8.**Use correct language-specific characters** in translations -- e.g., Danish requires æøå/ÆØÅ, not ae/oe/aa substitutes. Never approximate with ASCII equivalents
25
28
9. Don't translate fully dynamic content such as variable values or dynamic text
Copy file name to clipboardExpand all lines: application/account/WebApp/shared/translations/locale/da-DK.po
-79Lines changed: 0 additions & 79 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,6 @@ msgstr ""
13
13
"Plural-Forms: \n"
14
14
"X-Generator: @lingui/cli\n"
15
15
16
-
#. placeholder {0}: -diffDays
17
-
msgid"{0, plural, one {# day ago} other {# days ago}}"
18
-
msgstr"{0, plural, one {for # dag siden} other {for # dage siden}}"
19
-
20
16
#. placeholder {0}: result.value
21
17
msgid"{0, plural, one {# hour ago} other {# hours ago}}"
22
18
msgstr"{0, plural, one {# time siden} other {# timer siden}}"
@@ -64,9 +60,6 @@ msgstr "{0}/måned"
64
60
msgid"{deletedCount} users permanently deleted"
65
61
msgstr"{deletedCount} brugere slettet permanent"
66
62
67
-
msgid"{diffDays, plural, one {In # day} other {In # days}}"
68
-
msgstr"{diffDays, plural, one {Om # dag} other {Om # dage}}"
69
-
70
63
msgid"{price}/month"
71
64
msgstr"{price}/måned"
72
65
@@ -479,9 +472,6 @@ msgstr "Bunddrawer"
479
472
msgid"Bottom sheet"
480
473
msgstr"Bundsheet"
481
474
482
-
msgid"Breadcrumb"
483
-
msgstr"Brødkrumme"
484
-
485
475
msgid"Breadcrumb — custom separator"
486
476
msgstr"Brødkrumme — brugerdefineret skilletegn"
487
477
@@ -665,12 +655,6 @@ msgstr "By"
665
655
msgid"Clear"
666
656
msgstr"Ryd"
667
657
668
-
msgid"Clear date"
669
-
msgstr"Ryd dato"
670
-
671
-
msgid"Clear dates"
672
-
msgstr"Ryd datoer"
673
-
674
658
msgid"Clear filters"
675
659
msgstr"Ryd filtre"
676
660
@@ -683,15 +667,9 @@ msgstr "Klik på en række for at åbne sidepanelet. Brug Shift eller Cmd/Ctrl s
683
667
msgid"Close"
684
668
msgstr"Luk"
685
669
686
-
msgid"Close menu"
687
-
msgstr"Luk menu"
688
-
689
670
msgid"Close recipe details"
690
671
msgstr"Luk opskriftsdetaljer"
691
672
692
-
msgid"Close sidebar"
693
-
msgstr"Luk sidemenu"
694
-
695
673
msgid"Close user profile"
696
674
msgstr"Luk brugerprofil"
697
675
@@ -794,9 +772,6 @@ msgstr "Land"
794
772
msgid"Create"
795
773
msgstr"Opret"
796
774
797
-
msgid"Create <0>{search}</0>"
798
-
msgstr"Opret <0>{search}</0>"
799
-
800
775
msgid"Create new account"
801
776
msgstr"Opret ny konto"
802
777
@@ -893,9 +868,6 @@ msgstr "Afslå"
893
868
msgid"Declining..."
894
869
msgstr"Afslår..."
895
870
896
-
msgid"Decrease"
897
-
msgstr"Formindsk"
898
-
899
871
msgid"Default"
900
872
msgstr"Standard"
901
873
@@ -1023,9 +995,6 @@ msgstr "Slip et billede i et vilkårligt kort — AspectRatio holder feltet fast
1023
995
msgid"Drop anywhere to add to the gallery"
1024
996
msgstr"Slip et vilkårligt sted for at tilføje til galleriet"
1025
997
1026
-
msgid"Drop files here, or click to browse"
1027
-
msgstr"Slip filer her, eller klik for at vælge"
1028
-
1029
998
msgid"Drop your filter controls here. The sheet handles scrolling and dismissal."
1030
999
msgstr"Placér dine filterkontroller her. Sheet håndterer scrolling og lukning."
1031
1000
@@ -1266,12 +1235,6 @@ msgstr "Gå til kontoindstillinger"
1266
1235
msgid"Go to home"
1267
1236
msgstr"Gå til forsiden"
1268
1237
1269
-
msgid"Go to next page"
1270
-
msgstr"Gå til næste side"
1271
-
1272
-
msgid"Go to previous page"
1273
-
msgstr"Gå til forrige side"
1274
-
1275
1238
msgid"Google"
1276
1239
msgstr"Google"
1277
1240
@@ -1323,9 +1286,6 @@ msgstr "I selve appen er sidemenuen fixed-positioneret, gemmer sin tilstand og b
1323
1286
msgid"Include cooking notes"
1324
1287
msgstr"Inkluder tilberedningsnoter"
1325
1288
1326
-
msgid"Increase"
1327
-
msgstr"Forøg"
1328
-
1329
1289
msgid"Indeterminate"
1330
1290
msgstr"Ubestemt"
1331
1291
@@ -1524,9 +1484,6 @@ msgstr "Linkvarianter"
1524
1484
msgid"LinkedIn"
1525
1485
msgstr"LinkedIn"
1526
1486
1527
-
msgid"Loading"
1528
-
msgstr""
1529
-
1530
1487
msgid"Loading..."
1531
1488
msgstr"Indlæser..."
1532
1489
@@ -1647,9 +1604,6 @@ msgstr "Midte"
1647
1604
msgid"Mobile"
1648
1605
msgstr"Mobil"
1649
1606
1650
-
msgid"Mobile navigation menu"
1651
-
msgstr"Mobilnavigationsmenu"
1652
-
1653
1607
msgid"Mobile-first sheet with a drag handle and swipe-to-dismiss. Reach for it when content is short and the user should be able to flick it away. Left and right drawers are narrow by default; top and bottom span the full width unless you constrain DrawerContent with mx-auto and max-w-*."
1654
1608
msgstr"Mobile-first panel med trækhåndtag og swipe-to-dismiss. Brug det når indholdet er kort og brugeren skal kunne flicke det væk. Venstre- og højre-drawers er smalle som standard; top og bund spænder fuld bredde med mindre du begrænser DrawerContent med mx-auto og max-w-*."
0 commit comments