Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
fix: rework Crowdin integration (#3175)
Browse files Browse the repository at this point in the history
* chore: set up Crowdin configuration

* fix(app): sync strings from Crowdin

Closes #3174

* fix(ci): use crowdin/github-action instead of homebrew setup

* fix(build): remove obsolete Crowdin plugin
  • Loading branch information
msfjarvis authored Aug 18, 2024
1 parent 919f708 commit 71161e2
Show file tree
Hide file tree
Showing 24 changed files with 320 additions and 395 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/sync_crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,27 @@ jobs:
- name: Setup build environment
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop

- name: Download new translations from Crowdin
shell: bash
run: ./gradlew --no-configuration-cache crowdin
env:
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}

- name: Check if PR is required
run: if [[ $(git status -s) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
if: "env.UPDATED == 'true'"
- name: Sync translations to/from Crowdin
id: crowdin
uses: crowdin/github-action@v2
with:
author: GitHub Actions <[email protected]>
base: develop
body: This is an automated pull request to sync localisations from Crowdin.
branch: bot/crowdin-sync
commit-message: "strings: sync with crowdin"
labels: A-localisation, S-automerge
title: Sync localisations from Crowdin
token: ${{ secrets.PSL_UPDATE_TOKEN }}
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'develop'
env:
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PROJECT_KEY }}

- name: Enable automerge for PR
if: "${{ steps.cpr.outputs.pull-request-operation == 'created' }}"
shell: bash
run: |
gh pr merge --squash --auto "${PR_URL}"
env:
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
PR_URL: ${{ steps.crowdin.outputs.pull-request-url }}
6 changes: 0 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

