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-17756 first cut at test for missing examples #3835

Conversation

macchiati
Copy link
Member

@macchiati macchiati commented Jun 30, 2024

CLDR-17756

Add a test for which paths don't have examples.
Some paths don't have any obvious examples, because their values are not patterns, nor are components of patterns.
So there is a mechanism to exclude those paths.

The test currently succeeds, because all of the failures are now logKnownIssues, with a brief comment for what to do, and a list of the starred paths that need to be handled. The process will be to successively add examples for paths in ExampleGenerator, until the LogKnownIssues can be removed.

There were two tickets that I used for the logKnownIssues; the next step would be to file additional tickets, probably grouping related items so there aren't too many additional tickets.

Run TestForMissing -allKnownIssues to see the full listing, currently:

CLDR-15078 <https://unicode-org.atlassian.net/browse/CLDR-15078>
  - TestExampleGenerator/TestForMissing (Enable compound unit formatting)
		(For the following paths:
		//ldml/units/unitLength[@type="*"]/unit[@type="*"]/unitPattern[@count="*"]
		//ldml/units/unitLength[@type="*"]/unit[@type="*"]/unitPattern[@count="*"][@case="*"])
CLDR-17756 <https://unicode-org.atlassian.net/browse/CLDR-17756>
  - TestExampleGenerator/TestForMissing (Add examples of date intervals)
		(For the following paths:
		//ldml/dates/calendars/calendar[@type="*"]/dateTimeFormats/intervalFormats/intervalFormatItem[@id="*"]/greatestDifference[@id="*"])
  - TestExampleGenerator/TestForMissing (Show "{0} ¤¤" with formatted number and ISO code, eg {0} ¤¤ becomes 3,5 EUR)
		(For the following paths:
		//ldml/numbers/currencyFormats[@numberSystem="*"]/currencyPatternAppendISO)
  - TestExampleGenerator/TestForMissing (Show 2 currencies with pattern, eg EUR ➔ USD)
		(For the following paths:
		//ldml/numbers/currencies/currency[@type="*"]/displayName)
  - TestExampleGenerator/TestForMissing (Show as part of a locale name)
		(For the following paths:
		//ldml/localeDisplayNames/keys/key[@type="*"]
		//ldml/localeDisplayNames/measurementSystemNames/measurementSystemName[@type="*"]
		//ldml/localeDisplayNames/subdivisions/subdivision[@type="*"]
		//ldml/localeDisplayNames/types/type[@key="*"][@type="*"])
  - TestExampleGenerator/TestForMissing (Show font with field, eg: Helvetica (kursiv), Helvetica (Kursivstellung), Helvetica (vertikale Brüch))
		(For the following paths:
		//ldml/typographicNames/axisName[@type="*"]
		//ldml/typographicNames/featureName[@type="*"]
		//ldml/typographicNames/styleName[@type="*"][@subtype="*"])
  - TestExampleGenerator/TestForMissing (Show in date with both variants: formatting and standalone. That way people can see what difference it makes, eg between MMMM and LLLL)
		(For the following paths:
		//ldml/dates/calendars/calendar[@type="*"]/days/dayContext[@type="*"]/dayWidth[@type="*"]/day[@type="*"]
		//ldml/dates/calendars/calendar[@type="*"]/months/monthContext[@type="*"]/monthWidth[@type="*"]/month[@type="*"]
		//ldml/dates/calendars/calendar[@type="*"]/months/monthContext[@type="*"]/monthWidth[@type="*"]/month[@type="*"][@yeartype="*"]
		//ldml/dates/calendars/calendar[@type="*"]/quarters/quarterContext[@type="*"]/quarterWidth[@type="*"]/quarter[@type="*"])
  - TestExampleGenerator/TestForMissing (Show pattern with example)
		(For the following paths:
		//ldml/dates/fields/field[@type="*"]/relativePeriod)
  - TestExampleGenerator/TestForMissing (Show sample name with 2 different values)
		(For the following paths:
		//ldml/personNames/foreignSpaceReplacement
		//ldml/personNames/initialPattern[@type="*"]
		//ldml/personNames/nativeSpaceReplacement
		//ldml/personNames/parameterDefault[@parameter="*"]
		//ldml/personNames/sampleName[@item="*"]/nameField[@type="*"])
  - TestExampleGenerator/TestForMissing (Show two units with pattern, eg 'Meter ➔ Fuß')
		(For the following paths:
		//ldml/units/unitLength[@type="*"]/unit[@type="*"]/displayName)
  - TestExampleGenerator/TestForMissing (Show using two months, eg Januar - Juni)
		(For the following paths:
		//ldml/dates/calendars/calendar[@type="*"]/dateTimeFormats/intervalFormats/intervalFormatFallback)
  - TestExampleGenerator/TestForMissing (Show with formattted date, including era)
		(For the following paths:
		//ldml/dates/calendars/calendar[@type="*"]/eras/eraAbbr/era[@type="*"]
		//ldml/dates/calendars/calendar[@type="*"]/eras/eraNames/era[@type="*"])
  - TestExampleGenerator/TestForMissing (Show with pattern, eg '30° Süd')
		(For the following paths:
		//ldml/units/unitLength[@type="*"]/coordinateUnit/coordinateUnitPattern[@type="*"])
  - TestExampleGenerator/TestForMissing (Show with pattern, eg Richtung: 30° Süd)
		(For the following paths:
		//ldml/units/unitLength[@type="*"]/coordinateUnit/displayName)
  - TestExampleGenerator/TestForMissing (Show with sample characters (where possible, emoji))
		(For the following paths:
		//ldml/characterLabels/characterLabelPattern[@type="*"]
		//ldml/characterLabels/characterLabelPattern[@type="*"][@count="*"]
		//ldml/characterLabels/characterLabel[@type="*"])
  - TestExampleGenerator/TestForMissing (Show with {0}: {0}, eg Monat: Januar)
		(For the following paths:
		//ldml/dates/fields/field[@type="*"]/displayName)
  - TestExampleGenerator/TestForMissing (Use gender minimal pair patterns to show in context — look at the minimal pair examples, reversing the background)
		(For the following paths:
		//ldml/units/unitLength[@type="*"]/unit[@type="*"]/gender)
  - TestExampleGenerator/TestForMissing (Show as part of a locale name)
		(For the following paths:
		//ldml/localeDisplayNames/keys/key[@type="*"]
		//ldml/localeDisplayNames/types/type[@key="*"][@type="*"])
  - TestExampleGenerator/TestForMissing (Show with sample characters (where possible, emoji))
		(For the following paths:
		//ldml/characterLabels/characterLabelPattern[@type="*"][@count="*"])
CLDR-5854 <https://unicode-org.atlassian.net/browse/CLDR-5854>
  - TestExampleGenerator/TestForMissing (Show with appropriate amount, eg 'in 3 Jahren', and for all relatives > 1 day, add a time)
		(For the following paths:
		//ldml/dates/fields/field[@type="*"]/relativeTime[@type="*"]/relativeTimePattern[@count="*"])
  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@macchiati macchiati requested review from srl295 and btangmu June 30, 2024 06:21
@macchiati macchiati marked this pull request as draft June 30, 2024 06:22
srl295
srl295 previously approved these changes Jul 8, 2024
@macchiati macchiati marked this pull request as ready for review July 11, 2024 00:58
@macchiati macchiati merged commit 9af283d into unicode-org:main Jul 11, 2024
10 checks passed
@macchiati macchiati deleted the CLDR-17756-first-cut-at-test-for-missing-examples branch July 11, 2024 16:18
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.

3 participants