Skip to content

Commit 34f38da

Browse files
authored
Backport the changes to translating the mod from 5.9.x to 5.8.5 (#67)
* Make some changes to translating the mod and fix minor issues * Fix other issues found
1 parent 04ff378 commit 34f38da

File tree

2 files changed

+22
-28
lines changed

2 files changed

+22
-28
lines changed

docs/en/Contributing/translate-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# **Translate the docs**
22

3-
If you want to contribute towards JourneyMap, a good way to do that is to translate the docs and the mod. This can help people that do not speak or not know how to read English, be able to read the JourneyMap docs in their own language.
3+
If you want to contribute towards JourneyMap, a good way to do that is to translate the docs and the mod. This can help people that do not speak or not know how to read English, be able to read the JourneyMap docs or play the JourneyMap mod in their own language.
44

55
Instructions on how to translate the mod can be found [here](translate-mod.md)
66

docs/en/Contributing/translate-mod.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# **Translate the mod**
22

3-
If you want to contribute towards JourneyMap, a good way to do that is to translate the docs and the mod. This can help people that do not speak or not know how to read English, be able to read the JourneyMap docs in their own language.
3+
If you want to contribute towards JourneyMap, a good way to do that is to translate the docs and the mod. This can help people that do not speak or not know how to read English, be able to read the JourneyMap docs or play the JourneyMap mod in their own language.
44

55
Instructions on how to translate the docs can be found [here](translate-docs.md)
66

@@ -15,65 +15,59 @@ This Git repository contains the latest language files for JourneyMap: **[Journe
1515

1616
If your language file does not yet exist:
1717

18-
1. Copy the en_US.lang file
19-
2. Rename it according the [[http://minecraft.gamepedia.com/Language Locale Code used by Mojang]]
18+
1. Copy the en_us.json file
19+
2. Rename it according the [Locale Code](https://minecraft.wiki/w/Language) used by Mojang
2020
3. Ensure it is saved with UTF-8 encoding (not ASCII or an ISO format)
2121

22-
The .lang file **must be saved in UTF-8 encoding** by using a text editor which can handle UTF-8 characters like [http://notepad-plus-plus.org/ Notepad Plus].
22+
The .json file **must be saved in UTF-8 encoding** by using a text editor which can handle UTF-8 characters like [Notepad Plus](https://notepad-plus-plus.org/).
2323

2424
If your language uses a character set which needs to be handled with Unicode characters, you can type them directly into the file. There is **no longer a need** to use Unicode hexadecimal Numeric Character Reference (NCR) codes (like \u0202).
2525

26-
**Example**: <code>jm.common.saving_map_to_file=Saving %1$s map to file...</code>
26+
**Example**: `"jm.common.saving_map_to_file": "Saving %1$s map to file..."`
2727

28-
<span style="color: red">**Incorrect**</span>: <code>jm.common.saving_map_to_file=\u8282\u80FD %1$s \u6620\u5C04\u5230\u6587\u4EF6...</code>
28+
<span style="color: red">**Incorrect**</span>: <code>"jm.common.saving_map_to_file": "\u8282\u80FD %1$s \u6620\u5C04\u5230\u6587\u4EF6..."</code>
2929

30-
<span style="color: green">**Correct**</span>: <code>jm.common.saving_map_to_file=节能 %1$s 映射到文件...</code>
30+
<span style="color: green">**Correct**</span>: <code>"jm.common.saving_map_to_file": 节能 %1$s 映射到文件..."</code>
3131

32-
## **III. How to translate the .lang file**
32+
## **III. How to translate the .json file**
3333

34-
- Open your new .lang file in a text editor which can handle UTF-8 characters like [http://notepad-plus-plus.org/ Notepad Plus]. You will see a series of **keys** and **phrases** separated by an equals (=) sign. For example:
34+
- Open your new .json file in a text editor which can handle UTF-8 characters like [Notepad Plus](https://notepad-plus-plus.org/). You will see a series of **keys** and **phrases** separated by an equals (:) sign. For example:
3535

36-
<code>jm.common.chat_announcement= &sect;eJourneyMap:&sect;f %1$s
37-
jm.common.mapgui_only_ready=Press [&sect;b%1$s&sect;f]. (Webserver disabled.)
38-
</code>
36+
`"jm.common.chat_announcement": "&sect;eJourneyMap:&sect;f %1$s"`
37+
`"jm.common.mapgui_only_ready": "Press [&sect;b%1$s&sect;f]. (Webserver disabled.)"`
3938

4039
The sample lines above have the **keys** of "jm.common.chat_announcement" and "jm.common.mapgui_only_ready".
4140

4241
- Translate each **phrase** from the English phrase to your language, but do NOT alter the message keys. (Only change the text which come **after** the equals ("=") sign.)
4342

44-
**Example**: <code>example.key=This is a phrase.</code>
43+
**Example**: <code>"example.key": "This is a phrase."</code>
4544

46-
<span style="color: green">**Correct**</span>: <code>example.key=Esta es una frase.</code>
45+
<span style="color: green">**Correct**</span>: <code>"example.key": "Esta es una frase."</code>
4746

48-
<span style="color: red">**Incorrect**</span>: <code>example.llave=Esta es una frase.</code>
47+
<span style="color: red">**Incorrect**</span>: <code>"example.llave": "Esta es una frase."</code>
4948

50-
- Many of the phrases contain one or more numbered **parameters**. For example: "%1$s", "%1$d", "%2$s", etc. These are placeholders which will be replaced with a value when the message is displayed. You may reorder these parameters if it is required by the grammar rules of your language.
49+
- Many of the phrases contain one or more numbered **parameters**. For example: "%1$s", "%1$d", "%2$s", etc. These are placeholders which will be replaced with a value when the message is displayed. You may reorder these parameters if it is required by the grammar rules of your language. For example:
5150

52-
For example:
53-
<code>
54-
jm.common.player_location=Location: %1$s , %2$s | Elevation: %3$s ( %4$s ) | Biome: %5$s
55-
</code>
51+
`"jm.common.player_location=Location": "%1$s , %2$s | Elevation: %3$s ( %4$s ) | Biome: %5$s"`
5652

5753
When the above phrase is used by JourneyMap, the parameters will be substituted with actual location information, like so:
5854

59-
<code>
60-
Location: 23,-98 | Elevation: 32 (2) | Biome: Desert
61-
</code>
55+
`Location: 23,-98 | Elevation: 32 (2) | Biome: Desert`
6256

6357
- If a phrase is missing from an existing language file, it will be prefixed with a "#" and have "???" as the phrase. You should remove the "#" prefix and then provide the correct phrase.
6458

65-
**Example**: <code># example.key=???</code>
59+
**Example**: <code># "example.key": "???"</code>
6660

67-
<span style="color: green">**Correct**</span>: <code>example.key=Esta es una frase.</code>
61+
<span style="color: green">**Correct**</span>: <code>"example.key": "Esta es una frase."</code>
6862

6963
- Do not add line breaks (carriage returns) or HTML to any of the phrases.
7064

7165
- Do not translate or remove the special character combinations used by Minecraft to change color. (&sect;b, &sect;f, &sect;e, etc.)
7266

7367
## **IV. How to test your translation**
7468

75-
1. Use a zip program like 7Zip to open your JourneyMap*.jar mod file.
76-
2. Navigate down to <code>/assets/journeymap/lang</code> and add your language file (if new) or replace the older one.
69+
1. Use a zip program like 7-Zip to open your JourneyMap*.jar mod file.
70+
2. Navigate down to `/assets/journeymap/lang` and add your language file (if new) or replace the older one.
7771
3. JourneyMap will use the language you select in Minecraft. Select your language in Minecraft, and JourneyMap will use your new translation.
7872
4. Please test your translation in Minecraft as best as you can. Don't worry about trying to provoke error messages, but please try to test as much as possible, including the Fullscreen Map controls (and tooltips), Options (and tooltips), and Web Map controls to confirm they are working.
7973

0 commit comments

Comments
 (0)