fix: move i18n languages to public folder (#681)

* fix: move i18n languages for best practices

* updating test setup

* removed static copy
This commit is contained in:
Dan Ditomaso
2025-06-25 16:21:36 -04:00
committed by GitHub
parent e2f03aaf81
commit 85ee0747d1
183 changed files with 29 additions and 58 deletions

View File

@@ -2,10 +2,10 @@ name: Crowdin Upload Sources Action
on:
push:
# Monitor all .json files within the /src/i18n/locales/en/ directory.
# Monitor all .json files within the /i18n/locales/en/ directory.
# This ensures the workflow triggers if any the English namespace files are modified on the main branch.
paths:
- "/src/i18n/locales/en/*.json"
- "/i18n/locales/en/*.json"
branches: [main]
workflow_dispatch: # Allow manual triggering

View File

@@ -13,8 +13,7 @@ your needs already exists. Many common labels like "Save," "Cancel," "Name,"
"Description," "Loading...," or "Error" are likely already present, especially
in the common.json namespace. Reusing existing keys prevents duplication and
ensures consistency across the application. Using your code editor's search
function across the /src/i18n/locales/en/ directory is an effective way to do
this.
function across the /i18n/locales/en/ directory is an effective way to do this.
### Key Naming and Structure Rules
@@ -58,7 +57,7 @@ when creating new keys in the JSON files.
### Namespace Rules
We use namespaces to organize keys. All source keys are added to the English
(`en`) files located at `/src/i18n/locales/en/`. Place your new keys in the
(`en`) files located at `/i18n/locales/en/`. Place your new keys in the
appropriate file based on these rules:
- `common.json`:

View File

@@ -6,5 +6,5 @@ base_url: "https://meshtastic.crowdin.com/api/v2"
preserve_hierarchy: true
files:
- source: "/src/i18n/locales/en/*.json"
translation: "/src/i18n/locales/%locale%/%original_file_name%"
- source: "/i18n/locales/en/*.json"
translation: "/i18n/locales/%locale%/%original_file_name%"

26
deno.lock generated
View File

@@ -79,7 +79,6 @@
"npm:testing-library@^0.0.2": "0.0.2_@angular+common@6.1.10__@angular+core@6.1.10___rxjs@6.6.7___zone.js@0.8.29__rxjs@6.6.7_@angular+core@6.1.10__rxjs@6.6.7__zone.js@0.8.29",
"npm:typescript@^5.8.3": "5.8.3",
"npm:vite-plugin-pwa@1": "1.0.0_vite@6.3.5__@types+node@22.15.32__picomatch@4.0.2_workbox-build@7.3.0__ajv@8.17.1__@babel+core@7.27.4__rollup@2.79.2_workbox-window@7.3.0_@types+node@22.15.32",
"npm:vite-plugin-static-copy@3": "3.0.2_vite@6.3.5__@types+node@22.15.32__picomatch@4.0.2_@types+node@22.15.32",
"npm:vite@^6.3.4": "6.3.5_@types+node@22.15.32_picomatch@4.0.2",
"npm:vitest@^3.1.2": "3.2.4_@types+node@22.15.32_happy-dom@17.6.3_vite@6.3.5__@types+node@22.15.32__picomatch@4.0.2",
"npm:zod@^3.25.62": "3.25.67",
@@ -4736,14 +4735,6 @@
"fraction.js@4.3.7": {
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew=="
},
"fs-extra@11.3.0": {
"integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
"dependencies": [
"graceful-fs",
"jsonfile",
"universalify"
]
},
"fs-extra@9.1.0": {
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dependencies": [
@@ -5514,9 +5505,6 @@
"safe-push-apply"
]
},
"p-map@7.0.3": {
"integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA=="
},
"path-is-absolute@1.0.1": {
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
@@ -6595,17 +6583,6 @@
"workbox-window"
]
},
"vite-plugin-static-copy@3.0.2_vite@6.3.5__@types+node@22.15.32__picomatch@4.0.2_@types+node@22.15.32": {
"integrity": "sha512-/seLvhUg44s1oU9RhjTZZy/0NPbfNctozdysKcvPovxxXZdI5l19mGq6Ri3IaTf1Dy/qChS4BSR7ayxeu8o9aQ==",
"dependencies": [
"chokidar",
"fs-extra@11.3.0",
"p-map",
"picocolors",
"tinyglobby",
"vite"
]
},
"vite@6.3.5_@types+node@22.15.32_picomatch@4.0.2": {
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
"dependencies": [
@@ -6793,7 +6770,7 @@
"ajv",
"common-tags",
"fast-json-stable-stringify",
"fs-extra@9.1.0",
"fs-extra",
"glob",
"lodash",
"pretty-bytes@5.6.0",
@@ -7020,7 +6997,6 @@
"npm:testing-library@^0.0.2",
"npm:typescript@^5.8.3",
"npm:vite-plugin-pwa@1",
"npm:vite-plugin-static-copy@3",
"npm:vite@^6.3.4",
"npm:vitest@^3.1.2",
"npm:zod@^3.25.67",

View File

@@ -115,7 +115,6 @@
"typescript": "^5.8.3",
"vite": "^6.3.4",
"vite-plugin-pwa": "^1.0.0",
"vite-plugin-static-copy": "^3.0.0",
"vitest": "^3.1.2"
}
}

Some files were not shown because too many files have changed in this diff Show More