Skip to content

NVR with realtime local object detection for IP cameras

chore: i18n use cache key (#20885)

GuoQing Liu097673b845a4
diff --git a/.gitignore b/.gitignore
index 8456d9be07..660a378b01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ frigate/version.py
web/build
web/node_modules
web/coverage
+web/.env
core
!/web/**/*.ts
.idea/*
diff --git a/Makefile b/Makefile
index 2baac5aada..d1427b6df8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ push-boards: $(BOARDS:%=push-%)
version:
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
+ echo 'VITE_GIT_COMMIT_HASH=$(COMMIT_HASH)' > web/.env
local: version
docker buildx build --target=frigate --file docker/main/Dockerfile . \
diff --git a/web/.gitignore b/web/.gitignore
index a547bf36d8..1cac5597ea 100644
--- a/web/.gitignore
+++ b/web/.gitignore
@@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
+.env
\ No newline at end of file
diff --git a/web/src/utils/i18n.ts b/web/src/utils/i18n.ts
index 1a386ccb31..eba5ff7a5d 100644
--- a/web/src/utils/i18n.ts
+++ b/web/src/utils/i18n.ts
@@ -33,7 +33,7 @@ i18n
fallbackLng: "en", // use en if detected lng is not available
backend: {
- loadPath: "locales/{{lng}}/{{ns}}.json",
+ loadPath: `locales/{{lng}}/{{ns}}.json?v=${import.meta.env.VITE_GIT_COMMIT_HASH || "unknown"}`,
},
ns: [