From 3eb84b51ad69ed5ed74181774b6a356b30fa8c36 Mon Sep 17 00:00:00 2001 From: duoluodexiaoxiaoyuan <59086082+duoluodexiaoxiaoyuan@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:54:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E8=AF=AD=E8=A8=80=E4=B8=8Btable=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E9=97=AE=E9=A2=98=20(#236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 修改了一下table的宽度 * 🐛 通过监听语言的变化来修改table的宽度 --- CONTRIBUTING.md | 9 ++++++--- src/pages/options/routes/ScriptList.tsx | 8 ++++---- src/pages/options/routes/SubscribeList.tsx | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2e51f804..6e5e1526 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,9 +63,7 @@ git commit -m "✨ add login feature" ScriptCat 的文档在另外的仓库中:[scriptcat.org](https://docs.scriptcat.org),使用 [docusaurus](https://docusaurus.io/)进行撰写,这有一些 -[Markdown](https://docusaurus.io/ - -zh-CN/docs/markdown-features) +[Markdown](https://docusaurus.io/zh-CN/docs/markdown-features) 特性可以帮助你。如果你需要在本地预览修改后的文档,可以使用以下命令安装文档依赖并启动 dev server: @@ -96,6 +94,7 @@ ScriptCat 的页面开发使用了以下技术: npm run dev ``` + 如果你想打包扩展,可以使用以下命令: ```bash @@ -103,3 +102,7 @@ npm run pack ``` 在打包前,请确保在`dist`目录下生成了`scriptcat.pem`文件。 + +# 注意问题 +* 我使用的是yarn install的时候会出问题,不确定是yarn install还是网络问题,所以最好用npm i +* 因为down这个仓库的目的是贡献代码,npm run dev以后还需要执行一下npm run build然后把dist ext里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的 diff --git a/src/pages/options/routes/ScriptList.tsx b/src/pages/options/routes/ScriptList.tsx index f2895b13..31177ff0 100644 --- a/src/pages/options/routes/ScriptList.tsx +++ b/src/pages/options/routes/ScriptList.tsx @@ -97,7 +97,7 @@ function ScriptList() { const [showAction, setShowAction] = useState(false); const [action, setAction] = useState(""); const [select, setSelect] = useState([]); - const { t } = useTranslation(); + const { t, i18n } = useTranslation(); useEffect(() => { // Monitor script running status @@ -130,7 +130,7 @@ function ScriptList() { }, { title: t("enable"), - width: 100, + width: (i18n.language === "zh-CN" ? 100 : 120), dataIndex: "status", className: "script-enable", sorter(a, b) { @@ -249,7 +249,7 @@ function ScriptList() { }, { title: t("apply_to_run_status"), - width: 140, + width: (i18n.language === "zh-CN" ? 140 : "auto"), className: "apply_to_run_status", render(col, item: Script) { const toLogger = () => { @@ -406,7 +406,7 @@ function ScriptList() { dataIndex: "updatetime", align: "center", key: "updatetime", - width: 100, + width: (i18n.language === "zh-CN" ? 100 : "auto"), render(col, script: Script) { return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions diff --git a/src/pages/options/routes/SubscribeList.tsx b/src/pages/options/routes/SubscribeList.tsx index 8b7343e0..c9df1c30 100644 --- a/src/pages/options/routes/SubscribeList.tsx +++ b/src/pages/options/routes/SubscribeList.tsx @@ -35,7 +35,7 @@ function SubscribeList() { ) as SubscribeController; const [list, setList] = useState([]); const inputRef = useRef(null); - const { t } = useTranslation(); // 使用 useTranslation hook + const { t, i18n } = useTranslation(); // 使用 useTranslation hook useEffect(() => { dao.table @@ -56,7 +56,7 @@ function SubscribeList() { }, { title: t("enable"), - width: 100, + width: (i18n.language === "zh-CN" ? 100 : 120), key: "enable", sorter(a, b) { return a.status - b.status; @@ -215,7 +215,7 @@ function SubscribeList() { dataIndex: "updatetime", align: "center", key: "updatetime", - width: 100, + width: (i18n.language === "zh-CN" ? 100 : "auto"), render(col, subscribe: Subscribe) { return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions From c62a5593c5d57feb8239e50ee90aaa3f3fc309b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E4=B9=8B?= Date: Thu, 12 Oct 2023 22:47:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9C=A8=20=E4=BD=BF=E7=94=A8crowdin?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + CONTRIBUTING.md | 4 +- crowdin.yml | 8 + package-lock.json | 40 +-- package.json | 6 +- pkg/cloudscript/cloudscript.ts | 14 +- src/locales/en-US/translation.yaml | 382 -------------------- src/locales/en/translation.json | 348 +++++++++++++++++++ src/locales/locales.ts | 6 +- src/locales/zh-CN/translation.json | 351 +++++++++++++++++++ src/locales/zh-CN/translation.yaml | 383 --------------------- src/pages/options/routes/ScriptList.tsx | 8 +- src/pages/options/routes/SubscribeList.tsx | 4 +- webpack.config.ts | 6 +- 14 files changed, 733 insertions(+), 829 deletions(-) create mode 100644 crowdin.yml delete mode 100644 src/locales/en-US/translation.yaml create mode 100644 src/locales/en/translation.json create mode 100644 src/locales/zh-CN/translation.json delete mode 100644 src/locales/zh-CN/translation.yaml diff --git a/.gitignore b/.gitignore index 4887c070..712080a9 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ coverage CHANGELOG.md tailwind.config.js + +.env diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e5e1526..73bc676b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,5 +104,5 @@ npm run pack 在打包前,请确保在`dist`目录下生成了`scriptcat.pem`文件。 # 注意问题 -* 我使用的是yarn install的时候会出问题,不确定是yarn install还是网络问题,所以最好用npm i -* 因为down这个仓库的目的是贡献代码,npm run dev以后还需要执行一下npm run build然后把dist ext里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的 +* 使用`yarn install`时可能会出现错误,最好使用`npm i` +* `npm run dev`之后需要把`dist/ext`目录里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的 diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..19c464c2 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,8 @@ +project_id: '620320' +api_token_env: CROWDIN_PERSONAL_TOKEN +preserve_hierarchy: true + +files: + # JSON 翻译文件 + - source: /src/locales/zh-CN/**/* + translation: /src/locales/%locale%/**/%original_file_name% diff --git a/package-lock.json b/package-lock.json index 93ff8b6d..89dc13fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,8 +93,7 @@ "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0", "webpack-cli": "^5.1.4", - "webpack-merge": "^5.9.0", - "yaml-loader": "^0.8.0" + "webpack-merge": "^5.9.0" } }, "node_modules/@ampproject/remapping": { @@ -10285,12 +10284,6 @@ "node": ">=8" } }, - "node_modules/javascript-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", - "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==", - "dev": true - }, "node_modules/jest": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/jest/-/jest-29.3.1.tgz", @@ -17630,20 +17623,6 @@ "node": ">= 14" } }, - "node_modules/yaml-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.8.0.tgz", - "integrity": "sha512-LjeKnTzVBKWiQBeE2L9ssl6WprqaUIxCSNs5tle8PaDydgu3wVFXTbMfsvF2MSErpy9TDVa092n4q6adYwJaWg==", - "dev": true, - "dependencies": { - "javascript-stringify": "^2.0.1", - "loader-utils": "^2.0.0", - "yaml": "^2.0.0" - }, - "engines": { - "node": ">= 12.13" - } - }, "node_modules/yargs": { "version": "17.5.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", @@ -25255,12 +25234,6 @@ "istanbul-lib-report": "^3.0.0" } }, - "javascript-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", - "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==", - "dev": true - }, "jest": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/jest/-/jest-29.3.1.tgz", @@ -30734,17 +30707,6 @@ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==" }, - "yaml-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.8.0.tgz", - "integrity": "sha512-LjeKnTzVBKWiQBeE2L9ssl6WprqaUIxCSNs5tle8PaDydgu3wVFXTbMfsvF2MSErpy9TDVa092n4q6adYwJaWg==", - "dev": true, - "requires": { - "javascript-stringify": "^2.0.1", - "loader-utils": "^2.0.0", - "yaml": "^2.0.0" - } - }, "yargs": { "version": "17.5.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", diff --git a/package.json b/package.json index 19f2a5d4..48a96c83 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "build:no-split": "webpack --mode production --config ./webpack/webpack.no.split.ts", "dev:linter": "webpack --mode development --config ./webpack/webpack.linter.dev.ts", "pack": "node ./build/pack.js", - "changlog": "gitmoji-changelog" + "changlog": "gitmoji-changelog", + "crowdin": "crowdin" }, "dependencies": { "@arco-design/web-react": "^2.47.0", @@ -100,7 +101,6 @@ "webpack": "^5.88.2", "webpack-bundle-analyzer": "^4.9.0", "webpack-cli": "^5.1.4", - "webpack-merge": "^5.9.0", - "yaml-loader": "^0.8.0" + "webpack-merge": "^5.9.0" } } diff --git a/pkg/cloudscript/cloudscript.ts b/pkg/cloudscript/cloudscript.ts index 10a37938..c4e0e695 100644 --- a/pkg/cloudscript/cloudscript.ts +++ b/pkg/cloudscript/cloudscript.ts @@ -7,7 +7,7 @@ export type ExportCookies = { [key: string]: any; domain?: string; url?: string; - cookie: chrome.cookies.Cookie[]; + cookies?: chrome.cookies.Cookie[]; }; export type ExportParams = { @@ -44,9 +44,7 @@ export function parseExportCookie( const result = []; for (let i = 0; i < lines.length; i += 1) { const line = lines[i]; - const detail: ExportCookies = { - cookie: [], - }; + const detail: ExportCookies = {}; if (line.trim()) { line.split(";").forEach((param) => { const s = param.split("="); @@ -55,11 +53,13 @@ export function parseExportCookie( } detail[s[0].trim()] = s[1].trim(); }); - if (!detail.url && !detail.domain) { + if (detail.url || detail.domain) { result.push( new Promise((resolve) => { - detail.cookies = getCookies(detail); - resolve(detail); + getCookies(detail).then((cookies) => { + detail.cookies = cookies; + resolve(detail); + }); }) ); } diff --git a/src/locales/en-US/translation.yaml b/src/locales/en-US/translation.yaml deleted file mode 100644 index 1bdb7f36..00000000 --- a/src/locales/en-US/translation.yaml +++ /dev/null @@ -1,382 +0,0 @@ -# Top bar layout/MainLayout -import_link: Import Link -import_link_failure: Import Link Failed -create_user_script: Create User Script -create_background_script: Create Background Script -create_scheduled_script: Create Scheduled Script -create_script: Create Script -user_guide: User Guide -api_docs: API Docs -development_guide: Development Guide -script_gallery: Script Gallery -community_forum: Community Forum -external_links: External Links -system_follow: Follow System -no_data: No Data - -# Sidebar layout/Sider -installed_scripts: Scripts -subscribe: Subscribe -logs: Logs -tools: Tools -settings: Settings -collapsible: Collapsible Sidebar -guide: Guide -helpcenter: Help Center - -# Setting Page Setting -general: General -language: Language -script_sync: Script Sync -sync_delete: Sync Delete -enable_script_sync_to: Enable Script Sync to -save: Save -cloud_sync_account_verification: Cloud Sync Account Verification in Progress... -cloud_sync_verification_failed: Cloud Sync Account Verification Failed -save_success: Save Successful -update: Update -check_update: Check Update -script_subscription_check_interval: Script/Subscription Update Check Interval -never: Never -6_hours: 6 hours -12_hours: 12 hours -every_day: Every Day -every_week: Every Week -update_disabled_scripts: Update Disabled Scripts -silent_update_non_critical_changes: Silent Update Non-critical Script Changes -enable_eslint: Enable ESLint -eslint_rules: ESLint Rules -enter_eslint_rules: Please Enter ESLint Rules, Configurations Can Be Downloaded from https://eslint.org/play/ -language_change_tip: Language Change Successful - -# Tools Page Tools -backup: Backup -local: Local -export_file: Export File -import_file: Import File -cloud: Cloud -backup_to: Backup To -preparing_backup: Preparing Backup to Cloud -backup_success: Backup Successful -backup_failed: Backup Failed -no_backup_files: No Backup Files -backup_list: Backup List -open_backup_dir: Open Backup Directory -confirm_delete: Confirm Deletion -confirm_delete_backup_file: Confirm Delete Backup File -delete_success: Delete Successful -backup_strategy: Backup Strategy -under_construction: Under Construction -development_debugging: Development Debugging -vscode_url: VSCode URL -auto_connect_vscode_service: Auto Connect VSCode Service -connect: Connect -connection_success: Connection Successful -connection_failed: Connection Failed -select_import_script: Please Select the Script to Import in the New Page -import_error: Import Error -pulling_data_from_cloud: Pulling Data from Cloud -pull_failed: Pull Failed -restore: Restore - -# Logger Page Logger -log_title: Runtime Logs -last_5_minutes: Last 5 Minutes -last_15_minutes: Last 15 Minutes -last_30_minutes: Last 30 Minutes -last_1_hour: Last 1 Hour -last_3_hours: Last 3 Hours -last_6_hours: Last 6 Hours -last_12_hours: Last 12 Hours -last_24_hours: Last 24 Hours -last_7_days: Last 7 Days -query: Query -labels: Labels -search_regex: Search (Supports Regex) -clean_schedule: Schedule Cleanup -days_ago_logs: Logs of Days Ago -delete_completed: Deletion Completed -delete_current_logs: Delete Current Logs -clear_completed: Clearing Completed -clear_logs: Clear Logs -total_logs: Total Logs Found -filtered_logs: Logs After Filtering -enter_filter_conditions: Please Enter Filter Conditions for Query - -# Subscription List SubscribeList -permission: Permission -enter_subscribe_name: Please Enter Subscription Name -subscribe_url: Subscription URL -confirm_delete_subscription: Are You Sure You Want to Delete This Subscription? Related Scripts Will Also Be Deleted - -# Script List ScriptList -list: - confirm_delete: Are You Sure You Want to Delete? Please Note That This and pasted the remaining text. - confirm_update: Are You Sure You Want to Update? Please Note That This is an irreversible operation. -enable: Enable -disable: Disable -name: Name -version: Version -apply_to_run_status: Apply to/Run Status -source: Source -home: Home -sorting: Sorting -last_updated: Last Updated -action: Action -foreground_page_script_tooltip: Foreground page script, runs on the specified page -background_script_tooltip: Background script, runs on the specified page -scheduled_script_tooltip: "Scheduled script, next run time:" -running: Running -completed: Completed -subscription_link: Subscription Link -subscription_installation: Subscription Installation -manually_created: Local -script_link: Script Link -user_installation: Installation -confirm_delete_script: Are you sure you want to delete this script? -delete_failed: Deletion Failed -enter_script_name: Please enter script name -update_not_supported: This script does not support update checks -checking_for_updates: Checking for updates... -new_version_available: New version available -latest_version: Latest Version -checked_for_all_selected: Checked updates for all selected -update_check_failed: Update Check Failed -stopping_script: Stopping script -script_stopped: Script Stopped -starting_script: Starting script... -starting_updates: Starting Batch Updates... -script_started: Script Started -batch_operations: Batch Operations -export: Export -delete: Delete -unknown_operation: Unknown Operation -confirm: Confirm -close: Close -page_script: Page Script -homepage: Homepage -script_website: Script Website -script_source: Script Source Code -bug_feedback_script_support: Bug Feedback/Script Support - -# User Config Panel UserConfigPanel -config: Config - -# Script Storage ScriptStorage -key: Key -value: Value -add: Add -type: Type -edit_value: Edit Value -add_value: Add Value -update_success: Update Successful -add_success: Add Successful -script_storage: Script Storage -enter_key: Please enter key -key_placeholder: Key -value_placeholder: When the type is object, please enter data that can be JSON parsed -clear: Clear -clear_success: Clear Successful -confirm_clear: Are you sure you want to clear this storage space? -type_string: String -type_number: Number -type_boolean: Boolean -type_object: Object - -# Script Resource ScriptResource -confirm_delete_resource: Are you sure you want to delete this resource? This resource will reload on the next startup -confirm_clear_resource: Are you sure you want to clear these resources? Resources will reload on the next startup -script_resource: Script Resource - -# Script Setting ScriptSetting -permission_value: Authorization Value -allow: Allow -yes: Yes -no: No -confirm_delete_permission: Confirm deletion of this authorization? -script_setting: Script Setting -basic_info: Basic Information -update_url: Update URL -permission_management: Permission Management -# Script Setting Match ScriptSetting/Match -match: Match -user_setting: User Setting -confirm_delete_exclude: Confirm deletion of this exclusion? -after_deleting_match_item: After the script's match items are deleted, they will be automatically added to the match items -confirm_delete_match: Confirm deletion of this match? -after_deleting_exclude_item: After deleting the script's match item, it will be automatically added to the exclusion items -add_match: Add Match -add_exclude: Add Exclude -website_match: Website Match (@match) -reset: Reset -website_exclude: Website Exclude (@exclude) -confirm_reset: Confirm reset? - -# Script Menu List ScriptMenuList -script_total_runs: The script has run {{runNum}} times, {{runNumByIframe}} times in iframes -script_total_runs_single: The script has run {{runNum}} times -script_disabled: The script is not enabled -run_once: Run Once -stop: Stop -edit: Edit -exclude_on: Exclude On -exclude_off: Exclude Off -exclude_execution: Exclude Execution -user_config: User Config - -# GMApi Setting GMApiSetting -gm_api: GM Api -storage_api: Storage API -use_file_system: File System in Use -open_directory: Open Directory -account_validation_failed: Account Validation Failed -not_set: Not Set -in_use: In Use -storage_error: Storage Error - -# Cloud Script CloudScript -upload_to_cloud: Upload to Cloud -save_failed: Save Failed -exporting: Exporting... -upload_to: Upload To -value_export_expression: Value Export Expression -overwrite_original_value_on_import: Overwrite Original Value on Import -cookie_export_expression: Cookie Export Expression -overwrite_original_cookie_on_import: Overwrite Original Cookie on Import -restore_default_values: Restore Default Values - -# Permission Confirmation confirm -get_confirm_error: Get Confirmation Information Failed -confirm_error: Confirmation Failed -ignore: Ignore -allow_once: Allow Once -temporary_allow: Temporarily Allow This {{permissionContent}} -temporary_allow_all: Temporarily Allow All {{permissionContent}} -permanent_allow: Permanently Allow This {{permissionContent}} -permanent_allow_all: Permanently Allow All {{permissionContent}} -deny_once: Deny Once -temporary_deny: Temporarily Deny This {{permissionContent}} -temporary_deny_all: Temporarily Deny All {{permissionContent}} -permanent_deny: Permanently Deny This {{permissionContent}} -permanent_deny_all: Permanently Deny All {{permissionContent}} - -# Script Import import -data_import: Data Import -import: Import -select_scripts_to_import: Please select the scripts you want to import -select_all: Select All -script_import_progress: Script Import Progress -select_subscribes_to_import: Please select the subscriptions you want to import -subscribe_import_progress: Subscribe Import Progress -author: Author -description: Description -operation: Operation -error: Error -unknown: Unknown -add_new: Add New -no_operation: No Operation -enable_script: Enable Script -local_creation: Local Creation -import_success: Import Successful - -# Script Installation install -install_script: Install Script -update_script: Update Script -install_subscribe: Install Subscription -update_subscribe: Update Subscription -invalid_link: Invalid Link -subscribe_install_label: This subscription will install the following scripts -script_runs_in: Script will run on the following websites -script_has_full_access_to: Script will have full access to the following URLs -script_requires: Script requires the following external resources -cookie_warning: Please note, this script requests access to Cookie permissions, which is a dangerous permission. Please verify the security of the script. -scheduled_script_description_1: This is a scheduled script, which will automatically run at a specific time once enabled and can be manually controlled in the panel. -scheduled_script_description_2: "Scheduled task expression: {{expression}}, most recent run time: {{time}}" -background_script_description: This is a background script, which will automatically run once when the browser opens once enabled, and can be manually controlled in the panel. -install_success: Install Successful -install: - update_success: Update Successful -install_failed: Install Failed -subscribe_success: Subscription Successful -subscribe_failed: Subscription Failed -current_version: Current Version -update_version: Update Version -background_script_tag: This is a Background Script -scheduled_script_tag: This is a Scheduled Script -background_script: Background Script -scheduled_script: Scheduled Script -install_from_legitimate_sources_warning: Please install scripts from legitimate sources! Unknown scripts may invade your privacy or conduct malicious operations. -antifeature_referral_link_title: Referral Link -antifeature_referral_link_description: This script modifies or redirects to the author's referral links -antifeature_ads_title: Comes with Ads -antifeature_ads_description: This script inserts ads into the page you are visiting -antifeature_payment_title: Paid Script -antifeature_payment_description: This script requires payment to function properly -antifeature_miner_title: Miner -antifeature_miner_description: This script has mining behaviors -antifeature_membership_title: Membership Features -antifeature_membership_description: This script requires membership registration to function properly -antifeature_tracking_title: Information Tracking -antifeature_tracking_description: This script tracks your user information -script_info_load_failed: Failed to load script information -script_status_tooltip: You can control the opening status of scripts. Ordinary oil monkey scripts are enabled by default, and background scripts and timing scripts are disabled by default. - -# Popup page popup -get_script: Get Script -report_issue: Report Issue -project_docs: Project Documentation -community: Community -popup: - new_version_available: New Version Available -current_page_scripts: Current Page Running Scripts -enabled_background_scripts: Enabled and Running Background Scripts - -# background -script_accessing_cross_origin_resource: "Script is attempting to access a cross-origin resource" -confirm_operation_description: "Please confirm if you allow the script to perform this operation. The script can also add the @connect tag to bypass this option." -domain: "Domain" -script_name: "Script Name" -request_domain: "Request Domain" -request_url: "Request URL" -access_cookie_content: "The script is attempting to access website cookie content" -confirm_script_operation: "Please confirm if you allow the script to perform this operation. Cookies contain important user data, so only grant access to trusted scripts." -cookie_domain: "Cookie Domain" -script_operation_title: "Script is attempting to access script synchronization storage" -script_operation_description: "Please confirm whether you allow the script to perform this operation. If allowed, the script will be able to access the storage space you have set up and create a directory app/${dir} within it." -script_permission_content: "Script" -sync_system_connect_failed: "Sync system connection failed" -sync_system_closed: "Sync turned off" -sync_system_closed_description: "Sync is disabled, please configure again" - -# FileSystem -auth_type: Authentication Type -url: URL -username: Username -password: Password - -# Beginner's Guide -skip: Skip -next: Next -back: Back -last: Finish -start_guide_title: Welcome to ScriptCat Extension -start_guide_content: Next, we will introduce the basic usage of ScriptCat to you. -guide_installed_scripts: The scripts you have installed will be displayed here. -guide_script_list_title: Script Market -guide_script_list_content: You can install scripts from the Script Market. In addition to supporting user scripts, ScriptCat also supports background scripts. -guide_script_list_enable_title: Enable Scripts -guide_script_list_enable_content: Scripts need to be enabled to be used. Page scripts are enabled by default upon installation, while background scripts are disabled by default. -guide_script_list_apply_to_run_status_title: Apply to and Run Status -guide_script_list_apply_to_run_status_content: The running status of scripts is displayed here. Hover over the tags to view the script type. -guide_script_list_sort_title: Sort/Last Update/Actions -guide_script_list_sort_content: You can drag the tags of scripts to sort them. Clicking on the "Last Update" column label will check for updates once. The "Actions" column allows you to enter script editing, control script running/stopping (for background scripts), and configure UserConfig. - -guide_tools_title: Common Tools -guide_tools_content: The tools provide backup and development features. -guide_tools_backup_title: Backup -guide_tools_backup_content: Backup allows you to save scripts to avoid loss. You can export script files to your local machine or load script files from your local machine. You can also back up to the cloud for added convenience. - -guide_setting_title: Settings -guide_setting_content: The settings mainly include language, script synchronization, update frequency, and other common options. -guide_setting_sync_title: Update and Sync -guide_setting_sync_content: The script synchronization feature allows you to easily sync the script content of this device to the cloud. If you select the option to sync deletions, when a script is deleted on this device, it will also be deleted from the cloud. You can also update the script version here to get more powerful features. diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json new file mode 100644 index 00000000..9182f03b --- /dev/null +++ b/src/locales/en/translation.json @@ -0,0 +1,348 @@ +{ + "import_link": "Import Link", + "import_link_failure": "Import Link Failed", + "create_user_script": "Create User Script", + "create_background_script": "Create Background Script", + "create_scheduled_script": "Create Scheduled Script", + "create_script": "Create Script", + "user_guide": "User Guide", + "api_docs": "API Docs", + "development_guide": "Development Guide", + "script_gallery": "Script Gallery", + "community_forum": "Community Forum", + "external_links": "External Links", + "system_follow": "Follow System", + "no_data": "No Data", + "installed_scripts": "Scripts", + "subscribe": "Subscribe", + "logs": "Logs", + "tools": "Tools", + "settings": "Settings", + "collapsible": "Collapsible Sidebar", + "guide": "Guide", + "helpcenter": "Help Center", + "general": "General", + "language": "Language", + "script_sync": "Script Sync", + "sync_delete": "Sync Delete", + "enable_script_sync_to": "Enable Script Sync to", + "save": "Save", + "cloud_sync_account_verification": "Cloud Sync Account Verification in Progress...", + "cloud_sync_verification_failed": "Cloud Sync Account Verification Failed", + "save_success": "Save Successful", + "update": "Update", + "check_update": "Check Update", + "script_subscription_check_interval": "Script/Subscription Update Check Interval", + "never": "Never", + "6_hours": "6 hours", + "12_hours": "12 hours", + "every_day": "Every Day", + "every_week": "Every Week", + "update_disabled_scripts": "Update Disabled Scripts", + "silent_update_non_critical_changes": "Silent Update Non-critical Script Changes", + "enable_eslint": "Enable ESLint", + "eslint_rules": "ESLint Rules", + "enter_eslint_rules": "Please Enter ESLint Rules, Configurations Can Be Downloaded from https://eslint.org/play/", + "language_change_tip": "Language Change Successful", + "backup": "Backup", + "local": "Local", + "export_file": "Export File", + "import_file": "Import File", + "cloud": "Cloud", + "backup_to": "Backup To", + "preparing_backup": "Preparing Backup to Cloud", + "backup_success": "Backup Successful", + "backup_failed": "Backup Failed", + "no_backup_files": "No Backup Files", + "backup_list": "Backup List", + "open_backup_dir": "Open Backup Directory", + "confirm_delete": "Confirm Deletion", + "confirm_delete_backup_file": "Confirm Delete Backup File", + "delete_success": "Delete Successful", + "backup_strategy": "Backup Strategy", + "under_construction": "Under Construction", + "development_debugging": "Development Debugging", + "vscode_url": "VSCode URL", + "auto_connect_vscode_service": "Auto Connect VSCode Service", + "connect": "Connect", + "connection_success": "Connection Successful", + "connection_failed": "Connection Failed", + "select_import_script": "Please Select the Script to Import in the New Page", + "import_error": "Import Error", + "pulling_data_from_cloud": "Pulling Data from Cloud", + "pull_failed": "Pull Failed", + "restore": "Restore", + "log_title": "Runtime Logs", + "last_5_minutes": "Last 5 Minutes", + "last_15_minutes": "Last 15 Minutes", + "last_30_minutes": "Last 30 Minutes", + "last_1_hour": "Last 1 Hour", + "last_3_hours": "Last 3 Hours", + "last_6_hours": "Last 6 Hours", + "last_12_hours": "Last 12 Hours", + "last_24_hours": "Last 24 Hours", + "last_7_days": "Last 7 Days", + "query": "Query", + "labels": "Labels", + "search_regex": "Search (Supports Regex)", + "clean_schedule": "Schedule Cleanup", + "days_ago_logs": "Logs of Days Ago", + "delete_completed": "Deletion Completed", + "delete_current_logs": "Delete Current Logs", + "clear_completed": "Clearing Completed", + "clear_logs": "Clear Logs", + "total_logs": "Total Logs Found", + "filtered_logs": "Logs After Filtering", + "enter_filter_conditions": "Please Enter Filter Conditions for Query", + "permission": "Permission", + "enter_subscribe_name": "Please Enter Subscription Name", + "subscribe_url": "Subscription URL", + "confirm_delete_subscription": "Are You Sure You Want to Delete This Subscription? Related Scripts Will Also Be Deleted", + "list": { + "confirm_delete": "Are You Sure You Want to Delete? Please Note That This and pasted the remaining text.", + "confirm_update": "Are You Sure You Want to Update? Please Note That This is an irreversible operation." + }, + "enable": "Enable", + "script_list_enable_width": 120, + "subscribe_list_enable_width": 120, + "script_list_apply_to_run_status_width": "auto", + "script_list_last_updated_width": "auto", + "disable": "Disable", + "name": "Name", + "version": "Version", + "apply_to_run_status": "Apply to/Run Status", + "source": "Source", + "home": "Home", + "sorting": "Sorting", + "last_updated": "Last Updated", + "action": "Action", + "foreground_page_script_tooltip": "Foreground page script, runs on the specified page", + "background_script_tooltip": "Background script, runs on the specified page", + "scheduled_script_tooltip": "Scheduled script, next run time:", + "running": "Running", + "completed": "Completed", + "subscription_link": "Subscription Link", + "subscription_installation": "Subscription Installation", + "manually_created": "Local", + "script_link": "Script Link", + "user_installation": "Installation", + "confirm_delete_script": "Are you sure you want to delete this script?", + "delete_failed": "Deletion Failed", + "enter_script_name": "Please enter script name", + "update_not_supported": "This script does not support update checks", + "checking_for_updates": "Checking for updates...", + "new_version_available": "New version available", + "latest_version": "Latest Version", + "checked_for_all_selected": "Checked updates for all selected", + "update_check_failed": "Update Check Failed", + "stopping_script": "Stopping script", + "script_stopped": "Script Stopped", + "starting_script": "Starting script...", + "starting_updates": "Starting Batch Updates...", + "script_started": "Script Started", + "batch_operations": "Batch Operations", + "export": "Export", + "delete": "Delete", + "unknown_operation": "Unknown Operation", + "confirm": "Confirm", + "close": "Close", + "page_script": "Page Script", + "homepage": "Homepage", + "script_website": "Script Website", + "script_source": "Script Source Code", + "bug_feedback_script_support": "Bug Feedback/Script Support", + "config": "Config", + "key": "Key", + "value": "Value", + "add": "Add", + "type": "Type", + "edit_value": "Edit Value", + "add_value": "Add Value", + "update_success": "Update Successful", + "add_success": "Add Successful", + "script_storage": "Script Storage", + "enter_key": "Please enter key", + "key_placeholder": "Key", + "value_placeholder": "When the type is object, please enter data that can be JSON parsed", + "clear": "Clear", + "clear_success": "Clear Successful", + "confirm_clear": "Are you sure you want to clear this storage space?", + "type_string": "String", + "type_number": "Number", + "type_boolean": "Boolean", + "type_object": "Object", + "confirm_delete_resource": "Are you sure you want to delete this resource? This resource will reload on the next startup", + "confirm_clear_resource": "Are you sure you want to clear these resources? Resources will reload on the next startup", + "script_resource": "Script Resource", + "permission_value": "Authorization Value", + "allow": "Allow", + "yes": "Yes", + "no": "No", + "confirm_delete_permission": "Confirm deletion of this authorization?", + "script_setting": "Script Setting", + "basic_info": "Basic Information", + "update_url": "Update URL", + "permission_management": "Permission Management", + "add_permission": "Add Permission", + "match": "Match", + "user_setting": "User Setting", + "confirm_delete_exclude": "Confirm deletion of this exclusion?", + "after_deleting_match_item": "After the script's match items are deleted, they will be automatically added to the match items", + "confirm_delete_match": "Confirm deletion of this match?", + "after_deleting_exclude_item": "After deleting the script's match item, it will be automatically added to the exclusion items", + "add_match": "Add Match", + "add_exclude": "Add Exclude", + "website_match": "Website Match (@match)", + "reset": "Reset", + "website_exclude": "Website Exclude (@exclude)", + "confirm_reset": "Confirm reset?", + "script_total_runs": "The script has run {{runNum}} times, {{runNumByIframe}} times in iframes", + "script_total_runs_single": "The script has run {{runNum}} times", + "script_disabled": "The script is not enabled", + "run_once": "Run Once", + "stop": "Stop", + "edit": "Edit", + "exclude_on": "Exclude On", + "exclude_off": "Exclude Off", + "exclude_execution": "Exclude Execution", + "user_config": "User Config", + "gm_api": "GM Api", + "storage_api": "Storage API", + "use_file_system": "File System in Use", + "open_directory": "Open Directory", + "account_validation_failed": "Account Validation Failed", + "not_set": "Not Set", + "in_use": "In Use", + "storage_error": "Storage Error", + "upload_to_cloud": "Upload to Cloud", + "save_failed": "Save Failed", + "exporting": "Exporting...", + "upload_to": "Upload To", + "value_export_expression": "Value Export Expression", + "overwrite_original_value_on_import": "Overwrite Original Value on Import", + "cookie_export_expression": "Cookie Export Expression", + "overwrite_original_cookie_on_import": "Overwrite Original Cookie on Import", + "restore_default_values": "Restore Default Values", + "get_confirm_error": "Get Confirmation Information Failed", + "confirm_error": "Confirmation Failed", + "ignore": "Ignore", + "allow_once": "Allow Once", + "temporary_allow": "Temporarily Allow This {{permissionContent}}", + "temporary_allow_all": "Temporarily Allow All {{permissionContent}}", + "permanent_allow": "Permanently Allow This {{permissionContent}}", + "permanent_allow_all": "Permanently Allow All {{permissionContent}}", + "deny_once": "Deny Once", + "temporary_deny": "Temporarily Deny This {{permissionContent}}", + "temporary_deny_all": "Temporarily Deny All {{permissionContent}}", + "permanent_deny": "Permanently Deny This {{permissionContent}}", + "permanent_deny_all": "Permanently Deny All {{permissionContent}}", + "data_import": "Data Import", + "import": "Import", + "select_scripts_to_import": "Please select the scripts you want to import", + "select_all": "Select All", + "script_import_progress": "Script Import Progress", + "select_subscribes_to_import": "Please select the subscriptions you want to import", + "subscribe_import_progress": "Subscribe Import Progress", + "author": "Author", + "description": "Description", + "operation": "Operation", + "error": "Error", + "unknown": "Unknown", + "add_new": "Add New", + "no_operation": "No Operation", + "enable_script": "Enable Script", + "local_creation": "Local Creation", + "import_success": "Import Successful", + "install_script": "Install Script", + "update_script": "Update Script", + "install_subscribe": "Install Subscription", + "update_subscribe": "Update Subscription", + "invalid_link": "Invalid Link", + "subscribe_install_label": "This subscription will install the following scripts", + "script_runs_in": "Script will run on the following websites", + "script_has_full_access_to": "Script will have full access to the following URLs", + "script_requires": "Script requires the following external resources", + "cookie_warning": "Please note, this script requests access to Cookie permissions, which is a dangerous permission. Please verify the security of the script.", + "scheduled_script_description_1": "This is a scheduled script, which will automatically run at a specific time once enabled and can be manually controlled in the panel.", + "scheduled_script_description_2": "Scheduled task expression: {{expression}}, most recent run time: {{time}}", + "background_script_description": "This is a background script, which will automatically run once when the browser opens once enabled, and can be manually controlled in the panel.", + "install_success": "Install Successful", + "install": { + "update_success": "Update Successful" + }, + "install_failed": "Install Failed", + "subscribe_success": "Subscription Successful", + "subscribe_failed": "Subscription Failed", + "current_version": "Current Version", + "update_version": "Update Version", + "background_script_tag": "This is a Background Script", + "scheduled_script_tag": "This is a Scheduled Script", + "background_script": "Background Script", + "scheduled_script": "Scheduled Script", + "install_from_legitimate_sources_warning": "Please install scripts from legitimate sources! Unknown scripts may invade your privacy or conduct malicious operations.", + "antifeature_referral_link_title": "Referral Link", + "antifeature_referral_link_description": "This script modifies or redirects to the author's referral links", + "antifeature_ads_title": "Comes with Ads", + "antifeature_ads_description": "This script inserts ads into the page you are visiting", + "antifeature_payment_title": "Paid Script", + "antifeature_payment_description": "This script requires payment to function properly", + "antifeature_miner_title": "Miner", + "antifeature_miner_description": "This script has mining behaviors", + "antifeature_membership_title": "Membership Features", + "antifeature_membership_description": "This script requires membership registration to function properly", + "antifeature_tracking_title": "Information Tracking", + "antifeature_tracking_description": "This script tracks your user information", + "script_info_load_failed": "Failed to load script information", + "script_status_tooltip": "You can control the opening status of scripts. Ordinary oil monkey scripts are enabled by default, and background scripts and timing scripts are disabled by default.", + "get_script": "Get Script", + "report_issue": "Report Issue", + "project_docs": "Project Documentation", + "community": "Community", + "popup": { + "new_version_available": "New Version Available" + }, + "current_page_scripts": "Current Page Running Scripts", + "enabled_background_scripts": "Enabled and Running Background Scripts", + "script_accessing_cross_origin_resource": "Script is attempting to access a cross-origin resource", + "confirm_operation_description": "Please confirm if you allow the script to perform this operation. The script can also add the @connect tag to bypass this option.", + "domain": "Domain", + "script_name": "Script Name", + "request_domain": "Request Domain", + "request_url": "Request URL", + "access_cookie_content": "The script is attempting to access website cookie content", + "confirm_script_operation": "Please confirm if you allow the script to perform this operation. Cookies contain important user data, so only grant access to trusted scripts.", + "cookie_domain": "Cookie Domain", + "script_operation_title": "Script is attempting to access script synchronization storage", + "script_operation_description": "Please confirm whether you allow the script to perform this operation. If allowed, the script will be able to access the storage space you have set up and create a directory app/${dir} within it.", + "script_permission_content": "Script", + "sync_system_connect_failed": "Sync system connection failed", + "sync_system_closed": "Sync turned off", + "sync_system_closed_description": "Sync is disabled, please configure again", + "auth_type": "Authentication Type", + "url": "URL", + "username": "Username", + "password": "Password", + "skip": "Skip", + "next": "Next", + "back": "Back", + "last": "Finish", + "start_guide_title": "Welcome to ScriptCat Extension", + "start_guide_content": "Next, we will introduce the basic usage of ScriptCat to you.", + "guide_installed_scripts": "The scripts you have installed will be displayed here.", + "guide_script_list_title": "Script Market", + "guide_script_list_content": "You can install scripts from the Script Market. In addition to supporting user scripts, ScriptCat also supports background scripts.", + "guide_script_list_enable_title": "Enable Scripts", + "guide_script_list_enable_content": "Scripts need to be enabled to be used. Page scripts are enabled by default upon installation, while background scripts are disabled by default.", + "guide_script_list_apply_to_run_status_title": "Apply to and Run Status", + "guide_script_list_apply_to_run_status_content": "The running status of scripts is displayed here. Hover over the tags to view the script type.", + "guide_script_list_sort_title": "Sort/Last Update/Actions", + "guide_script_list_sort_content": "You can drag the tags of scripts to sort them. Clicking on the \"Last Update\" column label will check for updates once. The \"Actions\" column allows you to enter script editing, control script running/stopping (for background scripts), and configure UserConfig.", + "guide_tools_title": "Common Tools", + "guide_tools_content": "The tools provide backup and development features.", + "guide_tools_backup_title": "Backup", + "guide_tools_backup_content": "Backup allows you to save scripts to avoid loss. You can export script files to your local machine or load script files from your local machine. You can also back up to the cloud for added convenience.", + "guide_setting_title": "Settings", + "guide_setting_content": "The settings mainly include language, script synchronization, update frequency, and other common options.", + "guide_setting_sync_title": "Update and Sync", + "guide_setting_sync_content": "The script synchronization feature allows you to easily sync the script content of this device to the cloud. If you select the option to sync deletions, when a script is deleted on this device, it will also be deleted from the cloud. You can also update the script version here to get more powerful features." +} diff --git a/src/locales/locales.ts b/src/locales/locales.ts index 8f5f7af1..c83511d2 100644 --- a/src/locales/locales.ts +++ b/src/locales/locales.ts @@ -3,8 +3,9 @@ import { initReactI18next } from "react-i18next"; import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; import { Metadata } from "@App/app/repo/scripts"; -import enUS from "./en-US/translation.yaml"; -import zhCN from "./zh-CN/translation.yaml"; +import enUS from "./en/translation.json"; +import zhCN from "./zh-CN/translation.json"; +import zhTW from "./zh-TW/translation.json"; import "dayjs/locale/zh-cn"; i18n.use(initReactI18next).init({ @@ -16,6 +17,7 @@ i18n.use(initReactI18next).init({ resources: { "en-US": { title: "English", translation: enUS }, "zh-CN": { title: "简体中文", translation: zhCN }, + "zh-TW": { title: "繁体中文", translation: zhTW }, }, }); diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json new file mode 100644 index 00000000..7e5b003a --- /dev/null +++ b/src/locales/zh-CN/translation.json @@ -0,0 +1,351 @@ +{ + "import_link": "链接导入", + "import_link_failure": "链接导入失败", + "create_user_script": "新建普通脚本", + "create_background_script": "新建后台脚本", + "create_scheduled_script": "新建定时脚本", + "create_script": "新建脚本", + "user_guide": "使用指南", + "api_docs": "API文档", + "development_guide": "开发指南", + "script_gallery": "脚本站", + "community_forum": "社区论坛", + "external_links": "外部链接", + "system_follow": "跟随系统", + "no_data": "暂无数据", + "installed_scripts": "已安装脚本", + "subscribe": "订阅", + "logs": "日志", + "tools": "工具", + "settings": "设置", + "collapsible": "收起侧边栏", + "guide": "新手指引", + "helpcenter": "帮助中心", + "general": "通用", + "language": "语言", + "script_sync": "脚本同步", + "sync_delete": "同步删除", + "enable_script_sync_to": "启用脚本同步至", + "save": "保存", + "cloud_sync_account_verification": "云同步账号信息验证中...", + "cloud_sync_verification_failed": "云同步账号信息验证失败", + "save_success": "保存成功", + "update": "更新", + "check_update": "检查更新", + "script_subscription_check_interval": "脚本/订阅检查更新间隔", + "never": "从不", + "6_hours": "6小时", + "12_hours": "12小时", + "every_day": "每天", + "every_week": "每周", + "update_disabled_scripts": "更新已禁用脚本", + "silent_update_non_critical_changes": "非重要变更静默更新脚本", + "enable_eslint": "开启 ESLint", + "eslint_rules": "ESLint规则", + "enter_eslint_rules": "请输入 ESLint 规则,可以从 https://eslint.org/play/ 下载配置", + "language_change_tip": "语言切换成功", + "backup": "备份", + "local": "本地", + "export_file": "导出文件", + "import_file": "导入文件", + "cloud": "云端", + "backup_to": "备份至", + "preparing_backup": "正在准备备份到云端", + "backup_success": "备份成功", + "backup_failed": "备份失败", + "no_backup_files": "没有备份文件", + "backup_list": "备份列表", + "open_backup_dir": "打开备份目录", + "confirm_delete": "确认删除", + "confirm_delete_backup_file": "确认删除备份文件", + "confirm_update": "确认更新", + "delete_success": "删除成功", + "backup_strategy": "备份策略", + "under_construction": "建设中", + "development_debugging": "开发调试", + "vscode_url": "VSCode地址", + "auto_connect_vscode_service": "自动连接vscode服务", + "connect": "连接", + "connection_success": "连接成功", + "connection_failed": "连接失败", + "select_import_script": "请在新页面中选择要导入的脚本", + "import_error": "导入错误", + "pulling_data_from_cloud": "正在从云端拉取数据", + "pull_failed": "拉取失败", + "restore": "恢复", + "log_title": "运行日志", + "last_5_minutes": "最近5分钟", + "last_15_minutes": "最近15分钟", + "last_30_minutes": "最近30分钟", + "last_1_hour": "最近1小时", + "last_3_hours": "最近3小时", + "last_6_hours": "最近6小时", + "last_12_hours": "最近12小时", + "last_24_hours": "最近24小时", + "last_7_days": "最近7天", + "query": "查询", + "labels": "labels", + "search_regex": "搜索(支持正则)", + "clean_schedule": "定时清理", + "days_ago_logs": "天前的日志", + "delete_completed": "删除完成", + "delete_current_logs": "删除当前日志", + "clear_completed": "清空完成", + "clear_logs": "清空日志", + "total_logs": "共查询到条日志", + "filtered_logs": "筛选后条日志", + "enter_filter_conditions": "请输入筛选条件进行查询", + "permission": "权限", + "enter_subscribe_name": "请输入订阅名称", + "subscribe_url": "订阅地址", + "confirm_delete_subscription": "确定要删除此订阅吗? 相关的脚本也会被删除", + "list": { + "confirm_delete": "确定要删除吗?请注意这个操作无法恢复!", + "confirm_update": "确认要更新吗?请注意此操作不可逆!" + }, + "enable": "开启", + "script_list_enable_width": 100, + "script_list_last_updated_width": 100, + "script_list_apply_to_run_status_width": 140, + "subscribe_list_enable_width": 100, + "disable": "关闭", + "name": "名称", + "version": "版本", + "apply_to_run_status": "应用至/运行状态", + "source": "来源", + "home": "主页", + "sorting": "排序", + "last_updated": "最后更新", + "action": "操作", + "foreground_page_script_tooltip": "前台页面脚本,会在指定的页面上运行", + "background_script_tooltip": "后台脚本,会在指定的页面上运行", + "scheduled_script_tooltip": "定时脚本,下一次运行时间:", + "running": "运行中", + "completed": "运行完毕", + "subscription_link": "订阅链接", + "subscription_installation": "订阅安装", + "manually_created": "手动新建", + "script_link": "脚本链接", + "user_installation": "用户安装", + "confirm_delete_script": "确定要删除此脚本吗?", + "delete_failed": "删除失败", + "enter_script_name": "请输入脚本名", + "update_not_supported": "该脚本不支持检查更新", + "checking_for_updates": "检查更新中...", + "new_version_available": "存在新版本", + "latest_version": "已是最新版本", + "checked_for_all_selected": "所选脚本皆已检查更新", + "update_check_failed": "检查更新失败", + "stopping_script": "正在停止脚本", + "script_stopped": "脚本已停止", + "starting_script": "正在启动脚本...", + "starting_updates": "正在批量更新...", + "script_started": "脚本已启动", + "batch_operations": "批量操作", + "export": "导出", + "delete": "删除", + "unknown_operation": "未知操作", + "confirm": "确定", + "close": "关闭", + "page_script": "页面脚本", + "homepage": "脚本主页", + "script_website": "脚本站点", + "script_source": "脚本源码", + "bug_feedback_script_support": "BUG反馈/脚本支持站点", + "config": "配置", + "key": "key", + "value": "value", + "add": "新增", + "type": "类型", + "edit_value": "编辑值", + "add_value": "新增值", + "update_success": "修改成功", + "add_success": "添加成功", + "script_storage": "脚本储存", + "enter_key": "请输入key", + "key_placeholder": "key", + "value_placeholder": "当类型为object时,请输入可以JSON解析的数据", + "clear": "清空", + "clear_success": "清空成功", + "confirm_clear": "你真的要清空这个储存空间吗?", + "type_string": "string", + "type_number": "number", + "type_boolean": "boolean", + "type_object": "object", + "confirm_delete_resource": "你确定删除此资源吗?在下次开启时将会重新加载此资源", + "confirm_clear_resource": "你真的要清空这些资源吗?在下次开启时将会重新加载资源", + "script_resource": "脚本资源", + "permission_value": "授权值", + "allow": "是否允许", + "yes": "是", + "no": "否", + "confirm_delete_permission": "确认删除该授权?", + "script_setting": "脚本设置", + "basic_info": "基本信息", + "update_url": "更新URL", + "permission_management": "授权管理", + "add_permission": "添加授权", + "permission_cors": "跨域(cors)", + "permission_cookie": "管理cookie", + "match": "匹配", + "user_setting": "用户设定", + "confirm_delete_exclude": "确认删除该排除?", + "after_deleting_match_item": "脚本设定的匹配项删除后会自动添加到匹配项中", + "confirm_delete_match": "确认删除该匹配?", + "after_deleting_exclude_item": "脚本设定的匹配项删除后会自动添加到排除项中", + "add_match": "添加匹配", + "add_exclude": "添加排除", + "website_match": "网站匹配(@match)", + "reset": "重置", + "website_exclude": "网站排除(@exclude)", + "confirm_reset": "确定重置?", + "script_total_runs": "该脚本总共运行了{{runNum}}次,在iframe上运行了{{runNumByIframe}}次", + "script_total_runs_single": "该脚本运行了{{runNum}}次", + "script_disabled": "该脚本未开启", + "run_once": "运行一次", + "stop": "停止", + "edit": "编辑", + "exclude_on": "恢复在", + "exclude_off": "排除在", + "exclude_execution": "上执行", + "user_config": "用户配置", + "gm_api": "GM Api", + "storage_api": "Storage API", + "use_file_system": "使用的文件系统", + "open_directory": "打开目录", + "account_validation_failed": "账号信息验证失败", + "not_set": "未设置", + "in_use": "使用中", + "storage_error": "储存错误", + "upload_to_cloud": "上传至云", + "save_failed": "保存失败", + "exporting": "导出中...", + "upload_to": "上传至", + "value_export_expression": "值导出表达式", + "overwrite_original_value_on_import": "导入时覆盖原值", + "cookie_export_expression": "cookie导出表达式", + "overwrite_original_cookie_on_import": "导入时覆盖原值", + "restore_default_values": "恢复默认值", + "get_confirm_error": "获取确认信息失败", + "confirm_error": "确认失败", + "ignore": "忽略", + "allow_once": "允许一次", + "temporary_allow": "临时允许此{{permissionContent}}", + "temporary_allow_all": "临时允许全部{{permissionContent}}", + "permanent_allow": "永久允许此{{permissionContent}}", + "permanent_allow_all": "永久允许全部{{permissionContent}}", + "deny_once": "拒绝一次", + "temporary_deny": "临时拒绝此{{permissionContent}}", + "temporary_deny_all": "临时拒绝全部{{permissionContent}}", + "permanent_deny": "永久拒绝此{{permissionContent}}", + "permanent_deny_all": "永久拒绝全部{{permissionContent}}", + "data_import": "数据导入", + "import": "导入", + "select_scripts_to_import": "请选择你要导入的脚本", + "select_all": "全选", + "script_import_progress": "脚本导入进度", + "select_subscribes_to_import": "请选择你要导入的订阅", + "subscribe_import_progress": "订阅导入进度", + "author": "作者", + "description": "描述", + "operation": "操作", + "error": "错误", + "unknown": "未知", + "add_new": "新增", + "no_operation": "不做操作", + "enable_script": "开启脚本", + "local_creation": "本地创建", + "import_success": "导入成功", + "install_script": "安装", + "update_script": "更新", + "install_subscribe": "安装订阅", + "update_subscribe": "更新订阅", + "invalid_link": "错误的链接", + "subscribe_install_label": "该订阅将会安装下面的脚本", + "script_runs_in": "脚本将在下面的网站中运行", + "script_has_full_access_to": "脚本将获得以下地址的完整访问权限", + "script_requires": "脚本引用了下列外部资源", + "cookie_warning": "请注意,本脚本会申请 Cookie 的操作权限,这是一个危险的权限,请确认脚本的安全性。", + "scheduled_script_description_1": "这是一个定时脚本,启用后将在特定时间自动运行,并可在面板中手动控制。", + "scheduled_script_description_2": "定时任务表达式:{{expression}},最近一次运行时间:{{time}}", + "background_script_description": "这是一个后台脚本,启用后将在浏览器打开时自动运行一次,并可在面板中手动控制。", + "install_success": "安装成功", + "install": { + "update_success": "更新成功" + }, + "install_failed": "安装失败", + "subscribe_success": "订阅成功", + "subscribe_failed": "订阅失败", + "current_version": "当前版本", + "update_version": "更新版本", + "background_script_tag": "这是一个后台脚本", + "scheduled_script_tag": "这是一个定时脚本", + "background_script": "后台脚本", + "scheduled_script": "定时脚本", + "install_from_legitimate_sources_warning": "请从合法来源安装脚本!未知的脚本可能会侵犯您的隐私或者做出恶意的操作!", + "antifeature_referral_link_title": "推荐链接", + "antifeature_referral_link_description": "该脚本会修改或重定向到作者的返佣链接", + "antifeature_ads_title": "附带广告", + "antifeature_ads_description": "该脚本会在你访问的页面上插入广告", + "antifeature_payment_title": "付费脚本", + "antifeature_payment_description": "该脚本需要你付费才能够正常使用", + "antifeature_miner_title": "挖矿", + "antifeature_miner_description": "该脚本存在挖矿行为", + "antifeature_membership_title": "会员功能", + "antifeature_membership_description": "该脚本需要注册会员才能正常使用", + "antifeature_tracking_title": "信息追踪", + "antifeature_tracking_description": "该脚本会追踪你的用户信息", + "script_info_load_failed": "脚本信息加载失败!", + "script_status_tooltip": "可以控制脚本开启状态,普通油猴脚本默认开启,后台脚本、定时脚本默认关闭", + "get_script": "获取脚本", + "report_issue": "BUG/问题反馈", + "project_docs": "项目文档", + "community": "交流社区", + "popup": { + "new_version_available": "有新版本可用" + }, + "current_page_scripts": "当前页运行脚本", + "enabled_background_scripts": "开启和运行的后台脚本", + "script_accessing_cross_origin_resource": "脚本正在试图访问跨域资源", + "confirm_operation_description": "请您确认是否允许脚本进行此操作,脚本也可增加@connect标签跳过此选项", + "domain": "域名", + "script_name": "脚本名称", + "request_domain": "请求域名", + "request_url": "请求地址", + "access_cookie_content": "脚本正在试图访问网站cookie内容", + "confirm_script_operation": "请您确认是否允许脚本进行此操作,cookie是一项重要的用户数据,请务必只给信任的脚本授权.", + "cookie_domain": "Cookie域", + "script_operation_title": "脚本正在试图操作脚本同步储存空间", + "script_operation_description": "请您确认是否允许脚本进行此操作,允许后将允许脚本操作你设定的储存空间,脚本会在储存空间下创建一个app/${dir}的目录进行使用", + "script_permission_content": "脚本", + "sync_system_connect_failed": "同步系统连接失败", + "sync_system_closed": "已关闭同步", + "sync_system_closed_description": "同步功能已关闭,请重新配置", + "auth_type": "鉴权类型", + "url": "URL", + "username": "用户名", + "password": "密码", + "skip": "跳过", + "next": "下一步", + "back": "上一步", + "last": "完成", + "start_guide_title": "欢迎使用脚本猫扩展", + "start_guide_content": "接下来我们将为您介绍脚本猫的基本使用方法", + "guide_installed_scripts": "你所安装的脚本将会在这里显示", + "guide_script_list_title": "脚本市场", + "guide_script_list_content": "可以从脚本市场中安装脚本,脚本猫除了支持用户脚本以外,还支持后台脚本", + "guide_script_list_enable_title": "脚本开启", + "guide_script_list_enable_content": "脚本需要开启才能使用,页面脚本安装默认开启,后台脚本安装默认关闭", + "guide_script_list_apply_to_run_status_title": "应用至、与运行状态", + "guide_script_list_apply_to_run_status_content": "脚本运行状态展示,鼠标悬浮至标签可以查看脚本类型", + "guide_script_list_sort_title": "排序/最后更新/操作", + "guide_script_list_sort_content": "你可以拖动脚本的标签进行排序,点击最后更新列标签可以对脚本进行一次检查更新,操作列可以进入脚本编辑、控制脚本的运行停止(后台脚本)、设置UserConfig", + "guide_tools_title": "常用工具", + "guide_tools_content": "工具中提供了备份和开发的工具", + "guide_tools_backup_title": "备份", + "guide_tools_backup_content": "备份可以保存脚本,避免丢失。可以导出脚本文件到本地,也可以加载本地的脚本文件。也可以备份到云端,更加方便。", + "guide_setting_title": "设置", + "guide_setting_content": "设置中主要包含了语言、脚本同步、更新频率等常用设置项", + "guide_setting_sync_title": "更新与同步", + "guide_setting_sync_content": "脚本同步功能可以方便的将本设备的脚本内容同步至云端,如果勾选同步删除选项,则当本设备脚本删除时,也会从删除云端对应的脚本。你也可以在此更新脚本的版本获得更加强大的功能。" +} diff --git a/src/locales/zh-CN/translation.yaml b/src/locales/zh-CN/translation.yaml deleted file mode 100644 index 655d614a..00000000 --- a/src/locales/zh-CN/translation.yaml +++ /dev/null @@ -1,383 +0,0 @@ -# 顶部栏 layout/MainLayout -import_link: 链接导入 -import_link_failure: 链接导入失败 -create_user_script: 新建普通脚本 -create_background_script: 新建后台脚本 -create_scheduled_script: 新建定时脚本 -create_script: 新建脚本 -user_guide: 使用指南 -api_docs: API文档 -development_guide: 开发指南 -script_gallery: 脚本站 -community_forum: 社区论坛 -external_links: 外部链接 -system_follow: 跟随系统 -no_data: 暂无数据 - -# 侧边栏 layout/Sider -installed_scripts: 已安装脚本 -subscribe: 订阅 -logs: 日志 -tools: 工具 -settings: 设置 -collapsible: 收起侧边栏 -guide: 新手指引 -helpcenter: 帮助中心 - -# 设置页 Setting -general: 通用 -language: 语言 -script_sync: 脚本同步 -sync_delete: 同步删除 -enable_script_sync_to: 启用脚本同步至 -save: 保存 -cloud_sync_account_verification: 云同步账号信息验证中... -cloud_sync_verification_failed: 云同步账号信息验证失败 -save_success: 保存成功 -update: 更新 -check_update: 检查更新 -script_subscription_check_interval: 脚本/订阅检查更新间隔 -never: 从不 -6_hours: 6小时 -12_hours: 12小时 -every_day: 每天 -every_week: 每周 -update_disabled_scripts: 更新已禁用脚本 -silent_update_non_critical_changes: 非重要变更静默更新脚本 -enable_eslint: 开启 ESLint -eslint_rules: ESLint规则 -enter_eslint_rules: 请输入 ESLint 规则,可以从 https://eslint.org/play/ 下载配置 -language_change_tip: 语言切换成功 - -# 工具页 Tools -backup: 备份 -local: 本地 -export_file: 导出文件 -import_file: 导入文件 -cloud: 云端 -backup_to: 备份至 -preparing_backup: 正在准备备份到云端 -backup_success: 备份成功 -backup_failed: 备份失败 -no_backup_files: 没有备份文件 -backup_list: 备份列表 -open_backup_dir: 打开备份目录 -confirm_delete: 确认删除 -confirm_delete_backup_file: 确认删除备份文件 -confirm_update: 确认更新 -delete_success: 删除成功 -backup_strategy: 备份策略 -under_construction: 建设中 -development_debugging: 开发调试 -vscode_url: VSCode地址 -auto_connect_vscode_service: 自动连接vscode服务 -connect: 连接 -connection_success: 连接成功 -connection_failed: 连接失败 -select_import_script: 请在新页面中选择要导入的脚本 -import_error: 导入错误 -pulling_data_from_cloud: 正在从云端拉取数据 -pull_failed: 拉取失败 -restore: 恢复 - -# 日志页 Logger -log_title: 运行日志 -last_5_minutes: 最近5分钟 -last_15_minutes: 最近15分钟 -last_30_minutes: 最近30分钟 -last_1_hour: 最近1小时 -last_3_hours: 最近3小时 -last_6_hours: 最近6小时 -last_12_hours: 最近12小时 -last_24_hours: 最近24小时 -last_7_days: 最近7天 -query: 查询 -labels: labels -search_regex: 搜索(支持正则) -clean_schedule: 定时清理 -days_ago_logs: 天前的日志 -delete_completed: 删除完成 -delete_current_logs: 删除当前日志 -clear_completed: 清空完成 -clear_logs: 清空日志 -total_logs: 共查询到条日志 -filtered_logs: 筛选后条日志 -enter_filter_conditions: 请输入筛选条件进行查询 - -# 订阅列表 SubscribeList -permission: 权限 -enter_subscribe_name: 请输入订阅名称 -subscribe_url: 订阅地址 -confirm_delete_subscription: 确定要删除此订阅吗? 相关的脚本也会被删除 - -# 脚本列表 ScriptList -list: - confirm_delete: 确定要删除吗?请注意这个操作无法恢复! - confirm_update: 确认要更新吗?请注意此操作不可逆! -enable: 开启 -disable: 关闭 -name: 名称 -version: 版本 -apply_to_run_status: 应用至/运行状态 -source: 来源 -home: 主页 -sorting: 排序 -last_updated: 最后更新 -action: 操作 -foreground_page_script_tooltip: 前台页面脚本,会在指定的页面上运行 -background_script_tooltip: 后台脚本,会在指定的页面上运行 -scheduled_script_tooltip: 定时脚本,下一次运行时间: -running: 运行中 -completed: 运行完毕 -subscription_link: 订阅链接 -subscription_installation: 订阅安装 -manually_created: 手动新建 -script_link: 脚本链接 -user_installation: 用户安装 -confirm_delete_script: 确定要删除此脚本吗? -delete_failed: 删除失败 -enter_script_name: 请输入脚本名 -update_not_supported: 该脚本不支持检查更新 -checking_for_updates: 检查更新中... -new_version_available: 存在新版本 -latest_version: 已是最新版本 -checked_for_all_selected: 所选脚本皆已检查更新 -update_check_failed: 检查更新失败 -stopping_script: 正在停止脚本 -script_stopped: 脚本已停止 -starting_script: 正在启动脚本... -starting_updates: 正在批量更新... -script_started: 脚本已启动 -batch_operations: 批量操作 -export: 导出 -delete: 删除 -unknown_operation: 未知操作 -confirm: 确定 -close: 关闭 -page_script: 页面脚本 -homepage: 脚本主页 -script_website: 脚本站点 -script_source: 脚本源码 -bug_feedback_script_support: BUG反馈/脚本支持站点 - -# 用户配置面板 UserConfigPanel -config: 配置 - -# 脚本储存 ScriptStorage -key: key -value: value -add: 新增 -type: 类型 -edit_value: 编辑值 -add_value: 新增值 -update_success: 修改成功 -add_success: 添加成功 -script_storage: 脚本储存 -enter_key: 请输入key -key_placeholder: key -value_placeholder: 当类型为object时,请输入可以JSON解析的数据 -clear: 清空 -clear_success: 清空成功 -confirm_clear: 你真的要清空这个储存空间吗? -type_string: string -type_number: number -type_boolean: boolean -type_object: object - -# 脚本资源 ScriptResource -confirm_delete_resource: 你确定删除此资源吗?在下次开启时将会重新加载此资源 -confirm_clear_resource: 你真的要清空这些资源吗?在下次开启时将会重新加载资源 -script_resource: 脚本资源 - -# 脚本设置 ScriptSetting -permission_value: 授权值 -allow: 是否允许 -yes: 是 -no: 否 -confirm_delete_permission: 确认删除该授权? -script_setting: 脚本设置 -basic_info: 基本信息 -update_url: 更新URL -permission_management: 授权管理 -# 脚本设置Match ScriptSetting/Match -match: 匹配 -user_setting: 用户设定 -confirm_delete_exclude: 确认删除该排除? -after_deleting_match_item: 脚本设定的匹配项删除后会自动添加到匹配项中 -confirm_delete_match: 确认删除该匹配? -after_deleting_exclude_item: 脚本设定的匹配项删除后会自动添加到排除项中 -add_match: 添加匹配 -add_exclude: 添加排除 -website_match: 网站匹配(@match) -reset: 重置 -website_exclude: 网站排除(@exclude) -confirm_reset: 确定重置? - -# 脚本菜单列表 ScriptMenuList -script_total_runs: 该脚本总共运行了{{runNum}}次,在iframe上运行了{{runNumByIframe}}次 -script_total_runs_single: 该脚本运行了{{runNum}}次 -script_disabled: 该脚本未开启 -run_once: 运行一次 -stop: 停止 -edit: 编辑 -exclude_on: 恢复在 -exclude_off: 排除在 -exclude_execution: 上执行 -user_config: 用户配置 - -# GMApi设置 GMApiSetting -gm_api: GM Api -storage_api: Storage API -use_file_system: 使用的文件系统 -open_directory: 打开目录 -account_validation_failed: 账号信息验证失败 -not_set: 未设置 -in_use: 使用中 -storage_error: 储存错误 - -# 云脚本 CloudScript -upload_to_cloud: 上传至云 -save_failed: 保存失败 -exporting: 导出中... -upload_to: 上传至 -value_export_expression: 值导出表达式 -overwrite_original_value_on_import: 导入时覆盖原值 -cookie_export_expression: cookie导出表达式 -overwrite_original_cookie_on_import: 导入时覆盖原值 -restore_default_values: 恢复默认值 - -# 权限确认 confirm -get_confirm_error: 获取确认信息失败 -confirm_error: 确认失败 -ignore: 忽略 -allow_once: 允许一次 -temporary_allow: 临时允许此{{permissionContent}} -temporary_allow_all: 临时允许全部{{permissionContent}} -permanent_allow: 永久允许此{{permissionContent}} -permanent_allow_all: 永久允许全部{{permissionContent}} -deny_once: 拒绝一次 -temporary_deny: 临时拒绝此{{permissionContent}} -temporary_deny_all: 临时拒绝全部{{permissionContent}} -permanent_deny: 永久拒绝此{{permissionContent}} -permanent_deny_all: 永久拒绝全部{{permissionContent}} - -# 脚本导入 import -data_import: 数据导入 -import: 导入 -select_scripts_to_import: 请选择你要导入的脚本 -select_all: 全选 -script_import_progress: 脚本导入进度 -select_subscribes_to_import: 请选择你要导入的订阅 -subscribe_import_progress: 订阅导入进度 -author: 作者 -description: 描述 -operation: 操作 -error: 错误 -unknown: 未知 -add_new: 新增 -no_operation: 不做操作 -enable_script: 开启脚本 -local_creation: 本地创建 -import_success: 导入成功 - -# 脚本安装 install -install_script: 安装 -update_script: 更新 -install_subscribe: 安装订阅 -update_subscribe: 更新订阅 -invalid_link: 错误的链接 -subscribe_install_label: 该订阅将会安装下面的脚本 -script_runs_in: 脚本将在下面的网站中运行 -script_has_full_access_to: 脚本将获得以下地址的完整访问权限 -script_requires: 脚本引用了下列外部资源 -cookie_warning: 请注意,本脚本会申请 Cookie 的操作权限,这是一个危险的权限,请确认脚本的安全性。 -scheduled_script_description_1: 这是一个定时脚本,启用后将在特定时间自动运行,并可在面板中手动控制。 -scheduled_script_description_2: 定时任务表达式:{{expression}},最近一次运行时间:{{time}} -background_script_description: 这是一个后台脚本,启用后将在浏览器打开时自动运行一次,并可在面板中手动控制。 -install_success: 安装成功 -install: - update_success: 更新成功 -install_failed: 安装失败 -subscribe_success: 订阅成功 -subscribe_failed: 订阅失败 -current_version: 当前版本 -update_version: 更新版本 -background_script_tag: 这是一个后台脚本 -scheduled_script_tag: 这是一个定时脚本 -background_script: 后台脚本 -scheduled_script: 定时脚本 -install_from_legitimate_sources_warning: 请从合法来源安装脚本!未知的脚本可能会侵犯您的隐私或者做出恶意的操作! -antifeature_referral_link_title: 推荐链接 -antifeature_referral_link_description: 该脚本会修改或重定向到作者的返佣链接 -antifeature_ads_title: 附带广告 -antifeature_ads_description: 该脚本会在你访问的页面上插入广告 -antifeature_payment_title: 付费脚本 -antifeature_payment_description: 该脚本需要你付费才能够正常使用 -antifeature_miner_title: 挖矿 -antifeature_miner_description: 该脚本存在挖矿行为 -antifeature_membership_title: 会员功能 -antifeature_membership_description: 该脚本需要注册会员才能正常使用 -antifeature_tracking_title: 信息追踪 -antifeature_tracking_description: 该脚本会追踪你的用户信息 -script_info_load_failed: 脚本信息加载失败! -script_status_tooltip: 可以控制脚本开启状态,普通油猴脚本默认开启,后台脚本、定时脚本默认关闭 - -# 弹出页 popup -get_script: 获取脚本 -report_issue: BUG/问题反馈 -project_docs: 项目文档 -community: 交流社区 -popup: - new_version_available: 有新版本可用 -current_page_scripts: 当前页运行脚本 -enabled_background_scripts: 开启和运行的后台脚本 - -# background -script_accessing_cross_origin_resource: 脚本正在试图访问跨域资源 -confirm_operation_description: 请您确认是否允许脚本进行此操作,脚本也可增加@connect标签跳过此选项 -domain: 域名 -script_name: 脚本名称 -request_domain: 请求域名 -request_url: 请求地址 -access_cookie_content: "脚本正在试图访问网站cookie内容" -confirm_script_operation: "请您确认是否允许脚本进行此操作,cookie是一项重要的用户数据,请务必只给信任的脚本授权." -cookie_domain: "Cookie域" -script_operation_title: "脚本正在试图操作脚本同步储存空间" -script_operation_description: "请您确认是否允许脚本进行此操作,允许后将允许脚本操作你设定的储存空间,脚本会在储存空间下创建一个app/${dir}的目录进行使用" -script_permission_content: "脚本" -sync_system_connect_failed: "同步系统连接失败" -sync_system_closed: "已关闭同步" -sync_system_closed_description: "同步功能已关闭,请重新配置" - -# 文件系统 -auth_type: 鉴权类型 -url: URL -username: 用户名 -password: 密码 - -# 新手指引 -skip: 跳过 -next: 下一步 -back: 上一步 -last: 完成 -start_guide_title: 欢迎使用脚本猫扩展 -start_guide_content: 接下来我们将为您介绍脚本猫的基本使用方法 -guide_installed_scripts: 你所安装的脚本将会在这里显示 -guide_script_list_title: 脚本市场 -guide_script_list_content: 可以从脚本市场中安装脚本,脚本猫除了支持用户脚本以外,还支持后台脚本 -guide_script_list_enable_title: 脚本开启 -guide_script_list_enable_content: 脚本需要开启才能使用,页面脚本安装默认开启,后台脚本安装默认关闭 -guide_script_list_apply_to_run_status_title: 应用至、与运行状态 -guide_script_list_apply_to_run_status_content: 脚本运行状态展示,鼠标悬浮至标签可以查看脚本类型 -guide_script_list_sort_title: 排序/最后更新/操作 -guide_script_list_sort_content: 你可以拖动脚本的标签进行排序,点击最后更新列标签可以对脚本进行一次检查更新,操作列可以进入脚本编辑、控制脚本的运行停止(后台脚本)、设置UserConfig - -guide_tools_title: 常用工具 -guide_tools_content: 工具中提供了备份和开发的工具 -guide_tools_backup_title: 备份 -guide_tools_backup_content: 备份可以保存脚本,避免丢失。可以导出脚本文件到本地,也可以加载本地的脚本文件。也可以备份到云端,更加方便。 - -guide_setting_title: 设置 -guide_setting_content: 设置中主要包含了语言、脚本同步、更新频率等常用设置项 -guide_setting_sync_title: 更新与同步 -guide_setting_sync_content: 脚本同步功能可以方便的将本设备的脚本内容同步至云端,如果勾选同步删除选项,则当本设备脚本删除时,也会从删除云端对应的脚本。你也可以在此更新脚本的版本获得更加强大的功能。 diff --git a/src/pages/options/routes/ScriptList.tsx b/src/pages/options/routes/ScriptList.tsx index 31177ff0..f955e6c8 100644 --- a/src/pages/options/routes/ScriptList.tsx +++ b/src/pages/options/routes/ScriptList.tsx @@ -97,7 +97,7 @@ function ScriptList() { const [showAction, setShowAction] = useState(false); const [action, setAction] = useState(""); const [select, setSelect] = useState([]); - const { t, i18n } = useTranslation(); + const { t } = useTranslation(); useEffect(() => { // Monitor script running status @@ -130,7 +130,7 @@ function ScriptList() { }, { title: t("enable"), - width: (i18n.language === "zh-CN" ? 100 : 120), + width: t("script_list_enable_width"), dataIndex: "status", className: "script-enable", sorter(a, b) { @@ -249,7 +249,7 @@ function ScriptList() { }, { title: t("apply_to_run_status"), - width: (i18n.language === "zh-CN" ? 140 : "auto"), + width: t("script_list_apply_to_run_status_width"), className: "apply_to_run_status", render(col, item: Script) { const toLogger = () => { @@ -406,7 +406,7 @@ function ScriptList() { dataIndex: "updatetime", align: "center", key: "updatetime", - width: (i18n.language === "zh-CN" ? 100 : "auto"), + width: t("script_list_last_updated_width"), render(col, script: Script) { return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions diff --git a/src/pages/options/routes/SubscribeList.tsx b/src/pages/options/routes/SubscribeList.tsx index c9df1c30..2f9c6690 100644 --- a/src/pages/options/routes/SubscribeList.tsx +++ b/src/pages/options/routes/SubscribeList.tsx @@ -56,7 +56,7 @@ function SubscribeList() { }, { title: t("enable"), - width: (i18n.language === "zh-CN" ? 100 : 120), + width: t("subscribe_list_enable_width"), key: "enable", sorter(a, b) { return a.status - b.status; @@ -215,7 +215,7 @@ function SubscribeList() { dataIndex: "updatetime", align: "center", key: "updatetime", - width: (i18n.language === "zh-CN" ? 100 : "auto"), + width: i18n.language === "zh-CN" ? 100 : "auto", render(col, subscribe: Subscribe) { return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions diff --git a/webpack.config.ts b/webpack.config.ts index a0706a8b..98ac93b8 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -125,7 +125,7 @@ const config: Configuration = { }), ], resolve: { - extensions: [".js", ".ts", ".tsx", ".d.ts", ".tpl", ".json", ".yaml"], + extensions: [".js", ".ts", ".tsx", ".d.ts", ".tpl", ".json"], alias: { "@App": path.resolve(__dirname, "src/"), "@Pkg": path.resolve(__dirname, "pkg/"), @@ -152,10 +152,6 @@ const config: Configuration = { use: ["raw-loader"], exclude: /node_modules/, }, - { - test: /\.ya?ml$/, - use: "yaml-loader", - }, ], }, optimization: { From 5807a2af0aa62a945e273a677597f7c607dcd9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E4=B9=8B?= Date: Thu, 12 Oct 2023 23:06:19 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9C=A8=20=E4=BC=98=E5=8C=96=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/ach-UG/translation.json | 351 ++++++++++++++++++++++++++++ src/locales/locales.ts | 16 ++ src/locales/zh-TW/translation.json | 351 ++++++++++++++++++++++++++++ 3 files changed, 718 insertions(+) create mode 100644 src/locales/ach-UG/translation.json create mode 100644 src/locales/zh-TW/translation.json diff --git a/src/locales/ach-UG/translation.json b/src/locales/ach-UG/translation.json new file mode 100644 index 00000000..bc0a8225 --- /dev/null +++ b/src/locales/ach-UG/translation.json @@ -0,0 +1,351 @@ +{ + "import_link": "crwdns5820:0crwdne5820:0", + "import_link_failure": "crwdns5822:0crwdne5822:0", + "create_user_script": "crwdns5824:0crwdne5824:0", + "create_background_script": "crwdns5826:0crwdne5826:0", + "create_scheduled_script": "crwdns5828:0crwdne5828:0", + "create_script": "crwdns5830:0crwdne5830:0", + "user_guide": "crwdns5832:0crwdne5832:0", + "api_docs": "crwdns5834:0crwdne5834:0", + "development_guide": "crwdns5836:0crwdne5836:0", + "script_gallery": "crwdns5838:0crwdne5838:0", + "community_forum": "crwdns5840:0crwdne5840:0", + "external_links": "crwdns5842:0crwdne5842:0", + "system_follow": "crwdns5844:0crwdne5844:0", + "no_data": "crwdns5846:0crwdne5846:0", + "installed_scripts": "crwdns5848:0crwdne5848:0", + "subscribe": "crwdns5850:0crwdne5850:0", + "logs": "crwdns5852:0crwdne5852:0", + "tools": "crwdns5854:0crwdne5854:0", + "settings": "crwdns5856:0crwdne5856:0", + "collapsible": "crwdns5858:0crwdne5858:0", + "guide": "crwdns5860:0crwdne5860:0", + "helpcenter": "crwdns5862:0crwdne5862:0", + "general": "crwdns5864:0crwdne5864:0", + "language": "crwdns5866:0crwdne5866:0", + "script_sync": "crwdns5868:0crwdne5868:0", + "sync_delete": "crwdns5870:0crwdne5870:0", + "enable_script_sync_to": "crwdns5872:0crwdne5872:0", + "save": "crwdns5874:0crwdne5874:0", + "cloud_sync_account_verification": "crwdns5876:0crwdne5876:0", + "cloud_sync_verification_failed": "crwdns5878:0crwdne5878:0", + "save_success": "crwdns5880:0crwdne5880:0", + "update": "crwdns5882:0crwdne5882:0", + "check_update": "crwdns5884:0crwdne5884:0", + "script_subscription_check_interval": "crwdns5886:0crwdne5886:0", + "never": "crwdns5888:0crwdne5888:0", + "6_hours": "crwdns5890:0crwdne5890:0", + "12_hours": "crwdns5892:0crwdne5892:0", + "every_day": "crwdns5894:0crwdne5894:0", + "every_week": "crwdns5896:0crwdne5896:0", + "update_disabled_scripts": "crwdns5898:0crwdne5898:0", + "silent_update_non_critical_changes": "crwdns5900:0crwdne5900:0", + "enable_eslint": "crwdns5902:0crwdne5902:0", + "eslint_rules": "crwdns5904:0crwdne5904:0", + "enter_eslint_rules": "crwdns5906:0crwdne5906:0", + "language_change_tip": "crwdns5908:0crwdne5908:0", + "backup": "crwdns5910:0crwdne5910:0", + "local": "crwdns5912:0crwdne5912:0", + "export_file": "crwdns5914:0crwdne5914:0", + "import_file": "crwdns5916:0crwdne5916:0", + "cloud": "crwdns5918:0crwdne5918:0", + "backup_to": "crwdns5920:0crwdne5920:0", + "preparing_backup": "crwdns5922:0crwdne5922:0", + "backup_success": "crwdns5924:0crwdne5924:0", + "backup_failed": "crwdns5926:0crwdne5926:0", + "no_backup_files": "crwdns5928:0crwdne5928:0", + "backup_list": "crwdns5930:0crwdne5930:0", + "open_backup_dir": "crwdns5932:0crwdne5932:0", + "confirm_delete": "crwdns5934:0crwdne5934:0", + "confirm_delete_backup_file": "crwdns5936:0crwdne5936:0", + "confirm_update": "crwdns5938:0crwdne5938:0", + "delete_success": "crwdns5940:0crwdne5940:0", + "backup_strategy": "crwdns5942:0crwdne5942:0", + "under_construction": "crwdns5944:0crwdne5944:0", + "development_debugging": "crwdns5946:0crwdne5946:0", + "vscode_url": "crwdns5948:0crwdne5948:0", + "auto_connect_vscode_service": "crwdns5950:0crwdne5950:0", + "connect": "crwdns5952:0crwdne5952:0", + "connection_success": "crwdns5954:0crwdne5954:0", + "connection_failed": "crwdns5956:0crwdne5956:0", + "select_import_script": "crwdns5958:0crwdne5958:0", + "import_error": "crwdns5960:0crwdne5960:0", + "pulling_data_from_cloud": "crwdns5962:0crwdne5962:0", + "pull_failed": "crwdns5964:0crwdne5964:0", + "restore": "crwdns5966:0crwdne5966:0", + "log_title": "crwdns5968:0crwdne5968:0", + "last_5_minutes": "crwdns5970:0crwdne5970:0", + "last_15_minutes": "crwdns5972:0crwdne5972:0", + "last_30_minutes": "crwdns5974:0crwdne5974:0", + "last_1_hour": "crwdns5976:0crwdne5976:0", + "last_3_hours": "crwdns5978:0crwdne5978:0", + "last_6_hours": "crwdns5980:0crwdne5980:0", + "last_12_hours": "crwdns5982:0crwdne5982:0", + "last_24_hours": "crwdns5984:0crwdne5984:0", + "last_7_days": "crwdns5986:0crwdne5986:0", + "query": "crwdns5988:0crwdne5988:0", + "labels": "crwdns5990:0crwdne5990:0", + "search_regex": "crwdns5992:0crwdne5992:0", + "clean_schedule": "crwdns5994:0crwdne5994:0", + "days_ago_logs": "crwdns5996:0crwdne5996:0", + "delete_completed": "crwdns5998:0crwdne5998:0", + "delete_current_logs": "crwdns6000:0crwdne6000:0", + "clear_completed": "crwdns6002:0crwdne6002:0", + "clear_logs": "crwdns6004:0crwdne6004:0", + "total_logs": "crwdns6006:0crwdne6006:0", + "filtered_logs": "crwdns6008:0crwdne6008:0", + "enter_filter_conditions": "crwdns6010:0crwdne6010:0", + "permission": "crwdns6012:0crwdne6012:0", + "enter_subscribe_name": "crwdns6014:0crwdne6014:0", + "subscribe_url": "crwdns6016:0crwdne6016:0", + "confirm_delete_subscription": "crwdns6018:0crwdne6018:0", + "list": { + "confirm_delete": "crwdns6020:0crwdne6020:0", + "confirm_update": "crwdns6022:0crwdne6022:0" + }, + "enable": "crwdns6024:0crwdne6024:0", + "script_list_enable_width": 0, + "script_list_last_updated_width": 0, + "script_list_apply_to_run_status_width": 0, + "subscribe_list_enable_width": 0, + "disable": "crwdns6034:0crwdne6034:0", + "name": "crwdns6036:0crwdne6036:0", + "version": "crwdns6038:0crwdne6038:0", + "apply_to_run_status": "crwdns6040:0crwdne6040:0", + "source": "crwdns6042:0crwdne6042:0", + "home": "crwdns6044:0crwdne6044:0", + "sorting": "crwdns6046:0crwdne6046:0", + "last_updated": "crwdns6048:0crwdne6048:0", + "action": "crwdns6050:0crwdne6050:0", + "foreground_page_script_tooltip": "crwdns6052:0crwdne6052:0", + "background_script_tooltip": "crwdns6054:0crwdne6054:0", + "scheduled_script_tooltip": "crwdns6056:0crwdne6056:0", + "running": "crwdns6058:0crwdne6058:0", + "completed": "crwdns6060:0crwdne6060:0", + "subscription_link": "crwdns6062:0crwdne6062:0", + "subscription_installation": "crwdns6064:0crwdne6064:0", + "manually_created": "crwdns6066:0crwdne6066:0", + "script_link": "crwdns6068:0crwdne6068:0", + "user_installation": "crwdns6070:0crwdne6070:0", + "confirm_delete_script": "crwdns6072:0crwdne6072:0", + "delete_failed": "crwdns6074:0crwdne6074:0", + "enter_script_name": "crwdns6076:0crwdne6076:0", + "update_not_supported": "crwdns6078:0crwdne6078:0", + "checking_for_updates": "crwdns6080:0crwdne6080:0", + "new_version_available": "crwdns6082:0crwdne6082:0", + "latest_version": "crwdns6084:0crwdne6084:0", + "checked_for_all_selected": "crwdns6086:0crwdne6086:0", + "update_check_failed": "crwdns6088:0crwdne6088:0", + "stopping_script": "crwdns6090:0crwdne6090:0", + "script_stopped": "crwdns6092:0crwdne6092:0", + "starting_script": "crwdns6094:0crwdne6094:0", + "starting_updates": "crwdns6096:0crwdne6096:0", + "script_started": "crwdns6098:0crwdne6098:0", + "batch_operations": "crwdns6100:0crwdne6100:0", + "export": "crwdns6102:0crwdne6102:0", + "delete": "crwdns6104:0crwdne6104:0", + "unknown_operation": "crwdns6106:0crwdne6106:0", + "confirm": "crwdns6108:0crwdne6108:0", + "close": "crwdns6110:0crwdne6110:0", + "page_script": "crwdns6112:0crwdne6112:0", + "homepage": "crwdns6114:0crwdne6114:0", + "script_website": "crwdns6116:0crwdne6116:0", + "script_source": "crwdns6118:0crwdne6118:0", + "bug_feedback_script_support": "crwdns6120:0crwdne6120:0", + "config": "crwdns6122:0crwdne6122:0", + "key": "crwdns6124:0crwdne6124:0", + "value": "crwdns6126:0crwdne6126:0", + "add": "crwdns6128:0crwdne6128:0", + "type": "crwdns6130:0crwdne6130:0", + "edit_value": "crwdns6132:0crwdne6132:0", + "add_value": "crwdns6134:0crwdne6134:0", + "update_success": "crwdns6136:0crwdne6136:0", + "add_success": "crwdns6138:0crwdne6138:0", + "script_storage": "crwdns6140:0crwdne6140:0", + "enter_key": "crwdns6142:0crwdne6142:0", + "key_placeholder": "crwdns6144:0crwdne6144:0", + "value_placeholder": "crwdns6146:0crwdne6146:0", + "clear": "crwdns6148:0crwdne6148:0", + "clear_success": "crwdns6150:0crwdne6150:0", + "confirm_clear": "crwdns6152:0crwdne6152:0", + "type_string": "crwdns6154:0crwdne6154:0", + "type_number": "crwdns6156:0crwdne6156:0", + "type_boolean": "crwdns6158:0crwdne6158:0", + "type_object": "crwdns6160:0crwdne6160:0", + "confirm_delete_resource": "crwdns6162:0crwdne6162:0", + "confirm_clear_resource": "crwdns6164:0crwdne6164:0", + "script_resource": "crwdns6166:0crwdne6166:0", + "permission_value": "crwdns6168:0crwdne6168:0", + "allow": "crwdns6170:0crwdne6170:0", + "yes": "crwdns6172:0crwdne6172:0", + "no": "crwdns6174:0crwdne6174:0", + "confirm_delete_permission": "crwdns6176:0crwdne6176:0", + "script_setting": "crwdns6178:0crwdne6178:0", + "basic_info": "crwdns6180:0crwdne6180:0", + "update_url": "crwdns6182:0crwdne6182:0", + "permission_management": "crwdns6184:0crwdne6184:0", + "add_permission": "crwdns6186:0crwdne6186:0", + "permission_cors": "crwdns6188:0crwdne6188:0", + "permission_cookie": "crwdns6190:0crwdne6190:0", + "match": "crwdns6192:0crwdne6192:0", + "user_setting": "crwdns6194:0crwdne6194:0", + "confirm_delete_exclude": "crwdns6196:0crwdne6196:0", + "after_deleting_match_item": "crwdns6198:0crwdne6198:0", + "confirm_delete_match": "crwdns6200:0crwdne6200:0", + "after_deleting_exclude_item": "crwdns6202:0crwdne6202:0", + "add_match": "crwdns6204:0crwdne6204:0", + "add_exclude": "crwdns6206:0crwdne6206:0", + "website_match": "crwdns6208:0crwdne6208:0", + "reset": "crwdns6210:0crwdne6210:0", + "website_exclude": "crwdns6212:0crwdne6212:0", + "confirm_reset": "crwdns6214:0crwdne6214:0", + "script_total_runs": "crwdns6216:0{{runNum}}crwdnd6216:0{{runNumByIframe}}crwdne6216:0", + "script_total_runs_single": "crwdns6218:0{{runNum}}crwdne6218:0", + "script_disabled": "crwdns6220:0crwdne6220:0", + "run_once": "crwdns6222:0crwdne6222:0", + "stop": "crwdns6224:0crwdne6224:0", + "edit": "crwdns6226:0crwdne6226:0", + "exclude_on": "crwdns6228:0crwdne6228:0", + "exclude_off": "crwdns6230:0crwdne6230:0", + "exclude_execution": "crwdns6232:0crwdne6232:0", + "user_config": "crwdns6234:0crwdne6234:0", + "gm_api": "crwdns6236:0crwdne6236:0", + "storage_api": "crwdns6238:0crwdne6238:0", + "use_file_system": "crwdns6240:0crwdne6240:0", + "open_directory": "crwdns6242:0crwdne6242:0", + "account_validation_failed": "crwdns6244:0crwdne6244:0", + "not_set": "crwdns6246:0crwdne6246:0", + "in_use": "crwdns6248:0crwdne6248:0", + "storage_error": "crwdns6250:0crwdne6250:0", + "upload_to_cloud": "crwdns6252:0crwdne6252:0", + "save_failed": "crwdns6254:0crwdne6254:0", + "exporting": "crwdns6256:0crwdne6256:0", + "upload_to": "crwdns6258:0crwdne6258:0", + "value_export_expression": "crwdns6260:0crwdne6260:0", + "overwrite_original_value_on_import": "crwdns6262:0crwdne6262:0", + "cookie_export_expression": "crwdns6264:0crwdne6264:0", + "overwrite_original_cookie_on_import": "crwdns6266:0crwdne6266:0", + "restore_default_values": "crwdns6268:0crwdne6268:0", + "get_confirm_error": "crwdns6270:0crwdne6270:0", + "confirm_error": "crwdns6272:0crwdne6272:0", + "ignore": "crwdns6274:0crwdne6274:0", + "allow_once": "crwdns6276:0crwdne6276:0", + "temporary_allow": "crwdns6278:0{{permissionContent}}crwdne6278:0", + "temporary_allow_all": "crwdns6280:0{{permissionContent}}crwdne6280:0", + "permanent_allow": "crwdns6282:0{{permissionContent}}crwdne6282:0", + "permanent_allow_all": "crwdns6284:0{{permissionContent}}crwdne6284:0", + "deny_once": "crwdns6286:0crwdne6286:0", + "temporary_deny": "crwdns6288:0{{permissionContent}}crwdne6288:0", + "temporary_deny_all": "crwdns6290:0{{permissionContent}}crwdne6290:0", + "permanent_deny": "crwdns6292:0{{permissionContent}}crwdne6292:0", + "permanent_deny_all": "crwdns6294:0{{permissionContent}}crwdne6294:0", + "data_import": "crwdns6296:0crwdne6296:0", + "import": "crwdns6298:0crwdne6298:0", + "select_scripts_to_import": "crwdns6300:0crwdne6300:0", + "select_all": "crwdns6302:0crwdne6302:0", + "script_import_progress": "crwdns6304:0crwdne6304:0", + "select_subscribes_to_import": "crwdns6306:0crwdne6306:0", + "subscribe_import_progress": "crwdns6308:0crwdne6308:0", + "author": "crwdns6310:0crwdne6310:0", + "description": "crwdns6312:0crwdne6312:0", + "operation": "crwdns6314:0crwdne6314:0", + "error": "crwdns6316:0crwdne6316:0", + "unknown": "crwdns6318:0crwdne6318:0", + "add_new": "crwdns6320:0crwdne6320:0", + "no_operation": "crwdns6322:0crwdne6322:0", + "enable_script": "crwdns6324:0crwdne6324:0", + "local_creation": "crwdns6326:0crwdne6326:0", + "import_success": "crwdns6328:0crwdne6328:0", + "install_script": "crwdns6330:0crwdne6330:0", + "update_script": "crwdns6332:0crwdne6332:0", + "install_subscribe": "crwdns6334:0crwdne6334:0", + "update_subscribe": "crwdns6336:0crwdne6336:0", + "invalid_link": "crwdns6338:0crwdne6338:0", + "subscribe_install_label": "crwdns6340:0crwdne6340:0", + "script_runs_in": "crwdns6342:0crwdne6342:0", + "script_has_full_access_to": "crwdns6344:0crwdne6344:0", + "script_requires": "crwdns6346:0crwdne6346:0", + "cookie_warning": "crwdns6348:0crwdne6348:0", + "scheduled_script_description_1": "crwdns6350:0crwdne6350:0", + "scheduled_script_description_2": "crwdns6352:0{{expression}}crwdnd6352:0{{time}}crwdne6352:0", + "background_script_description": "crwdns6354:0crwdne6354:0", + "install_success": "crwdns6356:0crwdne6356:0", + "install": { + "update_success": "crwdns6358:0crwdne6358:0" + }, + "install_failed": "crwdns6360:0crwdne6360:0", + "subscribe_success": "crwdns6362:0crwdne6362:0", + "subscribe_failed": "crwdns6364:0crwdne6364:0", + "current_version": "crwdns6366:0crwdne6366:0", + "update_version": "crwdns6368:0crwdne6368:0", + "background_script_tag": "crwdns6370:0crwdne6370:0", + "scheduled_script_tag": "crwdns6372:0crwdne6372:0", + "background_script": "crwdns6374:0crwdne6374:0", + "scheduled_script": "crwdns6376:0crwdne6376:0", + "install_from_legitimate_sources_warning": "crwdns6378:0crwdne6378:0", + "antifeature_referral_link_title": "crwdns6380:0crwdne6380:0", + "antifeature_referral_link_description": "crwdns6382:0crwdne6382:0", + "antifeature_ads_title": "crwdns6384:0crwdne6384:0", + "antifeature_ads_description": "crwdns6386:0crwdne6386:0", + "antifeature_payment_title": "crwdns6388:0crwdne6388:0", + "antifeature_payment_description": "crwdns6390:0crwdne6390:0", + "antifeature_miner_title": "crwdns6392:0crwdne6392:0", + "antifeature_miner_description": "crwdns6394:0crwdne6394:0", + "antifeature_membership_title": "crwdns6396:0crwdne6396:0", + "antifeature_membership_description": "crwdns6398:0crwdne6398:0", + "antifeature_tracking_title": "crwdns6400:0crwdne6400:0", + "antifeature_tracking_description": "crwdns6402:0crwdne6402:0", + "script_info_load_failed": "crwdns6404:0crwdne6404:0", + "script_status_tooltip": "crwdns6406:0crwdne6406:0", + "get_script": "crwdns6408:0crwdne6408:0", + "report_issue": "crwdns6410:0crwdne6410:0", + "project_docs": "crwdns6412:0crwdne6412:0", + "community": "crwdns6414:0crwdne6414:0", + "popup": { + "new_version_available": "crwdns6416:0crwdne6416:0" + }, + "current_page_scripts": "crwdns6418:0crwdne6418:0", + "enabled_background_scripts": "crwdns6420:0crwdne6420:0", + "script_accessing_cross_origin_resource": "crwdns6422:0crwdne6422:0", + "confirm_operation_description": "crwdns6424:0crwdne6424:0", + "domain": "crwdns6426:0crwdne6426:0", + "script_name": "crwdns6428:0crwdne6428:0", + "request_domain": "crwdns6430:0crwdne6430:0", + "request_url": "crwdns6432:0crwdne6432:0", + "access_cookie_content": "crwdns6434:0crwdne6434:0", + "confirm_script_operation": "crwdns6436:0crwdne6436:0", + "cookie_domain": "crwdns6438:0crwdne6438:0", + "script_operation_title": "crwdns6440:0crwdne6440:0", + "script_operation_description": "crwdns6442:0${dir}crwdne6442:0", + "script_permission_content": "crwdns6444:0crwdne6444:0", + "sync_system_connect_failed": "crwdns6446:0crwdne6446:0", + "sync_system_closed": "crwdns6448:0crwdne6448:0", + "sync_system_closed_description": "crwdns6450:0crwdne6450:0", + "auth_type": "crwdns6452:0crwdne6452:0", + "url": "crwdns6454:0crwdne6454:0", + "username": "crwdns6456:0crwdne6456:0", + "password": "crwdns6458:0crwdne6458:0", + "skip": "crwdns6460:0crwdne6460:0", + "next": "crwdns6462:0crwdne6462:0", + "back": "crwdns6464:0crwdne6464:0", + "last": "crwdns6466:0crwdne6466:0", + "start_guide_title": "crwdns6468:0crwdne6468:0", + "start_guide_content": "crwdns6470:0crwdne6470:0", + "guide_installed_scripts": "crwdns6472:0crwdne6472:0", + "guide_script_list_title": "crwdns6474:0crwdne6474:0", + "guide_script_list_content": "crwdns6476:0crwdne6476:0", + "guide_script_list_enable_title": "crwdns6478:0crwdne6478:0", + "guide_script_list_enable_content": "crwdns6480:0crwdne6480:0", + "guide_script_list_apply_to_run_status_title": "crwdns6482:0crwdne6482:0", + "guide_script_list_apply_to_run_status_content": "crwdns6484:0crwdne6484:0", + "guide_script_list_sort_title": "crwdns6486:0crwdne6486:0", + "guide_script_list_sort_content": "crwdns6488:0crwdne6488:0", + "guide_tools_title": "crwdns6490:0crwdne6490:0", + "guide_tools_content": "crwdns6492:0crwdne6492:0", + "guide_tools_backup_title": "crwdns6494:0crwdne6494:0", + "guide_tools_backup_content": "crwdns6496:0crwdne6496:0", + "guide_setting_title": "crwdns6498:0crwdne6498:0", + "guide_setting_content": "crwdns6500:0crwdne6500:0", + "guide_setting_sync_title": "crwdns6502:0crwdne6502:0", + "guide_setting_sync_content": "crwdns6504:0crwdne6504:0" +} diff --git a/src/locales/locales.ts b/src/locales/locales.ts index c83511d2..a394f6d0 100644 --- a/src/locales/locales.ts +++ b/src/locales/locales.ts @@ -26,8 +26,24 @@ dayjs.locale( (localStorage.language || chrome.i18n.getUILanguage()) as string ).toLocaleLowerCase() ); + dayjs.extend(relativeTime); +if (!localStorage.language) { + chrome.i18n.getAcceptLanguages((lngs) => { + // 遍历数组寻找匹配语言 + for (let i = 0; i < lngs.length; i += 1) { + const lng = lngs[i]; + if (i18n.hasResourceBundle(lng, "translation")) { + localStorage.language = lng; + i18n.changeLanguage(lng); + dayjs.locale(lng.toLocaleLowerCase()); + break; + } + } + }); +} + export function i18nName(script: { name: string; metadata: Metadata }) { return script.metadata[`name:${i18n.language.toLowerCase()}`] ? script.metadata[`name:${i18n.language.toLowerCase()}`][0] diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json new file mode 100644 index 00000000..7e5b003a --- /dev/null +++ b/src/locales/zh-TW/translation.json @@ -0,0 +1,351 @@ +{ + "import_link": "链接导入", + "import_link_failure": "链接导入失败", + "create_user_script": "新建普通脚本", + "create_background_script": "新建后台脚本", + "create_scheduled_script": "新建定时脚本", + "create_script": "新建脚本", + "user_guide": "使用指南", + "api_docs": "API文档", + "development_guide": "开发指南", + "script_gallery": "脚本站", + "community_forum": "社区论坛", + "external_links": "外部链接", + "system_follow": "跟随系统", + "no_data": "暂无数据", + "installed_scripts": "已安装脚本", + "subscribe": "订阅", + "logs": "日志", + "tools": "工具", + "settings": "设置", + "collapsible": "收起侧边栏", + "guide": "新手指引", + "helpcenter": "帮助中心", + "general": "通用", + "language": "语言", + "script_sync": "脚本同步", + "sync_delete": "同步删除", + "enable_script_sync_to": "启用脚本同步至", + "save": "保存", + "cloud_sync_account_verification": "云同步账号信息验证中...", + "cloud_sync_verification_failed": "云同步账号信息验证失败", + "save_success": "保存成功", + "update": "更新", + "check_update": "检查更新", + "script_subscription_check_interval": "脚本/订阅检查更新间隔", + "never": "从不", + "6_hours": "6小时", + "12_hours": "12小时", + "every_day": "每天", + "every_week": "每周", + "update_disabled_scripts": "更新已禁用脚本", + "silent_update_non_critical_changes": "非重要变更静默更新脚本", + "enable_eslint": "开启 ESLint", + "eslint_rules": "ESLint规则", + "enter_eslint_rules": "请输入 ESLint 规则,可以从 https://eslint.org/play/ 下载配置", + "language_change_tip": "语言切换成功", + "backup": "备份", + "local": "本地", + "export_file": "导出文件", + "import_file": "导入文件", + "cloud": "云端", + "backup_to": "备份至", + "preparing_backup": "正在准备备份到云端", + "backup_success": "备份成功", + "backup_failed": "备份失败", + "no_backup_files": "没有备份文件", + "backup_list": "备份列表", + "open_backup_dir": "打开备份目录", + "confirm_delete": "确认删除", + "confirm_delete_backup_file": "确认删除备份文件", + "confirm_update": "确认更新", + "delete_success": "删除成功", + "backup_strategy": "备份策略", + "under_construction": "建设中", + "development_debugging": "开发调试", + "vscode_url": "VSCode地址", + "auto_connect_vscode_service": "自动连接vscode服务", + "connect": "连接", + "connection_success": "连接成功", + "connection_failed": "连接失败", + "select_import_script": "请在新页面中选择要导入的脚本", + "import_error": "导入错误", + "pulling_data_from_cloud": "正在从云端拉取数据", + "pull_failed": "拉取失败", + "restore": "恢复", + "log_title": "运行日志", + "last_5_minutes": "最近5分钟", + "last_15_minutes": "最近15分钟", + "last_30_minutes": "最近30分钟", + "last_1_hour": "最近1小时", + "last_3_hours": "最近3小时", + "last_6_hours": "最近6小时", + "last_12_hours": "最近12小时", + "last_24_hours": "最近24小时", + "last_7_days": "最近7天", + "query": "查询", + "labels": "labels", + "search_regex": "搜索(支持正则)", + "clean_schedule": "定时清理", + "days_ago_logs": "天前的日志", + "delete_completed": "删除完成", + "delete_current_logs": "删除当前日志", + "clear_completed": "清空完成", + "clear_logs": "清空日志", + "total_logs": "共查询到条日志", + "filtered_logs": "筛选后条日志", + "enter_filter_conditions": "请输入筛选条件进行查询", + "permission": "权限", + "enter_subscribe_name": "请输入订阅名称", + "subscribe_url": "订阅地址", + "confirm_delete_subscription": "确定要删除此订阅吗? 相关的脚本也会被删除", + "list": { + "confirm_delete": "确定要删除吗?请注意这个操作无法恢复!", + "confirm_update": "确认要更新吗?请注意此操作不可逆!" + }, + "enable": "开启", + "script_list_enable_width": 100, + "script_list_last_updated_width": 100, + "script_list_apply_to_run_status_width": 140, + "subscribe_list_enable_width": 100, + "disable": "关闭", + "name": "名称", + "version": "版本", + "apply_to_run_status": "应用至/运行状态", + "source": "来源", + "home": "主页", + "sorting": "排序", + "last_updated": "最后更新", + "action": "操作", + "foreground_page_script_tooltip": "前台页面脚本,会在指定的页面上运行", + "background_script_tooltip": "后台脚本,会在指定的页面上运行", + "scheduled_script_tooltip": "定时脚本,下一次运行时间:", + "running": "运行中", + "completed": "运行完毕", + "subscription_link": "订阅链接", + "subscription_installation": "订阅安装", + "manually_created": "手动新建", + "script_link": "脚本链接", + "user_installation": "用户安装", + "confirm_delete_script": "确定要删除此脚本吗?", + "delete_failed": "删除失败", + "enter_script_name": "请输入脚本名", + "update_not_supported": "该脚本不支持检查更新", + "checking_for_updates": "检查更新中...", + "new_version_available": "存在新版本", + "latest_version": "已是最新版本", + "checked_for_all_selected": "所选脚本皆已检查更新", + "update_check_failed": "检查更新失败", + "stopping_script": "正在停止脚本", + "script_stopped": "脚本已停止", + "starting_script": "正在启动脚本...", + "starting_updates": "正在批量更新...", + "script_started": "脚本已启动", + "batch_operations": "批量操作", + "export": "导出", + "delete": "删除", + "unknown_operation": "未知操作", + "confirm": "确定", + "close": "关闭", + "page_script": "页面脚本", + "homepage": "脚本主页", + "script_website": "脚本站点", + "script_source": "脚本源码", + "bug_feedback_script_support": "BUG反馈/脚本支持站点", + "config": "配置", + "key": "key", + "value": "value", + "add": "新增", + "type": "类型", + "edit_value": "编辑值", + "add_value": "新增值", + "update_success": "修改成功", + "add_success": "添加成功", + "script_storage": "脚本储存", + "enter_key": "请输入key", + "key_placeholder": "key", + "value_placeholder": "当类型为object时,请输入可以JSON解析的数据", + "clear": "清空", + "clear_success": "清空成功", + "confirm_clear": "你真的要清空这个储存空间吗?", + "type_string": "string", + "type_number": "number", + "type_boolean": "boolean", + "type_object": "object", + "confirm_delete_resource": "你确定删除此资源吗?在下次开启时将会重新加载此资源", + "confirm_clear_resource": "你真的要清空这些资源吗?在下次开启时将会重新加载资源", + "script_resource": "脚本资源", + "permission_value": "授权值", + "allow": "是否允许", + "yes": "是", + "no": "否", + "confirm_delete_permission": "确认删除该授权?", + "script_setting": "脚本设置", + "basic_info": "基本信息", + "update_url": "更新URL", + "permission_management": "授权管理", + "add_permission": "添加授权", + "permission_cors": "跨域(cors)", + "permission_cookie": "管理cookie", + "match": "匹配", + "user_setting": "用户设定", + "confirm_delete_exclude": "确认删除该排除?", + "after_deleting_match_item": "脚本设定的匹配项删除后会自动添加到匹配项中", + "confirm_delete_match": "确认删除该匹配?", + "after_deleting_exclude_item": "脚本设定的匹配项删除后会自动添加到排除项中", + "add_match": "添加匹配", + "add_exclude": "添加排除", + "website_match": "网站匹配(@match)", + "reset": "重置", + "website_exclude": "网站排除(@exclude)", + "confirm_reset": "确定重置?", + "script_total_runs": "该脚本总共运行了{{runNum}}次,在iframe上运行了{{runNumByIframe}}次", + "script_total_runs_single": "该脚本运行了{{runNum}}次", + "script_disabled": "该脚本未开启", + "run_once": "运行一次", + "stop": "停止", + "edit": "编辑", + "exclude_on": "恢复在", + "exclude_off": "排除在", + "exclude_execution": "上执行", + "user_config": "用户配置", + "gm_api": "GM Api", + "storage_api": "Storage API", + "use_file_system": "使用的文件系统", + "open_directory": "打开目录", + "account_validation_failed": "账号信息验证失败", + "not_set": "未设置", + "in_use": "使用中", + "storage_error": "储存错误", + "upload_to_cloud": "上传至云", + "save_failed": "保存失败", + "exporting": "导出中...", + "upload_to": "上传至", + "value_export_expression": "值导出表达式", + "overwrite_original_value_on_import": "导入时覆盖原值", + "cookie_export_expression": "cookie导出表达式", + "overwrite_original_cookie_on_import": "导入时覆盖原值", + "restore_default_values": "恢复默认值", + "get_confirm_error": "获取确认信息失败", + "confirm_error": "确认失败", + "ignore": "忽略", + "allow_once": "允许一次", + "temporary_allow": "临时允许此{{permissionContent}}", + "temporary_allow_all": "临时允许全部{{permissionContent}}", + "permanent_allow": "永久允许此{{permissionContent}}", + "permanent_allow_all": "永久允许全部{{permissionContent}}", + "deny_once": "拒绝一次", + "temporary_deny": "临时拒绝此{{permissionContent}}", + "temporary_deny_all": "临时拒绝全部{{permissionContent}}", + "permanent_deny": "永久拒绝此{{permissionContent}}", + "permanent_deny_all": "永久拒绝全部{{permissionContent}}", + "data_import": "数据导入", + "import": "导入", + "select_scripts_to_import": "请选择你要导入的脚本", + "select_all": "全选", + "script_import_progress": "脚本导入进度", + "select_subscribes_to_import": "请选择你要导入的订阅", + "subscribe_import_progress": "订阅导入进度", + "author": "作者", + "description": "描述", + "operation": "操作", + "error": "错误", + "unknown": "未知", + "add_new": "新增", + "no_operation": "不做操作", + "enable_script": "开启脚本", + "local_creation": "本地创建", + "import_success": "导入成功", + "install_script": "安装", + "update_script": "更新", + "install_subscribe": "安装订阅", + "update_subscribe": "更新订阅", + "invalid_link": "错误的链接", + "subscribe_install_label": "该订阅将会安装下面的脚本", + "script_runs_in": "脚本将在下面的网站中运行", + "script_has_full_access_to": "脚本将获得以下地址的完整访问权限", + "script_requires": "脚本引用了下列外部资源", + "cookie_warning": "请注意,本脚本会申请 Cookie 的操作权限,这是一个危险的权限,请确认脚本的安全性。", + "scheduled_script_description_1": "这是一个定时脚本,启用后将在特定时间自动运行,并可在面板中手动控制。", + "scheduled_script_description_2": "定时任务表达式:{{expression}},最近一次运行时间:{{time}}", + "background_script_description": "这是一个后台脚本,启用后将在浏览器打开时自动运行一次,并可在面板中手动控制。", + "install_success": "安装成功", + "install": { + "update_success": "更新成功" + }, + "install_failed": "安装失败", + "subscribe_success": "订阅成功", + "subscribe_failed": "订阅失败", + "current_version": "当前版本", + "update_version": "更新版本", + "background_script_tag": "这是一个后台脚本", + "scheduled_script_tag": "这是一个定时脚本", + "background_script": "后台脚本", + "scheduled_script": "定时脚本", + "install_from_legitimate_sources_warning": "请从合法来源安装脚本!未知的脚本可能会侵犯您的隐私或者做出恶意的操作!", + "antifeature_referral_link_title": "推荐链接", + "antifeature_referral_link_description": "该脚本会修改或重定向到作者的返佣链接", + "antifeature_ads_title": "附带广告", + "antifeature_ads_description": "该脚本会在你访问的页面上插入广告", + "antifeature_payment_title": "付费脚本", + "antifeature_payment_description": "该脚本需要你付费才能够正常使用", + "antifeature_miner_title": "挖矿", + "antifeature_miner_description": "该脚本存在挖矿行为", + "antifeature_membership_title": "会员功能", + "antifeature_membership_description": "该脚本需要注册会员才能正常使用", + "antifeature_tracking_title": "信息追踪", + "antifeature_tracking_description": "该脚本会追踪你的用户信息", + "script_info_load_failed": "脚本信息加载失败!", + "script_status_tooltip": "可以控制脚本开启状态,普通油猴脚本默认开启,后台脚本、定时脚本默认关闭", + "get_script": "获取脚本", + "report_issue": "BUG/问题反馈", + "project_docs": "项目文档", + "community": "交流社区", + "popup": { + "new_version_available": "有新版本可用" + }, + "current_page_scripts": "当前页运行脚本", + "enabled_background_scripts": "开启和运行的后台脚本", + "script_accessing_cross_origin_resource": "脚本正在试图访问跨域资源", + "confirm_operation_description": "请您确认是否允许脚本进行此操作,脚本也可增加@connect标签跳过此选项", + "domain": "域名", + "script_name": "脚本名称", + "request_domain": "请求域名", + "request_url": "请求地址", + "access_cookie_content": "脚本正在试图访问网站cookie内容", + "confirm_script_operation": "请您确认是否允许脚本进行此操作,cookie是一项重要的用户数据,请务必只给信任的脚本授权.", + "cookie_domain": "Cookie域", + "script_operation_title": "脚本正在试图操作脚本同步储存空间", + "script_operation_description": "请您确认是否允许脚本进行此操作,允许后将允许脚本操作你设定的储存空间,脚本会在储存空间下创建一个app/${dir}的目录进行使用", + "script_permission_content": "脚本", + "sync_system_connect_failed": "同步系统连接失败", + "sync_system_closed": "已关闭同步", + "sync_system_closed_description": "同步功能已关闭,请重新配置", + "auth_type": "鉴权类型", + "url": "URL", + "username": "用户名", + "password": "密码", + "skip": "跳过", + "next": "下一步", + "back": "上一步", + "last": "完成", + "start_guide_title": "欢迎使用脚本猫扩展", + "start_guide_content": "接下来我们将为您介绍脚本猫的基本使用方法", + "guide_installed_scripts": "你所安装的脚本将会在这里显示", + "guide_script_list_title": "脚本市场", + "guide_script_list_content": "可以从脚本市场中安装脚本,脚本猫除了支持用户脚本以外,还支持后台脚本", + "guide_script_list_enable_title": "脚本开启", + "guide_script_list_enable_content": "脚本需要开启才能使用,页面脚本安装默认开启,后台脚本安装默认关闭", + "guide_script_list_apply_to_run_status_title": "应用至、与运行状态", + "guide_script_list_apply_to_run_status_content": "脚本运行状态展示,鼠标悬浮至标签可以查看脚本类型", + "guide_script_list_sort_title": "排序/最后更新/操作", + "guide_script_list_sort_content": "你可以拖动脚本的标签进行排序,点击最后更新列标签可以对脚本进行一次检查更新,操作列可以进入脚本编辑、控制脚本的运行停止(后台脚本)、设置UserConfig", + "guide_tools_title": "常用工具", + "guide_tools_content": "工具中提供了备份和开发的工具", + "guide_tools_backup_title": "备份", + "guide_tools_backup_content": "备份可以保存脚本,避免丢失。可以导出脚本文件到本地,也可以加载本地的脚本文件。也可以备份到云端,更加方便。", + "guide_setting_title": "设置", + "guide_setting_content": "设置中主要包含了语言、脚本同步、更新频率等常用设置项", + "guide_setting_sync_title": "更新与同步", + "guide_setting_sync_content": "脚本同步功能可以方便的将本设备的脚本内容同步至云端,如果勾选同步删除选项,则当本设备脚本删除时,也会从删除云端对应的脚本。你也可以在此更新脚本的版本获得更加强大的功能。" +} From dabe7f38aa1cf13c59c6d710524b83ae106e3f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=80=E4=B9=8B?= Date: Thu, 12 Oct 2023 23:19:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=9D=20=E5=8D=8F=E5=8A=A9=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 12 +++++++++--- crowdin.yml | 2 +- src/locales/en/translation.json | 1 + src/locales/zh-CN/translation.json | 1 + src/pages/options/routes/Setting.tsx | 11 +++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73bc676b..c318e56e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,12 @@ npm install npm start ``` +### 帮助我们翻译 + +[Crowdin](https://crowdin.com/project/scriptcat) 是一个在线的多语言翻译平台。如果你想帮助我们翻译 ScriptCat 的文档,可以在 Crowdin 上找到 ScriptCat 的项目,然后开始翻译。 + +扩展的翻译文件在`src/locales`目录下。 + ## 参与开发 ScriptCat 使用 ESLint 来规范代码风格,使用 Jest @@ -94,7 +100,6 @@ ScriptCat 的页面开发使用了以下技术: npm run dev ``` - 如果你想打包扩展,可以使用以下命令: ```bash @@ -104,5 +109,6 @@ npm run pack 在打包前,请确保在`dist`目录下生成了`scriptcat.pem`文件。 # 注意问题 -* 使用`yarn install`时可能会出现错误,最好使用`npm i` -* `npm run dev`之后需要把`dist/ext`目录里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的 + +- 使用`yarn install`时可能会出现错误,最好使用`npm i` +- `npm run dev`之后需要把`dist/ext`目录里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的 diff --git a/crowdin.yml b/crowdin.yml index 19c464c2..d63bfc5b 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,4 +1,4 @@ -project_id: '620320' +project_id: "620320" api_token_env: CROWDIN_PERSONAL_TOKEN preserve_hierarchy: true diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 9182f03b..82d29f0b 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -23,6 +23,7 @@ "helpcenter": "Help Center", "general": "General", "language": "Language", + "help_translate": "Help Translate", "script_sync": "Script Sync", "sync_delete": "Sync Delete", "enable_script_sync_to": "Enable Script Sync to", diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json index 7e5b003a..8ed7072d 100644 --- a/src/locales/zh-CN/translation.json +++ b/src/locales/zh-CN/translation.json @@ -23,6 +23,7 @@ "helpcenter": "帮助中心", "general": "通用", "language": "语言", + "help_translate": "帮助翻译", "script_sync": "脚本同步", "sync_delete": "同步删除", "enable_script_sync_to": "启用脚本同步至", diff --git a/src/pages/options/routes/Setting.tsx b/src/pages/options/routes/Setting.tsx index 95796cb1..6ead5c98 100644 --- a/src/pages/options/routes/Setting.tsx +++ b/src/pages/options/routes/Setting.tsx @@ -47,6 +47,10 @@ function Setting() { title: i18n.store.data[key].title as string, }); }); + languageList.push({ + key: "help", + title: t("help_translate"), + }); return ( { + if (value === "help") { + window.open( + "https://crowdin.com/project/scriptcat", + "_blank" + ); + return; + } setLanguage(value); i18n.changeLanguage(value); dayjs.locale(