From 34a1812a18cc5035ca6251cb2055f88d9d7809ea Mon Sep 17 00:00:00 2001 From: "Romain B." <8530352+Rom1-B@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:54:25 +0200 Subject: [PATCH] Add workflows to sync locales (#71) * Add workflows to sync locales * tx --- .github/workflows/locales-sync.yml | 14 ++++++++++++++ .github/workflows/locales-update-source.yml | 13 +++++++++++++ .tx/config | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/locales-sync.yml create mode 100644 .github/workflows/locales-update-source.yml diff --git a/.github/workflows/locales-sync.yml b/.github/workflows/locales-sync.yml new file mode 100644 index 0000000..f1efd1c --- /dev/null +++ b/.github/workflows/locales-sync.yml @@ -0,0 +1,14 @@ +name: "Synchronize locales" + +on: + schedule: + - cron: "0 0 * * 1-5" + workflow_dispatch: + +jobs: + sync-with-transifex: + name: "Sync with transifex" + uses: "glpi-project/plugin-translation-workflows/.github/workflows/transifex-sync.yml@v1" + secrets: + github-token: "${{ secrets.LOCALES_SYNC_TOKEN }}" + transifex-token: "${{ secrets.TRANSIFEX_TOKEN }}" diff --git a/.github/workflows/locales-update-source.yml b/.github/workflows/locales-update-source.yml new file mode 100644 index 0000000..928c931 --- /dev/null +++ b/.github/workflows/locales-update-source.yml @@ -0,0 +1,13 @@ +name: "Update locales sources" + +on: + push: + branches: + - "main" + +jobs: + push-on-transifex: + name: "Push locales sources" + uses: "glpi-project/plugin-translation-workflows/.github/workflows/transifex-push-sources.yml@v1" + secrets: + transifex-token: "${{ secrets.TRANSIFEX_TOKEN }}" diff --git a/.tx/config b/.tx/config index 4099bf8..bf0ea4b 100644 --- a/.tx/config +++ b/.tx/config @@ -1,8 +1,8 @@ [main] host = https://www.transifex.com -[o:teclib:p:glpi-plugin-treeview:r:treeview-pot] +[o:teclib:p:glpi-project-plugin-treeview:r:treeview-pot] file_filter = locales/.po source_file = locales/treeview.pot -source_lang = en_GB +source_lang = en type = PO