Skip to content

Commit

Permalink
i18n: ease future translations
Browse files Browse the repository at this point in the history
For issue #16
  • Loading branch information
Istador committed May 29, 2021
1 parent 0e7a4c0 commit 5bb3628
Show file tree
Hide file tree
Showing 14 changed files with 958 additions and 85 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you wish to reset all of the user data saved, just type the following into th
localStorage.clear()
```

### How to link to the Map?
### How to link to the map?

The map has 6 parameters, that can be given to the hash portion of the URL (meaning that they aren't send to the server, but are only evaluated by the browser):
- `id`: integer, map-internal ID for every entry on the map. Permalinks can be found in the popups.
Expand Down
2 changes: 1 addition & 1 deletion img
Submodule img updated from 03f3a8 to e919ab
14 changes: 9 additions & 5 deletions src/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ const data = {
fr: require('./i18n/fr'),
it: require('./i18n/it'),
es: require('./i18n/es'),
//zh: require('./i18n/zh'),
//ru: require('./i18n/ru'),
pg: require('./i18n/pg'),
du: require('./i18n/du'),
//ru: require('./i18n/ru'),
//zh: require('./i18n/zh'),
//ja: require('./i18n/ja'),
//ko: require('./i18n/ko'),
}


Expand Down Expand Up @@ -71,10 +73,12 @@ i18n.langControl = () => {
L.langObject('fr', 'Français'),
L.langObject('it', 'Italiano'),
L.langObject('es', 'Español'),
L.langObject('zh', '中文'),
L.langObject('ru', 'Русский'),
L.langObject('pg', 'Português'),
L.langObject('pg', 'Português Brasileiro'),
L.langObject('du', 'Nederlands'),
L.langObject('ru', 'Русский'),
L.langObject('zh', '中文'),
L.langObject('ja', '日本語'),
L.langObject('ko', '한국어'),
].filter(lo => lo.id in data),
position: 'bottomleft',
callback: i18n.setLang,
Expand Down
19 changes: 14 additions & 5 deletions src/js/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
datasource : 'Beitragen',
mark_seen : 'Als erledigt markieren',
unmark_seen : 'Als unerledigt markieren',
permalink : 'Permalink',
styleTitle: {
seen: {
show : 'Erledigte Marker werden normal angezeigt',
Expand All @@ -26,11 +27,16 @@ module.exports = {
properties: {
type : 'Kategorie',
item : 'Typ',
item_id : 'Item-ID',
amount : 'Anzahl',
x : 'X',
y : 'Y',
z : 'Z',
area : 'Bereich',
title : 'Bezeichnung',
description : 'Beschreibung',
source : 'Quelle',
confirmed : 'Status',
},
names: {
area: {
Expand Down Expand Up @@ -60,7 +66,7 @@ module.exports = {
entrance: {
'.' : 'Eingang',
cave : 'Höhle',
//mohlenhill : '',
mohlenhill : 'Mollerhügel', // Beta only
vault : 'Gruft',
},
food: {
Expand All @@ -72,7 +78,7 @@ module.exports = {
carrant : 'Carrant',
commonwheat : 'Brotweizen',
dunerice : 'Dünenreis',
edenfruit : 'Edenfrucht',
edenfruit : 'Edenfrucht', // Beta only
fatplant : 'Fettpflanze',
leafdough : 'Blattteig',
meageryam : 'Mageryams',
Expand Down Expand Up @@ -124,9 +130,12 @@ module.exports = {
waddletoothblubber : 'Watschelzahn-Speck',
},
mechanic: {
'.' : 'Mechanisch',
door : 'Tür',
lever : 'Hebel',
'.' : 'Mechanisch',
door : 'Tür',
electrotrigger : 'Elektrischer Schalter',
hittrigger : 'Zielscheibe',
lever : 'Hebel',
pinsocket : 'Pin Socket',
},
nest: {
'.' : 'Nest',
Expand Down
77 changes: 62 additions & 15 deletions src/js/i18n/du.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
module.exports = {
ui: {
//title : 'Pine Interactive Map',
//zoom_in : 'Zoom in',
//zoom_out : 'Zoom out',
//fullscreen_on : 'View Fullscreen',
//fullscreen_off : 'Exit Fullscreen',
//datasource : 'Contribute',
//mark_seen : 'Mark completed',
//unmark_seen : 'Mark not completed',
//permalink : 'Permalink',
styleTitle: {
seen: {
//show : 'Completed markers are shown normally',
//fade : 'Completed markers are faded out',
//hide : 'Completed markers are hidden',
//only : 'Only completed markers are shown',
},
unconfirmed: {
//show : 'Unconfirmed markers are shown normally',
//red : 'Unconfirmed markers are tinted red',
//hide : 'Unconfirmed markers are hidden',
//only : 'Only unconfirmed markers are shown',
},
},
},
properties: {
//type : 'Category',
//item : 'Type',
//item_id : 'Item-ID',
//amount : 'Amount',
//x : 'X',
//y : 'Y',
//z : 'Z',
//area : 'Area',
//title : 'Title',
//description : 'Description',
//source : 'Source',
//confirmed : 'Status',
},
names: {
area: {
'.' : 'Gebied',
Expand All @@ -25,9 +64,9 @@ module.exports = {
21 : 'Verre Bosrand',
},
entrance: {
//'.' : '',
//'.' : 'Entrance',
cave : 'Grot',
//mohlenhill : '',
//mohlenhill : 'Mohlen Hill', // Beta only
vault : 'Kluis',
},
food: {
Expand All @@ -39,7 +78,7 @@ module.exports = {
carrant : 'Krentel',
commonwheat : 'Gewoneweit',
dunerice : 'Duinrijst',
//edenfruit : '',
//edenfruit : 'Eden Fruit', // Beta only
fatplant : 'Vetplant',
leafdough : 'Bladerdeeg',
meageryam : 'Magerwortel',
Expand All @@ -55,15 +94,15 @@ module.exports = {
},
idea: {
'.' : 'Idee',
//chest : '',
//pickup : '',
//quest : '',
//chest : 'Chest',
//pickup : 'Pick up',
//quest : 'Quest',
},
item: {
//'.' : '',
//'.' : 'Item',
equip : 'Uitrusting',
outfinding : 'Uitvinding',
//quest : '',
//quest : 'Quest',
},
material: {
'.' : 'Materialen',
Expand All @@ -90,18 +129,26 @@ module.exports = {
toothstone : 'Tandsteen',
waddletoothblubber : 'Waddeltand Blubber',
},
mechanic: {
//'.' : 'Mechanical',
//door : 'Door',
//electrotrigger : 'Electrical Trigger',
//hittrigger : 'Hit Trigger',
//lever : 'Lever',
//pinsocket : 'Pin Socket',
},
nest: {
//'.' : '',
//'.' : 'Nest',
alpafant : 'Alpafant',
bleeker : 'Bleeker',
puffle : 'Puffel',
waddletooth : 'Waddeltand',
},
npc: {
//'.' : '',
//chief : '',
//merchant : '',
//quest : '',
//'.' : 'NPC',
//chief : 'Chief',
//merchant : 'Merchant',
//quest : 'Quest',
village : 'Dorp',
},
spawn: {
Expand All @@ -112,9 +159,9 @@ module.exports = {
waddletooth : 'Waddeltand',
},
unique: {
//'.' : '',
//'.' : 'Unique',
amphiscusorb : 'Amfiscus Bollen',
//journal : '',
//journal : 'Journal / Book',
keygraphite : 'Sleutelgrafiet',
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/js/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module.exports = {
entrance: {
'.' : 'Entrance',
cave : 'Cave',
mohlenhill : 'Mohlen Hill',
mohlenhill : 'Mohlen Hill', // Beta only
vault : 'Vault',
},
food: {
Expand All @@ -78,7 +78,7 @@ module.exports = {
carrant : 'Carrant',
commonwheat : 'Commonwheat',
dunerice : 'Dunerice',
edenfruit : 'Eden Fruit',
edenfruit : 'Eden Fruit', // Beta only
fatplant : 'Fatplant',
leafdough : 'Leafdough',
meageryam : 'Meageryam',
Expand Down
83 changes: 65 additions & 18 deletions src/js/i18n/es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
module.exports = {
ui: {
//title : 'Pine Interactive Map',
//zoom_in : 'Zoom in',
//zoom_out : 'Zoom out',
//fullscreen_on : 'View Fullscreen',
//fullscreen_off : 'Exit Fullscreen',
//datasource : 'Contribute',
//mark_seen : 'Mark completed',
//unmark_seen : 'Mark not completed',
//permalink : 'Permalink',
styleTitle: {
seen: {
//show : 'Completed markers are shown normally',
//fade : 'Completed markers are faded out',
//hide : 'Completed markers are hidden',
//only : 'Only completed markers are shown',
},
unconfirmed: {
//show : 'Unconfirmed markers are shown normally',
//red : 'Unconfirmed markers are tinted red',
//hide : 'Unconfirmed markers are hidden',
//only : 'Only unconfirmed markers are shown',
},
},
},
properties: {
//type : 'Category',
//item : 'Type',
//item_id : 'Item-ID',
//amount : 'Amount',
//x : 'X',
//y : 'Y',
//z : 'Z',
//area : 'Area',
//title : 'Title',
//description : 'Description',
//source : 'Source',
//confirmed : 'Status',
},
names: {
area: {
'.' : 'Área',
Expand All @@ -25,10 +64,10 @@ module.exports = {
21 : 'Arboledas Remotas',
},
entrance: {
//'.' : '',
//'.' : 'Entrance',
cave : 'Cueva',
//mohlenhill : '',
//vault : '',
//mohlenhill : 'Mohlen Hill', // Beta only
//vault : 'Vault',
},
food: {
'.' : 'Comida',
Expand All @@ -39,7 +78,7 @@ module.exports = {
carrant : 'Grosanahoria',
commonwheat : 'Trigo blando',
dunerice : 'Arroz de la duna',
//edenfruit : '',
//edenfruit : 'Eden Fruit', // Beta only
fatplant : 'Gordiplanta',
leafdough : 'Masa frondosa',
meageryam : 'Poconiato',
Expand All @@ -55,15 +94,15 @@ module.exports = {
},
idea: {
'.' : 'Idea',
//chest : '',
//pickup : '',
//quest : '',
//chest : 'Chest',
//pickup : 'Pick up',
//quest : 'Quest',
},
item: {
//'.' : '',
//equip : '',
//outfinding : '',
//quest : '',
//'.' : 'Item',
//equip : 'Equipment',
//outfinding : 'Outfinding',
//quest : 'Quest',
},
material: {
'.' : 'Materiales',
Expand All @@ -90,18 +129,26 @@ module.exports = {
toothstone : 'Piedra dental',
waddletoothblubber : 'Grasa de Contodiente',
},
mechanic: {
//'.' : 'Mechanical',
//door : 'Door',
//electrotrigger : 'Electrical Trigger',
//hittrigger : 'Hit Trigger',
//lever : 'Lever',
//pinsocket : 'Pin Socket',
},
nest: {
//'.' : '',
//'.' : 'Nest',
alpafant : 'Alpafante',
bleeker : 'Bleeker',
puffle : 'Nubesco',
waddletooth : 'Contodiente',
},
npc: {
//'.' : '',
//chief : '',
//merchant : '',
//quest : '',
//'.' : 'NPC',
//chief : 'Chief',
//merchant : 'Merchant',
//quest : 'Quest',
village : 'Pueblo',
},
spawn: {
Expand All @@ -112,9 +159,9 @@ module.exports = {
waddletooth : 'Contodiente',
},
unique: {
//'.' : '',
//'.' : 'Unique',
amphiscusorb : 'Orbes de Anfibu',
//journal : '',
//journal : 'Journal / Book',
keygraphite : 'Grafito de Llave',
},
},
Expand Down
Loading

0 comments on commit 5bb3628

Please sign in to comment.