This Readme is for development.
Full plugin information is available in readme.txt.
Using the action provided by 10Up.
New tags are automatically deployed to wordpress.org via SVN.
Using the action provided by 10Up.
Changes to readme.txt
or .wordpress-org
on the master
branch are automatically deployed to the matching tag on wordpress.org when
the deploy
branch is pushed.
If other changes have been made to the master
branch, nothing will be deployed.
Plugin assets like screenshots are kept in the .wordpress-org
directory.
- Ignore files from SVN via
.distignore
. - Assets are updated within
.wordpress-org
. - SVN credentials are stored as GitHub secrets
Out of the box, Poedit does not support TypeScript extensions. TypeScript support may be added using the following:
- File -> Preferences
- Tab -> Extractors
+
- Language -> "TypeScript"
- List of extensions -> ".tsx;.ts"
- Command -> "xgettext -L JavaScript --add-comments=translators: --force-po -o %o %C %K %F"
- An item in keyword list -> "-k%k"
- An item in input files list -> "%f"
- Source code charset -> "--from-code=%c"
PHP translations are using the standard i18n process.
- Open
advanced-sidebar-menu.pot
file: - Click "Update from code".
- Click "Save".
- Open various
.po
files: - Click "Update from code".
- Translate any missing strings.
- Click "Save".
The PHP files are automatically generated during deployment via GitHub Actions scripts.
** Manually Generate Translation PHP Files**
wp i18n make-php languages/.
JS files are translated using the block editor i18n process.
This plugin contains a custom PHP CLI command exists in the dev/translate-cli
directory for generating JSON files. Like WP CLI i18n make-json
command with a few differences to
support a Webpack/TypeScript structure.
- Looks for .jsx, .ts, and .tsx as well as the .js.
- Combines all matching translations to a single file instead of split by source file.
- Use the
js/dist/advanced-sidebar-menu-block-editor.js
as the source file for all. - May be run outside WP using PHP.
The JSON files are automatically generated during deployment via GitHub Actions scripts.
Manually Generate Translation JSON Files
- Run
composer install
. - Run
php command.php