fix: add missing diacritical marks in Italian day names#104
fix: add missing diacritical marks in Italian day names#104atoomic merged 1 commit intocpan-authors:mainfrom
Conversation
Italian weekday names require a grave accent (ì) on five of seven days: Lunedì, Martedì, Mercoledì, Giovedì, Venerdì. The module had plain ASCII approximations without accents since its original contribution. Add `use utf8` pragma and correct the @Dow array. Update test expectations in format.t and lang-data.t accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| Luglio Agosto Settembre Ottobre Novembre Dicembre); | ||
| @MoYs = qw(Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic); | ||
| @DoW = qw(Domenica Lunedi Martedi Mercoledi Giovedi Venerdi Sabato); | ||
| @DoW = qw(Domenica Lunedì Martedì Mercoledì Giovedì Venerdì Sabato); |
There was a problem hiding this comment.
This looks correct after double check
my %en_to_it_days = (
Monday => 'lunedì',
Tuesday => 'martedì',
Wednesday => 'mercoledì',
Thursday => 'giovedì',
Friday => 'venerdì',
Saturday => 'sabato',
Sunday => 'domenica',
);
Greptile SummaryThis PR corrects a long-standing localization bug in Confidence Score: 5/5This PR is safe to merge — it is a minimal, well-scoped correctness fix with no logic changes. All three files are changed in a targeted way that mirrors the existing pattern used by Portuguese and other language modules. The No files require special attention.
|
| Filename | Overview |
|---|---|
| lib/Date/Language/Italian.pm | Added use utf8 pragma and corrected @DoW with proper grave-accented Italian day names; consistent with how other modules (e.g. Portuguese.pm) handle non-ASCII strings. |
| t/format.t | Updated %A expectation for Italian from Martedi to Martedì; follows the same literal-UTF-8-in-__DATA__ pattern already used for Portuguese and other languages with accented characters. |
| t/lang-data.t | Updated Italian A expectation to "Marted\x{ec}" using a Unicode escape, which is the safest encoding-agnostic style for a test file that does not declare use utf8. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Italian.pm\n(use utf8 added)"] -->|"@DoW contains\nUnicode character strings\ne.g. 'Martedì' U+00EC"| B["format_A()\nreturns $DoW[wday]"]
B --> C["time2str('%A', ...)"]
C -->|"compare"| D["format.t __DATA__\n'Martedì' literal\n(UTF-8 bytes)"]
C -->|"compare"| E["lang-data.t\n'Marted\\x{ec}'\n(Unicode escape)"]
D -->|"is() passes"| F["✓ Test suite green"]
E -->|"is() passes"| F
Reviews (1): Last reviewed commit: "fix: add missing diacritical marks in It..." | Re-trigger Greptile
What
Correct Italian weekday names to include the grave accent (ì).
Why
Five of seven Italian day names require a grave accent: Lunedì, Martedì, Mercoledì, Giovedì, Venerdì. The module had plain ASCII approximations ("Lunedi", "Martedi", etc.) since its original contribution — a localization bug present since the module was first added.
How
Added
use utf8pragma and corrected the@DoWarray. Short names (@DoWs) are unaffected since they use only the first 3 characters (before the accent). Updated test expectations informat.tandlang-data.t.Testing
🤖 Generated with Claude Code
Quality Report
Changes: 3 files changed, 4 insertions(+), 3 deletions(-)
Code scan: clean
Tests: skipped
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline