mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
fix: fix AM/PM i18n display issue
This commit is contained in:
parent
4f88447c9c
commit
735ac5af6b
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user