]> granicus.if.org Git - icu/commitdiff
ICU-20568 Fix sorting of unitPreferenceData rules: units.xml
authorHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 25 Feb 2020 21:49:48 +0000 (22:49 +0100)
committerHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 25 Feb 2020 21:49:48 +0000 (22:49 +0100)
tools/cldr/cldr-to-icu/src/main/resources/ldml2icu_supplemental.txt

index 607b65acdf5515821c3b1484a6a87c2909e67a8a..bfe8485adcaf2b50a93c10659fd8aa5c653d989e 100644 (file)
 //supplementalData/measurementData/paperSize[@type="A4"][@territories="(%W)"] ; /measurementData/$1/PaperSize:intvector ; values=297 210
 //supplementalData/measurementData/paperSize[@type="US-Letter"][@territories="(%W)"] ; /measurementData/$1/PaperSize:intvector ; values=279 216
 
-# Quoting "$1" and "$2" in the output lets $3 expand space-separated regions: only the first unquoted output supports such expansion.
-//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"]
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
-//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@geq="(%A)"]
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/geq ; values=$4
-//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@skeleton="(%A)"]
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/skeleton ; values=$4
-//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@geq="(%A)"][@skeleton="(%A)"]
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/geq ; values=$4
-    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/skeleton ; values=$5
-
 //supplementalData/territoryInfo/territory[@type="(%W)"][@gdp="(%N)"][@literacyPercent="(%N)"][@population="(%N)"]/languagePopulation[@type="(%W)"][@writingPercent="(%N)"][@populationPercent="(%N)"][@officialStatus="(%W)"](?:[@references="%W"])?
     ; /territoryInfo/$1/territoryF:intvector ; values=&exp($2) &exp($3,-2) &exp($4) ; base_xpath=//supplementalData/territoryInfo/territory[@type="$1"]
     ; /territoryInfo/$1/$5/writingShareF:int ; values=&exp($6,-2)
     ; /convertUnits/$1/factor ; values="$3"
     ; /convertUnits/$1/reciprocal ; values=$4
 
+# Quoting "$1" and "$2" in the output lets $3 expand space-separated regions: only the first unquoted output supports such expansion.
+//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"]
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
+
+//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@geq="(%A)"]
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/geq ; values=$4
+
+//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@skeleton="(%A)"]
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/skeleton ; values=$4
+
+//supplementalData/unitPreferenceData/unitPreferences[@category="(%W)"][@usage="(%A)"]/unitPreference[@regions="(%A)"][@geq="(%A)"][@skeleton="(%A)"]
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/unit
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/geq ; values=$4
+    ; /unitPreferenceData/"$1"/"$2"/$3/<FIFO>/skeleton ; values=$5
+
 # languageInfo.xml
 
 //supplementalData/languageMatching/languageMatches[@type="(%B)_new"]/paradigmLocales[@locales="(%A)"] ; /languageMatchingInfo/$1/paradigmLocales ; values=$2