-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocale.js
156 lines (151 loc) · 5.64 KB
/
locale.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
var _locale_data = {
"langs_for_domains": {
"com.au": "en",
"co.at": "de",
"ca": "en",
"dk": "da",
"fi": "en",
"fr": "fr",
"com.de": "de",
"ie": "en",
"it": "it",
"jp": "ja",
"my": "en",
"co.nl": "nl",
"co.nz": "en",
"no": "en",
"pl": "pl",
"sg": "en",
"co.za": "en",
"se": "sv",
"org.uk": "en",
"us": "en"
},
"messages": {
"da": {
"best_gender_position": "bedste placering køn",
"best_position": "bedste placering overall",
"best_time": "bedste tid",
"bingo": "this parkrunner has completed {PROGRESS} of parkrun bingo - only {LEFT} to go!",
"bingo_completed": "BINGO!!! Congrats to this parkrunner for completing parkrun bingo \\(^O^)/",
"bingo_info": "på {COURSE} {DATE}",
"bingo_more": "{NUMBER} mere",
//"map_mask_completed": "afsluttet",
//"map_mask_all": "all",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"times_completed": "antal event",
"view_on_map": "Se denne løbers parkruns på en kort"
},
"de": {
"best_gender_position": "beste Position nach Geschlecht",
"best_position": "beste Position insgesamt",
"best_time": "beste Zeit",
"bingo": "diese/r Parkrunner*in hat {PROGRESS} von Parkrunbingo vollendet - nur {LEFT} verbleibend!",
"bingo_completed": "BINGO!!! Herzlichen Glückwunsch an diese/n Parkrunner*in für Parkrunbingo zu vollenden \\(^O^)/",
"bingo_info": "bei {COURSE} am {DATE}",
"bingo_more": "{NUMBER} mehr",
"map_mask_completed": "nur Vollendete zeigen",
"map_mask_all": "alle",
"map_mask_junior": "Junior",
"map_mask_parkrun": "Parkrun",
"times_completed": "Ereignisanzahl",
"view_on_map": "Parkruns dieses/r Parkrunner(in)s auf einer Karte ansehen"
},
"fr": {
"best_gender_position": "meilleure position genre",
"best_position": "meilleure position générale",
"best_time": "meilleure temps",
"bingo": "this parkrunner has completed {PROGRESS} of parkrun bingo - only {LEFT} to go!",
"bingo_completed": "BINGO!!! Congrats to this parkrunner for completing parkrun bingo \\(^O^)/",
"bingo_info": "at {COURSE} on {DATE}",
"bingo_more": "{NUMBER} autres",
//"map_mask_all": "all",
//"map_mask_completed": "complété",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"times_completed": "nombre d'événements",
"view_on_map": "Consulter les parkruns de ce parkrunneur sur une carte"
},
"en": {
"best_gender_position": "best gender position",
"best_position": "best position overall",
"best_time": "best time",
"bingo": "this parkrunner has completed {PROGRESS} of parkrun bingo - only {LEFT} to go!",
"bingo_completed": "BINGO!!! Congrats to this parkrunner for completing parkrun bingo \\(^O^)/",
"bingo_info": "at {COURSE} on {DATE}",
"bingo_more": "{NUMBER} more",
"map_mask_all": "all",
"map_mask_completed": "only show completed",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"technical_details": "Log & Technical",
"times_completed": "times completed",
"view_on_map": "View this parkrunner's parkruns on a map"
},
"it": {
"best_gender_position": "miglior posizione di genere",
"best_position": "miglior posizione assoluta",
"best_time": "miglior tempo",
"bingo": "this parkrunner has completed {PROGRESS} of parkrun bingo - only {LEFT} to go!",
"bingo_completed": "BINGO!!! Congrats to this parkrunner for completing parkrun bingo \\(^O^)/",
"bingo_info": "at {COURSE} on {DATE}",
"bingo_more": "altri {NUMBER}",
//"map_mask_all": "all",
//"map_mask_completed": "completato",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"times_completed": "numero di eventi",
"view_on_map": "Visualizza i parkrun di questo parkrunner su una mappa"
},
"nl": {
"best_gender_position": "beste positie geslacht",
"best_position": "beste positie algeheel",
"best_time": "beste tijd",
"bingo": "deze parkrunner heeft {PROGRESS} van parkrun bingo voltooid - nog {LEFT} te gaan!",
"bingo_completed": "BINGO!!! Gefeliciteesd aan deze parkrunner met het voltooieen von parkrun bingo \\(^O^)/",
"bingo_info": "in {COURSE} op {DATE}",
"bingo_more": "meer ({NUMBER})",
"map_mask_all": "alle",
//"map_mask_completed": "voltooid",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"times_completed": "aantal keer voltooid",
"view_on_map": "Bekijk de parkruns von deze parkrunner op de kaart"
},
"sv": {
"best_gender_position": "bästa resultat för ditt kön",
"best_position": "bästa placering totalt",
"best_time": "bästa tid",
"bingo": "denna deltagare har avslutat {PROGRESS} av parkrunbingot - bara {LEFT} kvarstår!",
"bingo_completed": "BINGO!!! grattis til denna deltagare för att avsluta parkrunbingot \\(^O^)/",
"bingo_info": "på {COURSE} på {DATE}",
"bingo_more": "{NUMBER} mer",
"map_mask_all": "alla",
"map_mask_completed": "visa bara avslutad",
"map_mask_junior": "junior",
"map_mask_parkrun": "parkrun",
"times_completed": "antal event",
"view_on_map": "Se denna deltagares parkruns på en karta"
}
}
}
var _lang;
function set_language(lang) {
_lang = lang;
}
function get_language_for_domain(domain) {
var lang = _locale_data.langs_for_domains[domain];
if (lang == null) {
console.warn("sorry! I haven't added a translation for '"+lang+"' yet so you're stuck with English for now :( ... please nag me on the github page: https://github.com/mmmsoup/parkstats");
lang = "en";
}
return lang;
}
get_localised_string = function(message) {
if (_lang == null || _locale_data.messages[_lang][message] == null) {
return _locale_data.messages["en"][message];
} else {
return _locale_data.messages[_lang][message];
}
}