Skip to content

Commit

Permalink
CLDR-13587 Misc fixes to update files because of other changes. (unic…
Browse files Browse the repository at this point in the history
  • Loading branch information
macchiati committed Mar 19, 2020
1 parent 2bc565a commit b7a23f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
16 changes: 12 additions & 4 deletions common/testData/units/unitPreferencesTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ length; person-height; 001; 9 / 1000; 0.009; meter; 9 / 10; 0.9; cent

length; person-height; CA; 381 / 12500; 0.03048; meter; 3; foot; 6 / 5; 1.2; inch
length; person-height; CA; 0; 0.0; meter; 3; foot; 0; 0.0; inch
length; person-height; CA; 3429 / 12500; 0.27432; meter; 2; foot; 54 / 5; 10.8; inch
length; person-height; CA; 11049 / 12500; 0.88392; meter; 174 / 5; 34.8; inch
length; person-height; CA; 127 / 5000; 0.0254; meter; 1; 1.0; inch
length; person-height; CA; 1143 / 50000; 0.02286; meter; 9 / 10; 0.9; inch

length; person-height; AT; 1 / 10; 0.1; meter; 1; meter; 10; 10.0; centimeter
length; person-height; AT; 0; 0.0; meter; 1; meter; 0; 0.0; centimeter
Expand Down Expand Up @@ -192,9 +194,15 @@ length; road; GB; 1141857 / 12500; 91.34856; meter; 999 / 10; 99.9;
length; road; GB; 1143 / 1250; 0.9144; meter; 1; 1.0; yard
length; road; GB; 10287 / 12500; 0.82296; meter; 9 / 10; 0.9; yard

length; road; SE; 2000; 2000.0; meter; 1 / 5; 0.2; mile-scandinavian
length; road; SE; 1000; 1000.0; meter; 1 / 10; 0.1; mile-scandinavian
length; road; SE; 0; 0.0; meter; 0; 0.0; mile-scandinavian
length; road; SE; 11000; 11000.0; meter; 11 / 10; 1.1; mile-scandinavian
length; road; SE; 10000; 10000.0; meter; 1; 1.0; mile-scandinavian
length; road; SE; 9000; 9000.0; meter; 9; 9.0; kilometer
length; road; SE; 1000; 1000.0; meter; 1; 1.0; kilometer
length; road; SE; 900; 900.0; meter; 900; 900.0; meter
length; road; SE; 300; 300.0; meter; 300; 300.0; meter
length; road; SE; 2999 / 10; 299.9; meter; 2999 / 10; 299.9; meter
length; road; SE; 1; 1.0; meter; 1; 1.0; meter
length; road; SE; 9 / 10; 0.9; meter; 9 / 10; 0.9; meter

length; snowfall; 001; 11 / 1000; 0.011; meter; 11 / 10; 1.1; centimeter
length; snowfall; 001; 1 / 100; 0.01; meter; 1; 1.0; centimeter
Expand Down
2 changes: 1 addition & 1 deletion common/testData/units/unitsTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ year-duration ; month-person ; year ; 0.25/3 * x ; 83.33333
year-duration ; year ; year ; 1 * x ; 1,000.00
year-duration ; year-person ; year ; 1 * x ; 1000.0
year-duration ; decade ; year ; 10 * x ; 10000.0
year-duration ; century ; year ; 100 * x ; 100000.0
year-duration ; century ; year ; 100 * x ; 100000.0
16 changes: 10 additions & 6 deletions tools/java/org/unicode/cldr/tool/CompareFilesBetweenReleases2.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
import java.util.TreeSet;

import org.unicode.cldr.util.CLDRPaths;
import org.unicode.cldr.util.CldrUtility;

import com.google.common.collect.ImmutableSet;

public class CompareFilesBetweenReleases2 {

private static final String STAGING_DIRECTORY = CldrUtility.getPath(CLDRPaths.BASE_DIRECTORY, "../cldr-staging/production");
//private static final String STAGING_DIRECTORY = CldrUtility.getPath(CLDRPaths.BASE_DIRECTORY, "../cldr-staging/production");
private static final String RELEASE_DIRECTORY = CLDRPaths.ARCHIVE_DIRECTORY + "cldr-" + ToolConstants.LAST_RELEASE_VERSION + "/";

public static void main(String[] args) throws IOException {
Set<String> staging = getFiles(new File(STAGING_DIRECTORY));
Set<String> staging = getFiles(new File(CLDRPaths.BASE_DIRECTORY));
Set<String> lastRelease = getFiles(new File(RELEASE_DIRECTORY));
System.out.println("\nIn cldr-staging, but not last release:\n");
System.out.println("\nIn trunk, but not last release:\n");
showDiff(staging, lastRelease);
System.out.println("\nIn last release, but not cldr-staging:\n");
System.out.println("\nIn last release, but not trunk:\n");
showDiff(lastRelease, staging);
}

Expand All @@ -38,10 +39,13 @@ private static Set<String> getFiles(File base) throws IOException {
return result;
}

static final Set<String> SKIP = ImmutableSet.of("seed", "exemplars", "docs", "tools");

private static void getFiles(int baseLen, File subdir, Set<String> names) throws IOException {
String name = subdir.getName();
if (subdir.isDirectory()) {
if (name.equals("seed") || name.equals("exemplars")) {
if (SKIP.contains(name)
|| name.startsWith(".")) {
return;
}
for (File file : subdir.listFiles()) {
Expand Down

0 comments on commit b7a23f3

Please sign in to comment.