sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 02/02: Unit name for "%" should be "percent" rather than "percentage", to fit usage found in netCDF files. We keep "percentage" as an alias however.
Date Thu, 25 Oct 2018 16:13:57 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 1768c11223164e5acd17a0f4833435a5896fc1fe
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu Oct 25 18:13:15 2018 +0200

    Unit name for "%" should be "percent" rather than "percentage", to fit usage found in
netCDF files. We keep "percentage" as an alias however.
---
 .../src/main/resources/org/apache/sis/measure/UnitAliases.properties    | 1 +
 .../src/main/resources/org/apache/sis/measure/UnitNames.properties      | 2 +-
 .../src/main/resources/org/apache/sis/measure/UnitNames_fr.properties   | 2 +-
 .../src/test/java/org/apache/sis/measure/UnitFormatTest.java            | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitAliases.properties
b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitAliases.properties
index 0e4b0ea..3b6bbd9 100644
--- a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitAliases.properties
+++ b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitAliases.properties
@@ -27,6 +27,7 @@ mbar=hPa
 millibar=hPa
 millibars=hPa
 minutes=min
+percentage=%
 radians=rad
 seconds=s
 weeks=wk
diff --git a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
index fce3a4b..11c36bf 100644
--- a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
+++ b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames.properties
@@ -58,7 +58,7 @@ Wb=weber
 wk=week
 �rad=microradian
 \u03a9=ohm
-%=percentage
+%=percent
 �=degree
 \u2032=arc-minute
 \u2033=arc-second
diff --git a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
index 8675609..708a734 100644
--- a/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
+++ b/core/sis-utility/src/main/resources/org/apache/sis/measure/UnitNames_fr.properties
@@ -30,7 +30,7 @@ s=seconde
 sr=st�radian
 unity=unit�
 wk=semaine
-%=pourcentage
+%=pourcent
 �=degr�e
 \u2032=arc-minute
 \u2033=arc-seconde
diff --git a/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java b/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
index ee3073c..fc711b7 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/measure/UnitFormatTest.java
@@ -122,7 +122,7 @@ public final strictfp class UnitFormatTest extends TestCase {
         verify(declared, "GRAM",                "M",            "g",     "gram",        
           Units.GRAM);
         verify(declared, "MOLE",                "N",            "mol",   "mole",        
           Units.MOLE);
         verify(declared, "UNITY",               "",             "",       null,         
           Units.UNITY);
-        verify(declared, "PERCENT",             "",             "%",     "percentage",  
           Units.PERCENT);
+        verify(declared, "PERCENT",             "",             "%",     "percent",     
           Units.PERCENT);
         verify(declared, "PPM",                 "",             "ppm",   "parts per million",
      Units.PPM);
         verify(declared, "PSU",                 "",             "psu",   "practical salinity
unit", Units.PSU);
         verify(declared, "PIXEL",               "",             "px",    "pixel",       
           Units.PIXEL);


Mime
View raw message