Skip to content
Merged

sync #1173

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ docker-compose.ci.yml
artifacts
phpstan.neon
phpstan-baseline.neon
languages
52 changes: 52 additions & 0 deletions .github/workflows/diff-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Translations Diff

on:
pull_request_review:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches:
- development
- master

jobs:
translation:
runs-on: ubuntu-latest
steps:
- name: Checkout Base Branch
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: feedzy-base
- name: Setup node 16
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Build POT for Base Branch
run: |
cd feedzy-base
composer install --no-dev --prefer-dist --no-progress --no-suggest
npm ci
npm run build
npm run makepot
ls languages/
- name: Checkout PR Branch (Head)
uses: actions/checkout@v4
with:
path: feedzy-head
- name: Build POT for PR Branch
run: |
cd feedzy-head
composer install --no-dev --prefer-dist --no-progress --no-suggest
npm ci
npm run build
npm run makepot
ls languages/
- name: Compare POT files
uses: Codeinwp/action-i18n-string-reviewer@main
with:
fail-on-changes: 'true'
openrouter-key: ${{ secrets.OPEN_ROUTER_API_KEY }}
openrouter-model: 'google/gemini-2.5-flash'
base-pot-file: 'feedzy-base/languages/feedzy-rss-feeds.pot'
target-pot-file: 'feedzy-head/languages/feedzy-rss-feeds.pot'
github-token: ${{ secrets.BOT_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ cypress.env.json
js/build
/build
artifacts
.DS_Store
.DS_Store
languages
2 changes: 1 addition & 1 deletion js/FeedzyLoop/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"textdomain": "feedzy-rss-block"
"textdomain": "feedzy-rss-feeds"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"scripts": {
"build": "npm-run-all build:*",
"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",
"build:block": "wp-scripts build --webpack-src-dir=js/FeedzyBlock --output-path=build/block --output-filename=index.js",
"build:loop": "wp-scripts build --webpack-src-dir=js/FeedzyLoop --output-path=build/loop --output-filename=index.js",
"build:onboarding": "wp-scripts build --webpack-src-dir=js/Onboarding --output-path=build/onboarding --output-filename=index.js",
Expand Down
Loading