[IMP] website_sale_aplicoop: accessibility and responsive polish — phase 8
Quantity control layout: changed from wrapping flex to deliberate two-row
grid so the add-to-cart button sits full-width underneath the stepper,
avoiding accidental line breaks and giving the primary action more pulsing
area. Also removed the /Kg suffix's redundant font rules.
Order card delivery row: reordered to badge-then-date (visually centred),
removed the "Delivery" label, and swapped bg-primary to text-bg-primary for
proper contrast on the home-delivery badge (3.13:1 minimum).
Tooltip translations: moved hardcoded static tooltips from data-bs-title
(untranslatable) to title (QWeb-translatable). Handled the edge case of
"Save Cart" and "Back to Cart" which had translations but no model_terms
reference in the POT, causing the merge to discard them — added the view
reference so translations now apply.
Load-from-history page: added accessibility: a visible status message
("Loading your order…"), a <noscript> fallback with link to the group
order, lang and viewport meta tags, and localised strings for all three
languages. Gave the page a minimal inline style block since it does not
inherit the token system (no website.layout).
Translations: 11 new entries (es/eu/ca) for new/reworded UI strings, plus
two code catalogue entries (products found, Close) that needed the
#. odoo-python comment for _() resolution. Documented the silent-failure
pattern in docs/TRANSLATIONS.md: the POT merge, untranslatable attributes,
and missing code comments.
Tests: 246 passing. Pre-commit: clean.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
162ba0b570
commit
5de7573fba
35 changed files with 2181 additions and 2413 deletions
|
|
@ -12,7 +12,7 @@ This module has complete translation support for **3 languages**:
|
|||
|
||||
## Translated Content
|
||||
|
||||
Each `.po` file contains **378 translations** for:
|
||||
Each `.po` file contains **388 translations** for:
|
||||
|
||||
- **Selection Field Options** (Days of week, Recurrence periods)
|
||||
- Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
|
||||
|
|
@ -41,11 +41,26 @@ When users switch their Odoo interface language to any of the supported language
|
|||
|
||||
To add or update translations:
|
||||
|
||||
1. Edit the corresponding `.po` file
|
||||
1. Edit the corresponding `.po` file **with `polib`** (never `msgmerge`, it corrupts them)
|
||||
2. Update the `msgstr` values (keep `msgid` unchanged)
|
||||
3. Save and reload the module in Odoo
|
||||
4. Translations apply immediately
|
||||
|
||||
### Adding a *new* string is not just a `.po` edit
|
||||
|
||||
`website_sale_aplicoop.pot` is generated by Odoo and is gitignored, but it is not
|
||||
optional: Odoo merges every `.po` against it before importing, and polib's `merge()`
|
||||
drops entries the POT does not have and replaces their occurrences with the POT's.
|
||||
A brand new string, or an existing one that just became a view term, needs the POT
|
||||
regenerated (from the Odoo UI, against a database **without demo data**) before its
|
||||
translation applies anywhere.
|
||||
|
||||
Three failure modes that produce no error at all — an untranslatable attribute
|
||||
(`data-bs-title` is not on QWeb's list, `title` is), a missing
|
||||
`model_terms:ir.ui.view` reference in the POT, and a missing `#. odoo-python`
|
||||
comment on `_()` strings — are written up in
|
||||
[`docs/TRANSLATIONS.md`](../../docs/TRANSLATIONS.md), under *Troubleshooting*.
|
||||
|
||||
Example entry in a `.po` file:
|
||||
```po
|
||||
#. module: website_sale_aplicoop
|
||||
|
|
@ -57,7 +72,7 @@ msgstr "Pedido de Grupo" # Spanish translation
|
|||
|
||||
- All `.po` files were generated and tested: **40/40 tests passing**
|
||||
- Translation coverage: **100%** for all supported languages
|
||||
- Last updated: August 13, 2026
|
||||
- Last updated: August 16, 2026
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue