Merge pull request #231 from vector-im/feature/bma/localazy

Localazy
This commit is contained in:
Benoit Marty 2023-03-20 12:52:29 +01:00 committed by GitHub
commit 930cde37d4
4 changed files with 25 additions and 37 deletions

View file

@ -1,25 +0,0 @@
name: Sync Data From External Sources
on:
schedule:
# Every nights at 6
- cron: "0 6 * * *"
jobs:
sync-strings:
runs-on: ubuntu-latest
# Skip in forks
if: github.repository == 'vector-im/element-x-android'
# No concurrency required, runs every time on a schedule.
steps:
- uses: actions/checkout@v3
- name: Run local script
run: ./tools/strings/importStringsFromElement.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Import strings from Element Android
title: Sync strings
body: |
- Update strings from Element Android
branch: sync-strings
base: develop

View file

@ -1,15 +1,5 @@
## Module ui-strings
This module contains strings from Element Android.
This module contains all the strings for the project.
The content of this module will be keep synced by the script `rootDir/tools/strings/importStringsFromElement.sh`, which is run daily by a GitHub action.
### Adding new strings
Add new strings to the file `./src/main/res/values/new_strings.xml`, or your new strings will be erased on the next sync.
Also, new strings must be added to Element Android to give a chance to get translation.
### Long term
In the future, Weblate will be synced directly with this project.
For more details, see [the dedicated README.md file](../../tools/localazy/README.md)

23
tools/localazy/README.md Normal file
View file

@ -0,0 +1,23 @@
# Localazy
Localazy is used to host the source strings and their translations.
## Localazy project
To add new strings, or to translate existing strings, go the the Localazy project: [https://localazy.com/p/element](https://localazy.com/p/element).
Never edit manually the files `localazy.xml`!.
## CLI Installation
To install the Localazy client, follow the instructions from [here](https://localazy.com/docs/cli/installation).
## Download translations
In the root folder of the project, run:
```shell
localazy download --config ./tools/localazy/localazy.json
```
It will update all the `localazy.xml` resource files. In case of merge conflicts, just erase the files and download again using the Localazy client.