-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter page titles to enable translations (#450)
* Tools: Add i18n string workflow * Filter page titles to enable translations Fixes #436 * Update translation strings --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
cc6c2e4
commit e736cbc
Showing
3 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Translate Strings | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- update/generate-i18n-strings | ||
schedule: | ||
- cron: '0 6,18 * * *' | ||
|
||
jobs: | ||
translation-strings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: i18n | ||
uses: WordPress/wporg-repo-tools/.github/actions/i18n@trunk | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --no_taxonomies --post_types=page --url=https://wordpress.org/wp-json/wp/v2/ --textdomain=wporg | ||
|
||
- name: Remove the translation context | ||
run: | | ||
sed -i "s/, 'page title'//" extra/translation-strings.php | ||
sed -i "s/_x(/__(/" extra/translation-strings.php | ||
- name: Commit and push | ||
# Using a specific hash here instead of a tagged version, for risk mitigation, since this action modifies our repo. | ||
uses: actions-js/push@a52398fac807b0c1e5f1492c969b477c8560a0ba # 1.3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: update/generate-i18n-strings | ||
message: 'Update translation strings' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
// phpcs:disable | ||
/** | ||
* Generated file for translation strings. | ||
* | ||
* Used to import additional strings into the GlotPress translation project. | ||
* | ||
* ⚠️ This is a generated file. Do not edit manually. See bin/i18n.php. | ||
* ⚠️ Do not require or include this file anywhere. | ||
*/ | ||
|
||
__( 'Swag', 'wporg' ); | ||
__( 'WordPress 6.5', 'wporg' ); | ||
__( 'Data Liberation', 'wporg' ); | ||
__( 'State of the Word', 'wporg' ); | ||
__( 'WordPress 6.4', 'wporg' ); | ||
__( 'Blocks', 'wporg' ); | ||
__( 'WordPress 6.3', 'wporg' ); | ||
__( 'Remembers', 'wporg' ); | ||
__( 'Graphics & Logos', 'wporg' ); | ||
__( 'Etiquette', 'wporg' ); | ||
__( 'Philosophy', 'wporg' ); | ||
__( 'Stats', 'wporg' ); | ||
__( 'Privacy', 'wporg' ); | ||
__( 'Accessibility', 'wporg' ); | ||
__( 'License', 'wporg' ); | ||
__( 'Domains', 'wporg' ); | ||
__( 'History', 'wporg' ); | ||
__( 'Roadmap', 'wporg' ); | ||
__( 'Security', 'wporg' ); | ||
__( 'Features', 'wporg' ); | ||
__( 'Requirements', 'wporg' ); | ||
__( 'About', 'wporg' ); | ||
__( 'Search', 'wporg' ); | ||
__( 'Mobile', 'wporg' ); | ||
__( 'Hosting', 'wporg' ); | ||
__( 'WordPress and the Journey to 40% of the Web', 'wporg' ); | ||
__( 'Media', 'wporg' ); | ||
__( 'Integrations', 'wporg' ); | ||
__( 'Education', 'wporg' ); | ||
__( 'eCommerce', 'wporg' ); | ||
__( 'Content Marketing', 'wporg' ); | ||
__( 'Enterprise', 'wporg' ); | ||
__( 'Home', 'wporg' ); | ||
__( 'Counter', 'wporg' ); | ||
__( 'Source Code', 'wporg' ); | ||
__( 'Beta/Nightly', 'wporg' ); | ||
__( 'Release Archive', 'wporg' ); | ||
__( 'Download', 'wporg' ); | ||
__( 'Erase Personal Data', 'wporg' ); | ||
__( 'Export Personal Data', 'wporg' ); | ||
__( 'Cookie Policy', 'wporg' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters