cldr icon indicating copy to clipboard operation
cldr copied to clipboard

CLDR-17599 Test changing implementation of Hints to resemble PathDescription

Open btangmu opened this issue 6 months ago • 4 comments

-New PathDescriptionHints.md could replace hints.txt, similar format to PathDescription.md

-Work in progress: still use hints.txt rather than PathDescriptionHints.md, except for the test showing they match

-Possibly the data will be combined in a single file but for now PathDescriptionHints.md and PathDescription.md are separate files

-New PathDescription.getHintRawDescription serves the same purpose as old TranslationHints.get

-New unit test TestPathDescription.testHints confirms that PathDescription.getHintRawDescription returns the same value as TranslationHints.get for all paths in hints.txt

-Fix compiler warnings by deleting final from static final for two methods

CLDR-17599

  • [ ] This PR completes the ticket.

ALLOW_MANY_COMMITS=true

btangmu avatar Jun 16 '25 01:06 btangmu

I think it's the right path to have two different files for now, we will probably want to have other different files for the HTML messages that currently exist( there are two of those and they want to be separate also.)

macchiati avatar Jun 16 '25 14:06 macchiati

I think it's the right path to have two different files for now, we will probably want to have other different files for the HTML messages that currently exist( there are two of those and they want to be separate also.)

In that case, maybe this ticket should be renamed. Currently "Merge Hints and PathDescription". If the distinction is to be preserved, a more accurate name is "Change implementation of Hints to be like PathDescription".

btangmu avatar Jun 16 '25 14:06 btangmu

This draft PR is not meant for merging. It demonstrates by means of a temporary unit test that PathDescriptionHints.md can replace hints.txt and still match all the same paths.

See https://github.com/unicode-org/cldr/pull/4817 for a PR that actually removes hints.txt and TranslationHints.java.

btangmu avatar Jun 16 '25 16:06 btangmu

agreed!

In that case, maybe this ticket should be renamed. Currently "Merge Hints and PathDescription". If the distinction is to be preserved, a more accurate name is "Change implementation of Hints to be like PathDescription".

macchiati avatar Jun 18 '25 22:06 macchiati

Closing this PR; it served its purpose as a demonstration. The subsequent PR https://github.com/unicode-org/cldr/pull/4817 was merged.

btangmu avatar Jul 15 '25 18:07 btangmu