Skip to content

Commit

Permalink
fix: i18n are not loaded because is dynamically import (#199)
Browse files Browse the repository at this point in the history
Copy `generated` i18n files to public to allow bundle to import it dynamically
  • Loading branch information
Kout95 authored Jun 28, 2024
1 parent bb5541b commit 0bcac0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ dmypy.json
/frontend/lib/
/frontend/test/
/frontend/public/dist/
/frontend/src/localization/generated/
/frontend/src/localization/generated/
/frontend/public/generated/
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ repos:
name: "Check if translations files in 'frontend/xliff' need to be updated"
entry: make check_translations
language: system
files: '\.(ts|json|xlf)$'
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"type": "module",
"scripts": {
"//build": "echo 'compile typescript files'",
"build": "npm run translations:build && tsc",
"build": "npm run translations:build && tsc && npm run translations:copy",
"build:watch": "npm run translations:build && tsc --watch",
"translations:build": "lit-localize build",
"translations:copy": "cp -r public/dist/localization/generated public/generated",
"translations:extract": "lit-localize extract",
"clean": "rimraf search-a-licious.{d.ts,d.ts.map,js,js.map} test/search-a-licious.{d.ts,d.ts.map,js,js.map} test/search-a-licious_test.{d.ts,d.ts.map,js,js.map}",
"lint": "npm run lint:lit-analyzer && npm run lint:eslint",
Expand Down

0 comments on commit 0bcac0e

Please sign in to comment.