fix(i18n): publication-date field is free text, not "Italian format" (#201)#202
fix(i18n): publication-date field is free text, not "Italian format" (#201)#202fabiodalez-dev wants to merge 1 commit into
Conversation
…an format" (#201) The book edit form labelled the `data_pubblicazione` helper "Original publication date (Italian format)" while the placeholder showed a locale example ("e.g. August 26, 2025"). For a non-Italian user the note is contradictory and the translations had even drifted (fr_FR said "format français", de_DE/en kept "Italian format"), so #201 reasonably asked "what is the right date format?". There is none: `data_pubblicazione` is a free-text `varchar(50)`, stored verbatim by BookRepository (no parsing), and `format_date()` only reformats values `strtotime()` can parse (English/numeric) while leaving anything else — e.g. the real-world "24 settembre 1991" — untouched. The Italian `DateHelper` parser is not applied to this field. So drop the misleading format claim: the helper now reads "Original publication date (free text)" (and its IT/FR/DE equivalents), which matches the free-text nature and the locale-aware placeholder example. Source string + all four locale JSONs updated together. Verified: php -l clean; the 4 locale JSONs are valid; book edit form renders the new helper (browser, it_IT): "Data di pubblicazione originale (testo libero)".
|
Warning Review limit reached
More reviews will be available in 53 minutes and 19 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code review (
|
Closes #201.
Problem
The book edit form showed Publication Date with placeholder
e.g. August 26, 2025but a helper saying "Original publication date (Italian format)" — contradictory for a non-Italian user. The translations had also drifted (fr_FR→ "format français",de_DE/en_US→ "Italian format"), so the reporter reasonably asked "what is the right date format?".Answer / root cause
There is no required format.
data_pubblicazioneis a free-textvarchar(50):BookRepositorystores it verbatim (bind types, no parsing).format_date()only reformats valuesstrtotime()can parse (English/numeric); anything else — e.g. the real-world value24 settembre 1991— is returned unchanged.DateHelperparser is not applied to this field.So the "(Italian format)" note never reflected a real constraint.
Fix
Helper text is now "Original publication date (free text)" (+ IT/FR/DE equivalents), matching the free-text nature and the locale-aware placeholder example. Source string + all four locale JSONs updated in the same commit.
Verify
php -lclean; the 4 locale JSONs valid.