mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Automating translations updates (#2218)
* Automatically push new strings to cutter-translations
This commit is contained in:
parent
d971f30d25
commit
1cbbc45678
@ -90,7 +90,7 @@ matrix:
|
||||
brewfile: scripts/Brewfile
|
||||
update: true # updating brew to get slightly newer meson, 0.54 doesn't work on macOS.
|
||||
|
||||
- name: Documentation + Deploy
|
||||
- name: Documentation + Translations + Deploy
|
||||
os: linux
|
||||
cache: ~
|
||||
addons:
|
||||
@ -113,17 +113,19 @@ matrix:
|
||||
before_deploy:
|
||||
- cd "$TRAVIS_BUILD_DIR"
|
||||
- openssl aes-256-cbc -K $encrypted_bd0ed4c1fd75_key -iv $encrypted_bd0ed4c1fd75_iv -in scripts/deploy_docs_rsa.enc -out scripts/deploy_docs_rsa -d
|
||||
- openssl aes-256-cbc -K $encrypted_df6d16737705c_key -iv $encrypted_df6d16737705c_iv -in scripts/deploy_translations_rsa.enc -out scripts/deploy_translations_rsa -d
|
||||
- chmod 600 scripts/deploy_docs_rsa
|
||||
- chmod 600 scripts/deploy_translations_rsa
|
||||
- export GIT_SSH_COMMAND="/usr/bin/ssh -i $TRAVIS_BUILD_DIR/scripts/deploy_docs_rsa"
|
||||
- git config --global user.name "Travis CI"
|
||||
- git config --global user.email "travis@travis-ci.com"
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: bash scripts/deploy_docs.sh
|
||||
script: bash -c "./scripts/deploy_docs.sh; ./scripts/deploy_translations.sh"
|
||||
on:
|
||||
repo: radareorg/cutter
|
||||
branch: master
|
||||
branch: translate
|
||||
|
||||
|
||||
sudo: required
|
||||
@ -229,6 +231,7 @@ script:
|
||||
fi
|
||||
|
||||
after_success:
|
||||
# Do the release
|
||||
- export CUTTER_VERSION=$(python ../scripts/get_version.py)
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
lrelease ../src/Cutter.pro &&
|
||||
|
21
scripts/deploy_translations.sh
Executable file
21
scripts/deploy_translations.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
#######################
|
||||
#### Push new translation files
|
||||
|
||||
# Update submodule
|
||||
cd ${TRAVIS_BUILD_DIR}/src
|
||||
git submodule update translations
|
||||
cd translations
|
||||
git pull origin master
|
||||
|
||||
# Generate Crowdin single translation file from cutter_fr.ts
|
||||
lupdate ../Cutter.pro
|
||||
cp ./fr/cutter_fr_FR.ts ./Translations.ts
|
||||
|
||||
# Push it so Crowdin can find new strings, and later push updated translations
|
||||
git add Translations.ts
|
||||
git commit -m "Updated translations"
|
||||
export GIT_SSH_COMMAND="/usr/bin/ssh -i $TRAVIS_BUILD_DIR/scripts/deploy_translations_rsa"
|
||||
echo "Pushing new translation strings..."
|
||||
git push "git@github.com:radareorg/cutter-translations.git" HEAD:refs/heads/master
|
BIN
scripts/deploy_translations_rsa.enc
Normal file
BIN
scripts/deploy_translations_rsa.enc
Normal file
Binary file not shown.
@ -11,22 +11,25 @@ VERSION = $${CUTTER_VERSION_MAJOR}.$${CUTTER_VERSION_MINOR}.$${CUTTER_VERSION_PA
|
||||
# Required QT version
|
||||
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
|
||||
|
||||
TRANSLATIONS += translations/cutter_ar.ts \
|
||||
translations/cutter_ca.ts \
|
||||
translations/cutter_cn.ts \
|
||||
translations/cutter_de.ts \
|
||||
translations/cutter_es.ts \
|
||||
translations/cutter_fa.ts \
|
||||
translations/cutter_fr.ts \
|
||||
translations/cutter_he.ts \
|
||||
translations/cutter_hi.ts \
|
||||
translations/cutter_it.ts \
|
||||
translations/cutter_ja.ts \
|
||||
translations/cutter_nl.ts \
|
||||
translations/cutter_pt.ts \
|
||||
translations/cutter_ro.ts \
|
||||
translations/cutter_ru.ts \
|
||||
translations/cutter_tr.ts
|
||||
TRANSLATIONS += translations/ar/cutter_ar.ts \
|
||||
translations/ca/cutter_ca.ts \
|
||||
translations/de/cutter_de.ts \
|
||||
translations/es-ES/cutter_es.ts \
|
||||
translations/fa/cutter_fa.ts \
|
||||
translations/fr/cutter_fr.ts \
|
||||
translations/he/cutter_he.ts \
|
||||
translations/hi/cutter_hi.ts \
|
||||
translations/it/cutter_it.ts \
|
||||
translations/ja/cutter_ja.ts \
|
||||
translations/nl/cutter_nl.ts \
|
||||
translations/pt-PT/cutter_pt.ts \
|
||||
translations/ro/cutter_ro.ts \
|
||||
translations/ru/cutter_ru.ts \
|
||||
translations/tr/cutter_tr.ts \
|
||||
translations/zh-CN/cutter_zh.ts
|
||||
|
||||
# translations/ko/cutter_ko.ts problems with fonts
|
||||
# translations/pt-BR/cutter_pt.ts #2321 handling multiple versions of a language
|
||||
|
||||
# Icon for OS X
|
||||
ICON = img/cutter.icns
|
||||
|
@ -1,23 +1,23 @@
|
||||
set(TS_FILES
|
||||
translations/cutter_ar.ts
|
||||
translations/cutter_ca.ts
|
||||
translations/cutter_cn.ts
|
||||
translations/cutter_de.ts
|
||||
translations/cutter_es.ts
|
||||
translations/cutter_fa.ts
|
||||
translations/cutter_fr.ts
|
||||
translations/cutter_he.ts
|
||||
translations/cutter_hi.ts
|
||||
translations/cutter_it.ts
|
||||
translations/cutter_ja.ts
|
||||
translations/cutter_nl.ts
|
||||
translations/cutter_pt.ts
|
||||
translations/cutter_ro.ts
|
||||
translations/cutter_ru.ts
|
||||
translations/cutter_tr.ts
|
||||
translations/ar/cutter_ar.ts
|
||||
translations/ca/cutter_ca.ts
|
||||
translations/de/cutter_de.ts
|
||||
translations/es-ES/cutter_es.ts
|
||||
translations/fa/cutter_fa.ts
|
||||
translations/fr/cutter_fr.ts
|
||||
translations/he/cutter_he.ts
|
||||
translations/hi/cutter_hi.ts
|
||||
translations/it/cutter_it.ts
|
||||
translations/ja/cutter_ja.ts
|
||||
translations/nl/cutter_nl.ts
|
||||
translations/pt-PT/cutter_pt.ts
|
||||
translations/ro/cutter_ro.ts
|
||||
translations/ru/cutter_ru.ts
|
||||
translations/tr/cutter_tr.ts
|
||||
translations/zh-CN/cutter_zh.ts
|
||||
)
|
||||
# translations/cutter_ko.ts problems with fonts
|
||||
# translations/cutter_pt-BR #2321 handling multiple versions of a language
|
||||
# translations/ko/cutter_ko.ts problems with fonts
|
||||
# translations/pt-BR/cutter_pt.ts #2321 handling multiple versions of a language
|
||||
|
||||
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translations)
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7b0dd0675ba51e45106a2a188b8c01608953ffdc
|
||||
Subproject commit 8e1d24b4040474c681d8db39cb75c0ed66bb5bda
|
Loading…
Reference in New Issue
Block a user