diff --git a/apps/weblate/5.9.2.1/data.yml b/apps/weblate/5.9.2.1/data.yml new file mode 100644 index 000000000..b4ecbde25 --- /dev/null +++ b/apps/weblate/5.9.2.1/data.yml @@ -0,0 +1,230 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_POSTGRES_SERVICE + required: true + type: service + default: postgresql + envKey: PANEL_POSTGRES_TYPE + labelZh: Postgres 服务 (前置检查) + labelEn: Postgres Service (Pre-check) + required: true + type: apps + values: + - label: PostgreSQL + value: postgresql + - child: + default: "" + envKey: PANEL_REDIS_SERVICE + required: true + type: service + default: redis + envKey: PANEL_REDIS_TYPE + labelZh: Redis 服务 (前置检查) + labelEn: Redis Service (Pre-check) + required: true + type: apps + values: + - label: Redis + value: redis + - default: "/home/weblate" + edit: true + envKey: WEBLATE_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 8080 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: "Weblate admin" + edit: true + envKey: WEBLATE_ADMIN_NAME + labelZh: 管理员名称 + labelEn: Admin name + required: true + type: text + - default: "weblate@example.com" + edit: true + envKey: WEBLATE_ADMIN_EMAIL + labelZh: 管理员邮箱 + labelEn: Admin email + required: true + type: text + - default: "" + edit: true + envKey: WEBLATE_ADMIN_PASSWORD + labelZh: 管理员密码 + labelEn: Admin password + required: true + type: password + - default: "" + edit: true + envKey: WEBLATE_SITE_DOMAIN + labelZh: 站点域名 + labelEn: Site domain + required: true + type: text + - default: "Weblate 翻译平台" + edit: true + envKey: WEBLATE_SITE_TITLE + labelZh: 站点标题 + labelEn: Site title + required: true + type: text + - default: "1" + edit: true + envKey: WEBLATE_REGISTRATION_OPEN + labelZh: 是否开放注册 + labelEn: Registration open + required: true + type: select + values: + - label: 允许注册 + value: "1" + - label: 禁止注册 + value: "0" + - default: "127.0.0.1" + edit: true + envKey: POSTGRES_HOST + labelZh: 数据库 主机地址 + labelEn: Database Host + required: true + type: text + - default: 5432 + edit: true + envKey: POSTGRES_PORT + labelZh: 数据库 端口 + labelEn: Database Port + required: true + rule: paramPort + type: number + - default: "weblate" + edit: true + envKey: POSTGRES_DB + labelZh: 数据库 名称 + labelEn: Database Name + required: true + rule: paramCommon + type: text + - default: "weblate" + edit: true + envKey: POSTGRES_USER + labelZh: 数据库 用户名 + labelEn: Database Username + required: true + type: text + - default: "" + edit: true + envKey: POSTGRES_PASSWORD + labelZh: 数据库 密码 + labelEn: Database Password + random: true + required: true + rule: paramComplexity + type: password + - default: "127.0.0.1" + edit: true + envKey: REDIS_HOST + labelZh: Redis 主机 + labelEn: Redis Host + required: true + type: text + - default: 6379 + edit: true + envKey: REDIS_PORT + labelZh: Redis 端口 + labelEn: Redis Port + required: true + rule: paramPort + type: number + - default: 0 + edit: true + envKey: REDIS_DB + labelZh: Redis 索引 (0-20) + labelEn: Redis Index (0-20) + required: true + type: number + - default: "" + edit: true + envKey: REDIS_PASSWORD + labelZh: Redis 密码 + labelEn: Redis Password + required: false + type: password + - default: "" + edit: true + envKey: WEBLATE_SERVER_EMAIL + labelZh: 错误信息通知邮箱 + labelEn: Error notification email + required: true + type: text + - default: "" + edit: true + envKey: WEBLATE_DEFAULT_FROM_EMAIL + labelZh: 默认发件邮箱 + labelEn: Default sender email + required: true + type: text + - default: "smtp.gmail.com" + edit: true + envKey: WEBLATE_EMAIL_HOST + labelZh: 电子邮件服务器主机名 + labelEn: Email server hostname + required: true + type: text + - default: 465 + edit: true + envKey: WEBLATE_EMAIL_PORT + labelZh: 电子邮件服务器端口 (465/SSL 587/TLS) + labelEn: Email server port (465/SSL 587/TLS) + required: true + type: number + - default: "" + edit: true + envKey: WEBLATE_EMAIL_HOST_USER + labelZh: 电子邮件服务器用户名 + labelEn: Email server username + required: true + type: text + - default: "" + edit: true + envKey: WEBLATE_EMAIL_HOST_PASSWORD + labelZh: 电子邮件服务器密码 + labelEn: Email server password + required: true + type: password + - default: "" + edit: true + envKey: GET_HELP_URL + labelZh: 帮助文档链接 + labelEn: Help document link + required: false + type: text + - default: "" + edit: true + envKey: STATUS_URL + labelZh: 服务状态链接 + labelEn: Service status link + required: false + type: text + - default: "" + edit: true + envKey: LEGAL_URL + labelZh: 法律声明链接 + labelEn: Legal statement link + required: false + type: text + - default: "" + edit: true + envKey: PRIVACY_URL + labelZh: 隐私政策链接 + labelEn: Privacy policy link + required: false + type: text diff --git a/apps/weblate/5.9.2.1/docker-compose.yml b/apps/weblate/5.9.2.1/docker-compose.yml new file mode 100644 index 000000000..9e9c82ed0 --- /dev/null +++ b/apps/weblate/5.9.2.1/docker-compose.yml @@ -0,0 +1,34 @@ +networks: + 1panel-network: + external: true + +services: + weblate: + image: weblate/weblate:5.9.2.1 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8080 + tmpfs: + - /run + - /tmp + read_only: true + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${WEBLATE_ROOT_PATH}/data:/app/data + - ${WEBLATE_ROOT_PATH}/cache:/app/cache + environment: + - TZ=Asia/Shanghai + - WEBLATE_TIME_ZONE=Asia/Shanghai + - WEBLATE_WORKERS=2 + - WEBLATE_DEBUG=0 + - WEBLATE_LOGLEVEL=INFO + - WEBLATE_ALLOWED_HOSTS=* + - POSTGRES_DATABASE=weblate + - CLIENT_MAX_BODY_SIZE=200M diff --git a/apps/weblate/5.9.2.1/envs/default.env b/apps/weblate/5.9.2.1/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/weblate/5.9.2.1/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/weblate/5.9.2.1/envs/global.env b/apps/weblate/5.9.2.1/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/weblate/5.9.2.1/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/weblate/5.9.2.1/scripts/init.sh b/apps/weblate/5.9.2.1/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/weblate/5.9.2.1/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/weblate/5.9.2.1/scripts/uninstall.sh b/apps/weblate/5.9.2.1/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/weblate/5.9.2.1/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/weblate/5.9.2.1/scripts/upgrade.sh b/apps/weblate/5.9.2.1/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/weblate/5.9.2.1/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/weblate/README.md b/apps/weblate/README.md new file mode 100644 index 000000000..354e55659 --- /dev/null +++ b/apps/weblate/README.md @@ -0,0 +1,60 @@ +# Weblate + +高度集成了版本控制功能的web-based翻译工具 + +![Weblate](https://file.lifebus.top/imgs/weblate_cover.png) + +作为一款功能强大的计算机辅助翻译工具,Weblate 节省了开发者和译者的时间。让您的用户更快乐! + +![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) + +## 硬件说明 + +> 推荐的最小内存为 4 GB + ++ 3 GB 的内存 ++ 2 个 CPU 核心 ++ 1 GB 的存储空间 + +## 特性 + ++ 持续本地化 + +自动本地化工作流能紧密贴合您的项目开发。 + ++ 质量检查 + +可定制的质量检查有助于提高翻译质量。 + ++ 署名 + +所有译者的贡献信息都会妥善记录在版本控制系统中。 + ++ 访问控制 + +调整访问权限以适应您的环境。 + ++ 通知 + +译者能收到有新条目需要翻译或其他事件发生的通知。 + ++ 集成 API + +将 Weblate 与第三方服务集成。 + ++ 多种文件格式 + +使用任何常见的文件本地化格式,如 gettext、JSON、XLIFF 或资源字符串等。 + ++ 分支支持 + +通过自动将它们推到不同的分支来处理不同的翻译版本。 + ++ 翻译上下文 + +描述、附近字符串、图片、相关源代码和术语表条目 — 每条字符串均可拥有。 + + +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/apps/weblate/data.yml b/apps/weblate/data.yml new file mode 100644 index 000000000..aa6caa89c --- /dev/null +++ b/apps/weblate/data.yml @@ -0,0 +1,14 @@ +additionalProperties: + key: weblate + name: Weblate + tags: + - WebSite + - Local + shortDescZh: 高度集成了版本控制功能的web-based翻译工具 + shortDescEn: A highly integrated web-based translation tool with version control functions + type: website + crossVersionUpdate: true + limit: 0 + website: https://weblate.org/ + github: https://weblate.org/ + document: https://docs.weblate.org/ diff --git a/apps/weblate/logo.png b/apps/weblate/logo.png new file mode 100644 index 000000000..b11b4b507 Binary files /dev/null and b/apps/weblate/logo.png differ