Skip to content

Release 1.2.0 — raw stack, ordinal abbreviations (#3), meta links, cache, tests, i18n & docs#6

Merged
jaz-on merged 14 commits intomainfrom
1.2.0
Mar 29, 2026
Merged

Release 1.2.0 — raw stack, ordinal abbreviations (#3), meta links, cache, tests, i18n & docs#6
jaz-on merged 14 commits intomainfrom
1.2.0

Conversation

@jaz-on
Copy link
Copy Markdown
Owner

@jaz-on jaz-on commented Mar 29, 2026

Summary

Release 1.2.0 hardens French typography so narrow spaces, special-character replacements, and optional ordinal abbreviations never run inside raw/non-prose HTML, while Gutenberg Verse still gets typography (unless Code shares the same <pre>). Adds textarea to the raw stack, (tm) / (TM) → ™, french_typo_apply_ordinal_abbreviations() (issue #3), a correct static cache key (narrow space + special chars + ordinal toggle), cleaner options validation, automated replace tests (including ordinal on/off/only), POT / i18n CI, French (fr_FR) strings, plugin row meta links on the Plugins screen, and documentation aligned with settings and SEO plugin behavior.

Closes #3.

Ordinal abbreviations (#3)

  • Feedback traced to WordPress.org support (thanks @beryl-dlg, profiles.wordpress.org/beryldlg).
  • Prose only (same wp_html_split + empty raw stack as NBSP / (c)); shortcodes skipped.
  • 1ère1re (case variants); NèmeNe for N ≥ 2 (1–3 digits); n-ième / x-ième (hyphen / NB hyphen / en dash) → nième / xième.
  • ordinal_abbreviations: default on when missing from saved options; documented in settings.
  • English 1st / 2nd and non-standard 1ème left unchanged.

Typographie & HTML

  • Stack on wp_html_split() segments: script, style, pre, code, textarea (nested, strict LIFO closes).
  • Gutenberg Verse: <pre class="… wp-block-verse …"> stays typographic unless wp-block-code is also on the same <pre>.
  • No NBSP rules, no (c) / (r) / (tm) / (TM), and no ordinal rules inside those raw regions (covers inline SVG <style>, Elementor-style assets, code blocks, etc.).
  • Special characters: (tm) / (TM) → ™ (same Replace special characters option as © / ®).
  • Cache: static cache key includes narrow-space choice, special-character toggle, and ordinal setting.

Admin & settings

  • Plugins list (plugin_row_meta): GitHub, WordPress.org Support, Ko-fi, documentation (docs/ on GitHub), 5-star review link with Dashicons.
  • Settings: Posts and pages; Ordinal abbreviations section; help for raw markup, NBSP until first save, RSS/REST toggles; french_typo_options_validate() no longer persists a stray sanitized key or short-circuits via a static cache.

Tests & CI

  • tests/: bootstrap + WordPress wp_html_split stub; french_typo_replace() scenarios (SVG+<style>, <pre><code>, Verse, textarea, ordinals, HTML/code).
  • CI: php -l + php tests/french-typo-replace-test.php + ordinal off/only scripts; i18n job ensures languages/french-typo.pot matches wp i18n make-pot (timestamps normalized in diff).

i18n & locales

  • Regenerated french-typo.pot; french-typo-fr_FR.po for admin, meta links, ordinal settings.
  • docs/development.md: wp i18n make-pot / update-po (and local make-mo).

Documentation & packaging

  • CHANGELOG.md, readme.txt: 1.2.0 entries; contributors include beryldlg; Tested up to WordPress 7.0.
  • docs/: configuration (ordinal subsection), architecture, FAQ as applicable; root README.md where updated.

Housekeeping

  • Removed obsolete root TODO.md; local _local/ / _todo/ gitignored.

Merge / ship checklist

  • CI green on this PR
  • Quick manual check: Extensions row meta links; Elementor (or similar) SVG with <style>; Verse block; Ordinal abbreviations toggle; settings save
  • Merge → tag v1.2.0 / WordPress.org release when ready

- Ajout de juliobox à la liste des contributeurs dans readme.txt
- Julio Potier est un développeur WordPress reconnu et créateur de SecuPress
- README.md : simplification et condensation du contenu (241→96 lignes)
  * Focus sur l'essentiel et suppression des redondances
  * Amélioration de l'accessibilité de la documentation
  * Sections française et anglaise plus concises

- TODO.md : refactoring complet vers un format français pratique
  * Passage d'un format technique verbeux à des idées concises
  * Organisation claire des fonctionnalités futures par priorité
  * Format plus cohérent avec l'esprit du projet

- docs/test-post-content.md : nouveau fichier de test structuré
  * Cas de test prêts à copier-coller dans WordPress
  * Couverture des différents blocs Gutenberg
  * Outil précieux pour valider le comportement du plugin
Track `<style>` and `<script>` spans in the `wp_html_split` loop so narrow non-breaking spaces are not injected into embedded CSS/JSON/JS (fixes Elementor inline SVG icons).

Remove obsolete TODO.md, document changes in CHANGELOG and readme, bump stable tag and constant, and ignore local `_local/` / `_todo/`.
Align consecutive assignments in narrow_space / wp_html_split block per
WordPress.Arrays.MultipleStatementAlignment for CI.
@jaz-on jaz-on self-assigned this Mar 29, 2026
@jaz-on jaz-on added this to the 1.2.0 milestone Mar 29, 2026
jaz-on added 3 commits March 29, 2026 21:31
- Add stack helpers for script/style/pre/code (Verse vs Code class)
- Skip NBSP and (c)/(r) inside raw regions; fix static cache key
- CI: ignore tests/ for PHPCS; update changelog and FAQ
- Note README + test-post-content manual QA; credit Julio Potier
- Fix French FAQ typo in README (modifie-t-elle)
jaz-on added 2 commits March 29, 2026 22:01
- Extend raw boundaries to textarea; docblocks and readme/changelog
- Add (tm)/(TM) → ™ with special-characters option; refresh french-typo.pot
- Add tests/ with WP stubs and french_typo_replace() scenarios (SVG style,
  pre/code, Verse, textarea)
- CI: run replace tests; i18n job verifies POT matches source
- README (FR/EN): optional NBSP until settings saved; Yoast/Rank Math/SEOPress
- Architecture, configuration, API, installation, FAQ, dev index tweaks
@jaz-on jaz-on changed the title Release 1.2.0 — style/script guard & housekeeping Release 1.2.0 — raw markup stack, Verse, cache, tests, i18n & docs Mar 29, 2026
jaz-on added 3 commits March 29, 2026 22:34
- Drop static cache and stray sanitized key from french_typo_options_validate()
- Posts and pages section; help for raw markup, NBSP until save, RSS/REST toggles
- Update configuration, FAQ, architecture, readme.txt, root README, CHANGELOG
- Add languages/french-typo-fr_FR.po and refresh french-typo.pot
- Document language build in docs/development.md
Add GitHub, Support, Ko-fi, documentation, and 5-star review links to
the plugin list row via plugin_row_meta. Regenerate POT, update fr_FR
translations, and document WP-CLI i18n commands in development.md.
Changelog and readme.txt aligned with 1.2.0.
@jaz-on jaz-on changed the title Release 1.2.0 — raw markup stack, Verse, cache, tests, i18n & docs Release 1.2.0 — raw markup stack, plugin meta links, cache, tests, i18n & docs Mar 29, 2026
jaz-on added 2 commits March 29, 2026 22:44
…URI)

Regenerated french-typo.pot with wp i18n make-pot and updated
french-typo-fr_FR.po with wp i18n update-po so CI i18n-pot matches.
…ts, i18n

- Add french_typo_apply_ordinal_abbreviations() and ordinal_abbreviations option
  (default on when unsaved; cache key + early return with narrow/special off)
- Settings section, POT/fr_FR, docs, readme credits (beryldlg)
- Tests: ordinal off/only + extended replace tests; CI runs all three scripts
- Closes #3
@jaz-on jaz-on changed the title Release 1.2.0 — raw markup stack, plugin meta links, cache, tests, i18n & docs Release 1.2.0 — raw stack, ordinal abbreviations (#3), meta links, cache, tests, i18n & docs Mar 29, 2026
@jaz-on jaz-on marked this pull request as ready for review March 29, 2026 20:57
@jaz-on jaz-on merged commit 96b2f56 into main Mar 29, 2026
7 checks passed
@jaz-on jaz-on deleted the 1.2.0 branch March 29, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Améliorer la gestion abbréviations des nombres

1 participant