Skip to content

Commit e79f1b5

Browse files
authored
Merge pull request #1173 from Codeinwp/development
sync
2 parents 1998c91 + 0151be8 commit e79f1b5

5 files changed

Lines changed: 57 additions & 2 deletions

File tree

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ docker-compose.ci.yml
4444
artifacts
4545
phpstan.neon
4646
phpstan-baseline.neon
47+
languages
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Translations Diff
2+
3+
on:
4+
pull_request_review:
5+
pull_request:
6+
types: [opened, edited, synchronize, ready_for_review]
7+
branches:
8+
- development
9+
- master
10+
11+
jobs:
12+
translation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Base Branch
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.base_ref }}
19+
path: feedzy-base
20+
- name: Setup node 16
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 16.x
24+
- name: Build POT for Base Branch
25+
run: |
26+
cd feedzy-base
27+
composer install --no-dev --prefer-dist --no-progress --no-suggest
28+
npm ci
29+
npm run build
30+
npm run makepot
31+
ls languages/
32+
- name: Checkout PR Branch (Head)
33+
uses: actions/checkout@v4
34+
with:
35+
path: feedzy-head
36+
- name: Build POT for PR Branch
37+
run: |
38+
cd feedzy-head
39+
composer install --no-dev --prefer-dist --no-progress --no-suggest
40+
npm ci
41+
npm run build
42+
npm run makepot
43+
ls languages/
44+
- name: Compare POT files
45+
uses: Codeinwp/action-i18n-string-reviewer@main
46+
with:
47+
fail-on-changes: 'true'
48+
openrouter-key: ${{ secrets.OPEN_ROUTER_API_KEY }}
49+
openrouter-model: 'google/gemini-2.5-flash'
50+
base-pot-file: 'feedzy-base/languages/feedzy-rss-feeds.pot'
51+
target-pot-file: 'feedzy-head/languages/feedzy-rss-feeds.pot'
52+
github-token: ${{ secrets.BOT_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ cypress.env.json
1414
js/build
1515
/build
1616
artifacts
17-
.DS_Store
17+
.DS_Store
18+
languages

js/FeedzyLoop/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@
129129
"editorScript": "file:./index.js",
130130
"editorStyle": "file:./index.css",
131131
"style": "file:./style-index.css",
132-
"textdomain": "feedzy-rss-block"
132+
"textdomain": "feedzy-rss-feeds"
133133
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"scripts": {
2020
"build": "npm-run-all build:*",
21+
"makepot": "npm run dist && mkdir -p languages && docker run --user root --rm --volume \"$(pwd)/dist/feedzy-rss-feeds:/var/www/html/feedzy-rss-feeds\" wordpress:cli bash -c 'php -d memory_limit=512M \"$(which wp)\" --version --allow-root && wp i18n make-pot ./feedzy-rss-feeds/ ./feedzy-rss-feeds/languages/feedzy-rss-feeds.pot --allow-root --domain=feedzy-rss-feeds --debug ' && cp ./dist/feedzy-rss-feeds/languages/feedzy-rss-feeds.pot ./languages/feedzy-rss-feeds.pot",
2122
"build:block": "wp-scripts build --webpack-src-dir=js/FeedzyBlock --output-path=build/block --output-filename=index.js",
2223
"build:loop": "wp-scripts build --webpack-src-dir=js/FeedzyLoop --output-path=build/loop --output-filename=index.js",
2324
"build:onboarding": "wp-scripts build --webpack-src-dir=js/Onboarding --output-path=build/onboarding --output-filename=index.js",

0 commit comments

Comments
 (0)