Skip to content

Commit fcdd660

Browse files
committed
Adding crowdin support
1 parent 169cea3 commit fcdd660

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

.github/workflows/crowdin-wf.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Crowdin Action
2+
# Controls when the action will run.
3+
on:
4+
schedule:
5+
- cron: '30 * * * *'
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
13+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
14+
15+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16+
jobs:
17+
# This workflow contains a single job called "build"
18+
synchronize-with-crowdin:
19+
if: (github.event_name == 'schedule' && github.repository == 'joomla-extensions/weblinks') || (github.event_name != 'schedule')
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
# Runs the Crowdin action command - https://github.com/crowdin/github-action
30+
- name: crowdin action
31+
uses: crowdin/[email protected]
32+
with:
33+
# Upload sources to Crowdin
34+
upload_sources: true
35+
# Upload translations to Crowdin, only use true at initial run
36+
upload_translations: false
37+
# Make pull request of Crowdin translations
38+
download_translations: true
39+
# Only download translated strings
40+
skip_untranslated_strings: false
41+
# Download translations with pushing to branch
42+
push_translations: true
43+
# To download translations to the specified version branch
44+
localization_branch_name: 'l10n_crowdin_translations'
45+
# Create pull request after pushing to branch
46+
create_pull_request: true
47+
# Configuration file to use
48+
config: 'crowdin.yml'
49+
# Use true for dryrun to test the run without actually processing anything
50+
dryrun_action: false
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

crowdin.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Project Public Identifier: joomla-official-extensions
2+
project_id_env: CROWDIN_PROJECT_ID # The numeric project ID.
3+
api_token_env: CROWDIN_PERSONAL_TOKEN
4+
base_path: ".."
5+
base_url: "https://joomla.crowdin.com"
6+
7+
preserve_hierarchy: true
8+
9+
files:
10+
- source: /src/administrator/language/en-GB/en-GB.com_weblinks.ini
11+
dest: 'Weblinks/administrator/language/en-GB.com_weblinks.ini'
12+
translation: /administrator/language/%locale%/com_weblinks.ini
13+
type: joomla
14+
update_option: update_as_unapproved
15+
- source: /src/administrator/language/en-GB/en-GB.com_weblinks.sys.ini
16+
dest: 'Weblinks/administrator/language/en-GB.com_weblinks.sys.ini'
17+
translation: /administrator/language/%locale%/%locale%.com_weblinks.sys.ini
18+
type: joomla
19+
update_option: update_as_unapproved
20+
- source: /src/language/en-GB/en-GB.com_weblinks.ini
21+
dest: 'Weblinks/language/en-GB.com_weblinks.ini'
22+
translation: /language/%locale%/%locale%.com_weblinks.ini
23+
type: joomla
24+
update_option: update_as_unapproved
25+
- source: /src/language/en-GB/en-GB.mod_weblinks.ini
26+
dest: 'Weblinks/language/en-GB.mod_weblinks.ini'
27+
translation: /language/%locale%/%locale%.mod_weblinks.ini
28+
type: joomla
29+
update_option: update_as_unapproved
30+
- source: /src/language/en-GB/en-GB.mod_weblinks.sys.ini
31+
dest: 'Weblinks/language/en-GB.mod_weblinks.sys.ini'
32+
translation: /language/%locale%/%locale%.mod_weblinks.sys.ini
33+
type: joomla
34+
update_option: update_as_unapproved
35+
- source: /src/language/en-GB/en-GB.pkg_weblinks.sys.ini
36+
dest: 'Weblinks/language/en-GB.pkg_weblinks.sys.ini'
37+
translation: /language/%locale%/%locale%.pkg_weblinks.sys.ini
38+
type: joomla
39+
update_option: update_as_unapproved
40+
- source: /src/plugins/editors-xtd/weblink/language/en-GB/en-GB.plg_editors-xtd_weblink.ini
41+
dest: 'Weblinks/plugins/editors-xtd/weblink/language/en-GB.plg_editors-xtd_weblink.ini'
42+
translation: /plugins/editors-xtd/weblink/language/%locale%/%locale%.plg_editors-xtd_weblink.ini
43+
type: joomla
44+
update_option: update_as_unapproved
45+
- source: /src/plugins/editors-xtd/weblink/language/en-GB/en-GB.plg_editors-xtd_weblink.sys.ini
46+
dest: 'Weblinks/plugins/editors-xtd/weblink/language/en-GB.plg_editors-xtd_weblink.sys.ini'
47+
translation: /plugins/editors-xtd/weblink/language/%locale%/%locale%.plg_editors-xtd_weblink.sys.ini
48+
type: joomla
49+
update_option: update_as_unapproved
50+
- source: /src/plugins/finder/weblinks/language/en-GB/en-GB.plg_finder_weblinks.ini
51+
dest: 'Weblinks/plugins/finder/weblinks/language/en-GB.plg_finder_weblinks.ini'
52+
translation: /plugins/finder/weblinks/language/%locale%/%locale%.plg_finder_weblinks.ini
53+
type: joomla
54+
update_option: update_as_unapproved
55+
- source: /src/plugins/finder/weblinks/language/en-GB/en-GB.plg_finder_weblinks.sys.ini
56+
dest: 'Weblinks/plugins/finder/weblinks/language/en-GB.plg_finder_weblinks.sys.ini'
57+
translation: /plugins/finder/weblinks/language/%locale%/%locale%.plg_finder_weblinks.sys.ini
58+
type: joomla
59+
update_option: update_as_unapproved
60+
- source: /src/plugins/search/weblinks/language/en-GB/en-GB.plg_search_weblinks.ini
61+
dest: 'Weblinks/plugins/search/weblinks/language/en-GB.plg_search_weblinks.ini'
62+
translation: /plugins/search/weblinks/language/%locale%/%locale%.plg_search_weblinks.ini
63+
type: joomla
64+
update_option: update_as_unapproved
65+
- source: /src/plugins/search/weblinks/language/en-GB/en-GB.plg_search_weblinks.sys.ini
66+
dest: 'Weblinks/plugins/search/weblinks/language/en-GB.plg_search_weblinks.sys.ini'
67+
translation: /plugins/search/weblinks/language/%locale%/%locale%.plg_search_weblinks.sys.ini
68+
type: joomla
69+
update_option: update_as_unapproved
70+
- source: /src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.ini
71+
dest: 'Weblinks/plugins/system/weblinks/language/en-GB.plg_system_weblinks.ini'
72+
translation: /plugins/system/weblinks/language/%locale%/%locale%.plg_system_weblinks.ini
73+
type: joomla
74+
update_option: update_as_unapproved
75+
- source: /src/plugins/system/weblinks/language/en-GB/en-GB.plg_system_weblinks.sys.ini
76+
dest: 'Weblinks/plugins/system/weblinks/language/en-GB.plg_system_weblinks.sys.ini'
77+
translation: /plugins/system/weblinks/language/%locale%/%locale%.plg_system_weblinks.sys.ini
78+
type: joomla
79+
update_option: update_as_unapproved

0 commit comments

Comments
 (0)