Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17736 Update approximate widths #3808

Merged

Conversation

macchiati
Copy link
Member

@macchiati macchiati commented Jun 16, 2024

CLDR-17736

May fix some of the fulah items

FYI, this should be a yearly BRS item

NOTE
The check-console gets two errors, because the abbreviated forms are longer than the wide values. Looking at a variety of fonts, these are in fact errors that should show up in the survey tool.

However, if the console-check is run with BUILD mode (as it should be), then these two errors should not block merging.

"ई. स. पू. युग"
"ईसापूर्व युग"

"جماد ۱"
"جماعه"

mr [Marathi] error ▸Date_&Time|Gregorian|Eras-_abbreviated|0-variant◂ 〈BCE〉 【】 〈ई. स. पू. युग〉 «=» 【】 ⁅abbreviated date field too wide⁆ ❮Error: Abbreviated value "ई. स. पू. युग" can't be longer than the corresponding wide value "ईसापूर्व युग"❯ https://st.unicode.org/cldr-apps/v#/mr//efe32222ec06f22

ps [Pashto] error ▸Date_&Time|Islamic|Months-abbreviated-_Formatting|May◂ 〈Jum. I〉 【】 〈جماد ۱〉 «=» 【】 ⁅abbreviated date field too wide⁆ ❮Error: Abbreviated value "جماد ۱" can't be longer than the corresponding wide value "جماعه"❯ https://st.unicode.org/cldr-apps/v#/ps//6f92de7116b2180f

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code changes LGTM

  • the data is very verbose, is it really necessary to have the codepoint name? If it was just runs of widths, I'd think filling in entire blocks might be smaller even. I see:
xxxx5-xxxxB ; 0 ; # LONG NAME OF SOMETHING
xxxxD-xxxxF ; 0 ; # LONG NAME OF SOMETHING

but probably xxxxC is also 0

@srl295
Copy link
Member

srl295 commented Jun 17, 2024

console check is run in -z BUILD currently

@macchiati
Copy link
Member Author

code changes LGTM

  • the data is very verbose, is it really necessary to have the codepoint name? If it was just runs of widths, I'd think filling in entire blocks might be smaller even. I see:
xxxx5-xxxxB ; 0 ; # LONG NAME OF SOMETHING
xxxxD-xxxxF ; 0 ; # LONG NAME OF SOMETHING

It makes it easier to debug. The name is not needed in production, but it only affects startup, and I don't think it is a material performance issue.

If we really think it is an issue, we could measure, and if important could generate two files (that is what is done with GenerateBirths), one for debugging with names, and the other without (or even binary).


but probably xxxxC is also `0`

I don't think so. The items are sorted with width, so a gap typically means that something is in another group. I can check this if you give me an example.

@macchiati
Copy link
Member Author

console check is run in -z BUILD currently

@srl295
I'm confused. CheckWidths.java is supposed to only emit warnings when in BUILD. Could you look that code over, because as far as I can see it does that. So it shouldn't emit errors and thus block a merge. I think these are the relevant lines:

183: CheckStatus.Type errorType = CheckStatus.warningType;
192: errorType = CheckStatus.errorType;
206: errorType = CheckStatus.warningType;
208: errorType = CheckStatus.errorType;
219: new CheckStatus()

@macchiati macchiati requested a review from srl295 June 17, 2024 14:52
@macchiati
Copy link
Member Author

P.S. This is not a blocker for Vetting Phase, though I'd like to get it in very soon, since I think it solves the Fulah errors.

@srl295
Copy link
Member

srl295 commented Jun 17, 2024

P.S. This is not a blocker for Vetting Phase, though I'd like to get it in very soon, since I think it solves the Fulah errors.

ok . i will work on it while waiting for results of the sanity check.

@srl295
Copy link
Member

srl295 commented Jun 17, 2024

@macchiati I pulled down this PR and was able to repro the message

$ cldr-check -z BUILD -f mr
[-e, -z, BUILD, -f, mr]
#-f     file_filter     ≔       mr
#-t     test_filter     ≝       .*
#-o     organization    ≝       .*
#-p     path_filter     ≝       .*
#-e     errors_only     ≔       null
#-s     source_directory        ≝       /Users/srl295/src/cldr2/common/main/,/Users/srl295/src/cldr2/common/annotations/,/Users/srl295/src/cldr2/seed/main/
#-z     phase   ≔       BUILD
#-g     generate_html   ≝       /Users/srl295/src/cldr-staging/docs/charts/46//errors/
#-y     subtype_filter  ≝       .*
#-S     source_all      ≝       common,seed,exemplars
Source directories:

    /Users/srl295/src/cldr2/common/main (/Users/srl295/src/cldr2/common/main)
    /Users/srl295/src/cldr2/common/annotations  (/Users/srl295/src/cldr2/common/annotations)
    /Users/srl295/src/cldr2/seed/main   (/Users/srl295/src/cldr2/seed/main)
filtered tests: [CheckAnnotations, CheckChildren, CheckCoverage, CheckDates, CheckForCopy, CheckDisplayCollisions, CheckExemplars, CheckForExemplars, CheckForInheritanceMarkers, CheckNames, CheckNumbers, CheckMetazones, CheckLogicalGroupings, CheckAlt, CheckAltOnly, CheckCurrencies, CheckCasing, CheckConsistentCasing, CheckQuotes, CheckUnits, CheckWidths, CheckPlaceHolders, CheckPersonNames, CheckNew]
Locale  Status  ▸PPath◂ 〈Eng.Value〉   【Eng.Ex.】     〈Loc.Value〉   «fill-in»       【Loc.Ex】      ⁅error/warning type⁆    ❮Error/Warning Msg❯     Full Path    AliasedSource/Path?
/Users/srl295/src/cldr2/common/main/mr.xml:2043:54: error
mr [Marathi]    error   ▸Date_&_Time|Gregorian|Eras_-_abbreviated|0-variant◂    〈BCE〉 【】    〈ई. स. पू. युग〉 «=»     【】    ⁅abbreviated date field too wide⁆    ❮Error: Abbreviated value "ई. स. पू. युग" can't be longer than the corresponding wide value "ईसापूर्व युग"❯   https://st.unicode.org/cldr-apps/v#/mr//efe32222ec06f22
# mr [Marathi]  Summary modern  Items:  10969   Raw Missing:    144     Raw Provisional:        0
# mr [Marathi]  Summary modern  Total missing from general exemplars:   20      [\u200B ॲ a b c d e f g i l m n o p r s u x z]
# mr [Marathi]  Summary modern  Subtotal error: 1
# mr Elapsed time: : 5.732 s

# Total error:  1

# Total elapsed time: : 9.784 s

<< FAILURE - Error count is 1 . >>

@srl295
Copy link
Member

srl295 commented Jun 17, 2024

@macchiati digging in, the error is coming from this code

https://github.com/macchiati/cldr/blob/d53cd8d713b86ef939a8faab47dbd82e2f403bd8/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckDates.java#L491-L504

which seems to not have anything to do with the -z BUILD switch, but unconditionally is errorType

@macchiati
Copy link
Member Author

macchiati commented Jun 17, 2024 via email

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may eventually want to make this a common function

@macchiati
Copy link
Member Author

may eventually want to make this a common function

I was thinking that too.

@macchiati macchiati merged commit b62336e into unicode-org:main Jun 17, 2024
10 checks passed
@macchiati macchiati deleted the CLDR-17736-Update-ApproximateWidth branch June 17, 2024 21:00
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.

2 participants