Skip to content

Standard i18n wiring + POT template + SPDX alignment - #18

Merged
TheStreamCode merged 3 commits into
mainfrom
feat/standard-i18n
Sep 22, 2026
Merged

TheStreamCode merged 3 commits into
mainfrom
feat/standard-i18n

Conversation

@TheStreamCode

Copy link
Copy Markdown
Owner

What

  • Standard textdomain loading: MSTV_I18n::init() (runs on init via MSTV_Bootstrap::init_services()) now calls load_plugin_textdomain('mikesoft-teamvault', false, dirname(plugin_basename(__FILE__), 2) . '/languages'), so WordPress.org/GlotPress language packs are picked up. The bundled it/fr/es/de runtime maps stay untouched as a fallback via the existing gettext filter.
  • POT template: new languages/mikesoft-teamvault.pot (309 strings, #: file:line references, Plural-Forms header). wp-cli was unavailable in the authoring environment, so it was produced with a documented equivalent extractor (same function set + domain filter); docs/developer/i18n.md records the canonical wp i18n make-pot regeneration command.
  • GlotPress handoff: new docs/developer/i18n.md (loading, POT regen, handoff steps, fallback-map policy); linked from the README Documentation Map.
  • SPDX alignment (intent-preserving): GPL-2.0-or-later in the plugin header, readme.txt, root + localized README badges and root README license text. composer.json and CITATION.cff already used it. The LICENSE file text is deliberately untouched (the GPL text itself forbids modification).

Verification

  • POT cross-check: all 309 fallback-map keys present in the POT, 0 missing; POT structure validated (headers, balanced msgids, empty msgstrs).
  • Change set is minimal (10 files, +1318/-8, POT accounting for most additions); no generated noise committed.
  • Not runnable here (no PHP/composer on this machine, Plugin Check needs a WP server): php -l, composer validate, PHPUnit and Plugin Check left to CI, which already gates main.

No Issues/branch-protection/SVN changes. Never merge from this PR — maintainer review required.

TheStreamCode added 3 commits September 22, 2026 19:59
Wire load_plugin_textdomain('mikesoft-teamvault') on init so WordPress.org
language packs in languages/ are picked up; keep the bundled it/fr/es/de
runtime maps as fallback. Ship languages/mikesoft-teamvault.pot (309 strings)
with regeneration notes and GlotPress handoff in docs/developer/i18n.md.
Align SPDX license strings to GPL-2.0-or-later (plugin header, readme.txt,
README badges/license text); LICENSE text untouched per its no-modification
clause.
Since WP 4.6, wordpress.org-hosted plugins get GlotPress language packs
auto-loaded from WP_LANG_DIR, so the manual load_plugin_textdomain()
call in MSTV_I18n::init() is unnecessary (Requires at least is 6.0).
Per https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#plugins-on-wordpress-org
and https://make.wordpress.org/polyglots/handbook/plugin-theme-authors-guide/#once-your-project-is-translated
(community packs take precedence since WP 4.7).

The bundled gettext-filter fallback maps are kept so the it/fr/es/de
admin UI still works when no language pack is installed.

Also fixes the pre-existing Plugin Check error by bumping readme.txt
Tested up to 7.0 -> 7.1, verified against the current stable
(7.1.2) via https://api.wordpress.org/core/version-check/1.7/.
NOTE: owner smoke-test on WP 7.1 is still due.
PDMReleaseMetadataTest pinned the stale 'Tested up to: 7.0' value that
Plugin Check flags (current stable is 7.1 per version-check API); the
f362349 readme bump to 7.1 broke
test_release_metadata_matches_wordpress_7_release on PHP 8.2/8.3/8.4
(run 35768006906, 1 failure each: pattern /^Tested up to:\s*7\.0\s*$/m
vs actual 'Tested up to: 7.1'). Align the constant with the corrected
readme; no behavior change. Owner smoke-test on WP 7.1 still due.
@TheStreamCode
TheStreamCode merged commit dbe69c2 into main Sep 22, 2026
14 checks passed
@TheStreamCode
TheStreamCode deleted the feat/standard-i18n branch September 22, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant