Skip to content
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

added Turkish language #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ It adds an item in the status bar, there you can open the file
- **Català** (Catalan)
- **Italiano** (Italian)
- **English**
- **Türkçe** (Turkish)

If you know a language and want to contribute, do a PR with the translated strings.
I'll appreciate it :heart:
I'll appreciate it :heart:
4 changes: 3 additions & 1 deletion i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const strings = {
italian: "Apri nel browser",
russian: "Открыть в браузере",
spanish: "Abrir en el navegador",
turkish: "Tarayıcıda aç",
},
hint: {
brazilian_portuguese: "Abre o arquivo atual no seu navegador padrão",
Expand All @@ -18,11 +19,12 @@ export const strings = {
italian: "Apre il file corrente nel browser predefinito",
russian: "Открывает текущий файл в браузере по умолчанию",
spanish: "Abre el archivo actual en tu navegador por defecto",
turkish: "Mevcut dosyayı varsayılan tarayıcınızda açın",
}
};

export default function translate(text, language) {
const string = strings[text][language];
if (!string) return strings[text].english;
return string;
}
}