plugins {
id("com.github.android-password-store.android-application")
id("com.github.android-password-store.crowdin-plugin")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-kapt")
id("com.github.android-password-store.versioning-plugin")
Expand All @@ -16,11 +15,6 @@ plugins {
alias(libs.plugins.kotlin.composeCompiler)
}

crowdin {
crowdinIdentifier = "android-password-store"
skipCleanup = false
}

android {
compileOptions { isCoreLibraryDesugaringEnabled = true }
namespace = "app.passwordstore"
Expand Down
257 changes: 144 additions & 113 deletions app/src/main/res/values-de/strings.xml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<string name="ssh_key_error_dialog_text">Message : \n</string>
<string name="pref_recursive_filter_title">Filtrage récursif</string>
<string name="pref_recursive_filter_summary">Cherche le mot de passe dans tous les sous-répertoires du répertoire actuel.</string>
<string name="pref_directory_structure">Organisation des fichiers de mot de passe</string>
<string name="pref_sort_order_title">Ordre de tri des mots de passe</string>
<string name="pref_folder_first_sort_order">Dossiers en premier</string>
<string name="pref_file_first_sort_order">Fichiers en premier</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<string name="ssh_key_error_dialog_text">Messaggio : \n</string>
<string name="pref_recursive_filter_title">Filtro ricorsivo</string>
<string name="pref_recursive_filter_summary">Trova ricorsivamente le password della directory corrente.</string>
<string name="pref_directory_structure">Organizzazione dei file di password</string>
<string name="pref_sort_order_title">Ordine password</string>
<string name="pref_folder_first_sort_order">Prima le cartelle</string>
<string name="pref_file_first_sort_order">Prima i file</string>
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<string name="git_commit_remove_text">Remova %1$s do armazenamento.</string>
<string name="git_commit_move_text">Renomear %1$s para %2$s.</string>
<string name="git_commit_move_multiple_text">Mova múltiplas senhas para %1$s.</string>
<string name="git_commit_gpg_id">Inicializar IDs GPG em %1$s.</string>
<!-- PGPHandler -->
<string name="clipboard_copied_text">Copiado para a área de transferência</string>
<string name="file_toast_text">Por favor, informe um nome de arquivo</string>
Expand Down Expand Up @@ -71,6 +72,7 @@
<string name="action_search">Pesquisar</string>
<string name="password">Senha:</string>
<string name="username">Usuário:</string>
<string name="copy_label">Copiar</string>
<string name="edit_password">Editar senha</string>
<string name="copy_password">Copiar senha</string>
<string name="share_as_plaintext">Compartilhar como texto</string>
Expand All @@ -95,7 +97,6 @@
<string name="ssh_key_error_dialog_text">Mensagem : \n</string>
<string name="pref_recursive_filter_title">Filtragem recursiva</string>
<string name="pref_recursive_filter_summary">Encontrar senhas do diretório corrente recursivamente.</string>
<string name="pref_directory_structure">Organização do arquivo de senha</string>
<string name="pref_sort_order_title">Ordenação da Senha</string>
<string name="pref_folder_first_sort_order">Pastas primeiro</string>
<string name="pref_file_first_sort_order">Arquivos primeiro</string>
Expand All @@ -117,6 +118,11 @@
<string name="pref_import_pgp_key_title">Importar chave PGP</string>
<string name="pref_pgp_key_manager_title">Gerenciador de Chaves</string>
<string name="pref_pgp_ascii_armor_title">Criptografar no modo de proteção ASCII</string>
<string name="pref_passphrase_cache_title">Ativar cache da senha</string>
<string name="pref_passphrase_cache_summary">AVISO: este recurso é funcional mas muito experimental. Requer um bloqueio de tela ativo.</string>
<string name="pref_passphrase_cache_authenticate_enable">Autenticar para ativar o cache</string>
<string name="pref_passphrase_cache_auto_clear_title">Limpar automaticamente cache de senha</string>
<string name="pref_passphrase_cache_auto_clear_summary">Limpa o cache de senha quando a tela está desligada</string>
<!-- PasswordGenerator fragment -->
<string name="pwgen_title">Gerar Senha</string>
<string name="pwgen_generate">Gerar</string>
Expand Down Expand Up @@ -273,6 +279,7 @@
<string name="otp_import_failure_no_selection">Nenhum arquivo de imagem foi selecionado</string>
<string name="exporting_passwords">Exportando senhas…</string>
<string name="invalid_gpg_id">Encontrado .gpg-id, mas contém um ID de chave, fingerprint ou ID de usuário inválidos</string>
<string name="short_gpg_id">Encontrado .gpg-id, mas contém uma ID hexadecimal curta, que não é suportada</string>
<string name="invalid_filename_text">Nome do arquivo não deve conter \'/\', defina o diretório acima</string>
<string name="directory_hint">Diretório</string>
<string name="new_folder_set_gpg_key">Definir chave GPG para diretório</string>
Expand All @@ -288,6 +295,7 @@
<string name="git_break_out_of_detached_success">Houve um conflito ao executar o rebase. Houve um push de branch %1$s local para outra branch chamada %2$s\n Use esta branch para resolver o conflito no seu computador</string>
<string name="git_break_out_of_detached_unneeded">O repositório não está sendo rebased, não há necessidade de fazer push para outro branch</string>
<!-- GPG key selection in folder creation -->
<string name="gpg_key_select_mandatory">A seleção de uma chave GPG é necessária para prosseguir</string>
<string name="folder_creation_err_file_exists">Já existe um arquivo com esse nome</string>
<string name="folder_creation_err_folder_exists">Já existe uma pasta com esse nome</string>
<!-- Onboarding flow -->
Expand Down Expand Up @@ -335,4 +343,7 @@
<string name="pgp_key_manager_no_keys_guidance">Importar uma chave usando o botão Adicionar abaixo</string>
<string name="no_keys_imported_dialog_title">Nenhuma chave importada</string>
<string name="no_keys_imported_dialog_message">Não há chaves PGP importadas no aplicativo ainda, pressione o botão abaixo para escolher um arquivo de chave</string>
<string name="biometric_prompt_title_gpg_passphrase_cache">Desbloquear cache da senha</string>
<string name="aead_detect_title">Criptografia AEAD detectada</string>
<string name="aead_detect_message">%1$s, consulte https://passwordstore.app/fix-aead para obter mais informações</string>
</resources>
1 change: 0 additions & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
<string name="ssh_key_error_dialog_text">Сообщение: \n</string>
<string name="pref_recursive_filter_title">Рекурсивная фильтрация</string>
<string name="pref_recursive_filter_summary">Рекурсивный поиск паролей в текущей директории</string>
<string name="pref_directory_structure">Организация файла паролей</string>
<string name="pref_sort_order_title">Порядок сортировки паролей</string>
<string name="pref_folder_first_sort_order">Сначала папки</string>
<string name="pref_file_first_sort_order">Сначала файлы</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<string name="ssh_key_error_dialog_text">消息: </string>
<string name="pref_recursive_filter_title">递归过滤</string>
<string name="pref_recursive_filter_summary">递归式寻找当前目录的密码</string>
<string name="pref_directory_structure">密码文件组</string>
<string name="pref_sort_order_title">密码排序顺序</string>
<string name="pref_folder_first_sort_order">目录优先</string>
<string name="pref_file_first_sort_order">文件优先</string>
Expand Down
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">في انتظار الرسائل القصيرة…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">Esperando por SMS…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">Odotetaan SMS-viestiä…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-gl-rES/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">Agardando polo SMS…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">SMS-re várakozás…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">SMS를 기다리는 중입니다…</string>
</resources>
8 changes: 8 additions & 0 deletions app/src/nonFree/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<resources>
<string name="oreo_autofill_waiting_for_sms">Oczekiwanie na SMS…</string>
</resources>
3 changes: 2 additions & 1 deletion app/src/nonFree/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
Expand Down
4 changes: 0 additions & 4 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ gradlePlugin {
id = "com.github.android-password-store.android-library"
implementationClass = "app.passwordstore.gradle.LibraryPlugin"
}
register("crowdin") {
id = "com.github.android-password-store.crowdin-plugin"
implementationClass = "app.passwordstore.gradle.crowdin.CrowdinDownloadPlugin"
}
register("git-hooks") {
id = "com.github.android-password-store.git-hooks"
implementationClass = "app.passwordstore.gradle.GitHooksPlugin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ import okhttp3.OkHttpClient
object OkHttp {
private val certificatePinner =
CertificatePinner.Builder()
.add(
"api.crowdin.com",
"sha256/qKpGqFXXIteblI82BcMyRX0eC2o7lpL9XVInWKIG7rc=",
"sha256/DxH4tt40L+eduF6szpY6TONlxhZhBd+pJ9wbHlQ2fuw=",
"sha256/++MBgDH5WGvL9Bcn5Be30cRcL0f5O+NyoXuWtQdX1aI=",
)
.add(
"publicsuffix.org",
"sha256/Ov/MkC2OkVtTp9MdY+uXOKAuV2Birfdeazval8seMZM=",
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 71161e2

Please sign in to comment.