Skip to content

Commit 0319b8b

Browse files
authored
🔀 Merge pull request #1121 from Lissy93/lang/turkish-bengali-and-refactor
[TRANSLATIONS] Links the Turkish and Bengali locales, and updates lang docs Thanks @soaibsafi, @imsakg and @zcq100 🙌
2 parents f8c74e6 + b4496fb commit 0319b8b

File tree

3 files changed

+129
-110
lines changed

3 files changed

+129
-110
lines changed

README.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -400,30 +400,34 @@ All data is fully E2E encrypted before being sent to the backend (done in [`Clou
400400
## Language Switching 🌎
401401
> For full internationalization documentation, see: [**Multi-Language Support**](./docs/multi-language-support.md)
402402

403-
Dashy supports multiple languages and locales. When available, your language should be automatically detected and applied on load. But you can also select a language through the UI (under config --> Switch Language) or set `appConfig.language` to your language (specified as a 2-digit [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)).
403+
Dashy supports multiple languages and locales. When available, your language should be automatically detected and applied on load. But you can also select a language through the UI (under config --> Switch Language) or set `appConfig.language` to your language (specified as a 2-digit [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), as seen below, e.g. `language: de`.
404404

405405
#### Supported Languages
406406
- 🇬🇧 **English**: `en` - _Default_
407+
- 🇦🇪 **Arabic**: `ar` - _Auto-generated_
408+
- 🇧🇩 **Bengali**: `bn` - Contributed by **[@soaibsafi](https://github.com/soaibsafi)**
409+
- 🇧🇬 **Bulgarian**: `bg` - Contributed by **[@asenov](https://github.com/asenov)**
407410
- 🇨🇳 **Chinese**: `cn` - Contributed by **[@FormatToday](https://github.com/FormatToday)**
411+
- 🇨🇿 **Czech**: `cs` - Contributed by **[@Tuzi555](https://github.com/Tuzi555)**
412+
- 🇩🇰 **Danish**: `da` - Contributed by **[@lordpansar](https://github.com/lordpansar)**
408413
- 🇳🇱 **Dutch**: `nl` - Contributed by **[@evroon](https://github.com/evroon)**
409-
- 🇲🇫 **French**: `fr` - Contributed by **[@EVOTk](https://github.com/EVOTk)**
414+
- 🇫🇷 **French**: `fr` - Contributed by **[@EVOTk](https://github.com/EVOTk)**
410415
- 🇩🇪 **German**: `de` - Contributed by **[@Niklashere](https://github.com/Niklashere)**
416+
- 🇮🇳 **Hindi**: `hi` - _Auto-generated_
411417
- 🇮🇹 **Italian**: `it` - Contributed by **[@alexdelprete](https://github.com/alexdelprete)**
418+
- 🇯🇵 **Japanese**: `ja` - _Auto-generated_
419+
- 🇰🇷 **Korean**: `ko` - Contributed by **[@boggy-cs](https://github.com/boggy-cs)**
412420
- 🇳🇴 **Norwegian Bokmål**: `nb` - Contributed by **[@rubjo](https://github.com/rubjo)**
413421
- 🇵🇱 **Polish**: `pl` - Contributed by **[@skaarj1989](https://github.com/skaarj1989)**
414422
- 🇵🇹 **Portuguese**: `pt` - Contributed by **[@LeoColman](https://github.com/LeoColman)**
415-
- 🇪🇸 **Spanish**: `es` - Contributed by **[@lu4t](https://github.com/lu4t)**
423+
- 🇷🇺 **Russian**: `ru` - _Auto-generated_
424+
- 🇸🇰 **Slovak**: `sk` - Contributed by **[@Smexhy](https://github.com/Smexhy)**
416425
- 🇸🇮 **Slovenian**: `sl` - Contributed by **[@UrekD](https://github.com/UrekD)**
426+
- 🇪🇸 **Spanish**: `es` - Contributed by **[@lu4t](https://github.com/lu4t)**
417427
- 🇸🇪 **Swedish**: `sv` - Contributed by **[@BOZG](https://github.com/BOZG)**
418428
- 🇹🇼 **Traditional Chinese**: `zh-TW` - Contributed by **[@stanly0726](https://github.com/stanly0726)**
419-
- 🇷🇺 **Russian**: `ru`
420-
- 🇦🇪 **Arabic**: `ar`
421-
- 🇮🇳 **Hindi**: `hi`
422-
- 🇯🇵 **Japanese**: `ja`
423-
- 🇰🇷 **Korean**: `ko` - Contributed by **[@boggy-cs](https://github.com/boggy-cs)**
424-
- 🇸🇰 **Slovak**: `sk` - Contributed by **[@Smexhy](https://github.com/Smexhy)**
425-
- 🇩🇰 **Danish**: `da` - Contributed by **[@lordpansar](https://github.com/lordpansar)**
426-
- 🇨🇿 **Czech**: `cs` - Contributed by **[@Tuzi555](https://github.com/Tuzi555)**
429+
- 🇹🇷 **Turkish**: `tr` - Contributed by **[@imsakg](https://github.com/imsakg)**
430+
- 🏴‍☠️ **Pirate**: `pirate` - Contributed by **[@Lissy93](https://github.com/lissy93)**
427431

428432
#### Add your Language
429433
I would love Dashy to be available to everyone without language being a barrier to entry. If you've got a few minutes to spare, consider adding translations for your language. It's a quick task, and all text is in [a single JSON file](https://github.com/Lissy93/dashy/tree/master/src/assets/locales). Since any missing text will fall back to English, you don't need to translate it all.

src/components/Widgets/MvgConnection.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
connections: null,
6767
locationSearch: null,
6868
connectionName: null,
69-
defaultTitle: "Connection",
69+
defaultTitle: 'Connection',
7070
locations: {
7171
origin: undefined,
7272
destination: undefined,

src/utils/languages.js

+113-98
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,129 @@
1-
// Locales - Import translation files here!
1+
// Locales - Import translation files here! (sort alphabetically)
22
import en from '@/assets/locales/en.json';
3+
import ar from '@/assets/locales/ar.json';
4+
import bg from '@/assets/locales/bg.json';
5+
import bn from '@/assets/locales/bn.json';
6+
import cs from '@/assets/locales/cs.json';
7+
import da from '@/assets/locales/da.json';
38
import de from '@/assets/locales/de.json';
4-
import nl from '@/assets/locales/nl.json';
5-
import pl from '@/assets/locales/pl.json';
6-
import fr from '@/assets/locales/fr.json';
7-
import sl from '@/assets/locales/sl.json';
89
import es from '@/assets/locales/es.json';
9-
import it from '@/assets/locales/it.json';
10-
import zhCN from '@/assets/locales/zh-CN.json';
11-
import zhTW from '@/assets/locales/zh-TW.json';
12-
import ar from '@/assets/locales/ar.json';
10+
import fr from '@/assets/locales/fr.json';
1311
import hi from '@/assets/locales/hi.json';
12+
import it from '@/assets/locales/it.json';
1413
import ja from '@/assets/locales/ja.json';
14+
import ko from '@/assets/locales/ko.json';
15+
import nb from '@/assets/locales/nb.json';
16+
import nl from '@/assets/locales/nl.json';
17+
import pl from '@/assets/locales/pl.json';
1518
import pt from '@/assets/locales/pt.json';
1619
import ru from '@/assets/locales/ru.json';
17-
import nb from '@/assets/locales/nb.json';
18-
import pirate from '@/assets/locales/zz-pirate.json';
19-
import sv from '@/assets/locales/sv.json';
20-
import bg from '@/assets/locales/bg.json';
21-
import ko from '@/assets/locales/ko.json';
2220
import sk from '@/assets/locales/sk.json';
23-
import da from '@/assets/locales/da.json';
24-
import cs from '@/assets/locales/cs.json';
21+
import sl from '@/assets/locales/sl.json';
22+
import sv from '@/assets/locales/sv.json';
23+
import tr from '@/assets/locales/tr.json';
24+
import zhCN from '@/assets/locales/zh-CN.json';
25+
import zhTW from '@/assets/locales/zh-TW.json';
26+
import pirate from '@/assets/locales/zz-pirate.json';
2527

2628
// Language data - Next register your language by adding it to this list
29+
// Sorted alphabetically by code (except English which is first, and specials at the end)
2730
export const languages = [
2831
{
2932
name: 'English',
3033
code: 'en',
3134
locale: en,
3235
flag: '🇬🇧',
3336
},
37+
{ // Arabic
38+
name: 'العربية',
39+
code: 'ar',
40+
locale: ar,
41+
flag: '🇦🇪',
42+
},
43+
{ // Bulgarian
44+
name: 'Български',
45+
code: 'bg',
46+
locale: bg,
47+
flag: '🇧🇬',
48+
},
49+
{ // Bengali
50+
name: 'বাংলা',
51+
code: 'bn',
52+
locale: bn,
53+
flag: '🇧🇩',
54+
},
55+
{ // Czech
56+
name: 'Čeština',
57+
code: 'cs',
58+
locale: cs,
59+
flag: '🇨🇿',
60+
},
61+
{ // Danish
62+
name: 'Dansk',
63+
code: 'da',
64+
locale: da,
65+
flag: '🇩🇰',
66+
},
3467
{ // German
3568
name: 'Deutsch',
3669
code: 'de',
3770
locale: de,
3871
flag: '🇩🇪',
3972
},
40-
{
41-
name: 'Dutch',
42-
code: 'nl',
43-
locale: nl,
44-
flag: '🇳🇱',
45-
},
46-
{
47-
name: 'polski',
48-
code: 'pl',
49-
locale: pl,
50-
flag: '🇵🇱',
73+
{ // Spanish
74+
name: 'Español',
75+
code: 'es',
76+
locale: es,
77+
flag: '🇪🇸',
5178
},
5279
{
5380
name: 'Français',
5481
code: 'fr',
5582
locale: fr,
5683
flag: '🇲🇫',
5784
},
58-
{
59-
name: 'Slovenščina',
60-
code: 'sl',
61-
locale: sl,
62-
flag: '🇸🇮',
63-
},
64-
{ // Spanish
65-
name: 'Español',
66-
code: 'es',
67-
locale: es,
68-
flag: '🇪🇸',
85+
{ // Hindi
86+
name: 'नहीं',
87+
code: 'hi',
88+
locale: hi,
89+
flag: '🇮🇳',
6990
},
7091
{ // Italian
7192
name: 'Italiano',
7293
code: 'it',
7394
locale: it,
7495
flag: '🇮🇹',
7596
},
76-
{ // Chinese
77-
name: '简体中文',
78-
code: 'cn',
79-
locale: zhCN,
80-
flag: '🇨🇳',
81-
},
82-
{ // Chinese
83-
name: '繁體中文',
84-
code: 'zh-TW',
85-
locale: zhTW,
86-
flag: '🇹🇼',
87-
},
88-
{ // Arabic
89-
name: 'العربية',
90-
code: 'ar',
91-
locale: ar,
92-
flag: '🇦🇪',
93-
},
94-
{ // Hindi
95-
name: 'नहीं',
96-
code: 'hi',
97-
locale: hi,
98-
flag: '🇮🇳',
99-
},
10097
{ // Japanese
10198
name: '日本語',
10299
code: 'ja',
103100
locale: ja,
104101
flag: '🇯🇵',
105102
},
103+
{ // Korean
104+
name: '한국어',
105+
code: 'ko',
106+
locale: ko,
107+
flag: '🇰🇷',
108+
},
109+
{ // Norwegian
110+
name: 'Norsk',
111+
code: 'nb',
112+
locale: nb,
113+
flag: '🇳🇴',
114+
},
115+
{ // Dutch
116+
name: 'Nederlands',
117+
code: 'nl',
118+
locale: nl,
119+
flag: '🇳🇱',
120+
},
121+
{
122+
name: 'polski',
123+
code: 'pl',
124+
locale: pl,
125+
flag: '🇵🇱',
126+
},
106127
{ // Portuguese
107128
name: 'Português',
108129
code: 'pt',
@@ -115,53 +136,47 @@ export const languages = [
115136
locale: ru,
116137
flag: '🇷🇺',
117138
},
118-
{ // Norwegian
119-
name: 'Norsk',
120-
code: 'nb',
121-
locale: nb,
122-
flag: '🇳🇴',
139+
{ // Slovak
140+
name: 'Slovenčina',
141+
code: 'sk',
142+
locale: sk,
143+
flag: '🇸🇰',
123144
},
124-
{ // Joke Language - Pirate
125-
name: 'Pirate',
126-
code: 'pirate',
127-
locale: pirate,
128-
flag: '🏴‍☠️',
145+
{
146+
name: 'Slovenščina',
147+
code: 'sl',
148+
locale: sl,
149+
flag: '🇸🇮',
129150
},
130151
{ // Swedish
131152
name: 'Svenska',
132153
code: 'sv',
133154
locale: sv,
134155
flag: '🇸🇪',
135156
},
136-
{ // Bulgarian
137-
name: 'Български',
138-
code: 'bg',
139-
locale: bg,
140-
flag: '🇧🇬',
141-
},
142-
{ // Korean
143-
name: '한국어',
144-
code: 'ko',
145-
locale: ko,
146-
flag: '🇰🇷',
157+
{ // Turkish
158+
name: 'Türkçe',
159+
code: 'tr',
160+
locale: tr,
161+
flag: '🇹🇷',
147162
},
148-
{ // Slovak
149-
name: 'Slovenčina',
150-
code: 'sk',
151-
locale: sk,
152-
flag: '🇸🇰',
163+
{ // Chinese
164+
name: '简体中文',
165+
code: 'cn',
166+
locale: zhCN,
167+
flag: '🇨🇳',
153168
},
154-
{ // Danish
155-
name: 'Dansk',
156-
code: 'da',
157-
locale: da,
158-
flag: '🇩🇰',
169+
{ // Chinese
170+
name: '繁體中文',
171+
code: 'zh-TW',
172+
locale: zhTW,
173+
flag: '🇹🇼',
159174
},
160-
{ // Czech
161-
name: 'Čeština',
162-
code: 'cs',
163-
locale: cs,
164-
flag: '🇨🇿',
175+
{ // Joke Language - Pirate
176+
name: 'Pirate',
177+
code: 'pirate',
178+
locale: pirate,
179+
flag: '🏴‍☠️',
165180
},
166181
];
167182

0 commit comments

Comments
 (0)