cldr icon indicating copy to clipboard operation
cldr copied to clipboard

CLDR-17014 Use special brackets to distinguish fallback values based on codes

Open btangmu opened this issue 1 year ago • 2 comments

-New CONSTRUCTED_VALUE_PREFIX, CONSTRUCTED_VALUE_SUFFIX, makeConstructedValue

CLDR-17014

  • [ ] This PR completes the ticket.

ALLOW_MANY_COMMITS=true

btangmu avatar Jul 30 '24 19:07 btangmu

There are a few test failures like

Test4528
Error:  (TestExampleGenerator.java:957)  Error: : specifics: expected "〖❬123.456,79 ❭BMD〗", got "〖❬123.456,79 ❭⟦BMD⟧〗"

and

TestLocaleDisplay
Warning:  (TestLocale.java:514)  Warning: 
Use -v to get samples for tests

Error:  (TestLocale.java:587)  Error: : en; en-u-cu-chf: expected "English (Currency: CHF)", got "English (Currency: ⟦CHF⟧)"

Error:  (TestLocale.java:587)  Error: : en; en-u-tz-uslax: expected "English (Time Zone: Los Angeles Time)", got "English (Time Zone: ⟦Los Angeles⟧ Time)"

Error:  (TestLocale.java:587)  Error: : af; zh-Hans-fonipa: expected "Chinees (Vereenvoudig, FONIPA)", got "Chinees (Vereenvoudig, ⟦FONIPA⟧)"

Evidently the "fallback" values are treated as correct, rather than as placeholders for missing data, for some paths, so it might be necessary to distinguish two kinds of path that currently both rely on constructedItems...?

Or, maybe not. The "BMD" example above appears to depend on this path:

//ldml/numbers/currencies/currency[@type="BMD"]/symbol

https://st.unicode.org/cldr-apps/v#/it/C_NAmerica/6cc0bc4c231d3996

Currently the winning value "BMD" is shown as an "untranslated code" -- that is, inherited. If the code changes to "⟦BMD⟧", then the value should change to "BMD" and it should be present in it.xml. Currently it.xml has:

			<currency type="BMD">
				<displayName>dollaro delle Bermuda</displayName>
				<displayName count="one">dollaro delle Bermuda</displayName>
				<displayName count="other">dollari delle Bermuda</displayName>
				<symbol>↑↑↑</symbol>

That "↑↑↑" should change to "BMD". Then the test will pass...

btangmu avatar Jul 30 '24 20:07 btangmu

I'm not sure about this approach, and I added comments on the ticket https://unicode-org.atlassian.net/browse/CLDR-17014

srl295 avatar Jul 31 '24 20:07 srl295

Instead of special brackets, we're now looking at simply having no fallback values; that can be implemented using extra paths, see https://github.com/unicode-org/cldr/pull/4254

btangmu avatar Jan 17 '25 17:01 btangmu