Skip to content

Commit

Permalink
TASK-71389: Introduce crowdin wf using v2 api (#516)
Browse files Browse the repository at this point in the history
This PR aims to introduce new github action wf based on crowdin v2 API
  • Loading branch information
bourasom committed May 21, 2024
1 parent 910c8d6 commit 5eb4fa6
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/download-crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Crowdin download Action

on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:

jobs:
download-crowdin:
name: CI Build
uses: exoplatform/swf-scripts/.github/workflows/download-crowdin-meedsio.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 }}
16 changes: 16 additions & 0 deletions .github/workflows/upload-crowdin-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Crowdin Upload branches

on:
workflow_dispatch:
push:
branches:
- develop-exo
- develop-meed
- stable/*
jobs:
upload-crowdin-branch:
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 }}
14 changes: 14 additions & 0 deletions .github/workflows/upload-crowdin-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Crowdin Upload main

on:
workflow_dispatch:
push:
branches:
- develop
jobs:
upload-crowdin-main:
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 }}
144 changes: 144 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -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" : "/wallet-services/src/main/resources/locale/notification/WalletNotification_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/wallet/WalletNotification.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-services/src/main/resources/locale/addon/Wallet_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/wallet/Wallet.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-services/src/main/resources/locale/addon/Gamification_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/wallet/Gamification.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-services/src/main/resources/locale/portlet/Portlets_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/wallet/Portlets.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-webapps/src/main/resources/locale/navigation/portal/global_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/wallet/webui_en.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-webapps/src/main/resources/locale/portlet/NotificationAdministration_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/wallet/NotificationAdministration.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
{
"source" : "/wallet-webapps/src/main/resources/locale/portlet/Analytics_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/wallet/Analytics.properties",
"update_option" : "update_as_unapproved",
"escape_special_characters": 0,
"escape_quotes" : 0,
},
]

0 comments on commit 5eb4fa6

Please sign in to comment.