Skip to content

Commit

Permalink
Merge pull request #66 from radiosignal/danish-translation
Browse files Browse the repository at this point in the history
Danish translation
  • Loading branch information
Norbert Orzechowicz committed Dec 2, 2015
2 parents 6bed680 + daa04e8 commit 7599dd8
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ Currently we support following languages:
* [Chinese Simplified] (src/Coduo/PHPHumanizer/Resources/translations/difference.zh_CN.yml)
* [Spanish] (src/Coduo/PHPHumanizer/Resources/translations/difference.es.yml)
* [Ukrainian] (src/Coduo/PHPHumanizer/Resources/translations/difference.uk.yml)
* [Danish] (src/Coduo/PHPHumanizer/Resources/translations/difference.da.yml)

# Credits

Expand Down
35 changes: 35 additions & 0 deletions src/Coduo/PHPHumanizer/Resources/translations/difference.da.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
just_now:
past: "[0,Inf] lige nu"
future: "[0,Inf] lige nu"
second:
past: "{1} %count% sekund siden|[2,Inf] %count% sekunder siden"
future: "{1} %count% sekund fra nu|[2,Inf] %count% sekunder fra nu"
minute:
past: "{1} %count% minut siden|[2,Inf] %count% minutter siden"
future: "{1} %count% minut fra nu|[2,Inf] %count% minutter fra nu"
hour:
past: "{1} %count% time siden|[2,Inf] %count% timer siden"
future: "{1} %count% time fra nu|[2,Inf] %count% timer fra nu"
day:
past: "{1} %count% dag siden|[2,Inf] %count% dage siden"
future: "{1} %count% dag fra nu|[2,Inf] %count% dage fra nu"
week:
past: "{1} %count% uge siden|[2,Inf] %count% uger siden"
future: "{1} %count% uge fra nu|[2,Inf] %count% uger fra nu"
month:
past: "{1} %count% måned siden|[2,Inf] %count% måneder siden"
future: "{1} %count% måned fra nu|[2,Inf] %count% måneder fra nu"
year:
past: "{1} %count% år siden|[2,Inf] %count% år siden"
future: "{1} %count% år fra nu|[2,Inf] %count% år fra nu"

compound:
second: "{1} %count% sekund|[2,Inf] %count% sekunder"
minute: "{1} %count% minut|[2,Inf] %count% minutter"
hour: "{1} %count% time|[2,Inf] %count% timer"
day: "{1} %count% dag|[2,Inf] %count% dage"
week: "{1} %count% uge|[2,Inf] %count% uger"
month: "{1} %count% måned|[2,Inf] %count% måneder"
year: "{1} %count% år|[2,Inf] %count% år"
past: "%value% siden"
future: "%value% fra nu"
3 changes: 3 additions & 0 deletions src/Coduo/PHPHumanizer/Resources/translations/oxford.da.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
only_two: "%first% og %second%"
comma_separated: "%list%, og %last%"
comma_separated_with_limit: "{1} %list%, og 1 anden|[2,Inf] %list%, og %count% andre"
29 changes: 29 additions & 0 deletions tests/Coduo/PHPHumanizer/Tests/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,25 @@ public function humanizeDataProvider()
array("2014-05-01", "2014-04-01", '1 місяць тому', 'uk'),
array("2015-05-01", "2014-04-01", '1 рік тому', 'uk'),
array("2014-05-01", "2016-04-01", 'через 2 роки', 'uk'),

// Danish
array("2014-04-26 13:00:00", "2014-04-26 13:00:00", "lige nu", "da"),
array("2014-04-26 13:00:00", "2014-04-26 13:00:05", "5 sekunder fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-26 12:59:00", "1 minut siden", "da"),
array("2014-04-26 13:00:00", "2014-04-26 12:45:00", "15 minutter siden", "da"),
array("2014-04-26 13:00:00", "2014-04-26 13:15:00", "15 minutter fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-26 14:00:00", "1 time fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-26 15:00:00", "2 timer fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-26 12:00:00", "1 time siden", "da"),
array("2014-04-26", "2014-04-25", "1 dag siden", "da"),
array("2014-04-26", "2014-04-24", "2 dage siden", "da"),
array("2014-04-26", "2014-04-28", "2 dage fra nu", "da"),
array("2014-04-01", "2014-04-15", "2 uger fra nu", "da"),
array("2014-04-15", "2014-04-07", "1 uge siden", "da"),
array("2014-01-01", "2014-04-01", "3 måneder fra nu", "da"),
array("2014-05-01", "2014-04-01", "1 måned siden", "da"),
array("2015-05-01", "2014-04-01", "1 år siden", "da"),
array("2014-05-01", "2016-04-01", "2 år fra nu", "da"),
);
}

Expand Down Expand Up @@ -351,6 +370,16 @@ public function preciseDifferenceDataProvider()
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", 'через 2 дні, 10 годин', 'uk'),
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", '1 день, 1 година, 40 хвилин тому', 'uk'),
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", 'через 2 роки, 1 день', 'uk'),

// Danish
array("2014-04-26 13:00:00", "2014-04-26 12:58:15", "1 minut, 45 sekunder siden", "da"),
array("2014-04-26 13:00:00", "2014-04-26 11:20:00", "1 time, 40 minutter siden", "da"),
array("2014-04-26 13:00:00", "2014-04-27 13:15:00", "1 dag, 15 minutter fra nu", "da"),
array("2014-04-26 13:00:00", "2014-05-03 15:00:00", "7 dage, 2 timer fra nu", "da"),
array("2014-04-26 13:00:00", "2015-04-28 17:00:00", "1 år, 2 dage, 4 timer fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", "2 dage, 10 timer fra nu", "da"),
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", "1 dag, 1 time, 40 minutter siden", "da"),
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", "2 år, 1 dag fra nu", "da"),
);
}
}

0 comments on commit 7599dd8

Please sign in to comment.