Giter Club home page Giter Club logo

electron-i18n's Introduction

electron-i18n

A home for Electron's translated documentation.

๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡น๐Ÿ‡ผ ๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ฐ๐Ÿ‡ท ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡น๐Ÿ‡ญ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ฎ๐Ÿ‡น

Contributing

Do you speak multiple languages? We need your help!

Visit crowdin.com/project/electron and log in with your GitHub account to help translate.

Source Content

Electron's documentation and website are authored in English.

The source content in this repo is collected from a few places:

Here's the directory structure:

content
โ””โ”€โ”€ en
    โ”œโ”€โ”€ api
    โ”œโ”€โ”€ docs
    โ””โ”€โ”€ website

Translated Content

The Crowdin project is configured to automatically pull the latest English content out of this repo and push the translated content back into this repo.

Translations are added under a directory named after the locale. The contents of these files differ by language, but the directory structure and filenames for each locale is always identical.

content
โ”œโ”€โ”€ en
โ”‚ย ย  โ”œโ”€โ”€ api
โ”‚ย ย  โ”œโ”€โ”€ docs
โ”‚ย ย  โ””โ”€โ”€ website
โ”œโ”€โ”€ es
โ”‚ย ย  โ”œโ”€โ”€ api
โ”‚ย ย  โ”œโ”€โ”€ docs
โ”‚ย ย  โ””โ”€โ”€ website
โ”œโ”€โ”€ pt-BR
โ”‚ย ย  โ”œโ”€โ”€ api
โ”‚ย ย  โ”œโ”€โ”€ docs
โ”‚ย ย  โ””โ”€โ”€ website
โ””โ”€โ”€ zh-TW
    โ”œโ”€โ”€ api
    โ”œโ”€โ”€ docs
    โ””โ”€โ”€ website

To get a sense of how content is transformed, see crowdin.yml

Why Crowdin?

GitHub's documentation team reviewed numerous localization platforms (XTM, Smartling, Memsource, LingoHub, Qordoba, Transifex) before choosing Crowdin. We found Crowdin to be the best fit for the needs of the Electron project, as it satisfies most of our unique requirements:

  • GitHub Flavored Markdown. Some other localization platforms do not support markdown, on the basis that it is "unstructured" (though Githubbers are working on that. Other platforms have markdown support, but few have full support for GFM.
  • Aribtrary YAML data. Many localization platforms support YAML, but some have specific requirements about its structure, such as a locale key like en at the root node of the file.
  • YAML frontmatter. Tools like Jekyll (upon which the Electron website is built) use a block of key-value metadata atop markdown files like date, keywords, author, permalink, etc. This content needs to be translated while preserving the original YAML structure.

In addition to satifying our project's unique requirements, Crowdin has some compelling features:

  • GitHub Integration. Crowdin is the only provider we evaluated that can integrate with GitHub and automatically sync content in and out of repositories.
  • Machine Translations. Crowdin supports machine translation using APIs from Microsoft and Google. This may allow us to save human time and energy by automating the initial translation of doc sets.
  • Crowdsourcing. Electron has a huge community of open-source contributors. Whether or not we end up paying professionals to help translate Electron's docs, we will always want the localization process to be as transparent and inclusive as possible. Other localization platforms are geared toward professional translators, whereas Crowdin can be used by anyone, and has some unique collaborative features like voting.
  • Login with GitHub Translators can log in with their GitHub accounts. This makes the onboarding process easier for participants, and gives us an easier way to know who to thank for the contributions.

Installation and Usage

If you are here to help translate, visit crowdin.com/project/electron and log in with your GitHub account to get started.

If you are here to use this translated content for some purpose, read on!

This repo is also a node module for working with Electron's translated content.

It is not currently published to npm, so install it directly from GitHub:

npm install electron/electron-i18n

Then require it:

const i18n = require('electron-i18n')

API

i18n.api.array

Exports all of Electron's structured API docs, in array format. This data is identical to the electron-api.json release asset.

i18n.api.tree

Exports the same data as array, but in a deep tree format. This can be useful if you want to traverse the docs like apis.BrowserWindow.instanceMethods.blur.etc.etc

i18n.locales

Exports an array of locale names that are currently being translated.

i18n.api.get(api[, locale])

Returns an structured object for the given API, with translations applied from the given locale.

  • api String - an Electron API like app or BrowserWindow. Can be the full name like BrowserWindow, or the URL-friendly slug like browser-window. (required)
  • locale String - a language locale (optional; defaults to en)

License

MIT

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.