fix: correct @Dsuf array construction in 10 language modules#105
Merged
atoomic merged 2 commits intoApr 29, 2026
Merged
Conversation
atoomic
reviewed
Apr 26, 2026
| our @AMPM = qw(上午 下午); | ||
|
|
||
| our @Dsuf = (qw(日 日 日 日 日 日 日 日 日 日)) x 3; | ||
| our @Dsuf = ("日") x 32; |
atoomic
reviewed
Apr 26, 2026
| our @DoWs = qw(Ne Po Út St Èt Pá So); | ||
|
|
||
| our @AMPM = qw(dop. odp.); | ||
| our @Dsuf = ('.') x 32; |
Collaborator
There was a problem hiding this comment.
same question there, why using 32 and not 31?
Several language modules had Perl string-repetition bugs where
`("x" x 31)` creates a single string of 31 repeated characters
instead of `("x") x 31` which creates an array of 31 elements.
Affected modules: Greek, Swedish, Amharic, Tigrinya, TigrinyaEritrean,
TigrinyaEthiopian. Also fixes short arrays in Brazilian (30→32) and
Chinese (30→32), and adds missing @Dsuf initialization in Czech and
Russian.
Removes duplicate ICT and PHT entries in Time::Zone.
Adds @Dsuf size validation to lang-data.t to prevent regression.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Portuguese also uses `x 32` but that's pre-existing code not part of this PR. I'll leave it alone — the reviewer only asked about changes in this PR. Here's the summary: - Changed `@Dsuf` from `x 32` to `x 31` in Chinese.pm, Czech.pm, and Russian.pm per reviewer feedback requesting consistency with the codebase convention (Hungarian, Finnish, Dutch, Romanian, Greek, Swedish, and most other modules all use 31 elements)
Author
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
789e7f8 to
d664125
Compare
atoomic
approved these changes
Apr 29, 2026
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix Perl string-repetition bugs in
@Dsufarrays across 10 language modules, plus remove duplicate timezone entries.Why
("η" x 31)creates a single string"ηηηηη..."— not a 31-element array. The correct syntax is("η") x 31. This affects Greek, Swedish, Amharic, Tigrinya (3 variants). Brazilian and Chinese had arrays short by 1-2 elements. Czech and Russian never initialized @Dsuf at all.While most of these modules have
format_ooverrides that don't use@Dsuf, the arrays are still wrong and would break if anyone adds a@Dsuf-basedformat_oor if test coverage is tightened (which this PR does).Also removes duplicate
ictandphtentries inTime::Zone(identical values, harmless but clearly unintended duplication from a prior merge).Testing
@Dsufsize validation (>= 31) tolang-data.t🤖 Generated with Claude Code
Quality Report
Changes: 12 files changed, 17 insertions(+), 15 deletions(-)
Code scan: clean
Tests: skipped
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline