Giter Site home page Giter Site logo

obsidian-translations's Introduction

Translate Obsidian

Help translate Obsidian into your language.

Add a new language

To add a new language, follow these steps:

  1. Copy all of the content of the raw en.json: https://raw.githubusercontent.com/obsidianmd/obsidian-translations/master/en.json
  2. Paste into here: https://github.com/obsidianmd/obsidian-translations/new/master
  3. Translate some strings to your language
  4. Find the language code of the language you're contributing: https://www.wikiwand.com/en/List_of_ISO_639-1_codes
  5. Name the new file "[language code].json" and submit

Staying up-to-date

Merge conflicts are nasty. They happen when you're translating an outdated version of the template, part of which might have been translated by someone else. To prevent this, try to fork our repository right before you translate.

If you want to do multiple translation pull requests, before doing work each time, use the "Compare" UI on your own fork to pull in all the newest changes from obsidianmd:master first by creating a pull request on your own repository and merge it in yourself, so that your own copy is up-to-update.

Submit changes

To translate, fork this repo and edit the JSON file of your language. After that, submit a pull request.

Note that you don't have to clone your fork to make the edits; you can do everything on GitHub's web UI. Simply open a file in your own forked repo and click on the pencil icon to start editing.

Translating

The translation JSON file consists of key-value pairs. The key should give you a good idea of where the text is in the app.

To translate, simply edit the value. For example, let's say you see

"plugin": "Plugin"

Simply change it to:

"plugin": "pLU9IN"

where "pLU9IN" is the phrase "plugin" in the target language. I'm using leetspeak as an example here.

If you encounter something like

"label-welcome": "Welcome, {{name}}!"

leave the {{name}} part alone and do not translate it. "name" is not part of the text and will be replaced by the appropriate value when the app runs.

Translating an update

From time to time, we'll add new strings to all the language files. The new strings will be in English and ready to be translated to your language of choice.

Update commits usually have message in the format of "Update strings for 1.x.x" where "1.x.x" is the new version number. This is an example commit: Update strings for 1.2.7.

By examining what happened to your language file, you can find the new strings to translate.

Translate a missing phrase on the UI

If you spot a missing phrase while using Obsidian, here's what to do:

  1. Figure out where the language file lives by looking up the language table in the README under the "Existing languages" section.
  2. Edit the language file, look for the exact English phrase.
  3. Replace it with the appropriate translated phrase.
  4. Submit your changes as a pull request.

Testing translation

Once you have the JSON file, you can test it by opening up developer console and enter selectLanguageFileLocation(). The app will prompt you for a JSON file location. After that, the app will reboot itself with the selected translation JSON file applied.

To revert to using the default language pack, open developer console and enter localStorage.removeItem('language').

Existing languages

Here is a table of language code to language name, in alphabetical order. These languages have their template files ready, but are not necessarily ready to be used in the app.

Language code Language name Native name Status
en (default) English English
af Afrikaans Afrikaans 🚧
am Amharic አማርኛ
ar Arabic العربية 🚧
eu Basque Euskara 🚧
be Belarusian беларуская мова
bg Bulgarian български език 🚧
bn Bengali বাংলা 🚧
ca Catalan català 🚧
cs Czech čeština
da Danish Dansk
de German Deutsch
dv Dhivehi ދިވެހި 🚧
el Greek Ελληνικά 🚧
eo Esperanto Esperanto 🚧
es Spanish Español
fa Persian فارسی
fi-fi Finnish suomi 🚧
fr French français
gl Galician Galego 🚧
he Hebrew עברית 🇮🇱 🚧
hi Hindi हिन्दी 🚧
hu Hungarian Magyar nyelv 🚧
id Indonesian Bahasa Indonesia
it Italian Italiano
ja Japanese 日本語
ko Korean 한국어
lv Latvian Latviešu valoda 🚧
ml Malayalam മലയാളം 🚧
ms Malay Bahasa Melayu 🚧
nl Dutch Nederlands
no Norwegian Norsk
oc Occitan Occitan 🚧
pl Polish język polski
pt Portuguese Português
pt-BR Brazilian Portuguese Portugues do Brasil
ro Romanian Română 🚧
ru Russian Русский
sa Sanskrit संस्कृतम् 🚧
sr Serbian српски језик 🚧
se Swedish Svenska 🚧
sk Slovak Slovenčina 🚧
sq Albanian Shqip
ta Tamil தமிழ் 🚧
te Telugu తెలుగు 🚧
th Thai ไทย
tr Turkish Türkçe
uk Ukrainian Українська 🚧
ur Urdu اردو 🚧
vi Vietnamese Tiếng Việt
zh (see note below) Chinese (Simplified) 简体中文
zh-TW Chinese (Traditional) 繁體中文

Note: the Chinese translation is maintained by Obsidian.zh. If you want to discuss it, please come here: https://github.com/obsidianzh/obsidian-translations.

obsidian-translations's People

Contributors

ericaxu avatar 11-check-it-out avatar yo-goto avatar jokysatria avatar henrikfalk avatar emisjerry avatar lisachev avatar write avatar starise avatar floflixt avatar jerichoi224 avatar hitchhiker90 avatar vkondakoff avatar lisandra-dev avatar jxhnnyut8h avatar sundevista avatar mafsi avatar joethei avatar k-and avatar liamcain avatar alikhomami avatar gustmartins avatar dojje avatar inirdin avatar mubassari avatar nikhil-mat avatar 5idereal avatar eric-hansen avatar natancieplinski avatar rjdverbeek-tud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.