-
Notifications
You must be signed in to change notification settings - Fork 412
CLDR-18451 Update TerritoryInfo references after v48 changes #5154
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -352,14 +352,16 @@ private static void writeBasicLanguageData(PrintWriter out, Set<RowData> sortedI | |
| TreeSet.class)); | ||
| } | ||
| if (languageInCountryData.officialStatus.isMajor()) { | ||
| // Output will look like <language type="sw" territories="TZ"/> | ||
| // This is no longer saved to output | ||
| // It used to appear like: <language type="sw" territories="TZ"/> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mysterious. Does the code still serve a purpose? There can be a tendency to keep code around for historical reference and/or in case it might be useful again someday. However, that leads to crufty hard-to-maintain code. So I'd rather see the code removed if unnecessary, and otherwise a comment explaining why the code is here, rather than a comment saying what it used to do or doesn't do...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, it's not great to leave this code in. I started this refactor last year but I punted the more consequential work until I had a proper design to replace the old class completely with a new format. Removing this code ended up affecting other classes that consume the data and ended up causing a big rewrite that I wasn't prepared. Would you like me to change the comment to instead say "this is not saved to the output but it is used in the BasicLanguageData class"?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds good. Also, maybe (optional!) there could be a ticket for the larger refactoring, and you could put in a TODO comment referencing that ticket. Unless that's just wishful thinking :-) |
||
| status_territories.put( | ||
| BasicLanguageData.Type.primary, languageInCountryData.countryCode); | ||
| } else if (languageInCountryData.officialStatus.isOfficial() | ||
| || languageInCountryData.getLanguagePopulation() | ||
| >= cutoff * languageInCountryData.countryPopulation | ||
| || languageInCountryData.getLanguagePopulation() >= 1000000) { | ||
| // Output will look like <language type="sw" territories="CD" alt="secondary"/> | ||
| // This is no longer saved to output | ||
| // It used to appear like: <language type="sw" territories="CD" alt="secondary"/> | ||
| status_territories.put( | ||
| BasicLanguageData.Type.secondary, languageInCountryData.countryCode); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a period here before "In particular"?