Skip to content

Commit

Permalink
upgrade transifex CLI for github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Nov 15, 2022
1 parent 88d7d7f commit 460ca6d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/transifex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install transifex-client
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
source ~/.bashrc
- name: Create .transifexrc
uses: DamianReeves/write-file-action@e19fd875ed54f16fc583a3486e62547ce4a5dde8
with:
path: .transifexrc
write-mode: overwrite
contents: |
[https://www.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
password = ${{secrets.TX_TOKEN}}
username = api
token = ${{secrets.TX_TOKEN}}
- name: Push source strings to Transifex
run: tx push --source --no-interactive
25 changes: 14 additions & 11 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
[main]
host = https://www.transifex.com
minimum_perc = 1

[id-editor.community]
[o:openstreetmap:p:id-editor:r:community]
file_filter = .tx/tmp/community/<lang>.yaml
source_file = .tx/tmp/community/en.yaml
source_lang = en
type = YAML
type = YAML

[id-editor.core]
[o:openstreetmap:p:id-editor:r:core]
file_filter = .tx/tmp/core/<lang>.yaml
source_file = data/core.yaml
source_lang = en
type = YAML
type = YAML

[id-editor.presets]
file_filter = .tx/tmp/presets/<lang>.yaml
[o:openstreetmap:p:id-editor:r:imagery]
file_filter = .tx/tmp/imagery/<lang>.yaml
source_file = .tx/tmp/imagery/en.yaml
source_lang = en
type = YAML
type = YAML

[id-editor.imagery]
file_filter = .tx/tmp/imagery/<lang>.yaml
[o:openstreetmap:p:id-editor:r:presets]
file_filter = .tx/tmp/presets/<lang>.yaml
source_file = .tx/tmp/presets/en.yaml
source_lang = en
type = YAML
type = YAML

0 comments on commit 460ca6d

Please sign in to comment.