Skip to content

Commit b28e8cd

Browse files
committed
feat(fila_manager): add i18n support — replace hardcoded Chinese with locale files
The fila_manager web page was hardcoded in Chinese (lang="zh") with no internationalization support. This commit adds a lightweight i18n system: - Add locales/en.json and locales/zh_CN.json with all UI strings - Add t(key) / tf(key, n) translation helpers loaded at startup - Apply translations via data-i18n / data-i18n-placeholder attributes in HTML - Replace all hardcoded Chinese strings in index.js with t() calls - Language is resolved from the ?lang= URL parameter passed by C++
1 parent e150b50 commit b28e8cd

5 files changed

Lines changed: 463 additions & 146 deletions

File tree

linux.d/debian

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ REQUIRED_DEV_PACKAGES=(
3535

3636
if [[ -n "$UPDATE_LIB" ]]
3737
then
38-
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
38+
# Detect distro and version to pick correct webkit package
39+
DISTRO_ID="$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')"
40+
VERSION_MAJOR="$(grep VERSION_ID /etc/os-release | cut -d "=" -f 2 | cut -d "." -f 1 | tr -d '\"')"
41+
# Debian 13+ and Ubuntu 24+ ship libwebkit2gtk-4.1-dev
42+
if [ "$DISTRO_ID" = "debian" ] && [ "$VERSION_MAJOR" -ge "13" ] 2>/dev/null; then
43+
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev curl libfuse-dev libssl-dev libcurl4-openssl-dev m4)
44+
elif [ "$VERSION_MAJOR" = "22" ] || [ "$VERSION_MAJOR" = "23" ]
45+
then
46+
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev curl libfuse-dev libssl-dev libcurl4-openssl-dev m4)
47+
elif [ "$VERSION_MAJOR" = "24" ]
48+
then
49+
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
50+
else
51+
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
52+
fi
3953
if [[ -n "$BUILD_DEBUG" ]]
4054
then
4155
REQUIRED_DEV_PACKAGES+=(libssl-dev libcurl4-openssl-dev)

0 commit comments

Comments
 (0)