From 8c7b9b35195331fc229b797d033af178ca91471f Mon Sep 17 00:00:00 2001 From: Omar Bouras Date: Thu, 18 Apr 2024 13:25:05 +0200 Subject: [PATCH] TASK-70643: Introduce new crowdin wf --- .github/workflows/download-crowdin.yml | 19 +++ .github/workflows/upload-crowdin-branches.yml | 14 ++ .github/workflows/upload-crowdin-main.yml | 14 ++ crowdin.yml | 144 ++++++++++++++++++ 4 files changed, 191 insertions(+) create mode 100644 .github/workflows/download-crowdin.yml create mode 100644 .github/workflows/upload-crowdin-branches.yml create mode 100644 .github/workflows/upload-crowdin-main.yml create mode 100644 crowdin.yml diff --git a/.github/workflows/download-crowdin.yml b/.github/workflows/download-crowdin.yml new file mode 100644 index 000000000..85f98f4e1 --- /dev/null +++ b/.github/workflows/download-crowdin.yml @@ -0,0 +1,19 @@ +name: Crowdin download Action + +on: + schedule: + - cron: "45 20 * * *" + workflow_dispatch: + +jobs: + download-crowdin-exo: + name: CI Build + uses: exoplatform/swf-scripts/.github/workflows/download-crowdin-exoplatform.yml@master + with: + CROWDIN_MAINTENANCE_EXO_VERSION: ${{ vars.CROWDIN_MAINTENANCE_EXO_VERSION }} + secrets: + CROWDIN_GITHUB_TOKEN: ${{ secrets.CROWDIN_GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + SWF_GPG_PRIVATE_KEY: ${{ secrets.SWF_GPG_PRIVATE_KEY }} + SWF_GPG_PASSPHRASE: ${{ secrets.SWF_GPG_PASSPHRASE }} diff --git a/.github/workflows/upload-crowdin-branches.yml b/.github/workflows/upload-crowdin-branches.yml new file mode 100644 index 000000000..5c3eb4d13 --- /dev/null +++ b/.github/workflows/upload-crowdin-branches.yml @@ -0,0 +1,14 @@ +name: Crowdin Upload branches + +on: + workflow_dispatch: + push: + branches: + - stable/* +jobs: + download-crowdin-exo: + name: CI Build + uses: exoplatform/swf-scripts/.github/workflows/upload-crowdin-branches.yml@master + secrets: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/upload-crowdin-main.yml b/.github/workflows/upload-crowdin-main.yml new file mode 100644 index 000000000..3dbfc3dfb --- /dev/null +++ b/.github/workflows/upload-crowdin-main.yml @@ -0,0 +1,14 @@ +name: Crowdin Upload main + +on: + workflow_dispatch: + push: + branches: + - develop +jobs: + download-crowdin-exo: + name: CI Build + uses: exoplatform/swf-scripts/.github/workflows/upload-crowdin-main.yml@master + secrets: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..ad2584056 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,144 @@ +# +# Your Crowdin credentials +# +"project_id_env" : "CROWDIN_PROJECT_ID" +"api_token_env" : "CROWDIN_PERSONAL_TOKEN" +"base_path" : "." +"base_url" : "https://api.crowdin.com" + +# +# Choose file structure in Crowdin +# e.g. true or false +# +"preserve_hierarchy": true +# +# Files configuration +# +files: [ + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/navigation/portal/dw_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/DW.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/navigation/portal/intranet_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/Intranet.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/navigation/portal/mycraft_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/MyCraft.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/navigation/portal/administration_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/Administration.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/navigation/portal/public_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/Public.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/portal/webui_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/Webui.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, + { + "source" : "/digital-workplace-webapps/src/main/resources/locale/portlet/Login_en.properties", + + "translation" : "%original_path%/%file_name%!_%locale_with_underscore%.%file_extension%", + "translation_replace" : { + "_en!": "","ar_SA": "ar","ar_OM": "aro","az_AZ": "az","ca_ES": "ca","ceb_PH": "ceb", + "co_FR": "co","cs_CZ": "cs","de_DE": "de","el_GR": "el","en_US": "en","es_ES": "es_ES","eu_ES": "eu","fa_IR": "fa", + "fi_FI": "fi","fil_PH": "fil","fr_FR": "fr","hi_IN": "hi","hu_HU": "hu","id_ID": "id","it_IT": "it","ja_JP": "ja", + "kab_KAB": "kab","ko_KR": "ko","lt_LT": "lt","ms_MY": "ms","nl_NL": "nl","no_NO": "no","pcm_NG": "pcm","pl_PL": "pl", + "pt_BR": "pt_BR","pt_PT": "pt_PT","ro_RO": "ro","ru_RU": "ru","sk_SK": "sk","sl_SI": "sl","sq_AL": "sq", + "sv_SE": "sv_SE","th_TH": "th","tl_PH": "tl","tr_TR": "tr","uk_UA": "uk","ur_IN": "ur_IN","vi_VN": "vi", + "zh_CN": "zh_CN","zh_TW": "zh_TW", + }, + "dest" : "add__ons/digital__workplace/Login.properties", + "update_option" : "update_as_unapproved", + "escape_special_characters": 0, + "escape_quotes" : 0, + }, +] \ No newline at end of file