summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-07-19 17:02:21 +0200
committerJonas Smedegaard <dr@jones.dk>2021-03-23 23:49:21 +0100
commitd282233861beb08cb720abdab09d3d9c8aae1949 (patch)
tree6de26ab0d54c3868e0995ea4f68defe1ce11212e
parentb6d728c09483e5d54b983a5666dced199648ec2c (diff)
Localize relativedate.js.couchdesign/bullseye-da
-rw-r--r--ikiwiki/relativedate.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/ikiwiki/relativedate.js b/ikiwiki/relativedate.js
index e8643f4..7b7df84 100644
--- a/ikiwiki/relativedate.js
+++ b/ikiwiki/relativedate.js
@@ -37,11 +37,11 @@ function showDates() {
}
var timeUnits = [
- { unit: 'year', seconds: 60 * 60 * 24 * 364 },
- { unit: 'month', seconds: 60 * 60 * 24 * 30 },
- { unit: 'day', seconds: 60 * 60 * 24 },
- { unit: 'hour', seconds: 60 * 60 },
- { unit: 'minute', seconds: 60 },
+ { unit: 'år', units: 'år', seconds: 60 * 60 * 24 * 364 },
+ { unit: 'måned', units: 'måneder', seconds: 60 * 60 * 24 * 30 },
+ { unit: 'dag', units: 'dage', seconds: 60 * 60 * 24 },
+ { unit: 'time', units: 'timer', seconds: 60 * 60 },
+ { unit: 'minut', units: 'minutter', seconds: 60 },
];
function relativeDate(date) {
@@ -52,7 +52,7 @@ function relativeDate(date) {
// hack to avoid reading just in the future if there is a minor
// amount of clock slip
if (offset >= 0 && seconds < 30 * 60 * 60) {
- return "just now";
+ return "lige før";
}
var ret = "";
@@ -62,8 +62,8 @@ function relativeDate(date) {
var num = Math.floor(seconds / timeUnits[i].seconds);
seconds -= num * timeUnits[i].seconds;
if (ret)
- ret += "and ";
- ret += num + " " + timeUnits[i].unit + (num > 1 ? "s" : "") + " ";
+ ret += "og ";
+ ret += num + " " + (num > 1 ? timeUnits[i].unit : timeUnits[i].units) + " ";
if (++shown == 2)
break;
@@ -73,7 +73,7 @@ function relativeDate(date) {
}
if (! ret)
- ret = "less than a minute "
+ ret = "for mindre end et minut "
- return ret + (offset < 0 ? "ago" : "from now");
+ return ret + (offset < 0 ? "siden" : "fra nu");
}