forked from blisstown/campfire
ga_IE Localisation, other localisation touchups
This commit is contained in:
parent
d8efaccb30
commit
f6901085f5
6 changed files with 178 additions and 15 deletions
|
@ -2,12 +2,12 @@ import Lang from '$lib/lang';
|
|||
const lang = Lang('en_GB');
|
||||
|
||||
const denoms = [
|
||||
{ unit: 's', min: 0 },
|
||||
{ unit: 'm', min: 60 },
|
||||
{ unit: 'h', min: 60 },
|
||||
{ unit: 'd', min: 24 },
|
||||
{ unit: 'w', min: 7 },
|
||||
{ unit: 'y', min: 52 },
|
||||
{ unit: lang.string('time.second'), min: 0 },
|
||||
{ unit: lang.string('time.minute'), min: 60 },
|
||||
{ unit: lang.string('time.hour'), min: 60 },
|
||||
{ unit: lang.string('time.day'), min: 24 },
|
||||
{ unit: lang.string('time.week'), min: 7 },
|
||||
{ unit: lang.string('time.year'), min: 52 },
|
||||
];
|
||||
|
||||
export function shorthand(date) {
|
||||
|
@ -21,6 +21,6 @@ export function shorthand(date) {
|
|||
unit = denoms[index].unit;
|
||||
}
|
||||
if (value > 0)
|
||||
return lang.string('post.time', Math.floor(value) + unit);
|
||||
return "in " + Math.floor(value) + unit;
|
||||
return lang.string('time.ago').replaceAll('%1', Math.floor(value) + unit);
|
||||
return lang.string('time.in').replaceAll('%1', Math.floor(value) + unit);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue