update paths for POEditor actions
This commit is contained in:
1 parent
6f6602fc94
commit
1b1317949f
2 files changed
+8
-8
No files matched your search
@@ -88,9 +88,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Copy translations to project
|
- name: Copy translations to project
|
||||||
run: |
|
run: |
|
||||||
mkdir -p src/locales
|
mkdir -p client/src/locales
|
||||||
cp -r temp/* src/locales/
|
cp -r temp/* client/src/locales/
|
||||||
echo "Translation files copied to src/locales/"
|
echo "Translation files copied to client/src/locales/"
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: date
|
id: date
|
||||||
@@ -113,6 +113,6 @@ jobs:
|
|||||||
delete-branch: true
|
delete-branch: true
|
||||||
base: develop
|
base: develop
|
||||||
add-paths: |
|
add-paths: |
|
||||||
src/locales/*.json
|
client/src/locales/*.json
|
||||||
committer: GitHub Action <github-actions[bot]@users.noreply.github.com>
|
committer: GitHub Action <github-actions[bot]@users.noreply.github.com>
|
||||||
author: GitHub Action <github-actions[bot]@users.noreply.github.com>
|
author: GitHub Action <github-actions[bot]@users.noreply.github.com>
|
||||||
@@ -6,7 +6,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- "src/locales/**"
|
- "client/src/locales/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload-translations:
|
upload-translations:
|
||||||
@@ -58,8 +58,8 @@ jobs:
|
|||||||
echo "Base SHA: $BASE_SHA"
|
echo "Base SHA: $BASE_SHA"
|
||||||
echo "Head SHA: $HEAD_SHA"
|
echo "Head SHA: $HEAD_SHA"
|
||||||
|
|
||||||
# Get list of changed files in src/locales directory
|
# Get list of changed files in client/src/locales directory
|
||||||
CHANGED_FILES=$(git diff --name-only $BASE_SHA..$HEAD_SHA -- 'src/locales/*.json' || git ls-files 'src/locales/*.json')
|
CHANGED_FILES=$(git diff --name-only $BASE_SHA..$HEAD_SHA -- 'client/src/locales/*.json' || git ls-files 'client/src/locales/*.json')
|
||||||
|
|
||||||
if [ -z "$CHANGED_FILES" ]; then
|
if [ -z "$CHANGED_FILES" ]; then
|
||||||
echo "No changes detected in locale files"
|
echo "No changes detected in locale files"
|
||||||
@@ -81,7 +81,7 @@ jobs:
|
|||||||
# Process each changed file
|
# Process each changed file
|
||||||
for FILE in $CHANGED_FILES; do
|
for FILE in $CHANGED_FILES; do
|
||||||
if [[ -f "$FILE" ]]; then
|
if [[ -f "$FILE" ]]; then
|
||||||
# Extract language code from filename (e.g., src/locales/en.json -> en)
|
# Extract language code from filename (e.g., client/src/locales/en.json -> en)
|
||||||
FILENAME=$(basename "$FILE")
|
FILENAME=$(basename "$FILE")
|
||||||
|
|
||||||
# Special case: map gb.json to en language code
|
# Special case: map gb.json to en language code
|
||||||
|
|||||||
Reference in new issue
Block a user