Fix explicit date format strings.

pull/763/head
Fredrik Jönsson 2015-02-11 13:36:09 +01:00
parent 0b4e584533
commit d774cfeb6d
3 changed files with 17 additions and 23 deletions

View File

@ -179,52 +179,42 @@ var ApprovedSiteView = Backbone.View.extend({
var accessDate = this.model.get("accessDate");
var timeoutDate = this.model.get("timeoutDate");
var displayCreationDate = "Unknown";
var displayCreationDate = $.t('grant.grant-table.unknown');
var hoverCreationDate = "";
if (creationDate == null || !moment(creationDate).isValid()) {
displayCreationDate = "Unknown";
hoverCreationDate = "";
} else {
if ((creationDate != null) && moment(creationDate).isValid()) {
creationDate = moment(creationDate);
if (moment().diff(creationDate, 'months') < 6) {
displayCreationDate = creationDate.fromNow();
} else {
displayCreationDate = creationDate.format("MMMM Do, YYYY");
displayCreationDate = creationDate.format("LL");
}
hoverCreationDate = creationDate.format("MMMM Do, YYYY [at] h:mmA");
hoverCreationDate = creationDate.format("LLL");
}
var displayAccessDate = "Unknown";
var displayAccessDate = $.t('grant.grant-table.unknown');
var hoverAccessDate = "";
if (accessDate == null || !moment(accessDate).isValid()) {
displayAccessDate = "Unknown";
hoverAccessDate = "";
} else {
if ((accessDate != null) && moment(accessDate).isValid()) {
accessDate = moment(accessDate);
if (moment().diff(accessDate, 'months') < 6) {
displayAccessDate = accessDate.fromNow();
} else {
displayAccessDate = accessDate.format("MMMM Do, YYYY");
displayAccessDate = accessDate.format("LL");
}
hoverAccessDate = accessDate.format("MMMM Do, YYYY [at] h:mmA");
hoverAccessDate = accessDate.format("LLL");
}
var displayTimeoutDate = "Unknown";
var displayTimeoutDate = $.t('grant.grant-table.unknown');
var hoverTimeoutDate = "";
if (timeoutDate == null) {
displayTimeoutDate = "Never";
hoverTimeoutDate = "";
} else if(!moment(timeoutDate).isValid()) {
displayTimeoutDate = "Unknown";
hoverTimeoutDate = "";
} else {
displayTimeoutDate = $.t('grant.grant-table.never');
} else if(moment(timeoutDate).isValid()) {
timeoutDate = moment(timeoutDate);
if (moment().diff(timeoutDate, 'months') < 6) {
displayTimeoutDate = timeoutDate.fromNow();
} else {
displayTimeoutDate = timeoutDate.format("MMMM Do, YYYY");
displayTimeoutDate = timeoutDate.format("LL");
}
hoverTimeoutDate = timeoutDate.format("MMMM Do, YYYY [at] h:mmA");
hoverTimeoutDate = timeoutDate.format("LLL");
}

View File

@ -230,10 +230,12 @@
"dynamically-registered": "This client was dynamically registered",
"expires": "Expires:",
"last-accessed": "Last accessed:",
"never": "Never",
"no-sites": "You have not approved any sites.",
"no-whitelisted": "You have not accessed any whitelisted sites.",
"pre-approved": "These are sites that have been pre-approved by an administrator.",
"text": "These are sites you have approved manually. If the same site asks for the same access in the future, it will be granted without prompting.",
"unknown": "Unknown",
"whitelist-note": "<b>NOTE:</b> If you revoke them here, they will automatically be re-approved on your next visit wthout prompting.",
"whitelisted-site": "This site was whitelisted by an adminstrator",
"whitelisted-sites": "Whitelisted Sites"

View File

@ -232,10 +232,12 @@
"authorized": "Auktoriserad:",
"dynamically-registered": "Denna klient registrerades dynamiskt",
"last-accessed": "Senast använd:",
"never": "Aldrig",
"no-sites": "Du har inte godkänt någon webbplats.",
"no-whitelisted": "Du har inte besökt några vitlistade webbplatser.",
"pre-approved": "Detta är webbplatser som är godkända i förväg av en administratör.",
"text": "Det här är webbplatser som du själv har godkänt. Om en av dessa webbplatser begär samma information igen blir det medgivet utan att du blir tillfrågad.",
"unknown": "Okänt",
"whitelist-note": "<b>OBS:</b> Om du återkallar dem kommer de automatiskt att godkännas igen nästa gång du besöker dem utan att du blir tillfrågad.",
"whitelisted-site": "Denna webbplats är vitlistad av en administratör",
"whitelisted-sites": "Vitlistade webbplatser"