electron-i18n

Electron 的翻译文档。「? The home of Electron's translated documentation」

  • 所有者: electron/i18n
  • 平台: Linux, Mac, Windows
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

electron-i18n

Dependabot badge

A home for Electron's translated documentation.

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??

Contributing

Do you speak multiple languages? We need your help!

To get started translating, visit
crowdin.com/project/electron
and log in with your GitHub account.

The following languages are currently being translated, but we can
easily add more:

Installation

If you're just here to translate content, see above. ☝️

If you're here to actually use this translated content for some purpose,
read on! This project is published to npm as a module containing all the
translated docs.

npm install electron-i18n

Usage

The electron-i18n module has no dependencies and exports no functions. It is
simply a large JSON object containing all of Electron's API docs and tutorial
content, in every language.

Require the module in your code:

const i18n = require('electron-i18n')

i18n is an object with the following keys:

  • electronLatestStableVersion is a string like 1.7.8
  • electronLatestStableTag is a string like v1.7.8
  • electronMasterBranchCommit is a git commit SHA string.
  • docs - see #docs
  • locales - see #locales
  • website - see #website
  • date is a timestamp

Docs

i18n.docs is an object with locale strings as keys:

Object.keys(i18n.docs)
[ 'en-US', 'fr-FR', 'vi-VN', 'ja-JP', 'zh-CN', '...']

Each locale object contains an object with doc HREFs as keys:

> Object.keys(i18n.docs['en-US'])

[
  '/docs/tutorial/about',
  '/docs/api/accelerator',
  '/docs/tutorial/accessibility',
  '/docs/api/app',
  '...'
]

Each doc object contains metadata and an HTML version of itself, ready to be
rendered:

i18n.docs['en-US']['/docs/api/app']

{
  locale: 'en-US',
  slug: 'app',
  category: 'api',
  categoryFancy: 'API',
  href: '/docs/api/app',
  title: 'app',
  description: '\nControl your application\'s event lifecycle.\n'
  githubUrl: 'https://github.com/electron/electron/tree/master/docs/api/app.md',
  crowdinFileId: '123',
  isTutorial: false,
  isApiDoc: true,
  isDevTutorial: false,
  isApiStructureDoc: false,
  markdown: '...',
  html: '...'
}

Locales

i18n.locales is an object with locale strings as keys:

Object.keys(i18n.locales)
[ 'en-US', 'fr-FR', 'vi-VN', 'ja-JP', 'zh-CN', '...']

Each locale object contains language names, country info, and translation
progress:

i18n.locales['en-US']

{ locale: 'en-US',
  languageCode: 'en',
  languageName: 'English',
  languageNativeName: 'English',
  countryCode: 'US',
  countryName: 'United States',
  stats: {
    translated_progress: 100,
    approved_progress: 100
  }
}

Website

i18n.website contains localized versions of electron/electronjs.org/blob/master/data/locale.yml.

It is an object with locale strings as keys:

Object.keys(i18n.locales)
[ 'en-US', 'fr-FR', 'vi-VN', 'ja-JP', 'zh-CN', '...']
i18n.website['fr-FR']

{
  tagline: 'Développez des applications desktop multi-plateformes avec JavaScript, HTML et CSS',
  nav: '...'
}

License

MIT

主要指標

概覽
名稱與所有者electron/i18n
主編程語言TypeScript
編程語言JavaScript (語言數: 4)
平台Linux, Mac, Windows
許可證Other
所有者活动
創建於2017-05-16 22:18:06
推送於2022-08-02 02:35:05
最后一次提交2022-05-18 00:07:26
發布數3328
最新版本名稱v1.3136.0 (發布於 )
第一版名稱v1.6.11 (發布於 )
用户参与
星數621
關注者數64
派生數238
提交數30.2k
已啟用問題?
問題數121
打開的問題數19
拉請求數1410
打開的拉請求數29
關閉的拉請求數530
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?