Skip to content

Commit

Permalink
Add Translation Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-vara committed Feb 19, 2025
1 parent 98fa0b4 commit 8a2daf4
Show file tree
Hide file tree
Showing 11 changed files with 1,692 additions and 98 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Crowdin Download Action

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
auto_approve_imported: 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: 'main'

env:
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Crowdin Upload Action

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
download_translations: false
# localization_branch_name: l10n_crowdin_translations
# create_pull_request: true
# auto_approve_imported: 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: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
23 changes: 23 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "."

"preserve_hierarchy": true

"files": [
{
"source": "/languages/wp-module-staging.pot",
"translation": "/languages/wp-module-staging-%locale%.po",
"languages_mapping": {
"locale": {
"de": "de_DE",
"en-AU": "en_AU",
"en-GB": "en_GB",
"es-ES": "es_ES",
"fr": "fr_FR",
"it": "it_IT",
"nl": "nl_NL"
}
}
}
]
211 changes: 199 additions & 12 deletions languages/wp-module-staging-de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,45 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2025-02-13T11:02:08+00:00\n"
"PO-Revision-Date: 2025-02-13 19:40+0530\n"
"Language: de\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: wp-module-staging\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: includes/Staging.php:240
#: includes/Staging.php:256
msgid "Cloning can only be done from the production environment."
msgstr ""

#: includes/Staging.php:265
#: includes/Staging.php:281
msgid "Staging environment already exists!"
msgstr ""

#: includes/Staging.php:299
msgid ""
"You must switch to the production environment before destroying staging."
#: includes/Staging.php:315
msgid "You must switch to the production environment before destroying staging."
msgstr ""

#: includes/Staging.php:321
#: includes/Staging.php:337
msgid "Switch to an environment you are already in, you cannot."
msgstr ""

#: includes/Staging.php:358
#: includes/Staging.php:374
msgid "Invalid staging CLI command."
msgstr ""

#. translators: Invalid character that was entered
#: includes/Staging.php:408
#: includes/Staging.php:424
msgid "Invalid character (%s) in command."
msgstr ""

#: includes/Staging.php:417
#: includes/Staging.php:433
msgid "Unable to execute script (disabled_function)."
msgstr ""

#: includes/Staging.php:425
#: includes/Staging.php:441
msgid "Unable to execute script (permission error)."
msgstr ""

#: includes/Staging.php:438
#: includes/Staging.php:454
msgid "Unable to parse JSON"
msgstr ""

Expand All @@ -63,3 +62,191 @@ msgstr ""
#: includes/StagingMenu.php:33
msgid "Staging Actions"
msgstr ""

#: components/staging/defaultText.js:4
msgid "Cancel"
msgstr ""

#: components/staging/defaultText.js:5
msgid "Clone"
msgstr ""

#: components/staging/defaultText.js:6
msgid "Confirm Clone Action"
msgstr ""

#: components/staging/defaultText.js:7
msgid "This will overwrite anything in staging and update it to an exact clone of the current production site. Are you sure you want to proceed?"
msgstr ""

#: components/staging/defaultText.js:8
msgid "Cloned to Staging"
msgstr ""

#: components/staging/defaultText.js:9
msgid "Cloning production to staging, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:10
msgid "Clone to staging"
msgstr ""

#: components/staging/defaultText.js:11
msgid "Created"
msgstr ""

#: components/staging/defaultText.js:12
msgid "Staging Created"
msgstr ""

#: components/staging/defaultText.js:13
msgid "Creating a staging site, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:14
msgid "Create staging site"
msgstr ""

#: components/staging/defaultText.js:15
msgid "Currently editing"
msgstr ""

#: components/staging/defaultText.js:16
msgid "Delete"
msgstr ""

#: components/staging/defaultText.js:17
msgid "Confirm Delete"
msgstr ""

#: components/staging/defaultText.js:18
msgid "This will permanently delete staging site. Are you sure you want to proceed? You can recreate another staging site at any time, but any specific changes you've made to this staging site will be lost."
msgstr ""

#: components/staging/defaultText.js:19
msgid "Deleted Staging"
msgstr ""

#: components/staging/defaultText.js:20
msgid "Deleting the staging site, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:21
msgid "Delete Staging Site"
msgstr ""

#: components/staging/defaultText.js:22
msgid "Deploy"
msgstr ""

#: components/staging/defaultText.js:23
msgid "Deploy all changes"
msgstr ""

#: components/staging/defaultText.js:24
msgid "Confirm Deployment"
msgstr ""

#: components/staging/defaultText.js:25
msgid "Deploy database only"
msgstr ""

#: components/staging/defaultText.js:26
msgid "This will deploy staging to production and overwrite current production site. Are you sure you want to proceed?"
msgstr ""

#: components/staging/defaultText.js:27
msgid "Deploy files only"
msgstr ""

#: components/staging/defaultText.js:28
msgid "Deployed"
msgstr ""

#: components/staging/defaultText.js:29
msgid "Deploying from staging to production, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:30
msgid "Deploy Site"
msgstr ""

#: components/staging/defaultText.js:31
msgid "Error"
msgstr ""

#: components/staging/defaultText.js:32
msgid "You don't have a staging site yet."
msgstr ""

#: components/staging/defaultText.js:33
msgid "Not currently editing"
msgstr ""

#: components/staging/defaultText.js:34
msgid "Proceed"
msgstr ""

#: components/staging/defaultText.js:35
msgid "Production Site"
msgstr ""

#: components/staging/defaultText.js:36
msgid "Staging Site"
msgstr ""

#: components/staging/defaultText.js:37
msgid "A staging site is a duplicate of your live site, offering a secure environment to experiment, test updates, and deploy when ready."
msgstr ""

#: components/staging/defaultText.js:38
msgid "Switch"
msgstr ""

#: components/staging/defaultText.js:39
msgid "Switching"
msgstr ""

#: components/staging/defaultText.js:40
msgid "Switch to Production"
msgstr ""

#: components/staging/defaultText.js:41
msgid "This will navigate you to the production environment"
msgstr ""

#: components/staging/defaultText.js:42
msgid "Loading the production environment now."
msgstr ""

#: components/staging/defaultText.js:43
msgid "Switching to the production environment, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:44
msgid "Switch to Staging"
msgstr ""

#: components/staging/defaultText.js:45
msgid "This will navigate you to the staging environment"
msgstr ""

#: components/staging/defaultText.js:46
msgid "Loading the staging environment now."
msgstr ""

#: components/staging/defaultText.js:47
msgid "Switching to the staging environment, this should take about a minute."
msgstr ""

#: components/staging/defaultText.js:48
msgid "Staging"
msgstr ""

#: components/staging/defaultText.js:49
msgid "An unknown error has occurred."
msgstr ""

#: components/staging/defaultText.js:50
msgid "Working..."
msgstr ""
Loading

0 comments on commit 8a2daf4

Please sign in to comment.