chore: i18n use cache key

This commit is contained in:
ZhaiSoul 2025-11-11 08:34:06 +00:00
parent e4eac4ac81
commit e4bacc2e71
3 changed files with 8 additions and 3 deletions

View File

@ -189,7 +189,7 @@ RUN /build_pysqlite3.sh
COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
RUN pip3 wheel --wheel-dir=/wheels -r /requirements-wheels.txt && \
if [ "$DEBUG" = "true" ]; then \
pip3 wheel --wheel-dir=/wheels -r /requirements-dev.txt; \
pip3 wheel --wheel-dir=/wheels -r /requirements-dev.txt; \
fi
# Install HailoRT & Wheels
@ -318,6 +318,10 @@ FROM --platform=$BUILDPLATFORM node:20 AS web-build
WORKDIR /work
COPY web/package.json web/package-lock.json ./
ARG GIT_COMMIT_HASH
ENV GIT_COMMIT_HASH=$GIT_COMMIT_HASH
RUN npm install
COPY web/ ./

View File

@ -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.GIT_COMMIT_HASH || "unknown"}`,
},
ns: [

View File

@ -5,11 +5,12 @@ import react from "@vitejs/plugin-react-swc";
import monacoEditorPlugin from "vite-plugin-monaco-editor";
const proxyHost = process.env.PROXY_HOST || "localhost:5000";
const gitCommitHash = process.env.GIT_COMMIT_HASH || "unknown";
// https://vitejs.dev/config/
export default defineConfig({
define: {
"import.meta.vitest": "undefined",
"import.meta.env.GIT_COMMIT_HASH": JSON.stringify(gitCommitHash),
},
server: {
proxy: {