mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-25 12:48:53 +01:00
🌍 fix: Enhance i18n Support & Optimize Category Handling (#5866)
* fix: Missing Translations in Prompt Filters in Prompt Library * fix: fixed issue with `zh` feat: added `Estonian` language option * fix: test for `i18n.ts` * refactor: `pt` --> `pt-BR` and `pt-PT` * feat: request access to another language. default is only one language during invite.
This commit is contained in:
parent
52a6de2aa7
commit
04c2a5abe7
33 changed files with 819 additions and 41 deletions
13
.github/workflows/i18n-unused-keys.yml
vendored
13
.github/workflows/i18n-unused-keys.yml
vendored
|
|
@ -4,6 +4,7 @@ on:
|
|||
pull_request:
|
||||
paths:
|
||||
- "client/src/**"
|
||||
- "api/**"
|
||||
|
||||
jobs:
|
||||
detect-unused-i18n-keys:
|
||||
|
|
@ -21,7 +22,7 @@ jobs:
|
|||
|
||||
# Define paths
|
||||
I18N_FILE="client/src/locales/en/translation.json"
|
||||
SOURCE_DIR="client/src"
|
||||
SOURCE_DIRS=("client/src" "api")
|
||||
|
||||
# Check if translation file exists
|
||||
if [[ ! -f "$I18N_FILE" ]]; then
|
||||
|
|
@ -37,7 +38,15 @@ jobs:
|
|||
|
||||
# Check if each key is used in the source code
|
||||
for KEY in $KEYS; do
|
||||
if ! grep -r --include=\*.{js,jsx,ts,tsx} -q "$KEY" "$SOURCE_DIR"; then
|
||||
FOUND=false
|
||||
for DIR in "${SOURCE_DIRS[@]}"; do
|
||||
if grep -r --include=\*.{js,jsx,ts,tsx} -q "$KEY" "$DIR"; then
|
||||
FOUND=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$FOUND" == false ]]; then
|
||||
UNUSED_KEYS+=("$KEY")
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue