Skip to content

Commit 2d00693

Browse files
authored
Merge pull request #837 from nscuro/i18n-docs
Add i18n documentation
2 parents 467e149 + 18e99f4 commit 2d00693

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed
117 KB
Loading
124 KB
Loading
16.9 KB
Loading

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,53 @@ for this scenario, simply change the value of API_BASE_URL in static/config.json
8181

8282
## Internationalization (i18n)
8383

84-
This project supports internationalization. Currently, only English language is supported. Pull requests to support additional languages are encouraged.
84+
This project supports internationalization. Supported languages are:
8585

86-
Note to developers: Textual labels are defined in `src/i18n/locales/{lang}.json`. Ensure that all labels are defined here and that components use i18n, not textual labels directly.
86+
- 🇩🇪 [German](src/i18n/locales/de.json)
87+
- 🇺🇸 [English](src/i18n/locales/en.json)
88+
- 🇪🇸 [Spanish](src/i18n/locales/es.json)
89+
- 🇫🇷 [French](src/i18n/locales/fr.json)
90+
- 🇮🇳 [Hindi](src/i18n/locales/hi.json)
91+
- 🇮🇹 [Italian](src/i18n/locales/it.json)
92+
- 🇯🇵 [Japanese](src/i18n/locales/ja.json)
93+
- 🇵🇱 [Polish](src/i18n/locales/pl.json)
94+
- 🇵🇹 [Portuguese](src/i18n/locales/pt.json)
95+
- 🇧🇷 [Portuguese (Brazil)](src/i18n/locales/pt-BR.json)
96+
- 🇷🇺 [Russian](src/i18n/locales/ru.json)
97+
- 🇺🇦 [Ukrainian](src/i18n/locales/uk-UA.json)
98+
- 🇨🇳 [Chinese](src/i18n/locales/zh.json)
99+
100+
Pull requests to add support for additional languages, or improve existing
101+
ones are highly encouraged.
102+
103+
> [!NOTE]
104+
> The core maintainers are currently able to support English and German.
105+
> Other languages rely on community contributions, and will be subject to
106+
> machine translation otherwise.
107+
108+
Dependency-Track tries to detect the language preference from the user's browser.
109+
If no matching language is available, it will fall back to English.
110+
111+
Users can customize their language preference via the profile dropdown menu:
112+
113+
![Profile dropdown menu with language picker](.github/images/i18n_language-picker.png)
114+
115+
> [!NOTE]
116+
> The page may need to be reloaded in order for the language preference to take
117+
> affect across all elements of the application.
118+
119+
### Adding or Improving Translations
120+
121+
Translations are defined in `src/i18n/locales/{lang}.json`, for example [en.json](src/i18n/locales/en.json).
122+
We recommend using [VS Code] with the [i18n Ally] extension when working on translation.
123+
The extension provides an overview of translation progress across all languages:
124+
125+
![Translation progress in i18n Ally](.github/images/i18n_i18n-ally-progress.png)
126+
127+
In case of missing translations, it is possible to translate automatically using Google Translate.
128+
To do this, hover over the _No Translation_ item of a language, and click the globe icon:
129+
130+
![Machine translation in i18n Ally](.github/images/i18n_i18n-ally-translate.png)
87131

88132
## Copyright & License
89133

@@ -93,3 +137,5 @@ Permission to modify and redistribute is granted under the terms of the
93137
Apache 2.0 license. See the [LICENSE] file for the full license.
94138

95139
[License]: https://github.com/DependencyTrack/frontend/blob/master/LICENSE
140+
[VS Code]: https://code.visualstudio.com/
141+
[i18n Ally]: https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally

0 commit comments

Comments
 (0)