Skip to content

[TRANSLATIONS] Links the Turkish and Bengali locales, and updates lang docs #1121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 23, 2023
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,30 +400,34 @@ All data is fully E2E encrypted before being sent to the backend (done in [`Clou
## Language Switching 🌎
> For full internationalization documentation, see: [**Multi-Language Support**](./docs/multi-language-support.md)

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)).
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`.

#### Supported Languages
- 🇬🇧 **English**: `en` - _Default_
- 🇦🇪 **Arabic**: `ar` - _Auto-generated_
- 🇧🇩 **Bengali**: `bn` - Contributed by **[@soaibsafi](https://github.com/soaibsafi)**
- 🇧🇬 **Bulgarian**: `bg` - Contributed by **[@asenov](https://github.com/asenov)**
- 🇨🇳 **Chinese**: `cn` - Contributed by **[@FormatToday](https://github.com/FormatToday)**
- 🇨🇿 **Czech**: `cs` - Contributed by **[@Tuzi555](https://github.com/Tuzi555)**
- 🇩🇰 **Danish**: `da` - Contributed by **[@lordpansar](https://github.com/lordpansar)**
- 🇳🇱 **Dutch**: `nl` - Contributed by **[@evroon](https://github.com/evroon)**
- 🇲🇫 **French**: `fr` - Contributed by **[@EVOTk](https://github.com/EVOTk)**
- 🇫🇷 **French**: `fr` - Contributed by **[@EVOTk](https://github.com/EVOTk)**
- 🇩🇪 **German**: `de` - Contributed by **[@Niklashere](https://github.com/Niklashere)**
- 🇮🇳 **Hindi**: `hi` - _Auto-generated_
- 🇮🇹 **Italian**: `it` - Contributed by **[@alexdelprete](https://github.com/alexdelprete)**
- 🇯🇵 **Japanese**: `ja` - _Auto-generated_
- 🇰🇷 **Korean**: `ko` - Contributed by **[@boggy-cs](https://github.com/boggy-cs)**
- 🇳🇴 **Norwegian Bokmål**: `nb` - Contributed by **[@rubjo](https://github.com/rubjo)**
- 🇵🇱 **Polish**: `pl` - Contributed by **[@skaarj1989](https://github.com/skaarj1989)**
- 🇵🇹 **Portuguese**: `pt` - Contributed by **[@LeoColman](https://github.com/LeoColman)**
- 🇪🇸 **Spanish**: `es` - Contributed by **[@lu4t](https://github.com/lu4t)**
- 🇷🇺 **Russian**: `ru` - _Auto-generated_
- 🇸🇰 **Slovak**: `sk` - Contributed by **[@Smexhy](https://github.com/Smexhy)**
- 🇸🇮 **Slovenian**: `sl` - Contributed by **[@UrekD](https://github.com/UrekD)**
- 🇪🇸 **Spanish**: `es` - Contributed by **[@lu4t](https://github.com/lu4t)**
- 🇸🇪 **Swedish**: `sv` - Contributed by **[@BOZG](https://github.com/BOZG)**
- 🇹🇼 **Traditional Chinese**: `zh-TW` - Contributed by **[@stanly0726](https://github.com/stanly0726)**
- 🇷🇺 **Russian**: `ru`
- 🇦🇪 **Arabic**: `ar`
- 🇮🇳 **Hindi**: `hi`
- 🇯🇵 **Japanese**: `ja`
- 🇰🇷 **Korean**: `ko` - Contributed by **[@boggy-cs](https://github.com/boggy-cs)**
- 🇸🇰 **Slovak**: `sk` - Contributed by **[@Smexhy](https://github.com/Smexhy)**
- 🇩🇰 **Danish**: `da` - Contributed by **[@lordpansar](https://github.com/lordpansar)**
- 🇨🇿 **Czech**: `cs` - Contributed by **[@Tuzi555](https://github.com/Tuzi555)**
- 🇹🇷 **Turkish**: `tr` - Contributed by **[@imsakg](https://github.com/imsakg)**
- 🏴‍☠️ **Pirate**: `pirate` - Contributed by **[@Lissy93](https://github.com/lissy93)**

#### Add your Language
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.
Expand Down
2 changes: 1 addition & 1 deletion src/components/Widgets/MvgConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default {
connections: null,
locationSearch: null,
connectionName: null,
defaultTitle: "Connection",
defaultTitle: 'Connection',
locations: {
origin: undefined,
destination: undefined,
Expand Down
211 changes: 113 additions & 98 deletions src/utils/languages.js
Original file line number Diff line number Diff line change
@@ -1,108 +1,129 @@
// Locales - Import translation files here!
// Locales - Import translation files here! (sort alphabetically)
import en from '@/assets/locales/en.json';
import ar from '@/assets/locales/ar.json';
import bg from '@/assets/locales/bg.json';
import bn from '@/assets/locales/bn.json';
import cs from '@/assets/locales/cs.json';
import da from '@/assets/locales/da.json';
import de from '@/assets/locales/de.json';
import nl from '@/assets/locales/nl.json';
import pl from '@/assets/locales/pl.json';
import fr from '@/assets/locales/fr.json';
import sl from '@/assets/locales/sl.json';
import es from '@/assets/locales/es.json';
import it from '@/assets/locales/it.json';
import zhCN from '@/assets/locales/zh-CN.json';
import zhTW from '@/assets/locales/zh-TW.json';
import ar from '@/assets/locales/ar.json';
import fr from '@/assets/locales/fr.json';
import hi from '@/assets/locales/hi.json';
import it from '@/assets/locales/it.json';
import ja from '@/assets/locales/ja.json';
import ko from '@/assets/locales/ko.json';
import nb from '@/assets/locales/nb.json';
import nl from '@/assets/locales/nl.json';
import pl from '@/assets/locales/pl.json';
import pt from '@/assets/locales/pt.json';
import ru from '@/assets/locales/ru.json';
import nb from '@/assets/locales/nb.json';
import pirate from '@/assets/locales/zz-pirate.json';
import sv from '@/assets/locales/sv.json';
import bg from '@/assets/locales/bg.json';
import ko from '@/assets/locales/ko.json';
import sk from '@/assets/locales/sk.json';
import da from '@/assets/locales/da.json';
import cs from '@/assets/locales/cs.json';
import sl from '@/assets/locales/sl.json';
import sv from '@/assets/locales/sv.json';
import tr from '@/assets/locales/tr.json';
import zhCN from '@/assets/locales/zh-CN.json';
import zhTW from '@/assets/locales/zh-TW.json';
import pirate from '@/assets/locales/zz-pirate.json';

// Language data - Next register your language by adding it to this list
// Sorted alphabetically by code (except English which is first, and specials at the end)
export const languages = [
{
name: 'English',
code: 'en',
locale: en,
flag: '🇬🇧',
},
{ // Arabic
name: 'العربية',
code: 'ar',
locale: ar,
flag: '🇦🇪',
},
{ // Bulgarian
name: 'Български',
code: 'bg',
locale: bg,
flag: '🇧🇬',
},
{ // Bengali
name: 'বাংলা',
code: 'bn',
locale: bn,
flag: '🇧🇩',
},
{ // Czech
name: 'Čeština',
code: 'cs',
locale: cs,
flag: '🇨🇿',
},
{ // Danish
name: 'Dansk',
code: 'da',
locale: da,
flag: '🇩🇰',
},
{ // German
name: 'Deutsch',
code: 'de',
locale: de,
flag: '🇩🇪',
},
{
name: 'Dutch',
code: 'nl',
locale: nl,
flag: '🇳🇱',
},
{
name: 'polski',
code: 'pl',
locale: pl,
flag: '🇵🇱',
{ // Spanish
name: 'Español',
code: 'es',
locale: es,
flag: '🇪🇸',
},
{
name: 'Français',
code: 'fr',
locale: fr,
flag: '🇲🇫',
},
{
name: 'Slovenščina',
code: 'sl',
locale: sl,
flag: '🇸🇮',
},
{ // Spanish
name: 'Español',
code: 'es',
locale: es,
flag: '🇪🇸',
{ // Hindi
name: 'नहीं',
code: 'hi',
locale: hi,
flag: '🇮🇳',
},
{ // Italian
name: 'Italiano',
code: 'it',
locale: it,
flag: '🇮🇹',
},
{ // Chinese
name: '简体中文',
code: 'cn',
locale: zhCN,
flag: '🇨🇳',
},
{ // Chinese
name: '繁體中文',
code: 'zh-TW',
locale: zhTW,
flag: '🇹🇼',
},
{ // Arabic
name: 'العربية',
code: 'ar',
locale: ar,
flag: '🇦🇪',
},
{ // Hindi
name: 'नहीं',
code: 'hi',
locale: hi,
flag: '🇮🇳',
},
{ // Japanese
name: '日本語',
code: 'ja',
locale: ja,
flag: '🇯🇵',
},
{ // Korean
name: '한국어',
code: 'ko',
locale: ko,
flag: '🇰🇷',
},
{ // Norwegian
name: 'Norsk',
code: 'nb',
locale: nb,
flag: '🇳🇴',
},
{ // Dutch
name: 'Nederlands',
code: 'nl',
locale: nl,
flag: '🇳🇱',
},
{
name: 'polski',
code: 'pl',
locale: pl,
flag: '🇵🇱',
},
{ // Portuguese
name: 'Português',
code: 'pt',
Expand All @@ -115,53 +136,47 @@ export const languages = [
locale: ru,
flag: '🇷🇺',
},
{ // Norwegian
name: 'Norsk',
code: 'nb',
locale: nb,
flag: '🇳🇴',
{ // Slovak
name: 'Slovenčina',
code: 'sk',
locale: sk,
flag: '🇸🇰',
},
{ // Joke Language - Pirate
name: 'Pirate',
code: 'pirate',
locale: pirate,
flag: '🏴‍☠️',
{
name: 'Slovenščina',
code: 'sl',
locale: sl,
flag: '🇸🇮',
},
{ // Swedish
name: 'Svenska',
code: 'sv',
locale: sv,
flag: '🇸🇪',
},
{ // Bulgarian
name: 'Български',
code: 'bg',
locale: bg,
flag: '🇧🇬',
},
{ // Korean
name: '한국어',
code: 'ko',
locale: ko,
flag: '🇰🇷',
{ // Turkish
name: 'Türkçe',
code: 'tr',
locale: tr,
flag: '🇹🇷',
},
{ // Slovak
name: 'Slovenčina',
code: 'sk',
locale: sk,
flag: '🇸🇰',
{ // Chinese
name: '简体中文',
code: 'cn',
locale: zhCN,
flag: '🇨🇳',
},
{ // Danish
name: 'Dansk',
code: 'da',
locale: da,
flag: '🇩🇰',
{ // Chinese
name: '繁體中文',
code: 'zh-TW',
locale: zhTW,
flag: '🇹🇼',
},
{ // Czech
name: 'Čeština',
code: 'cs',
locale: cs,
flag: '🇨🇿',
{ // Joke Language - Pirate
name: 'Pirate',
code: 'pirate',
locale: pirate,
flag: '🏴‍☠️',
},
];

Expand Down