mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 19:36:04 +00:00
v2.4.0 — internationalization (EN/RU) + custom git templates
- 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
This commit is contained in:
12
bootstrap.sh
12
bootstrap.sh
@@ -71,15 +71,20 @@ FILES=(
|
|||||||
"lib/backup.sh"
|
"lib/backup.sh"
|
||||||
"lib/website.sh"
|
"lib/website.sh"
|
||||||
"lib/templates_catalog.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/bot.py"
|
||||||
|
"gotelegram-bot/i18n.py"
|
||||||
|
"gotelegram-bot/lang/en.json"
|
||||||
|
"gotelegram-bot/lang/ru.json"
|
||||||
"gotelegram-bot/config.example.env"
|
"gotelegram-bot/config.example.env"
|
||||||
"gotelegram-bot/requirements.txt"
|
"gotelegram-bot/requirements.txt"
|
||||||
"gotelegram-bot/README.md"
|
"gotelegram-bot/README.md"
|
||||||
)
|
)
|
||||||
|
|
||||||
echo -e " ${CYAN}↻${NC} Загрузка файлов в ${INSTALL_DIR}..."
|
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
|
failed=0
|
||||||
for f in "${FILES[@]}"; do
|
for f in "${FILES[@]}"; do
|
||||||
@@ -101,7 +106,8 @@ fi
|
|||||||
echo -e " ${CYAN}↻${NC} Настройка прав..."
|
echo -e " ${CYAN}↻${NC} Настройка прав..."
|
||||||
chmod +x "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/install_gotelegram_bot.sh"
|
chmod +x "${INSTALL_DIR}/install.sh" "${INSTALL_DIR}/install_gotelegram_bot.sh"
|
||||||
chmod +x "${INSTALL_DIR}"/lib/*.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
|
# Create symlink
|
||||||
ln -sf "${INSTALL_DIR}/install.sh" /usr/local/bin/gotelegram
|
ln -sf "${INSTALL_DIR}/install.sh" /usr/local/bin/gotelegram
|
||||||
|
|||||||
Reference in New Issue
Block a user