Skip to content

Commit 1ef73bd

Browse files
Update CONTRIBUTING.md
1 parent c49105e commit 1ef73bd

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

CONTRIBUTING.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
# Contributing
22

33
## Translating
4+
> [!NOTE]
5+
> For each missing/empty translation string, there will be a warning in the console.
6+
47
For translations, the target language of this site is English, so you should base your translations off of that.
58

69
under [/src/Assets/L10N](/src/Assets/L10N) there are JSON files for the existing supported languages.
7-
For adding your own, copy the en-us.json file and rename it with the correct locale code for the targeted language. (e.g Japanese would be `ja.json`)
10+
For adding your own, copy the [en-us.json](/src/Assets/L10N/en-us.json) file and rename it with the correct locale code for the targeted language. (e.g Japanese would be `ja.json`)
811

9-
To have the language work on the site, go to [main.ts](/src/main.ts#L29) and add a new line.
12+
To have the language work on the site, add the language translation to the JSON file, then go to [main.ts](/src/main.ts#L29) and add a new line.
1013
The line should look like this (using Japanese as an example):
1114
```register('ja', () => import('./Assets/L10N/ja.json'));```
1215

1316
Which boils down to:
14-
```register('locale-code', () => import('./Assets/L10N/locale-code.json'));```
17+
```register('language-code', () => import('./Assets/L10N/language-code.json'));```
18+
19+
To find a list of Language Codes using Firefox, go to `about:preferences`, search `language`, and choose `Choose your preferred language for displaying pages`, then find your language and look at the code (in the square brackets)
20+
21+
You can also find the language code of the currently used Navigator language by opening devtools and typing `console.log(navigator.language);`.
22+
23+
After verifying that the translations show correctly, and following the [guidelines](#guidelines), you can add yourself to [the credits](/src/App.svelte#L80) and then make a pull request to submit the translation.
1524

16-
For each missing/empty translation string, there will be a warning in the console.
25+
### Guidelines
26+
1. Do not translate "`Project Lodestone`"
27+
2. Do not translate the Edition names unless an edition had official translations that clearly show how it's meant to be translated.
1728

18-
After verifying that the translations show correctly on the site, you can add yourself to [the credits](/src/App.svelte#L80) and then make a pull request to submit the translation.

0 commit comments

Comments
 (0)