|
1 | 1 | # Internationalisation support |
2 | 2 |
|
| 3 | +## Before you start |
| 4 | + |
| 5 | +It's highly recommended that you spin up a development instance of this project |
| 6 | +on your docker capable server. It's pretty easy: |
| 7 | + |
| 8 | +```bash |
| 9 | +git clone https://github.com/NginxProxyManager/nginx-proxy-manager.git |
| 10 | +cd nginx-proxy-manager |
| 11 | +./scripts/start-dev -f |
| 12 | +``` |
| 13 | + |
| 14 | +Then after a while, you can access http://yourserverip:3081 |
| 15 | + |
| 16 | +This stack will watch the file system for changes, especially to language files, |
| 17 | +and reload the site you have open in the browser. |
| 18 | + |
| 19 | + |
3 | 20 | ## Adding new translations |
4 | 21 |
|
5 | 22 | Modify the files in the `src` folder. Follow the conventions already there. |
6 | 23 |
|
| 24 | +When the development stack is running, it will sort the locale lang files |
| 25 | +for you when you save. |
| 26 | + |
7 | 27 |
|
8 | 28 | ## After making changes |
9 | 29 |
|
10 | | -You will need to run `yarn locale-compile` in this frontend folder for |
| 30 | +If you're NOT running the development stack, you will need to run |
| 31 | +`yarn locale-compile` in the `frontend` folder for |
11 | 32 | the new translations to be compiled into the `lang` folder. |
12 | 33 |
|
13 | | -When running in dev mode, this should automatically happen within Vite. |
14 | 34 |
|
| 35 | +## Adding a whole new language |
15 | 36 |
|
16 | | -## Checking for missing translations in other languages |
| 37 | +There's a fair bit you'll need to touch. Here's a list that may |
| 38 | +not be complete by the time you're reading this: |
17 | 39 |
|
18 | | -Run `node check-locales.cjs` in this frontend folder. |
| 40 | +- frontend/src/locale/src/[yourlang].json |
| 41 | +- frontend/src/locale/src/lang-list.json |
| 42 | +- frontend/src/locale/src/HelpDoc/* |
| 43 | +- frontend/src/locale/IntlProvider.tsx |
19 | 44 |
|
20 | 45 |
|
21 | | -## Adding new languages |
| 46 | +## Checking for missing translations in languages |
22 | 47 |
|
23 | | -todo |
| 48 | +Run `node check-locales.cjs` in this frontend folder. |
0 commit comments