mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-20 13:54:36 +01:00
i18n miscellaneous fixes (#21614)
* fix: fix face library unknown label i18n wrong * fix: fix review genai threat level i18n * fix: fix preview unknown label i18n * fix: fix AM/PM i18n display issue
This commit is contained in:
@@ -165,7 +165,7 @@ export const formatUnixTimestampToDateTime = (
|
||||
// Uppercase AM/PM for 12-hour formats
|
||||
if (date_format.includes("a") || date_format.includes("aaa")) {
|
||||
formatted = formatted.replace(/am|pm/gi, (match) =>
|
||||
match.toUpperCase(),
|
||||
i18n.t(`time.${match.toLowerCase()}`, { ns: "common" }).toUpperCase(),
|
||||
);
|
||||
}
|
||||
return formatted;
|
||||
@@ -217,7 +217,7 @@ export const formatUnixTimestampToDateTime = (
|
||||
// Uppercase AM/PM in fallback
|
||||
if (options.hour12) {
|
||||
fallbackFormatted = fallbackFormatted.replace(/am|pm/gi, (match) =>
|
||||
match.toUpperCase(),
|
||||
i18n.t(`time.${match.toLowerCase()}`, { ns: "common" }).toUpperCase(),
|
||||
);
|
||||
}
|
||||
return fallbackFormatted;
|
||||
|
||||
Reference in New Issue
Block a user