Skip to content

Home of Sabaki's translation efforts.

License

Notifications You must be signed in to change notification settings

SabakiHQ/sabaki-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sabaki I18n CI Status Daily Sync

Home of Sabaki's translation efforts.

Progress

Language File Progress
English (English) en.i18n.js 100%
Español (Spanish) es.i18n.js 98%
Français (French) fr.i18n.js 98%
日本語 (Japanese) ja.i18n.js 96%
한국어 (Korean) ko.i18n.js 95%
Português Brasileiro (Brazilian Portuguese) pt-br.i18n.js 97%
русский (Russian) ru.i18n.js 99%
Türkçe (Turkish) tr.i18n.js 98%
简体中文 (Simplified Chinese) zh-Hans.i18n.js 96%
繁體中文 (Traditional Chinese) zh-Hant.i18n.js 99%

Contributing

If you speak multiple languages, you can help us translate Sabaki. First, look at the progress table to see which languages are missing translations.

Translate for an existing language

Open the language file in the src directory as specified in the progress table. All translation strings are grouped by their context, a string which determines the component of Sabaki the string belongs to:

module.exports = {
  '<context>': {
    '<English string to be translated>': '<translation>'
    // ...
  }
  // ...
}

Entries that don't have a translation will have the value null and you can replace it with an actual translation. String interpolation need a special syntax, please look at en.i18n.js for a model translation file.

Once you finish translating, commit your work, and open a pull request to this repository. Once your work gets merged, the translation will be available in the next Sabaki release.

Try out your translation

Make sure you have Sabaki v0.50.1 or higher installed and developer mode turned on. Once you start Sabaki, choose 'Developer' > 'Load Language File…' from the main menu. Dismiss the warning and you can choose your language file.

This feature is just for convenience. Unfortunately, not all strings can be replaced on runtime, so prepare for inconsistencies.

Guidelines

  • Don't introduce standalone functions/variables outside of module.exports. In particular, don't import third party libraries or other files.
  • Always use UTF-8 encoding for all files.
  • Always use real typographic punctuation symbols, such as apostrophe (’), or quotation marks (“ ”), etc.
  • There's no need to update your progress in the README or index.json file. They will be automatically updated every day.

Add a new language

First, find the ISO 639-1 language code for the language you want to add and the country code or other subtags if necessary, e.g. en-US. Open index.json and add a new entry for the new language:

{
  "ja": {
    "name": "Japanese",
    "nativeName": "日本語"
  },
  // ...
}

Set name to the English name of the language and nativeName to the name of the language in its own language. Once the language entry is there, copy the file template.i18n.js inside the src directory and name your copy <language code>.i18n.js.