Skip to content

Commit 5d2846d

Browse files
committed
initial [skip ci]
0 parents  commit 5d2846d

32 files changed

Lines changed: 239 additions & 0 deletions

.github/workflows/PullLokalise.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Demo pull with tags
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Pull from Lokalise
21+
id: lokalise-pull
22+
uses: lokalise/lokalise-pull-action@main
23+
with:
24+
api_token: ${{ secrets.LOKALISE_API_TOKEN }}
25+
project_id: 5868381966b39e5053ff15.63486389
26+
translations_path: messages
27+
# skip_original_filenames: true
28+
skip_include_tags: true
29+
flat_naming: true
30+
file_format: json
31+
pr_teams_reviewers: demo-team
32+
pr_title: Demo
33+
pr_body: "Review that"
34+
additional_params: |
35+
--indentation=2sp
36+
--export-sort=a_z
37+
--replace-breaks=false
38+
--language-mapping=[{"original_language_iso":"ar_AR","custom_language_iso":"ar-AR"},{"original_language_iso":"bn_BD","custom_language_iso":"bn-BD"},{"original_language_iso":"de_DE","custom_language_iso":"de-DE"},{"original_language_iso":"en_CA","custom_language_iso":"en-CA"},{"original_language_iso":"en_GB","custom_language_iso":"en-GB"},{"original_language_iso":"en_US","custom_language_iso":"en-US"},{"original_language_iso":"en","custom_language_iso":"en"},{"original_language_iso":"es_ES","custom_language_iso":"es-ES"},{"original_language_iso":"fa_IR","custom_language_iso":"fa-IR"},{"original_language_iso":"fr_CA","custom_language_iso":"fr-CA"},{"original_language_iso":"fr_FR","custom_language_iso":"fr-FR"},{"original_language_iso":"hi_IN","custom_language_iso":"hi-IN"},{"original_language_iso":"id_ID","custom_language_iso":"id-ID"},{"original_language_iso":"ms_MY","custom_language_iso":"ms-MY"},{"original_language_iso":"nl_NL","custom_language_iso":"nl-NL"},{"original_language_iso":"tr_TR","custom_language_iso":"tr-TR"},{"original_language_iso":"ur_PK","custom_language_iso":"ur-PK"}]
39+
40+
41+
# base_lang: en
42+
# file_format: json
43+
# # file_ext: json
44+
# # additional_params: |
45+
# # --directory-prefix=%LANG_ISO%
46+
# # --indentation=4sp
47+
# # --json-unescaped-slashes=true
48+
# # --export-empty-as=skip
49+
# # --export-sort=a_z
50+
# # --replace-breaks=false
51+
# # --language-mapping=[{"original_language_iso":"en_US","custom_language_iso":"en-US"}]
52+
# always_pull_base: true
53+
# flat_naming: true
54+
# skip_include_tags: true
55+
# pr_labels: 'automerge,sample'
56+
# # skip_original_filenames: true
57+
# # async_mode: true
58+
# # override_branch_name: 'custom_branch'
59+
# # force_push: true
60+
61+
- name: Debug Created Branch
62+
run: |
63+
echo "Branch created: ${{ steps.lokalise-pull.outputs.created_branch }}"
64+
echo "PR created: ${{ steps.lokalise-pull.outputs.pr_created }}"
65+
echo "PR id: ${{ steps.lokalise-pull.outputs.pr_id }}"
66+
echo "PR number: ${{ steps.lokalise-pull.outputs.pr_number }}"
67+
68+
# - name: Trigger Automerge Workflow
69+
# if: steps.lokalise-pull.outputs.created_branch != '' && steps.lokalise-pull.outputs.pr_created == 'true'
70+
# uses: actions/github-script@v7
71+
# with:
72+
# github-token: ${{ secrets.PAT_TOKEN }}
73+
# script: |
74+
# await github.rest.actions.createWorkflowDispatch({
75+
# owner: context.repo.owner,
76+
# repo: context.repo.repo,
77+
# workflow_id: "automerge.yml",
78+
# ref: "${{ steps.lokalise-pull.outputs.created_branch }}",
79+
# });
80+
81+
# - name: Inspect Pull Requests
82+
# run: gh pr list --state open --json number,headRefName,labels,baseRefName,title
83+
# env:
84+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
86+
# - name: List All PRs with Merge Status
87+
# run: gh pr list --state open --json number,mergeable,mergeStateStatus,headRefName,baseRefName,labels,title
88+
# env:
89+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Demo push with tags
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout Repo
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Push to Lokalise
16+
uses: lokalise/lokalise-push-action@known_commit
17+
id: lokalise-push
18+
with:
19+
api_token: ${{ secrets.LOKALISE_API_TOKEN }}
20+
project_id: 5868381966b39e5053ff15.63486389
21+
base_lang: en
22+
translations_path: |
23+
locales
24+
i18n
25+
file_format: json_structured
26+
file_ext: json
27+
additional_params: |
28+
--convert-placeholders
29+
--hidden-from-contributors
30+
flat_naming: true
31+
rambo_mode: false
32+
skip_tagging: true
33+
use_tag_tracking: false
34+
# name_pattern: "en/**/custom_*.json"
35+
# name_pattern: "custom_file.json"
36+
37+
- name: Debug Outputs
38+
run: |
39+
echo "Initial Run: ${{ steps.lokalise-push.outputs.initial_run }}"
40+
echo "Files Uploaded: ${{ steps.lokalise-push.outputs.files_uploaded }}"

.github/workflows/automerge.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# name: Automerge PRs
2+
3+
# on:
4+
# workflow_dispatch:
5+
6+
# permissions:
7+
# contents: write
8+
# pull-requests: write
9+
10+
# jobs:
11+
# automerge:
12+
# runs-on: ubuntu-latest
13+
14+
# steps:
15+
# - name: Checkout Repository
16+
# uses: actions/checkout@v4
17+
18+
# - name: Automerge PRs
19+
# uses: pascalgn/automerge-action@v0.16.4
20+
# env:
21+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
# MERGE_LABELS: "automerge"
23+
# MERGE_METHOD: "squash"
24+
# MERGE_RETRIES: 6
25+
# MERGE_RETRY_SLEEP: 10000
26+
# MERGE_DELETE_BRANCH: "true"

i18n/custom_i18n_fileflat.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flatcustom": "i18n"
3+
}

i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"second_flat": "flat 4 24.04-new4"
3+
}

i18n/en/custom_file_nest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"nest": "custom file 4"
3+
}

i18n/en/i18n.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"hi": "hi! pull :) go9 base"
3+
}

i18n/en/main.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"night": "Good night! :) go 9"
3+
}

i18n/en/ui.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"next": "Next >"
3+
}

i18n/fr.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"second_flat": "24.04-3"
3+
}

0 commit comments

Comments
 (0)