Repository navigation
feat(i18n): move to wicket-finance domain and add fr_CA translation #minor - #10
Open
Revenantal wants to merge 8 commits into
Open
Revenantal wants to merge 8 commits into
Revenantal wants to merge 8 commits into
Conversation
…duplicates - Move the 30 Finance settings strings from the `wicket` domain to `wicket-finance`, with context. - Merge the five trigger descriptions into one string and use WooCommerce's translated order status labels. - Merge the three missing-plugin activation errors into one string. - Use the same deferral date messages for product JS and server-side validation; align range wording to "the same as or later than". - Wrap order note audit strings for translation.
- Add a pre-commit hook that regenerates languages/<text-domain>.pot from the staged files. It uses `wp` on PATH, or downloads a pinned, checksum-verified WP-CLI into the user cache. It never blocks a commit. - Make `composer setup-hooks` install the pre-commit hook. - Add a PR check that fails when the committed .pot is out of date.
- Read extra comma-separated exclude paths from .ci/pot-exclude. - Leave excluded paths out of the staged snapshot, so large folders are not copied.
Explain that GL means general ledger and what the term dates cover, so translators can render these labels correctly. Msgids are unchanged.
- Add wicket-finance-fr_CA.po covering all 63 strings in wicket-finance.pot, with Canadian French terminology and typography. - Add the compiled .mo and WordPress 6.5+ .l10n.php files. Site-level translations (Loco, wp-content/languages) still take precedence.
- Give every string of 1 to 3 words a gettext context and drop contexts from full sentences, following the Atlas translations convention. - Contexts name the kind of string (label, button label, status, message, accessibility label, ...), not where it shows, so identical strings with the same meaning share one translation entry. Specific contexts are kept only where the same text has a different meaning (role name, relationship type). - ACF field strings follow the same rule in the runtime translator and the languages/acf-strings.php generator. Changes msgids' contexts, so existing site translations of these keys stop matching; accepted because client coverage is under 1% and Wicket ships fr_CA.
This was referenced Oct 2, 2026
Revenantal
requested review from
EstebanForge,
alex91ckua,
gary-wicket and
rferguson10
October 2, 2026 19:20
Revenantal
marked this pull request as ready for review
October 2, 2026 19:21
EstebanForge
approved these changes
Oct 2, 2026
EstebanForge
left a comment
Contributor
There was a problem hiding this comment.
Approved. Smallest of the set and it checks out. What I verified:
load_plugin_textdomainalready existed in Plugin.php with the right path and stays untouched, so the bundled fr_CA actually loads. The 30 legacywicket-domain strings are all moved; zero old-domain calls remain. (The, 'error')hits in my sweep were WooCommerce notice types, not textdomains.)msgfmt --checkpasses on the fr_CA catalog (63 messages),.momatches,.l10n.phpis valid, CI pot check green. Hook and workflow are byte-identical to the base plugin's.- The activation errors are deduplicated into one
sprintfhelper withesc_html, and "Plugin Activation Error" gets a proper context. - The audit-note refactor in LineItemMeta keeps the exact same note shape, now with real
%1$s/%2$stemplates, translators comments, and anemptyvalue placeholder. Nice reuse of WooCommerce's own status labels in the settings screen, with a sane fallback chain.
Thanks Adrian, that closes out the set nicely.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Wicket: none
Related PRs: industrialdev/wicket-wp-base-plugin#63, industrialdev/wicket-wp-account-centre#58, industrialdev/wicket-wp-theme#19
What
wicketdomain towicket-finance.languages/wicket-finance.potand a Canadian French (fr_CA) translation (.po,.mo,.l10n.php) for all 63 strings..pot, and a PR check that fails when the.potis out of date.Why
Finance strings were on the wrong text domain, several messages were built from separate strings, and order note audit strings were not translatable. Wicket now ships fr_CA, following the Atlas translations convention (
conv.stack.translations).How
Strings
wicket-finance, with context.Tooling
languages/wicket-finance.pot. It useswpon PATH, or downloads a pinned, checksum-verified WP-CLI. It never blocks a commit.composer setup-hooksinstalls the hook.Impact on existing translations
Moved or re-contexted strings no longer match existing site translations. We accepted this because client translation coverage is under 1% and fr_CA now ships with the plugin. Site-level translations (Loco,
wp-content/languages) still take precedence.