Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Danish translation of word-based periods

Originated from Kasper Laudrup, checked by SJC
  • Loading branch information...
commit 136667ccf66c62866dc99c7967cf8491804a54be 1 parent 6d3a272
@jodastephen jodastephen authored
View
4 RELEASE-NOTES.txt
@@ -26,6 +26,8 @@ Enhancements since 2.1
- Add method to calculate the Julian Day
See DateTimeUtils
+- Add Danish translation of word-based periods
+
Compatibility with 2.1
----------------------
@@ -86,7 +88,7 @@ Bug fixes since 2.1
- Javadoc fix to BaseChronology [3513326]
-- Fixed Spanish translation of day - dia now has accented i
+- Fixed Spanish translation of day for periods - dia now has accented i
https://github.com/JodaOrg/joda-time/pull/5
View
22 src/main/java/org/joda/time/format/messages_da.properties
@@ -0,0 +1,22 @@
+PeriodFormat.space=\
+PeriodFormat.comma=,
+PeriodFormat.commandand=,og
+PeriodFormat.commaspaceand=, og
+PeriodFormat.commaspace=,\
+PeriodFormat.spaceandspace=\ og\
+PeriodFormat.year=\ år
+PeriodFormat.years=\ år
+PeriodFormat.month=\ måned
+PeriodFormat.months=\ måneder
+PeriodFormat.week=\ uge
+PeriodFormat.weeks=\ uger
+PeriodFormat.day=\ dag
+PeriodFormat.days=\ dage
+PeriodFormat.hour=\ time
+PeriodFormat.hours=\ timer
+PeriodFormat.minute=\ minut
+PeriodFormat.minutes=\ minutter
+PeriodFormat.second=\ sekund
+PeriodFormat.seconds=\ sekunder
+PeriodFormat.millisecond=\ millisekund
+PeriodFormat.milliseconds=\ millisekunder
View
16 src/test/java/org/joda/time/format/TestPeriodFormat.java
@@ -28,13 +28,14 @@
* @author Stephen Colebourne
*/
public class TestPeriodFormat extends TestCase {
-
+
private static final Locale EN = new Locale("en");
private static final Locale FR = new Locale("fr");
private static final Locale PT = new Locale("pt");
private static final Locale ES = new Locale("es");
private static final Locale DE = new Locale("de");
private static final Locale NL = new Locale("nl");
+ private static final Locale DA = new Locale("da");
private Locale originalLocale = null;
@@ -299,6 +300,19 @@ public void test_wordBased_nl_cached() {
}
//-----------------------------------------------------------------------
+ // wordBased(Locale da)
+ //-----------------------------------------------------------------------
+ public void test_wordBased_da_formatMultiple() {
+ Period p = new Period(2, 3, 4, 2, 5, 6 ,7, 8);
+ assertEquals("2 \u00E5r, 3 m\u00E5neder, 4 uger, 2 dage, 5 timer, 6 minutter, 7 sekunder og 8 millisekunder", PeriodFormat.wordBased(DA).print(p));
+ }
+
+ public void test_wordBased_da_formatSinglular() {
+ Period p = new Period(1, 1, 1, 1, 1, 1, 1, 1);
+ assertEquals("1 \u00E5r, 1 m\u00E5ned, 1 uge, 1 dag, 1 time, 1 minut, 1 sekund og 1 millisekund", PeriodFormat.wordBased(DA).print(p));
+ }
+
+ //-----------------------------------------------------------------------
// Cross check languages
//-----------------------------------------------------------------------
public void test_wordBased_fr_from_de() {
Please sign in to comment.
Something went wrong with that request. Please try again.