[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #5973(accepted defect)

Opened 4 years ago

Last modified 3 years ago

Fix extraPaths

Reported by: mark Owned by: googler
Component: perf Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:
Xref:

Description

  1. There is something odd going on, where a path has a value, but when you iterate over the paths you don't find it. Seems to have to do with the count= logic, but I didn't have time to investigate further.
  1. The extra paths should only contain items that are locale specific: that is count=x and dayperiod=y.

The following code is not, and should be in the code fallback area of XMLSource instead.

        // metazones
        Set<String> zones = supplementalData.getAllMetazones();

        for (String zone : zones) {
            for (String width : new String[] { "long", "short" }) {
                for (String type : new String[] { "generic", "standard", "daylight" }) {
                    toAddTo.add("//ldml/dates/timeZoneNames/metazone[@type=\"" + zone + "\"]/" + width + "/" + type);
                }
            }
        }

        // Individual zone overrides
        final String[] overrides = {
                "Pacific/Honolulu\"]/short/generic",
                "Pacific/Honolulu\"]/short/standard",
                "Pacific/Honolulu\"]/short/daylight",
                "Europe/Dublin\"]/long/daylight",
                "Europe/London\"]/long/daylight"
        };
        for (String override : overrides) {
            toAddTo.add("//ldml/dates/timeZoneNames/zone[@type=\"" + override);
        }
  1. The extra paths code is not very clean. We generate and cache the extra paths for each locale, which is ok, but there is a lot of string generation. It might be cleaner to generate all the extra paths for each possible dayperiod and count once, and then filter that list for each locale (we have to filter anyway so that we don't have extra paths).
  1. It would be cleaner and easier to maintain to refactor the code fallback XMLSource code into a separate class.

Attachments

Change History

comment:1 Changed 4 years ago by emmons

  • Status changed from new to assigned
  • Component changed from unknown to tools
  • Priority changed from assess to medium
  • Milestone changed from UNSCH to 25dsub
  • Owner changed from anybody to mark
  • Type changed from unknown to defect

comment:2 Changed 4 years ago by emmons

  • Milestone changed from 25dsub to 25rc

Moving all 25dsub and 25design tickets to 25rc. If you plan to complete items in the 25M1 time frame, please move those tickets to 25M1.

comment:3 Changed 4 years ago by mark

  • Component changed from tools to perf

comment:4 Changed 4 years ago by mark

  • Milestone changed from 25rc to 25final

comment:5 Changed 4 years ago by mark

  • Milestone changed from 25final to 26dsub

comment:6 Changed 4 years ago by mark

  • Owner changed from mark to ribnitz

ticket:4632, ticket:5973, ticket:4007, and ticket:6303 are all connected, and should be done together.

Needs design doc.

comment:7 Changed 4 years ago by mark

  • Priority changed from medium to major

comment:8 Changed 3 years ago by emmons

  • Milestone changed from 26dsub to 26dvet

Moving all 26dsub to 26dvet. Please assess the need to complete tickets by 26dvet, which is 2014-06-19

comment:9 Changed 3 years ago by mark

  • Owner changed from ribnitz to googler

comment:10 Changed 3 years ago by mark

  • Milestone changed from 26dvet to 27dsub

comment:11 Changed 3 years ago by markus

  • Phase set to dsub
  • Milestone changed from 27dsub to 27

comment:12 Changed 3 years ago by emmons

  • Milestone changed from 27 to UNSCH

comment:13 Changed 2 years ago by srl

  • Status changed from assigned to accepted
View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.