Skip to content

Commit 3c8b372

Browse files
authored
Backport adding a way to translate the navigation sidebar from 5.9.x to 5.8.5 (#77)
* feat: add the ability to translate the navigation bar Adds the ability to translate the navigation bar to a different langauge * fix: fix a bunch of markdown issues Fix a bunch issues relating to using HTML in markdown, and convert code to use markdown rather than HTML
1 parent 4b33f91 commit 3c8b372

File tree

7 files changed

+129
-21
lines changed

7 files changed

+129
-21
lines changed

config/mkdocs.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ theme:
99
name: material
1010
custom_dir: ../overrides
1111
features:
12+
- content.code.copy
1213
- search.highlight
1314
- search.suggest
1415
palette:
@@ -61,6 +62,53 @@ plugins:
6162
default: true
6263
name: English
6364
build: true
65+
nav_translations:
66+
Home: Home
67+
About: About
68+
Credits: Credits
69+
Licensing: Licensing
70+
Support: Support
71+
Client Docs: Client Docs
72+
Installing: Installing
73+
Basic Usage: Basic Usage
74+
Full-Screen Map: Full-Screen Map
75+
Settings: Settings
76+
Overview: Overview
77+
Grid: Grid
78+
Minimap: Minimap
79+
Minimap Position: Minimap Position
80+
Full-Screen Map: Full-Screen Map
81+
Webmap: Webmap
82+
Waypoint: Waypoint
83+
Waypoint Beacons: Waypoint Beacons
84+
Cartography: Cartography
85+
Advanced Options: Advanced Options
86+
Waypoints: Waypoints
87+
Server Docs: Server Docs
88+
Installing: Installing
89+
Basic Usage: Basic Usage
90+
Commands: Commands
91+
Waypoint: Waypoint
92+
Settings: Settings
93+
Overview: Overview
94+
Global Properties: Global Properties
95+
Default Dimension Properties: Default Dimension Properties
96+
Dimension - minecraft:overworld: Dimension - minecraft:overworld
97+
Dimension - minecraft:the_nether: Dimension - minecraft:the_nether
98+
Dimension - minecraft:the_end: Dimension - minecraft:the_end
99+
Multiplayer: Multiplayer
100+
Endpoints: Endpoints
101+
Waypoint: Waypoint
102+
Tools & Customisation: Tools & Customisation
103+
Custom Mob Icons: Custom Mob Icons
104+
Integrate your mod: Integrate your mod
105+
JourneyMap Tools: JourneyMap Tools
106+
Map a multiplayer server: Map a multiplayer server
107+
Topographic: Topographic
108+
UI Themes: UI Themes
109+
Contributing: Contributing
110+
Translate the mod: Translate the mod
111+
Translate the docs: Translate the docs
64112
- mike:
65113
version_selector: true
66114
- search

docs/en/Contributing/translate-docs.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You will have to make a few changes to the `mkdocs.yml` file in the config folde
1313
1. Opening the `mkdocs.yml` file in the config folder
1414
2. Scroll down until you see the variable name `languages` and input a new line like this:
1515

16-
```diff
16+
```diff title="mkdocs.yml"
1717
languages:
1818
- locale: en
1919
default: true
@@ -27,9 +27,68 @@ You will have to make a few changes to the `mkdocs.yml` file in the config folde
2727

2828
```
2929

30+
3\. You will also have to add translations to the navigation elements for French. To do this, please copy and paste the `nav_translations` section from the English to the French section. Here is an example:
31+
32+
```diff title="mkdocs.yml"
33+
- locale: fr
34+
default: false
35+
name: Français
36+
build: true
37+
+ nav_translations:
38+
+ Home: Home
39+
+ About: About
40+
+ Credits: Credits
41+
+ Licensing: Licensing
42+
+ Support: Support
43+
+ Client Docs: Client Docs
44+
+ Installing: Installing
45+
+ Basic Usage: Basic Usage
46+
+ Full-Screen Map: Full-Screen Map
47+
+ Settings: Settings
48+
+ Overview: Overview
49+
+ Grid: Grid
50+
+ Minimap: Minimap
51+
+ Minimap Position: Minimap Position
52+
+ Full-Screen Map: Full-Screen Map
53+
+ Webmap: Webmap
54+
+ Waypoint: Waypoint
55+
+ Waypoint Beacons: Waypoint Beacons
56+
+ Cartography: Cartography
57+
+ Advanced Options: Advanced Options
58+
+ Waypoints: Waypoints
59+
+ Server Docs: Server Docs
60+
+ Installing: Installing
61+
+ Basic Usage: Basic Usage
62+
+ Commands: Commands
63+
+ Waypoint: Waypoint
64+
+ Settings: Settings
65+
+ Overview: Overview
66+
+ Global Properties: Global Properties
67+
+ Default Dimension Properties: Default Dimension Properties
68+
+ Dimension - minecraft:overworld: Dimension - minecraft:overworld
69+
+ Dimension - minecraft:the_nether: Dimension - minecraft:the_nether
70+
+ Dimension - minecraft:the_end: Dimension - minecraft:the_end
71+
+ Multiplayer: Multiplayer
72+
+ Endpoints: Endpoints
73+
+ Waypoint: Waypoint
74+
+ Tools & Customisation: Tools & Customisation
75+
+ Custom Mob Icons: Custom Mob Icons
76+
+ Integrate your mod: Integrate your mod
77+
+ JourneyMap Tools: JourneyMap Tools
78+
+ Map a multiplayer server: Map a multiplayer server
79+
+ Topographic: Topographic
80+
+ UI Themes: UI Themes
81+
+ Contributing: Contributing
82+
+ Translate the mod: Translate the mod
83+
+ Translate the docs: Translate the docs
84+
+ Changelogs: Changelogs
85+
```
86+
87+
This codeblock includes English translations. In this case, you would need to translate the English words after the colon into French. I have left them English as an example.
88+
3089
!!! note "Note"
3190

32-
The instructions above only apply if you are translating to French. Please apply these intructions to the relative language you are translating to.
91+
The instructions above only apply if you are translating to French. Please apply these instructions to the relative language you are translating to.
3392

3493
## **Creating a new folder**
3594

docs/en/Tools and Customisation/custom-mob-icons.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ JourneyMap only comes with mob icons for Vanilla Minecraft mobs. (There's no mag
66

77
!!! note "Note"
88

9-
This section is for JourneyMap 5.2 and older. It is no longer relevant for JourneyMap 5.3+.
9+
This section is for JourneyMap 5.2 and older. It is no longer relevant for JourneyMap 5.3+.
1010

11-
Whenever JourneyMap encounters a mob without a known icon, it creates a blank placeholder file that you can replace with your own icon. Look for them here <code>.minecraft/journeymap/icon/entity/(set name)/ ...</code>
11+
Whenever JourneyMap encounters a mob without a known icon, it creates a blank placeholder file that you can replace with your own icon. Look for them here `.minecraft/journeymap/icon/entity/(set name)/...`
1212

1313
If you view the folder tree with thumbnails displayed, it should be easy to spot the blank placeholder files. Simply find and replace them with your own mob icon. It must be a PNG file and should have the same dimensions as the one you are replacing (usually 32x32 pixels).
1414

1515
Or, you can create your own custom mob icon set in its own folder:
1616

17-
- Look in <code>.minecraft/journeymap/icon/entity/</code> for existing icon set folders, like "2D", "3D", or "Default" (JourneyMap 5.3+)
17+
- Look in `.minecraft/journeymap/icon/entity/` for existing icon set folders, like "2D", "3D", or "Default" (JourneyMap 5.3+)
1818
- Copy that folder and give it a new name, placing it in the same directory as above.
19-
- Within the copied folder, you can optionally edit the <code>[[#sources.json|sources.json]]</code> file to define how new icon sources (mods and resource packs) will be handled.
19+
- Within the copied folder, you can optionally edit the `[[#sources.json|sources.json]]` file to define how new icon sources (mods and resource packs) will be handled.
2020
- Within the copied folder, replace existing PNG images with a newer version your own. Do not change the filename. It is highly recommended that you keep the image sizes the same (32x32 pixels).
2121
- Restart Minecraft and go into (J > Options Manager > Fullscreen Map) or (J > Options Manager > MiniMap Preset). You will now be able to select your new mob icon set for these displays.
2222

@@ -26,23 +26,25 @@ JourneyMap 5.3+ no longer uses folders of icons. Instead, it uses mob icons via
2626

2727
JourneyMap 5.3+ uses the mob's entity texture resource location and substitutes "/entity/" with "/entity_icon/" to look up the mob icon. Thus:
2828

29-
* Mob entity texture: <code>minecraft:textures/entity/pig/pig.png</code>
30-
* Mob icon texture: <code>minecraft:textures/entity_icon/pig/pig.png</code>
29+
* Mob entity texture: `minecraft:textures/entity/pig/pig.png`
30+
* Mob icon texture: `minecraft:textures/entity_icon/pig/pig.png`
3131

3232
(or)
3333

34-
* Mob entity texture: <code>enderzoo:textures/entity/wither_cat.png</code>
35-
* Mob icon texture: <code>enderzoo:textures/entity_icon/wither_cat.png</code>
34+
* Mob entity texture: `enderzoo:textures/entity/wither_cat.png`
35+
* Mob icon texture: `enderzoo:textures/entity_icon/wither_cat.png`
3636

37-
*Note: If you are a player and you want to provide your own icons similiar to older versions of JourneyMap, you'll need to put together a [simple resource pack](http://minecraft.gamepedia.com/Tutorials/Creating_a_resource_pack) in a zip file. See the Instructions for Resource Pack Authors below.*
37+
!!! note "Note"
38+
39+
If you are a player and you want to provide your own icons similar to older versions of JourneyMap, you'll need to put together a [simple resource pack](http://minecraft.gamepedia.com/Tutorials/Creating_a_resource_pack) in a zip file. See the Instructions for Resource Pack Authors below.
3840

3941
## **Instructions for Mod Authors**
4042

4143
You can now provide icons to JourneyMap for your mod's mobs. Here's how:
4244

43-
- JourneyMap 5.3+ will look in your mod jar for icons in <code>/assets/modname/textures/entity_icon</code> .
45+
- JourneyMap 5.3+ will look in your mod jar for icons in `/assets/modname/textures/entity_icon` .
4446
- Icons should be transparent PNG files. Other sizes are usually supported, but 16x16 pixels is recommended.
45-
- The folder structure and filenames for your icons must mirror the folder structure and filename for your mob textures in <code>/assets/modname/textures/entity</code>.
47+
- The folder structure and filenames for your icons must mirror the folder structure and filename for your mob textures in `/assets/modname/textures/entity`.
4648

4749
For example:
4850

@@ -63,15 +65,15 @@ For example:
6365
│ kobold_blue.png
6466
```
6567

66-
Why is the above necessary? JourneyMap uses the ResourceLocation returned by <code>net.minecraft.client.renderer.entity.Render.getEntityTexture()</code> as the unique way to identify a mob for any mod. Providing icons with a similar same path and name keeps things as simple as possible.
68+
Why is the above necessary? JourneyMap uses the ResourceLocation returned by `net.minecraft.client.renderer.entity.Render.getEntityTexture()` as the unique way to identify a mob for any mod. Providing icons with a similar same path and name keeps things as simple as possible.
6769

6870
## **Instructions for Resource Pack Authors**
6971

7072
You can use a resource pack to provide icons to JourneyMap 5.3+ for any Minecraft mobs or mod mobs. Here's how:
7173

72-
- JourneyMap will look in your resource pack zip for icons in <code>/assets/<modname>/textures/entity_icon</code> .
74+
- JourneyMap will look in your resource pack zip for icons in `/assets/<modname>/textures/entity_icon` .
7375
- Icons should be transparent PNG files. Other sizes are usually supported, but 16x16 pixels is recommended.
74-
- The folder structure and filenames for your icons must mirror the folder structure and filename for mob textures in minecraft or other mods in <code>/assets/<modname>/textures/entity</code>.
76+
- The folder structure and filenames for your icons must mirror the folder structure and filename for mob textures in minecraft or other mods in `/assets/<modname>/textures/entity`.
7577

7678
For example, if you want to provide custom icons for both Minecraft mobs and a mod called "coolmod", the mob textures for both would along these lines:
7779

docs/en/Tools and Customisation/integration.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ Players can add waypoints by clicking on specially-formatted text in chat. (Han
1111

1212
For example:
1313

14-
<code>
15-
NPC says: "Here's where I buried my loot:" [name:"treasure", x:1212, y:70, z:456, dim:0]
16-
</code>
14+
`NPC says: "Here's where I buried my loot:" [name:"treasure", x:1212, y:70, z:456, dim:0]`
1715

1816
The chat text itself is not changed, but is turned into a link for players with JourneyMap. Hover text shows it can be clicked to create a waypoint, or shift-clicked to show on the full screen map.
1917

docs/en/Tools and Customisation/multiplayer-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ As of JourneyMap 5.1.3, there is no server-side mechanism for generating a map o
99
- In JourneyMap, run **J > Actions > Automap** for all regions. Keep in mind Automap will do just the dimension you're in, and only the surface if you're on the surface. Or if you're underground, only the vertical slice (chunk), you were in when you kicked off Automap. If you want to Automap multiple slices or dimensions, move to the corresponding area and run Automap again.
1010
- If you're intending to share the results with other players, note that any waypoints you create will go into the same folder as the map image tiles.
1111

12-
When it's done, the generated map image tiles and waypoints will be in <code>.minecraft/journeymap/data/sp/{worldname}</code>. To use the results when connecting to the server again, you'll need to copy that folder's contents to the one JourneyMap uses for your server connection: <code> .minecraft/journeymap/data/mp/{servername}</code>. If you want to share the results with other players, simply zip up the folder and give them these instructions.
12+
When it's done, the generated map image tiles and waypoints will be in `.minecraft/journeymap/data/sp/{worldname}`. To use the results when connecting to the server again, you'll need to copy that folder's contents to the one JourneyMap uses for your server connection: `.minecraft/journeymap/data/mp/{servername}`. If you want to share the results with other players, simply zip up the folder and give them these instructions.

docs/en/Tools and Customisation/topographic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ So, given a **world height of 256** blocks, a palette of **32 colors** will crea
2222

2323
## **Customization**
2424

25-
The topographic maps config file </code>.minecraft/journeymap/config/5.2/journeymap.topo.config</code> can be edited with a simple text editor. You can make changes to it, save it, and see the results immediately in JourneyMap without a need to restart.
25+
The topographic maps config file `.minecraft/journeymap/config/5.2/journeymap.topo.config` can be edited with a simple text editor. You can make changes to it, save it, and see the results immediately in JourneyMap without a need to restart.
2626

2727
The file has the following properties:
2828

docs/en/Tools and Customisation/ui-themes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Create images 2x larger than the sizes you specify in the theme.json file. This
3333
Modpacks can provide a theme for users by creating a theme folder just like the above. If a modpack author so wishes, they can also designate that theme to be the default theme for users who are using JourneyMap 5 for the first time.
3434

3535
This can be done by creating this file: .minecraft/journeymap/icon/theme/default.theme.config
36+
3637
The contents of the file provide the theme folder name, json file name, and the name designated within the json file, like so:
3738

3839
```json

0 commit comments

Comments
 (0)