From ef9cba76a075081f357aeca2e62c18cd89e67b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3n=20Molleda?= Date: Fri, 1 Oct 2021 14:35:23 -0700 Subject: [PATCH] chore: disable Crowdin integration The translation will happen directly in electron/electronjs.org-new. This will avoid delays between getting the translation, publishing the i18n package, and updating all the projects that depend on it. --- .github/PULL_REQUEST_TEMPLATE | 9 - .github/config.yml | 16 -- .github/dependabot.yml | 14 -- .github/workflows/push.yml | 36 ---- .../schedule-auto-merge-crowdin-pr.yml | 22 --- .../schedule-update-source-content.yml | 22 --- readme.md | 161 +----------------- 7 files changed, 4 insertions(+), 276 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE delete mode 100644 .github/config.yml delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/push.yml delete mode 100644 .github/workflows/schedule-auto-merge-crowdin-pr.yml delete mode 100644 .github/workflows/schedule-update-source-content.yml diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 265e3a6b74502..0000000000000 --- a/.github/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/.github/config.yml b/.github/config.yml deleted file mode 100644 index 38f9d8e91240a..0000000000000 --- a/.github/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for https://github.com/behaviorbot/welcome - -newIssueWelcomeComment: > - 👋 Thanks for opening your first issue here! - -newPRWelcomeComment: > - Thanks for opening your first pull request on this repo! - - Note that translations should be made on [Crowdin](https://crowdin.com/project/electron) and _should not_ be submitted manually here as a pull request. - - Please check out our [contributing guidelines](https://github.com/electron/i18n/blob/master/contributing.md). - - 🙏 - -firstPRMergeComment: > - Thanks for your contribution! You are awesome. 💛 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 93dca2c3acd40..0000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 2 -updates: - - package-ecosystem: npm - directory: '/' - schedule: - interval: weekly - time: '13:00' - open-pull-requests-limit: 99 - - package-ecosystem: github-actions - directory: / - schedule: - interval: weekly - time: '13:00' - open-pull-requests-limit: 999 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index a1fc6066c2640..0000000000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI / GitHub Actions - -on: - pull_request: - branches: - - master - push: - branches: - - master - -jobs: - build: - name: Install dependencies - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v2.2.0 - with: - node-version: '12.x' - - name: Install dependencies - run: 'npm ci' - - name: Run tests - env: - NODE_OPTIONS: --max_old_space_size=4096 - run: 'npm test' - - uses: actions/upload-artifact@v2.2.4 - if: github['ref'] == 'refs/heads/master' - with: - name: 'Dist folder' - path: dist/ - - name: Publish via semantic-release - if: github['ref'] == 'refs/heads/master' - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm run semantic-release diff --git a/.github/workflows/schedule-auto-merge-crowdin-pr.yml b/.github/workflows/schedule-auto-merge-crowdin-pr.yml deleted file mode 100644 index 679283811d0c5..0000000000000 --- a/.github/workflows/schedule-auto-merge-crowdin-pr.yml +++ /dev/null @@ -1,22 +0,0 @@ -on: - schedule: - - cron: 00 09 * * * - workflow_dispatch: {} - -name: Auto-merge Crowdin PR - -jobs: - installDependencies: - name: Install dependencies - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v2.2.0 - with: - node-version: '12.x' - - name: Install dependencies - run: npm ci - - name: Automerge PR - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: npm run automerge diff --git a/.github/workflows/schedule-update-source-content.yml b/.github/workflows/schedule-update-source-content.yml deleted file mode 100644 index 34bc0c97340cf..0000000000000 --- a/.github/workflows/schedule-update-source-content.yml +++ /dev/null @@ -1,22 +0,0 @@ -on: - schedule: - - cron: 0 */6 * * * - workflow_dispatch: {} - -name: Update source content - -jobs: - fetchLatestSourceContent: - name: Fetch latest source content - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v2.2.0 - with: - node-version: "12.x" - - name: Fetch latest source content - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NODE_OPTIONS: --max_old_space_size=4096 - run: npm run update-source-content - - run: git pull origin master diff --git a/readme.md b/readme.md index a02fb607ea74d..21b2a56e7e2f0 100644 --- a/readme.md +++ b/readme.md @@ -1,159 +1,6 @@ # electron-i18n -[![Dependabot badge](https://img.shields.io/badge/Dependabot-enabled-blue.svg)](https://dependabot.com/) - -> 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](https://crowdin.com/project/electron) -and log in with your GitHub account. - -The following languages are currently being translated: - - -- [日本語 (Japanese)](https://crowdin.com/project/electron/ja) -- [Español (Spanish)](https://crowdin.com/project/electron/es-ES) -- [中文 (Chinese Simplified)](https://crowdin.com/project/electron/zh-CN) -- [Français (French)](https://crowdin.com/project/electron/fr) -- [Русский (Russian)](https://crowdin.com/project/electron/ru) -- [Português (Portuguese)](https://crowdin.com/project/electron/pt-BR) -- [Deutsch (German)](https://crowdin.com/project/electron/de) - - -## 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. - -```sh -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: - -```js -const i18n = require('electron-i18n') -``` - -`i18n` is an object with the following keys: - -- `electronLatestStableTag` is a string like `v1.7.8` -- `docs` - see [#docs](#docs) -- `locales` - see [#locales](#locales) -- `website` - see [#website](#website) -- `date` is a timestamp - -### Docs - -`i18n.docs` is an object with locale strings as keys: - -```js -> Object.keys(i18n.docs) -[ 'en-US', 'fr-FR', 'ja-JP', 'zh-CN', '...'] -``` - -Each locale object contains an object with doc HREFs as keys: - -```js -> 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: - -```js -> 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: - -```js -> Object.keys(i18n.locales) -[ 'en-US', 'fr-FR', 'ja-JP', 'zh-CN', '...'] -``` - -Each locale object contains language names, country info, and translation -progress: - -```js -> 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](https://github.com/electron/electronjs.org/blob/master/data/locale.yml). - -It is an object with locale strings as keys: - -```js -> Object.keys(i18n.locales) -[ 'en-US', 'fr-FR', 'ja-JP', 'zh-CN', '...'] -``` - -```js -> i18n.website['fr-FR'] -{ - tagline: 'Développez des applications desktop multi-plateformes avec JavaScript, HTML et CSS', - nav: '...' -} -``` - - -## License - -[MIT](license) - -[Crowdin]: https://crowdin.com/project/electron +**THIS PROJECT IS DEPRECATED** The i18n efforts continue happening in +[Crowdin](https://crowdin.com/projects/electron) but the sync is done directly +on +[electron/electronjs.org-new](https://github.com/electron/electronjs.org-new).