Skip to content

Commit

Permalink
Merge pull request #528 from ExpressLRS/crowdin-integration
Browse files Browse the repository at this point in the history
Add crowdin.com integration
  • Loading branch information
jurgelenas authored Jun 24, 2023
2 parents 853a922 + a63693e commit e34238e
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 17 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/translations-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Translations download and PR

on:
workflow_dispatch:
schedule:
- cron: '00 3 * * 1'



jobs:
crowdin-translations-to-pr:
name: Create a PR with the latest translations from Crowdin
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download Crowdin translations and create Pull Request
uses: crowdin/github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
config: 'crowdin.yml'
crowdin_branch_name: ${{ github.ref_name }}

upload_sources: false
upload_translations: false

download_translations: true
download_translations_args: '-l zh-CN'
localization_branch_name: update-translations-crowdin
push_translations: true
commit_message: 'Update translations'

create_pull_request: true
pull_request_title: 'Update translations'
pull_request_body: |
**This is an automated PR.**
This PR updates the translations using the content from Crowdin. Thanks to all the translators for the really hard work!!!
If you want to help to make the localization better, or add a new language, go to [Crowdin](https://crowdin.com/project/expresslrs-configurator/) and start helping!.
[crowdin.com/expresslrs-configurator](https://crowdin.com/project/expresslrs-configurator/)
34 changes: 34 additions & 0 deletions .github/workflows/translations-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upload translation keys to Crowdin

concurrency: upload-crowdin

on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'locales/en/**'

jobs:
upload-message-keys-to-crowdin:
name: Messages file to Crowdin
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Upload messages file
uses: crowdin/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
config: 'crowdin.yml'
crowdin_branch_name: ${{ github.ref_name }}

upload_sources: true
upload_translations: false

download_translations: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ npm-debug.log.*
/src/api/src/services/BinaryFlashingStrategy/firmware
__pycache__
r2
crowdin_env.sh
63 changes: 47 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ ExpressLRS Configurator is a cross-platform build & configuration tool for the

## Support ExpressLRS

Supporting ExpressLRS is as easy as contributing a feature, either code or just a fleshed out idea. Coding not your thing? Testing a Pull Request using the convenient Configurator tab and providing feedback is essential as well. We're all working together.
Supporting ExpressLRS is as easy as contributing a feature, either code or just a fleshed out idea. Coding not your
thing? Testing a Pull Request using the convenient Configurator tab and providing feedback is essential as well. We're
all working together.

If you don't have the time to contribute in that way, consider making a small donation. Donations are used to buy test equipment, software licenses, and certificates needed to further the project and make it securely accessible. ExpressLRS accepts donations through [Open Collective](https://opencollective.com/expresslrs), which provides recognition of donors and transparency on how that support is utilized.
If you don't have the time to contribute in that way, consider making a small donation. Donations are used to buy test
equipment, software licenses, and certificates needed to further the project and make it securely accessible. ExpressLRS
accepts donations through [Open Collective](https://opencollective.com/expresslrs), which provides recognition of donors
and transparency on how that support is utilized.

[![Open Collective backers](https://img.shields.io/opencollective/backers/expresslrs?label=Open%20Collective%20backers)](https://opencollective.com/expresslrs)

## Quick Start Guide
If you have hardware that you want to flash, please refer to our guides on the [website](https://www.expresslrs.org/), and our [FAQ](https://www.expresslrs.org/3.0/faq/)

If you have hardware that you want to flash, please refer to our guides on the [website](https://www.expresslrs.org/),
and our [FAQ](https://www.expresslrs.org/3.0/faq/)

## Installation

Expand All @@ -40,9 +47,11 @@ The minimum required version of windows is Windows 8.
#### macOS

Changes to the security model used in the latest versions of MacOS X 10.14 (Mojave) and 10.15 (Catalina)
mean that the operating system will show an error message ('"ExpressLRS Configurator.app" cannot be openend because the developer cannot be verified') when trying to install the application.
mean that the operating system will show an error message ('"ExpressLRS Configurator.app" cannot be openend because the
developer cannot be verified') when trying to install the application.

To work around this, click `ExpressLRS Configurator.app` while pressing `control` key, and click `Open`. In the popup, you'll be able to forcefully open the application. (you may need to try this twice.)
To work around this, click `ExpressLRS Configurator.app` while pressing `control` key, and click `Open`. In the popup,
you'll be able to forcefully open the application. (you may need to try this twice.)

Alternatively, run the following command in a terminal after installing:

Expand Down Expand Up @@ -110,6 +119,38 @@ sudo apt update
sudo apt install git
```

## Localisation

**Please do not submit pull requests for translation changes, but read and follow the instructions below!**

ExpressLRS Configurator has been translated into several languages. The application will try to detect and use your
system language if a translation into this language is available.

If you prefer to have the application in English or any other language, you can select your desired language in the
"Settings" menu.

We want to make ExpressLRS accessible for pilots who are not fluent in English. We have got a team of volunteer
translators who do this work, but additional translators are always welcome to share the workload, and we are keen to
add additional languages. If you would like to help us with translations, you have got the following options:

- if you help by suggesting some updates or improvements to translations in a language you are familiar with, head
to [crowdin.com](https://crowdin.com/project/expresslrs-configurator) and add your suggested translations there.
- if you would like to start working on the translation for a new language, or take on responsibility for proof-reading
the translation for a language you are very familiar with, please head to the ExpressLRS Discord chat
(registration [here](https://discord.gg/dS6ReFY)), and join the
[#configurator-translation](https://discord.com/channels/596350022191415318/1121712995505021059) channel - the people
in there can help you to get a new language added, or set you up as a proof reader.

Our localisation progress:

![Translations progress](https://badges.awesome-crowdin.com/translation-15884405-596659-update.png)

## Screenshots

![Main screen](docs/readme/screenshots/main_screen.jpg)

![Compile result](docs/readme/screenshots/compile_result.jpg)

## Architecture

```
Expand Down Expand Up @@ -150,7 +191,7 @@ yarn install --frozen-lockfile
yarn start
```

In order to simulate WI-FI devices on your local network you can start application with
In order to simulate WI-FI devices on your local network you can start application with
`MULTICAST_DNS_SIMULATOR_ENABLED` environment variable:

```
Expand All @@ -165,16 +206,6 @@ Generate TypeScript types from Graphql schema and Queries located in [src/ui/gql
yarn run gql-codegen
```

## Screenshots

![Main screen](docs/readme/screenshots/main_screen.jpg)

![Compile result](docs/readme/screenshots/compile_result.jpg)

## Credits

- [electron-react-boilerplate](https://github.com/electron-react-boilerplate/electron-react-boilerplate)

## Legal disclaimer

The use and operation of this type of device may require a license, and some countries may forbid its use. It is
Expand Down
13 changes: 13 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
"base_path": "."
"base_url": "https://api.crowdin.com"

"preserve_hierarchy": true

files: [
{
"source": "/src/i18n/locales/en/messages.json",
"translation": "/src/i18n/locales/%two_letters_code%/%original_file_name%",
}
]
2 changes: 1 addition & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ i18n
.init({
fallbackLng: 'en',
backend: {
loadPath: './i18n/{{lng}}/translation.json',
loadPath: './i18n/locales/{{lng}}/messages.json',
},
debug:
process.env.NODE_ENV === 'development' ||
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit e34238e

Please sign in to comment.