Skip to content

Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.

Add Simplified Chinese (#89)

QuietBladec88c382e8d7a
diff --git a/endpoints/logos/search.php b/endpoints/logos/search.php
index e42efa9..3d1022a 100644
--- a/endpoints/logos/search.php
+++ b/endpoints/logos/search.php
@@ -7,6 +7,20 @@
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+
+ // Convert all environment variable keys to lowercase
+ $envVars = array_change_key_case($_SERVER, CASE_LOWER);
+
+ // Check for http_proxy or https_proxy environment variables
+ $httpProxy = isset($envVars['http_proxy']) ? $envVars['http_proxy'] : null;
+ $httpsProxy = isset($envVars['https_proxy']) ? $envVars['https_proxy'] : null;
+
+ if (!empty($httpProxy)) {
+ curl_setopt($ch, CURLOPT_PROXY, $httpProxy);
+ } elseif (!empty($httpsProxy)) {
+ curl_setopt($ch, CURLOPT_PROXY, $httpsProxy);
+ }
+
$response = curl_exec($ch);
if ($response === false) {
diff --git a/includes/i18n/languages.php b/includes/i18n/languages.php
index 29af3cb..b74bd16 100644
--- a/includes/i18n/languages.php
+++ b/includes/i18n/languages.php
@@ -5,6 +5,7 @@
"en" => "English",
"pt" => "Português",
"fr" => "Français",
+ "zh_cn" => "简体中文",
]
?>
\ No newline at end of file
diff --git a/includes/i18n/zh_cn.php b/includes/i18n/zh_cn.php
new file mode 100644
index 0000000..4746a8a
--- /dev/null
+++ b/includes/i18n/zh_cn.php
@@ -0,0 +1,208 @@
+<?php
+
+$i18n = [
+ // 注册页面
+ "create_account" => "在登录前您需要创建一个账号",
+ 'username' => "用户名",
+ 'password' => "密码",
+ "email" => "电子邮箱",
+ "confirm_password" => "确认密码",
+ "main_currency" => "主要货币",
+ "language" => "语言",
+ "passwords_dont_match" => "密码不匹配",
+ "registration_failed" => "注册失败,请重试。",
+ "register" => "注册",
+
+ // 登录页面
+ 'please_login' => "请登录",
+ 'stay_logged_in' => "保持登录状态(30天)",
+ 'login' => "登录",
+ 'login_failed' => "登录信息错误",
+
+ // 页眉
+ 'subscriptions' => "订阅",
+ 'stats' => "统计",
+ 'settings' => "设置",
+ 'about' => "关于",
+ 'logout' => "登出",
+
+ // 订阅页面
+ "subscription" => "订阅",
+ "no_subscriptions_yet" => "您还没有任何订阅",
+ "add_first_subscription" => "添加首个订阅",
+ 'new_subscription' => "新订阅",
+ 'sort' => "排序",
+ 'name' => "名称",
+ 'last_added' => "最后添加",
+ 'price' => "价格",
+ 'next_payment' => "下次支付",
+ 'member' => "成员",
+ 'category' => "分类",
+ 'payment_method' => "支付方式",
+ "Daily" => "每日",
+ "Weekly" => "每周",
+ "Monthly" => "每月",
+ "Yearly" => "每年",
+ "days" => "天",
+ "weeks" => "周",
+ "months" => "月",
+ "years" => "年",
+ "external_url" => "访问外部链接",
+ "empty_page" => "空白页面",
+
+ // 订阅表单
+ "add_subscription" => "添加订阅",
+ "edit_subscription" => "编辑订阅",
+ "subscription_name" => "订阅名称",
+ "logo_preview" => "标志预览",
+ "search_logo" => "在网上搜索标志",
+ "web_search" => "网页搜索",
+ "currency" => "货币",
+ "billing_cycle" => "账单周期",
+ "frequency" => "频率",
+ "cycle" => "周期",
+ "next_payment" => "下次支付",
+ "payment_method" => "支付方式",
+ "no_category" => "无分类",
+ "paid_by" => "支付者",
+ "url" => "链接",
+ "notes" => "备注",
+ "enable_notifications" => "为此订阅启用通知",
+ "delete" => "删除",
+ "cancel" => "取消",
+ "upload_logo" => "上传标志",
+
+ // 统计页面
+ 'general_statistics' => "总体统计",
+ 'active_subscriptions' => "活跃订阅",
+ 'monthly_cost' => "月费用",
+ 'yearly_cost' => "年费用",
+ 'average_monthly' => "平均每月订阅费用",
+ 'most_expensive' => "最昂贵订阅费用",
+ 'amount_due' => "本月应付金额",
+ 'split_views' => "拆分视图",
+ 'category_split' => "分类拆分",
+ 'household_split' => "家庭拆分",
+
+ // 关于页面
+ 'about_and_credits' => "关于和鸣谢",
+ 'license' => "许可证",
+ 'issues_and_requests' => "问题和请求",
+ 'the_author' => "作者",
+ 'icons' => "图标",
+ 'payment_icons' => "支付图标",
+
+ // 设置页面
+ 'user_details' => "用户详情",
+ "household" => "家庭",
+ "save_member" => "保存成员",
+ "delete_member" => "删除成员",
+ "cant_delete_member" => "不能删除主要成员",
+ "cant_delete_member_in_use" => "不能删除正在订阅中的成员",
+ "notifications" => "通知",
+ "enable_email_notifications" => "启用电子邮件通知",
+ "notify_me" => "通知我",
+ "day_before" => "前一天",
+ "days_before" => "前几天",
+ "smtp_address" => "SMTP 地址",
+ "port" => "端口",
+ "smtp_username" => "SMTP 用户名",
+ "smtp_password" => "SMTP 密码",
+ "from_email" => "发件人邮箱(可选)",
+ "smtp_info" => "SMTP 密码以明文传输和存储。为了安全,请专门为此创建一个账户。",
+ "categories" => "分类",
+ "save_category" => "保存分类",
+ "delete_category" => "删除分类",
+ "cant_delete_category_in_use" => "不能删除正在订阅中的分类",
+ "currencies" => "货币",
+ "save_currency" => "保存货币",
+ "delete_currency" => "删除货币",
+ "cant_delete_main_currency" => "不能删除主要货币",
+ "cant_delete_currency_in_use" => "不能删除正在订阅中的货币",
+ "exchange_update" => "汇率最后更新于",
+ "currency_info" => "在此查找支持的货币和正确的货币代码",
+ "currency_performance" => "为提高性能,仅保留您使用的货币。",
+ "fixer_api_key" => "Fixer API 密钥",
+ "api_key" => "API 密钥",
+ "fixer_info" => "如果您使用多种货币,并希望准确统计和排序订阅,需要一个来自 Fixer 的免费 API 密钥。",
+ "get_key" => "在此获取您的密钥",
+ "display_settings" => "显示设置",
+ "switch_theme" => "切换浅色/深色主题",
+ "calculate_monthly_price" => "计算并显示所有订阅的月价格",
+ "convert_prices" => "始终按我的主要货币转换和显示价格(较慢)",
+ "experimental_settings" => "实验性设置",
+ "remove_background" => "尝试从图片搜索中移除标志的背景(实验性)",
+ "experimental_info" => "实验性设置可能不会完美工作。",
+ "payment_methods" => "支付方式",
+ "payment_methods_info" => "点击支付方式以禁用/启用它。",
+ "cant_delete_payment_method_in_use" => "不能禁用正在使用的支付方式",
+ "disable" => "禁用",
+ "enable" => "启用",
+ "test" => "测试",
+ "add" => "添加",
+ "save" => "保存",
+
+ // Toast
+ "success" => "成功",
+
+ // Endpoint responses
+ "session_expired" => "您的会话已过期,请重新登录",
+ "fields_missing" => "缺少一些字段",
+ "fill_all_fields" => "请填写所有字段",
+ "fill_mandatory_fields" => "请填写所有必填字段",
+ "error" => "错误",
+
+ // Category
+ "failed_add_category" => "添加类别失败",
+ "failed_edit_category" => "编辑类别失败",
+ "category_in_use" => "类别正在被订阅使用中,无法移除",
+ "failed_remove_category" => "移除类别失败",
+ "category_saved" => "类别已保存",
+ "category_removed" => "类别已移除",
+
+ // Currency
+ "currency_saved" => "货币已保存。",
+ "error_adding_currency" => "添加货币条目时出错。",
+ "failed_to_store_currency" => "存储货币到数据库失败。",
+ "currency_in_use" => "货币正在被订阅使用中,无法删除。",
+ "currency_is_main" => "货币被设置为主货币,无法删除。",
+ "failed_to_remove_currency" => "从数据库移除货币失败。",
+ "failed_to_store_api_key" => "存储 API 密钥到数据库失败。",
+ "invalid_api_key" => "无效的 API 密钥。",
+ "api_key_saved" => "API 密钥已成功保存",
+ "currency_removed" => "货币已移除",
+
+ // Household
+ "failed_add_household" => "添加家庭成员失败",
+ "failed_edit_household" => "编辑家庭成员失败",
+ "failed_remove_household" => "移除家庭成员失败",
+ "household_in_use" => "家庭成员正在被订阅使用中,无法移除",
+ "member_saved" => "成员已保存",
+ "member_removed" => "成员已移除",
+
+ // Notifications
+ "error_saving_notifications" => "保存通知数据时出错。",
+ "wallos_notification" => "Wallos 通知",
+ "test_notification" => "这是一条测试通知。如果您看到此消息,配置正确。",
+ "email_error" => "发送电子邮件时出错",
+ "notification_sent_successfuly" => "通知已成功发送",
+ "notifications_settings_saved" => "通知设置已成功保存。",
+
+ // Payments
+ "payment_in_use" => "无法禁用正在使用的支付方式",
+ "failed_update_payment" => "更新数据库中的支付方式失败",
+ "enabled" => "已启用",
+ "disabled" => "已禁用",
+
+ // Subscription
+ "error_fetching_image" => "获取图片时出错",
+ "subscription_updated_successfuly" => "订阅已成功更新",
+ "subscription_added_successfuly" => "订阅已成功添加",
+ "error_deleting_subscription" => "删除订阅时出错。",
+ "invalid_request_method" => "无效的请求方法。",
+
+ // User
+ "error_updating_user_data" => "更新用户数据时出错。",
+ "user_details_saved" => "用户详细信息已保存",
+
+];
\ No newline at end of file
diff --git a/scripts/i18n/zh_cn.js b/scripts/i18n/zh_cn.js
new file mode 100644
index 0000000..9658d5c
--- /dev/null
+++ b/scripts/i18n/zh_cn.js
@@ -0,0 +1,34 @@
+let i18n = {
+ // Dashboard
+ 'error_reloading_subscription': '重新加载订阅时出错:',
+ 'error_fetching_image_results': '获取图片结果时出错:',
+ 'subscription_deleted': '订阅已删除',
+ 'error_deleting_subscription': "删除订阅时出错",
+ 'failed_to_load_subscription': "加载订阅失败",
+ 'edit_subscription': "编辑订阅",
+ 'add_subscription': "添加订阅",
+ // Settings
+ 'network_response_error': "网络响应不正常",
+ 'failed_add_member': '添加成员失败',
+ 'member': '成员',
+ 'save_member': '保存成员',
+ 'delete_member': '删除成员',
+ 'failed_remove_member': '移除成员失败',
+ 'failed_save_member': '保存成员失败',
+ 'failed_add_category': '添加类别失败',
+ 'category': '类别',
+ 'save_category': '保存类别',
+ 'delete_category': '删除类别',
+ 'failed_remove_category': '移除类别失败',
+ 'currency': '货币',
+ 'currency_code': '货币代码',
+ 'save_currency': '保存货币',
+ 'delete_currency': '删除货币',
+ 'failed_remove_currency': '移除货币失败',
+ 'failed_save_currency': '保存货币失败',
+ 'cant_disable_payment_in_use': '无法禁用正在使用的支付方式',
+ 'failed_save_payment_method': '保存支付方式失败',
+ 'unknown_error': '未知错误,请重试。',
+ 'error_saving_notification_data': '保存通知数据时出错',
+ 'error_sending_notification': '发送通知时出错',
+};