From 45e5cbabea6871db84158c37fdff45de5d5d0f68 Mon Sep 17 00:00:00 2001 From: anten-ka Date: Fri, 10 Apr 2026 11:29:23 +0300 Subject: [PATCH] =?UTF-8?q?v2.4.0=20=E2=80=94=20internationalization=20(EN?= =?UTF-8?q?/RU)=20+=20custom=20git=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - i18n engine (lib/i18n.sh, lib/lang/en.sh, lib/lang/ru.sh) - first-run language picker, persisted to .language + config.json - install.sh, common.sh, backup.sh, templates_catalog.sh wired through t()/tf() - backup.sh preserves .language marker and records language in metadata.json - custom git template feature (first item in pro template picker) * validates HTTPS URLs, rejects shell metachars * 100MB size guard, 90s clone timeout * auto-detects index.html in dist/public/build/_site/site/docs/out/www - bot v2.4.0: i18n.py + lang/{en,ru}.json, /lang command, language toggle button - bot: custom git template via text input with waiter gating --- bootstrap.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1bb77c8..b45b401 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -71,15 +71,20 @@ FILES=( "lib/backup.sh" "lib/website.sh" "lib/templates_catalog.sh" - "lib/stats.sh" + "lib/i18n.sh" + "lib/lang/en.sh" + "lib/lang/ru.sh" "gotelegram-bot/bot.py" + "gotelegram-bot/i18n.py" + "gotelegram-bot/lang/en.json" + "gotelegram-bot/lang/ru.json" "gotelegram-bot/config.example.env" "gotelegram-bot/requirements.txt" "gotelegram-bot/README.md" ) echo -e " ${CYAN}↻${NC} Загрузка файлов в ${INSTALL_DIR}..." -mkdir -p "${INSTALL_DIR}/lib" "${INSTALL_DIR}/gotelegram-bot" +mkdir -p "${INSTALL_DIR}/lib/lang" "${INSTALL_DIR}/gotelegram-bot/lang" failed=0 for f in "${FILES[@]}"; do @@ -101,7 +106,8 @@ fi echo -e " ${CYAN}↻${NC} Настройка прав..." chmod +x "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/install_gotelegram_bot.sh" chmod +x "${INSTALL_DIR}"/lib/*.sh -sed -i 's/\r$//' "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/install_gotelegram_bot.sh" "${INSTALL_DIR}"/lib/*.sh 2>/dev/null +sed -i 's/\r$//' "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/install_gotelegram_bot.sh" "${INSTALL_DIR}"/lib/*.sh "${INSTALL_DIR}"/lib/lang/*.sh 2>/dev/null || true +sed -i 's/\r$//' "${INSTALL_DIR}"/gotelegram-bot/*.py "${INSTALL_DIR}"/gotelegram-bot/lang/*.json 2>/dev/null || true # Create symlink ln -sf "${INSTALL_DIR}/install.sh" /usr/local/bin/gotelegram