Files
klz-cables.com/.pnpm-store/v10/files/38/02e363653e421181aa756c4e262187763aa0a56816c19756e73da3190dc46ed0e1457d5429b06ffc3c4641e51f9b0264f62488c52fffe591047615bccd1d49
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

106 lines
1.8 KiB
Plaintext

"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "dưới 1 giây",
other: "dưới {{count}} giây",
},
xSeconds: {
one: "1 giây",
other: "{{count}} giây",
},
halfAMinute: "nửa phút",
lessThanXMinutes: {
one: "dưới 1 phút",
other: "dưới {{count}} phút",
},
xMinutes: {
one: "1 phút",
other: "{{count}} phút",
},
aboutXHours: {
one: "khoảng 1 giờ",
other: "khoảng {{count}} giờ",
},
xHours: {
one: "1 giờ",
other: "{{count}} giờ",
},
xDays: {
one: "1 ngày",
other: "{{count}} ngày",
},
aboutXWeeks: {
one: "khoảng 1 tuần",
other: "khoảng {{count}} tuần",
},
xWeeks: {
one: "1 tuần",
other: "{{count}} tuần",
},
aboutXMonths: {
one: "khoảng 1 tháng",
other: "khoảng {{count}} tháng",
},
xMonths: {
one: "1 tháng",
other: "{{count}} tháng",
},
aboutXYears: {
one: "khoảng 1 năm",
other: "khoảng {{count}} năm",
},
xYears: {
one: "1 năm",
other: "{{count}} năm",
},
overXYears: {
one: "hơn 1 năm",
other: "hơn {{count}} năm",
},
almostXYears: {
one: "gần 1 năm",
other: "gần {{count}} năm",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " nữa";
} else {
return result + " trước";
}
}
return result;
};
exports.formatDistance = formatDistance;