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: docs/i18n.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,13 @@ The OSF Angular project uses [`@ngx-translate/core`](https://github.com/ngx-tran
18
18
19
19
All strings rendered to users—whether in HTML templates or dynamically via Angular components—must be sourced from the centralized i18n JSON files located in:
20
20
21
-
**IMPORTANT**
22
-
The OSF application must maintain 100% translation coverage, as it is a requirement of grant funding that supports a globally distributed user base.
23
-
24
21
```
25
22
src/app/i18n/
26
23
```
27
24
25
+
**IMPORTANT**
26
+
The OSF application must maintain 100% translation coverage, as it is a requirement of grant funding that supports a globally distributed user base.
27
+
28
28
## Integration: `@ngx-translate/core`
29
29
30
30
To support multilingual content, the following module is included globally:
@@ -74,7 +74,7 @@ The structure should be **namespaced by feature or component** for maintainabili
74
74
{
75
75
"home": {
76
76
"title": "Welcome to OSF",
77
-
"subtTtle": "Your research. Your control."
77
+
"subTitle": "Your research. Your control."
78
78
},
79
79
"login": {
80
80
"email": "Email Address",
@@ -85,11 +85,15 @@ The structure should be **namespaced by feature or component** for maintainabili
85
85
86
86
Avoid deeply nested keys, and always use consistent camel-casing and key naming for reuse and clarity.
87
87
88
+
**Note**
89
+
90
+
The `common section` in the en.json file stores frequently used phrases to prevent one-off duplicate translations.
91
+
88
92
## Source of Truth: `en.json` Only
89
93
90
94
All translation key additions and updates must be made **only** in the `src/app/i18n/en.json` file.
91
95
92
-
> Other language files (e.g., `fr.json`, `es.json`) must **not** be modified manually. These translations will be handle internally by the OSF Angular team.
96
+
> Other language files (e.g., `fr.json`, `es.json`) must **not** be modified by non-OSF engineers. These translations will be handle internally by the OSF Angular team.
93
97
94
98
This ensures consistency across translations and prevents desynchronization between supported languages.
0 commit comments