52 lines
3.2 KiB
JavaScript
52 lines
3.2 KiB
JavaScript
// Module ID: 3311
|
|
// Function ID: 26096
|
|
// Name: result
|
|
// Dependencies: []
|
|
// Exports: default
|
|
|
|
// Module 3311 (result)
|
|
function declension(one) {
|
|
if (1 === arg1) {
|
|
let other = one.one;
|
|
} else {
|
|
const result = arg1 % 100;
|
|
if (result <= 20) {
|
|
if (result > 10) {
|
|
other = one.other;
|
|
}
|
|
}
|
|
const result1 = result % 10;
|
|
if (result1 >= 2) {
|
|
if (result1 <= 4) {
|
|
other = one.twoFour;
|
|
}
|
|
}
|
|
other = one.other;
|
|
}
|
|
let str = other;
|
|
if ("string" !== typeof other) {
|
|
str = other[arg2];
|
|
}
|
|
return str.replace("{{count}}", String(arg1));
|
|
}
|
|
let obj = { one: { regular: "mniej ni\u017C sekunda", past: "mniej ni\u017C sekund\u0119", future: "mniej ni\u017C sekund\u0119" }, twoFour: "mniej ni\u017C {{count}} sekundy", other: "mniej ni\u017C {{count}} sekund" };
|
|
obj = { one: { regular: "sekunda", past: "sekund\u0119", future: "sekund\u0119" }, twoFour: "{{count}} sekundy", other: "{{count}} sekund" };
|
|
obj = { one: { regular: "mniej ni\u017C minuta", past: "mniej ni\u017C minut\u0119", future: "mniej ni\u017C minut\u0119" }, twoFour: "mniej ni\u017C {{count}} minuty", other: "mniej ni\u017C {{count}} minut" };
|
|
const obj1 = { one: { regular: "minuta", past: "minut\u0119", future: "minut\u0119" }, twoFour: "{{count}} minuty", other: "{{count}} minut" };
|
|
const obj2 = { one: { regular: "oko\u0142o godziny", past: "oko\u0142o godziny", future: "oko\u0142o godzin\u0119" }, twoFour: "oko\u0142o {{count}} godziny", other: "oko\u0142o {{count}} godzin" };
|
|
const obj3 = { one: { regular: "godzina", past: "godzin\u0119", future: "godzin\u0119" }, twoFour: "{{count}} godziny", other: "{{count}} godzin" };
|
|
const obj4 = { one: { regular: "dzie\u0144", past: "dzie\u0144", future: "1 dzie\u0144" }, twoFour: "{{count}} dni", other: "{{count}} dni" };
|
|
let closure_0 = { lessThanXSeconds: obj, xSeconds: obj, halfAMinute: { one: "p\u00F3\u0142 minuty", twoFour: "p\u00F3\u0142 minuty", other: "p\u00F3\u0142 minuty" }, lessThanXMinutes: obj, xMinutes: obj1, aboutXHours: obj2, xHours: obj3, xDays: obj4, aboutXWeeks: { one: "oko\u0142o tygodnia", twoFour: "oko\u0142o {{count}} tygodni", other: "oko\u0142o {{count}} tygodni" }, xWeeks: { one: "tydzie\u0144", twoFour: "{{count}} tygodnie", other: "{{count}} tygodni" }, aboutXMonths: { one: "oko\u0142o miesi\u0105c", twoFour: "oko\u0142o {{count}} miesi\u0105ce", other: "oko\u0142o {{count}} miesi\u0119cy" }, xMonths: { one: "miesi\u0105c", twoFour: "{{count}} miesi\u0105ce", other: "{{count}} miesi\u0119cy" }, aboutXYears: { one: "oko\u0142o rok", twoFour: "oko\u0142o {{count}} lata", other: "oko\u0142o {{count}} lat" }, xYears: { one: "rok", twoFour: "{{count}} lata", other: "{{count}} lat" }, overXYears: { one: "ponad rok", twoFour: "ponad {{count}} lata", other: "ponad {{count}} lat" }, almostXYears: { one: "prawie rok", twoFour: "prawie {{count}} lata", other: "prawie {{count}} lat" } };
|
|
|
|
export default function formatDistance(arg0, arg1, addSuffix) {
|
|
if (null != addSuffix) {
|
|
if (addSuffix.addSuffix) {
|
|
if (!addSuffix.comparison) {
|
|
let text = `${declension(tmp, arg1, "past")} temu`;
|
|
}
|
|
text = `za ${declension(tmp, arg1, "future")}`;
|
|
}
|
|
}
|
|
return declension(table[arg0], arg1, "regular");
|
|
};
|
|
export default exports.default;
|