Skip to content

T3359-Childpack_typo - #2131

Open
loris-fab wants to merge 2 commits into
18.0from
T3359-Childpack_typo
Open

T3359-Childpack_typo#2131
loris-fab wants to merge 2 commits into
18.0from
T3359-Childpack_typo

Conversation

@loris-fab

@loris-fab loris-fab commented Aug 6, 2026

Copy link
Copy Markdown

Goal

The childpack PDF printed a garbled line under the child photo. In French it read
8 NÉ NÉ 01 JANV. 2018 ) instead of 8 (NÉ LE 01 JANV. 2018), and German and
Italian had the same problem.

Technical aspect

Two distinct bugs in child_compassion/report/childpack.xml, both in the
.summary block:

  • The parentheses around the birth date were wrapped in their own <span>, which
    exposed ( as a translatable term. fr_CH, de and it had it translated as
    / Geb. / Nato, so the opening parenthesis was replaced by a second birth
    label. They are now drawn with :before / :after CSS rules, which no
    translation can reach. The msgid "<span>(</span>" entries are removed from the
    six .po files.
  • The spans sat on separate source lines, so HTML whitespace collapsing added a
    space on both sides of each parenthesis. Nesting the label and the date inside a
    single wrapper span removes those.

French and Italian labels lacked prepositions ( instead of Né le). Updating msgstr alone doesn't apply on standard Odoo upgrades due to overwrite=False. To force the update across environments without needing --i18n-overwrite, the source term was renamed from Born to Born on, creating a new msgid.

Misc

No misc

- Draw the parentheses around the birthdate in CSS instead of wrapping them
  in <span> tags. The opening one was exposed as a translatable term and
  fr_CH/de/it had it translated as "Né"/"Geb."/"Nato", so the line read
  "8 NÉ NÉ 01 JANV. 2018 )" instead of "8 (NÉ LE 01 JANV. 2018)". Nesting
  the spans also let the HTML whitespace collapsing add a space on both
  sides of each parenthesis.
- Drop the now unused "<span>(</span>" entry from the six .po files.
- Add the missing preposition to the French and Italian "Born" translations
  ("Né le", "Nato il"); de/da/nb/sv read fine without one.
Rename the source term from "Born" to "Born on" so it gets a msgid no
database translation matches yet, which makes the .po files apply on a
plain module upgrade. Odoo calls load_module_terms with overwrite=False
unless --i18n-overwrite is passed, so the "Né le" / "Nato il" msgstr of
the previous commit were ignored on an existing database and the childpack
still printed "NÉE 01 JANV. 2018". The English wording gains the missing
preposition too.
@loris-fab
loris-fab requested a review from ecino August 6, 2026 13:15
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