Merge pull request #5 from htmambo/main

适配6.0.2版本汉化支持
This commit is contained in:
liuze0109
2024-02-02 18:04:50 +08:00
committed by GitHub
12 changed files with 1138 additions and 90 deletions

37
GettingStarted/index.htm Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Copyright (c) 2022 Royal Apps GmbH -->
<!-- Design and Code by www.royalapps.com -->
<title>Royal TSX 入门</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="app.css" type="text/css" media="screen" />
</head>
<body>
<div id="rmi_main_container">
<h1>Royal TSX 入门</h1>
<h2 id="rmi_header_plugins"><span><strong>第 1 步:</strong>&nbsp;&nbsp;安装插件</span></h2>
<p><span class="rm_screenshot" id="rmi_screenshot_plugins"></span>Royal TSX 是一款<strong>基于插件</strong>的应用程序。这意味着,在实际连接到任何远程计算机之前,必须安装该特定连接所需的<strong>插件</strong></p>
<p>要安装插件,请打开 &quot;Royal TSX&quot; 菜单,选择 &quot;设置&quot; 菜单项,然后导航到 &quot;插件&quot;。您也可以直接 <a href="#plugins" target="_blank">点击此处</a></p>
<p>插件屏幕允许您安装、卸载和更新连接插件。</p>
<h2 id="rmi_header_documents"><span><strong>步骤 2</strong>&nbsp;&nbsp;创建文档</span></h2>
<p><span class="rm_screenshot" id="rmi_screenshot_documents"></span>首次启动 Royal TSX 时,您会发现系统自动为您创建了一个 <strong>&quot;应用程序&quot; 文档</strong> 。该文档具有一些独特的属性:</p>
<ul>
<li>您可以用<strong>密码保护</strong>应用程序文档。这样,每次启动 Royal TSX 时都会要求您输入密码。</li>
<li>您可以创建文件夹、凭证、任务、连接模板和编辑<strong>默认设置</strong></li>
<li>但不能关闭或删除。</li>
<li>不能创建连接。</li>
</ul>
<p>要真正<strong>创建连接</strong>,必须创建一个<strong>新文档</strong>。为此,请导航至&quot;文件&quot;菜单并选择&quot;新建文档&quot;菜单项。您会发现主窗口左侧的导航面板中添加了新项目。</p>
<p>文档可以包含 Royal TSX 支持的任何对象类型。您可以拥有任意数量的文档,但只能有一个应用程序文档。</p>
<h2 id="rmi_header_connections"><span><strong>步骤 3</strong>&nbsp;&nbsp;添加第一个连接</span></h2>
<p><span class="rm_screenshot" id="rmi_screenshot_connections"></span>现在,您已经安装了一个或多个插件,并设置了一个新文档,可以开始<strong>创建连接</strong>和使用 Royal TSX 了。要创建新连接,请选择自动创建的&quot;连接&quot;文件夹,然后点击主窗口导航面板左下角的小&quot;加号按钮&quot;,选择要创建连接的连接类型。</p>
<p>单击要添加的连接类型的菜单项后,您将进入<strong>&quot;连接属性对话框&quot;</strong>。在这里您可以编辑特定连接的所有可用属性。该对话框还提供了一些所有连接通用的属性,如&quot;备注&quot;&quot;自定义属性&quot;</p>
<p>创建第一个连接对象后,只需在导航面板上双击新添加的项目,即可连接到该对象。</p>
<p><i>小提示 请记住,只有安装了与连接类型相匹配的插件,才能创建或编辑连接对象。</i></p>
<p>&nbsp;</p>
<p>现在,你已经了解了使用 Royal TSX 的基础知识,开始在 macOS 上享受前所未有的远程连接吧!</p>
<p>感谢您使用 Royal TSX</p>
</div>
</body>
</html>

View File

@@ -3,8 +3,8 @@
// Toolbar Items
"Tabs" = "选项卡";
"Tab Navigation" = "选项卡导航";
"Ad Hoc" = "Ad Hoc";
"Ad Hoc Connection" = "Ad Hoc连接";
"Ad Hoc" = "临时连接";
"Ad Hoc Connection" = "临时连接";
"Search" = "搜索";
"Filter by Name" = "名称筛选";
@@ -92,7 +92,7 @@
"Add Object" = "添加对象";
"Duplicate" = "复制";
"Connect" = "连接";
"Connect Ad Hoc" = "连接Ad Hoc";
"Connect Ad Hoc" = "临时连接";
"Disconnect" = "断开连接";
"Reconnect" = "重新连接";
"Connect all in Folder" = "打开文件夹内的所有连接";
@@ -191,6 +191,16 @@
"Custom Field {0}:" = "自定义项 {0}:";
"Custom Field {0}" = "自定义项 {0}";
"Custom Field Names" = "自定义项名称";
"Custom Field 11 (Protected)" = "自定义项 11 (受保护)";
"Custom Field 12 (Protected)" = "自定义项 12 (受保护)";
"Custom Field 13 (Protected)" = "自定义项 13 (受保护)";
"Custom Field 14 (Protected)" = "自定义项 14 (受保护)";
"Custom Field 15 (Protected)" = "自定义项 15 (受保护)";
"Custom Field 16 (Protected)" = "自定义项 16 (受保护)";
"Custom Field 17 (Protected)" = "自定义项 17 (受保护)";
"Custom Field 18 (Protected)" = "自定义项 18 (受保护)";
"Custom Field 19 (Protected)" = "自定义项 19 (受保护)";
"Custom Field 20 (Protected)" = "自定义项 20 (受保护)";
// Property Page - Options General
"Application Start" = "程序启动";
@@ -210,7 +220,7 @@
"Information" = "信息";
"Warning" = "警告";
"Error" = "错误";
"Question" = "问题";
"Question" = "请确认";
"OK" = "OK";
"Save" = "保存";
"Don't save" = "不保存";
@@ -248,7 +258,7 @@
"New Credential" = "新凭证";
"You cannot add connections to the 'Application' document. Connections are stored in separate documents. You need to either open an existing document or create a new one and add the connection there." = "您无法将连接添加到“应用程序”文档。连接是存储在单独的文档中的。您需要打开一个现有文档或创建一个新文档并在其中添加连接.";
"You cannot add dynamic folders to the 'Application' document. Dynamic folders must be stored in separate documents. You need to either open an existing document or create a new one and add the dynamic folder there." = "您不能将动态文件夹添加到“应用程序”文档中。动态文件夹必须存储在单独的文档中。您需要打开一个现有文档或创建一个新文档并在其中添加动态文件夹.";
"Ad Hoc: {0}" = "Ad Hoc: {0}";
"Ad Hoc: {0}" = "临时连接: {0}";
"You are about to move an object from one document to another document.\nTo prevent duplicate object IDs, Royal TSX will automatically save both documents after the move.\nDo you want to continue?" = "您将要将一个对象从一个文档移动到另一文档.\n防止重复的对象IDRoyal TSX将在移动后自动保存两个文档\n请问要继续吗?";
"Version {0}" = "版本号 {0}";
"Version %@" = "版本号 %@";
@@ -350,6 +360,7 @@
"Expires in {0}" = "将在 {0} 内过期";
"Expires in %@" = "将在 %@ 内过期";
"days" = "天";
"Days" = "天";
"Unknown Credential" = "未知的凭据";
"License information verified.\nThank you for supporting Royal TSX!" = "许可证信息已验证通过.\n感谢您对 Royal TSX 的支持!";
"License information for '{0}' verified.\nThank you for supporting Royal TSX!" = "授权信息 '{0}' 已验证.\n感谢您对 Royal TSX 的支持!";
@@ -437,7 +448,9 @@
"Task:" = "任务:";
"Wait for completion" = "等待完成";
"&Wait for connect task completion" = "&等待连接任务完成";
"Wait for connect task completion" = "等待连接任务完成";
"&Wait for disconnect task completion" = "&等待断开任务完成";
"Wait for disconnect task completion" = "等待断开任务完成";
"No Task Selected" = "没有选择任务";
"Unknown Task" = "未知的任务";
"Disconnect Task" = "断开连接任务";
@@ -554,8 +567,8 @@
"Recovered" = "已恢复";
"Select Computer" = "选择计算机";
"Search Computers" = "搜索计算机";
"New Ad Hoc Connection" = "新建Ad Hoc连接";
"Please select a Connection Type for the new Ad Hoc Connection below." = "请为Ad Hoc连接设置一个类型.";
"New Ad Hoc Connection" = "新建临时连接";
"Please select a Connection Type for the new Ad Hoc Connection below." = "请为临时连接设置一个类型.";
"Default Sort Settings" = "默认排序设置";
"Specify up to 3 sort criteria to sort your objects. Each sort criteria allows you to specify the object property to sort and whether to sort ascending or descending." = "最多指定3个排序标准来对对象进行排序。每个排序标准都允许您指定要排序的对象属性以及是升序还是降序.";
"Sort Criteria" = "排序标准";
@@ -666,7 +679,9 @@
"Configure the default behavior when you double-click on an object in the tree or change the selection. You can assign different actions for inactive and active connections, credentials and task objects." = "双击树中的对象或更改选择时,配置默认行为。您可以为非活动和活动连接,凭据和任务对象分配不同的操作。";
"Tasks and Credentials" = "任务和凭证";
"Active" = "活动的";
"Active Connections" = "活跃链接";
"Inactive" = "不活跃的";
"Inactive Connections" = "不活跃的链接";
"Track selection in tab bar" = "选项卡栏中的轨迹选择";
"Track selection in Navigation Panel" = "导航面板中的轨迹选择";
"Do nothing" = "什么也不用做";
@@ -719,7 +734,7 @@
"Key sequence tasks can only be executed in the context of an active connection. Please select an active connection before executing a key sequence task." = "键序列任务只能在活动连接的上下文中执行。请在执行按键序列任务之前选择一个活动连接。";
"Auto Fill can be used internally, with the Web Page connection or in an external browser window with the Royal Passwords Browser Extensions." = "自动填充功能可以在内部使用通过网页连接使用也可以在带有Royal密码浏览器扩展程序的外部浏览器窗口中使用.";
"If you have configured Auto Fill mappings in your credential and the connection, the connection configuration will be used." = "如果您在凭据和连接中配置了自动填充映射,则将使用连接配置.";
"Ad Hoc Key Sequence" = "Ad Hoc按键序列";
"Ad Hoc Key Sequence" = "临时按键序列";
"The entered trial license key has expired. Feel free to use Royal TSX in shareware mode for as long as you want for further evaluation.\n\nIn case you have any questions or issues, contact us.\n\nTo remove the shareware limitations please obtain or enter a valid license key for Royal TSX." = "输入的试用许可证密钥已过期。您可以随时在共享软件模式下使用Royal TSX进行进一步评估。\n\n如果您有任何疑问或问题请与我们联系。\n\n要解除共享软件限制请获取或输入有效的Royal TSX许可证密钥.";
"Beta" = "测试版";
"Stable" = "稳定版";
@@ -730,7 +745,7 @@
"An error occurred during the import." = "导入时发生错误.";
"Tab" = "选项卡";
"Duplicate Tab" = "复制选项卡";
"Duplicate (Ad Hoc)" = "复制 (Ad Hoc连接)";
"Duplicate (Ad Hoc)" = "复制 (临时连接)";
"Disconnect Tab" = "断开选项卡连接";
"Reconnect Tab" = "重新选项卡连接";
"Split Tab" = "分割选项卡";
@@ -814,7 +829,7 @@
"Connection Template" = "连接模板";
"Add from Template" = "从模板添加";
"Add new Template" = "添加新模板";
"Web Page (Ad Hoc)" = "网页 (Ad Hoc)";
"Web Page (Ad Hoc)" = "网页 (临时)";
"An error occurred while installing a plugin. Installation was cancelled. Details: {0}" = "安装插件时发生错误。安装已取消。细节如下: {0}";
"No Connection Tab selected" = "未选择连接选项卡";
"Number of Entries" = "计数项";
@@ -890,7 +905,7 @@
"Dashboard Settings" = "面板设置";
"Copy Username" = "复制用户名";
"Copy Password" = "复制密码";
"Ad Hoc Connections Identifier" = "Ad Hoc 连接凭据";
"Ad Hoc Connections Identifier" = "临时连接凭据";
"The selected document '{0}' cannot be opened because it is already open." = "无法打开所选文档 '{0}' 因为它已经打开了.";
"Apply to all conflicts" = "应用于所有冲突";
"Royal TSX detected a duplicate key in one of the already opened documents and in the document you want to load." = "Royal TSX在已打开的文档之一和要加载的文档中检测到重复密钥.";
@@ -992,12 +1007,12 @@
"Copy Username" = "复制用户名";
"Copy Password" = "复制密码";
"Clipboard" = "剪切板";
"Ad Hoc using Default Settings" = "Ad Hoc 使用默认设置";
"Ad Hoc using Templates" = "Ad Hoc 使用模板设置";
"Ad Hoc using Default Settings" = "临时连接使用默认设置";
"Ad Hoc using Templates" = "临时连接使用模板设置";
"You've selected the default settings object for an object type. When you create a new object of this type, the values from this object are used as a starting point." = "您已经为对象类型选择了默认设置对象。创建此类型的新对象时,该对象的值将用作起点.";
"Edit Default Settings" = "编辑默认设置";
"Edit Overrides" = "编辑覆盖";
"Ad Hoc Connect" = "Ad Hoc 连接";
"Ad Hoc Connect" = "临时连接";
"You've selected a template object for a connection type. When you create a new connection, the values from this object are used as a starting point." = "您已经为连接类型选择了模板对象。创建新连接时,该对象的值用作起点.";
"Edit Template" = "编辑模板";
"Default Setting" = "默认设置";
@@ -1035,6 +1050,7 @@
"Switch to Overview" = "切换到概述";
"Switch to Dashboard" = "切换到控制台";
"Please specify the properties to overwrite by using the 'Override' button on the top right." = "请使用右上角的“覆盖”按钮指定要覆盖的属性.";
"Please specify the properties to overwrite by using the 'Bulk Edit' button on the top right." = "请使用右上角的“批量编辑”按钮指定要覆盖的属性。";
"Remote Assistance" = "远程协助";
"Yes, reconnect" = "是的, 重新连接";
"{0} session(s) were disconnected when your computer went to sleep. Do you want to reconnect those sessions?" = "您的计算机进入睡眠状态后,会话 {0} 已断开连接。您是否要重新连接这些会话?";
@@ -1093,6 +1109,7 @@
"You can also use the parent folder's credential." = "您还可以使用父文件夹的凭据.";
"The current document type is set to 'Shared (Merge File)'. Creating a credential {0}in a shared document allows users who have access to this document also access {0}this credential. Please make sure personal credentials are stored in personal documents." = "当前文档类型设置为“共享(合并文件)”。在共享文档中创建凭证{0}可以使有权访问此文档的用户也访问{0}凭证。请确保个人凭据存储在个人文档中";
"The entered license key was issued for Royal TS (for Windows). A separate license or bundle license is required for Royal TSX (for macOS).{0}Visit our website for license and pricing information. Do you want to visit our website now?" = "输入的许可证密钥已颁发给Royal TS适用于Windows。 Royal TSX用于macOS需要单独的许可证或捆绑软件许可证。{0}访问我们的网站以获取许可证和价格信息。您现在要访问我们的网站吗?";
"The entered license key was issued for Royal Server. A separate license or bundle license is required for Royal TSX (for macOS).{0}Visit our website for license and pricing information. Do you want to visit our website now?" = "输入的许可证密钥是为 Royal Server 颁发的。Royal TSX适用于 macOS需要单独的许可证或捆绑许可证。{0}请访问我们的网站,了解许可证和定价信息。您现在要访问我们的网站吗?";
"Yes, visit website" = "是的,访问网站";
"Please use File - Save Document As..." = "请使用 文件--另存为...";
"You may also continue using Royal TSX in Shareware Mode." = "您也可以在共享软件模式下继续使用Royal TSX.";
@@ -1310,12 +1327,12 @@
"No results" = "没有结果";
"Experimental" = "实验性";
"Key Sequence from Parent" = "父级按键序列";
"Clear Ad Hoc Connection History" = "清空Ad Hoc 连接历史";
"Are you sure you want to clear your Ad Hoc connection history?" = "您确定要清空Ad Hoc 连接历史吗?";
"Clear Ad Hoc Connection History" = "清空临时连接历史";
"Are you sure you want to clear your Ad Hoc connection history?" = "您确定要清空临时连接历史吗?";
"Task Name" = "任务名称";
"Plugin Actions" = "插件操作";
"Last Updated {0}" = "最后更新时间 {0}";
"Hide from 'Add' and 'Ad Hoc' menu" = "从 '添加' 和 'Ad Hoc' 中隐藏";
"Hide from 'Add' and 'Ad Hoc' menu" = "从 '添加' 和 '临时连接' 中隐藏";
"Find in Documents" = "从文档中查找";
"Header" = "头部";
"Text Title" = "文字标题";
@@ -1718,6 +1735,8 @@
"Remember encryption passwords across documents" = "记住跨文档的加密密码";
"When this option is enabled, you will only be prompted once for an encryption password if a document with the same password has already been opened. This also applies to encryption passwords that are stored in your Keychain, even those protected with Touch ID. Encryption passwords are only cached in memory and are cleared when quitting Royal TSX. By disabling this setting you will be prompted for the encryption password every time you open a document, even if a document with the same password has already been opened." = "启用此选项后如果已经打开了具有相同密码的文档则只会提示您一次输入加密密码。这也适用于存储在钥匙串中的加密密码甚至包括受Touch ID保护的密码。加密密码仅缓存在内存中退出Royal TSX时将清除。通过禁用此设置即使您已经打开了具有相同密码的文档每次打开文档时也会提示您输入加密密码.";
"Monitor connection state (port check)" = "监视连接状态(端口检查)";
"Monitor state of disconnected connections (port check)" = "监控断开连接的状态(端口检查)";
"Monitor state of connections in navigation panel (port check)" = "监控导航面板中的连接状态(端口检查)";
"Prefer Keyboard-Interactive Authentication" = "首选键盘交互式身份验证";
"If checked, keyboard-interactive authentication is preferred over password authentication." = "如果选中,则键盘交互式身份验证优先于密码身份验证.";
"Deprecated" = "不推荐使用";
@@ -1870,4 +1889,64 @@
"Auto Refresh" = "自动刷新";
"Protocol" = "协议";
"Styles" = "风格";
"An error occurred while creating plugins directory at '{0}'.\n\nDetails: {1}" = "在'{0}'创建插件目录时出错。\n\n详细信息: {1}";
"An error occurred while creating plugins directory at '{0}'.\n\nDetails: {1}" = "在'{0}'创建插件目录时出错。\n\n详细信息: {1}";
"with Royal Server" = "使用 Royal Server";
"incl. Royal Server" = "包括 Royal Server";
"Clipboard replacement token found. Do you want to continue and allow access to the clipboard?" = "找到剪贴板替换标记。您想继续并允许访问剪贴板吗?";
"Yes, allow" = "是,允许";
"No, don't allow" = "否,不允许";
"On this page you can tweak advanced security settings like which authentication types are preferred and configuring allowed encryption algorithms." = "在此页面,您可以调整高级安全设置,如首选哪种身份验证类型和配置允许的加密算法。";
"Algorithms" = "算法";
"Save as XML" = "保存为 XML";
"An error occurred while parsing a dynamic folder export file." = "解析动态文件夹导出文件时发生错误。";
"Bulk Edit" = "批量编辑";
"This document contains {0} Royal Server object(s) with a total of {1} open document(s). If you continue, all documents referenced by these Royal Server objects will be closed as well. Do you want to continue?" = "本文档包含 {0} 个Royal Server对象共有 {1} 个打开文档。如果继续,这些 Royal Server 对象引用的所有文档也将关闭。您想继续吗?";
"Close all Disconnected" = "关闭所有已断开的连接";
"Reconnect all Disconnected" = "重新连接所有断开的连接";
"{0}/{1} Objects Analyzed" = "{0}/{1} 对象已分析";
"Reveal in Navigation Panel" = "在导航面板中显示";
"Show Reusing Objects" = "显示重复使用对象";
"Filtered by reusing objects" = "通过重复使用对象进行过滤";
"Property Name" = "属性名称";
"Quality" = "Quality";
"Reuse" = "重复使用";
"Pwned" = "Pwned";
"Hash" = "Hash";
"Clear Filter" = "清除过滤器";
"Password Analyzer" = "密码分析器";
"Show Password Analyzer" = "显示密码分析器";
"Collecting Data" = "收集数据";
"Analyze Passwords and Passphrases" = "分析密码和口令";
"Select the document(s) and options below" = "选择以下文件和选项";
"Note that including the \"Pwned\" option may take more time depending on the number of passwords. Visit [[[haveibeenpwned.com]]] for more information." = "请注意根据密码数量的不同包含“Pwned”选项可能需要更多时间。请访问[[[haveibeenpwned.com]]]获取更多信息。";
"Options" = "选项";
"All Documents" = "所有文档";
"Gateway Password" = "网关密码";
"Proxy Password" = "代理密码";
"Team Viewer Password" = "Team Viewer 密码";
"It looks like there's an OpenSSH certificate stored next to the private key you selected." = "你选择的私钥旁边似乎存储了 OpenSSH 证书。";
"Please note that only the private key file will be embedded in the document! If you additionally need a certificate for authentication, you must specify the path to the certificate in the \"SSH - Security\" settings of your Terminal connection's properties." = "请注意文件中只会嵌入私钥文件如果还需要证书进行身份验证则必须在终端连接属性的“SSH - Security”设置中指定证书的路径。";
"The path of the certificate we detected is \"{0}\"." = "我们检测到的证书路径是“{0}”。";
"An error occurred while parsing the port." = "解析端口时发生错误。";
"Configure" = "配置";
"Chameleon" = "Chameleon";
"Execute Primary Action" = "执行主要操作";
"Execute Secondary Action" = "执行辅助操作";
"Chameleon Toolbar Item Configuration" = "Chameleon 工具栏项目配置";
"You can use the Chameleon toolbar item to configure actions that are executed when you click it. The primary action is executed when you click the button without holding a modifier key. The secondary action is executed when the ⌥ (option/alt) key is held down while clicking the button." = "你可以使用 Chameleon 工具栏项目来配置当你单击它时执行的操作。当你单击按钮而不按下修改键时,将执行主要操作。当按住 ⌥option/alt键单击按钮时将执行辅助操作。";
"Primary Action" = "主要操作";
"Secondary Action (when ⌥ key is held down)" = "辅助操作(按住 ⌥ 键时)";
"Action to Execute" = "执行操作";
"Target Object(s)" = "目标对象";
"Open selected Connection(s)" = "打开所选连接";
"Execute a Command Task" = "执行命令任务";
"Execute a Key Sequence Task" = "执行关键序列任务";
"Please select a {0}." = "请选择 {0}。";
"Only a single {0} is supported." = "只支持单个{0}。";
"The same {0} has already been added." = "已经添加了相同的 {0}。";
"An error occurred while adding a target object." = "添加目标对象时发生错误。";
"Chameleon Toolbar Item has not been configured yet." = "Chameleon 工具栏尚未配置。";
"An error occurred while reading Chameleon configuration." = "读取 Chameleon 配置时发生错误。";
"An error occurred while writing Chameleon configuration." = "写入 Chameleon 配置时发生错误。";
"An error occurred while executing a Chameleon action." = "执行 Chameleon 操作时发生错误。";
"Open Configuration" = "打开配置";

View File

@@ -0,0 +1,110 @@
<!DOCTYPE html>
<html>
<head>
<!-- Copyright (c) 2023 Royal Apps GmbH -->
<!-- Design and Code by royalapps.com -->
<title>Royal TSX Plugins</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/mac.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/tinysort.min.js"></script>
<script type="text/javascript" src="js/jquery.tinysort.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/language_en.js"></script>
<script type="text/javascript" src="js/language_de.js"></script>
<script type="text/javascript" src="js/language_cn.js"></script>
<script type="text/javascript" src="js/language.js"></script>
<script type="text/javascript" src="js/royalAppProxy.js"></script>
<script type="text/javascript" src="js/pluginService.js"></script>
<script type="text/javascript" src="js/pluginGallery.js"></script>
</head>
<body>
<div id="id_output">
</div>
<div class="ts_toolbar">
<div class="ts_toolbar_button_installed ts_toolbar_button_active">
<div class="ts_toolbar_button_icon"></div>
<div class="ts_toolbar_button_label ts_localize">Installed Plugins</div>
</div>
<div class="ts_toolbar_button_available ts_toolbar_button">
<div class="ts_toolbar_button_icon"></div>
<div class="ts_toolbar_button_label ts_localize">Available Plugins</div>
</div>
<div class="ts_toolbar_icon"></div>
</div>
<div class="ts_content" style="-webkit-overflow-scrolling: touch;">
<div class="ts_content_wrapper">
<div class="ts_content_spacer"></div>
<div class="ts_updates_bar">
<div class="ts_updates_bar_counter ts_localize">No Updates available</div>
<div class="ts_updates_bar_updateall_button ts_button">
<div class="ts_button_content ts_button_content_accent ts_localize">Update all</div>
</div>
</div>
<div class="ts_plugins">
</div>
</div>
</div>
<div class="ts_templates">
<div class="ts_no_plugins_installed"><p class="ts_localize">You currently have no plugins installed.</p><p class="ts_localize">Switch to the 'Available Plugins' tab to start installing.</p></div>
<div class="ts_no_plugins_available"><p class="ts_localize">There are currently no plugins available.</p><p class="ts_localize">You might have to update the main application.</p></div>
<div class="ts_plugins_footer_container">
<a class="ts_button ts_plugins_more_info_button" href="#" target="_blank">
<div class="ts_button_content ts_localize">More Information</div>
</a>
<div class="ts_button ts_plugins_install_all_button">
<div class="ts_button_content ts_localize">Install All</div>
</div>
<div class="clearBoth"></div>
</div>
<div class="ts_plugin_template">
<div class="hidden ts_plugin_id">ID</div>
<div class="ts_plugin_top"></div>
<div class="ts_plugin_content">
<div class="ts_plugin_content_left ts_plugin_content_info_icon"></div>
<div class="ts_plugin_content_center">
<h1 class="ts_plugin_content_info_name">Name</h1>
<p><span class="ts_localize">by</span>&nbsp;<span class="ts_plugin_content_info_publisher">Publisher</span></p>
</div>
<div class="ts_plugin_content_right">
<p><span><span class="ts_localize">Version</span>&nbsp;<span class="ts_plugin_content_info_version">0.0.0.0</span></span><br /><span><span class="ts_localize">Update</span>&nbsp;<span class="ts_plugin_content_info_updateversion">0.0.0.0</span></span></p>
<div class="ts_button ts_plugin_update_button">
<div class="ts_button_content ts_button_content_accent ts_localize">Install</div>
</div>
</div>
<div class="clearBoth"></div>
</div>
<div class="ts_plugin_content_extended">
<div class="ts_plugin_content_extended_content">
<p class="ts_plugin_content_info_description">Description</p>
<div class="ts_plugin_content_extended_content_bottom">
<div class="ts_plugin_content_extended_content_bottom_left">
<p><a class="ts_localize ts_plugin_content_info_website" href="#" target="_blank">Visit Website</a></p>
<p><a class="ts_localize ts_plugin_content_info_supportwebsite" href="#" target="_blank">Get Support</a></p>
</div>
<div class="ts_plugin_content_extended_content_bottom_right">
<p><span class="ts_localize">License</span>:&nbsp;<a class="ts_plugin_content_info_license" href="#" target="_blank">License Type</a></p>
<p><a class="ts_localize ts_plugin_content_info_releasenotes" href="#" target="_blank">Release Notes</a></p>
</div>
<div class="clearBoth"></div>
</div>
<div class="ts_plugin_content_extended_content_bottom">
<div class="ts_plugin_content_extended_content_bottom_left">
<div class="ts_button ts_plugin_uninstall_button">
<div class="ts_button_content ts_localize">Uninstall</div>
</div>
</div>
<div class="clearBoth"></div>
</div>
</div>
</div>
<div class="ts_plugin_bottom_left"></div>
<div class="ts_plugin_bottom_right"></div>
<div class="clearBoth"></div>
<div class="ts_plugin_bottom_button"><span class="ts_localize">More</span> ...</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,35 @@
/*
CHINESE LANGUAGE FILE BY LIUZE
*/
var language_file_cn = {
"Loading" : "加载中",
"Installed Plugins" : "已安装插件",
"Available Plugins" : "可用插件",
"No Updates available" : "没有可以更新的插件",
"{0} Update(s) available" : "{0} 个插件可更新",
"Update all" : "升级全部",
"Less" : "较少",
"More" : "更多",
"Install" : "安装",
"Install All" : "安装全部",
"Uninstall" : "卸载",
"License" : "授权",
"by" : "by",
"Update" : "升级",
"ToUpdate" : "升级",
"Version" : "版本",
"An error occurred" : "发生错误",
"You currently have no plugins installed." : "您当前没有安装插件.",
"Switch to the 'Available Plugins' tab to start installing." : "切换到“可用插件”标签以开始安装.",
"There are currently no plugins available." : "当前没有可用的插件.",
"You might have to update the main application." : "您可能必须更新主应用程序.",
"Warning" : "警告",
"An error occurred" : "发生错误",
"OK" : "OK",
"Client Side Error" : "客户端错误",
"Visit Website" : "访问网站",
"Get Support" : "获取支持",
"Release Notes" : "更新日志",
"More Information" : "更多信息"
};

View File

@@ -0,0 +1,717 @@
$(document).ready(function() {
pluginGallery.init();
});
var pluginGallery = {
OPERATION_GETINSTALLEDPLUGINS: "getInstalledPlugins",
OPERATION_GETAVAILABLEPLUGINS: "getAvailablePlugins",
OPERATION_GETUPDATEABLEPLUGINS: "getUpdateablePlugins",
ANIMATION_SPEED: "fast",
UPDATES_BAR_HEIGHT_HIDDEN: 0,
UPDATES_BAR_HEIGHT_VISIBLE: 42,
appVersion: "",
language: "",
accentColor: "0e7afe",
installedPlugins: null,
availablePlugins: null,
updateablePlugins: null,
currentOperation: "",
init: function () {
// Read QueryString Arguments
pluginGallery.language = "en";
var langQ = utils.getParameter("language");
if (langQ) {
pluginGallery.language = langQ;
}
pluginGallery.language = "cn";
pluginGallery.appVersion = "0.0.0.0";
var appVersionQ = utils.getParameter("appVersion");
if (appVersionQ) {
pluginGallery.appVersion = appVersionQ;
}
var accentColorQ = utils.getParameter("accentColor");
if (accentColorQ) {
pluginGallery.accentColor = accentColorQ;
}
pluginGallery.loadCss();
language.init(pluginGallery.language);
pluginGallery.loadLanguage();
pluginGallery.bindEventHandlers();
if (!royalAppProxy.isAvailable()) {
pluginGallery.getPluginServiceUrl();
pluginGallery.configureAdditionalElements();
pluginService.appVersion = pluginGallery.appVersion;
pluginService.baseUrl = config.pluginServiceBaseUrl;
pluginService.timeOutAfterMs = config.timeOutAfterMs;
pluginGallery.switchToAvailable();
}
},
initRoyalAppProxy: function(pluginServiceBaseUrl, featuresAllPluginsUrl, installedPluginInfosJsonBase64) {
royalAppProxy.pluginServiceBaseUrl = pluginServiceBaseUrl;
royalAppProxy.featuresAllPluginsUrl = featuresAllPluginsUrl;
royalAppProxy.installedPluginInfosJson = installedPluginInfosJsonBase64;
pluginGallery.getPluginServiceUrl();
pluginGallery.configureAdditionalElements();
pluginService.appVersion = pluginGallery.appVersion;
pluginService.baseUrl = config.pluginServiceBaseUrl;
pluginService.timeOutAfterMs = config.timeOutAfterMs;
pluginGallery.switchToInstalled(true);
},
loadLanguage: function () {
$(".ts_localize").each(function() {
$(this).html(language.get($(this).html()));
});
},
loadCss: function () {
var backgroundStyle = "";
if (!royalAppProxy.isAvailable()) {
backgroundStyle = "@media (prefers-color-scheme: dark) { body { background-color: #2e3131; } }";
}
var installedToolbarButtonStyle = ".ts_toolbar_button_installed.ts_toolbar_button_active .ts_toolbar_button_icon { background-image: url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25.99 20.99\"%3E%3Cdefs%3E%3Cstyle%3E.fill%7Bfill:%230e7afe;fill-rule:evenodd;%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3Cg%3E%3Cpath class=\"fill\" d=\"M0,10.49,5.2,5.24l5.2,5.25L20.79,0,26,5.25,10.4,21Z\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E'); }";
var availableToolbarButtonStyle = ".ts_toolbar_button_available.ts_toolbar_button_active .ts_toolbar_button_icon { background-image: url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 20\"%3E%3Cdefs%3E%3Cstyle%3E.fill%7Bfill:%230e7afe;fill-rule:evenodd;%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3Cg%3E%3Cpath class=\"fill\" d=\"M24.64,19.14a2,2,0,0,1-2.8.51L13.55,14a2,2,0,0,1-.87-1.72,7.19,7.19,0,0,1-4,2.18,7.31,7.31,0,0,1-5.49-1.17A7.24,7.24,0,0,1,1.3,3.13,7.38,7.38,0,0,1,11.5,1.29a7.26,7.26,0,0,1,2.42,9.18,2,2,0,0,1,1.93.2l8.28,5.69A2,2,0,0,1,24.64,19.14ZM12.36,6.36A5.07,5.07,0,0,0,10.24,3.1,5.15,5.15,0,0,0,3.13,4.38a5,5,0,0,0,1.29,7.06,5.15,5.15,0,0,0,7.12-1.28A5.06,5.06,0,0,0,12.36,6.36Z\"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E'); }";
var progressToolbarButtonStyle = ".ts_toolbar_progress { background-image: url('data:image/svg+xml,%3Csvg width=\"32px\" height=\"32px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" class=\"lds-dual-ring\" style=\"background: none;\"%3E%3Ccircle cx=\"50\" cy=\"50\" ng-attr-r=\"%7B%7Bconfig.radius%7D%7D\" ng-attr-stroke-width=\"%7B%7Bconfig.width%7D%7D\" ng-attr-stroke=\"%7B%7Bconfig.stroke%7D%7D\" ng-attr-stroke-dasharray=\"%7B%7Bconfig.dasharray%7D%7D\" fill=\"none\" stroke-linecap=\"round\" r=\"41\" stroke-width=\"14\" stroke=\"%230e7afe\" stroke-dasharray=\"64.40264939859075 64.40264939859075\" transform=\"rotate(330 50 50)\"%3E%3CanimateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"linear\" values=\"0 50 50;360 50 50\" keyTimes=\"0;1\" dur=\"1.4s\" begin=\"0s\" repeatCount=\"indefinite\"%3E%3C/animateTransform%3E%3C/circle%3E%3C/svg%3E'); }";
installedToolbarButtonStyle = installedToolbarButtonStyle.replace("0e7afe", pluginGallery.accentColor);
availableToolbarButtonStyle = availableToolbarButtonStyle.replace("0e7afe", pluginGallery.accentColor);
progressToolbarButtonStyle = progressToolbarButtonStyle.replace("0e7afe", pluginGallery.accentColor);
var buttonStyle = ".ts_button .ts_button_content.ts_button_content_accent { background-color: #" + pluginGallery.accentColor + "; }";
var linkStyle = "a { color: #" + pluginGallery.accentColor + " }";
var allStyles = backgroundStyle + "\n" + installedToolbarButtonStyle + "\n" + availableToolbarButtonStyle + "\n" + progressToolbarButtonStyle + "\n" + buttonStyle + "\n" + linkStyle;
pluginGallery.injectStyles(allStyles);
},
injectStyles: function(rule) {
var div = $("<div />", {
html: '<style>' + rule + '</style>'
});
div.appendTo("body");
},
getPluginServiceUrl: function() {
if (royalAppProxy.isAvailable()) {
config.pluginServiceBaseUrl = royalAppProxy.getPluginServiceBaseUrl();
}
},
configureAdditionalElements: function() {
if (royalAppProxy.isAvailable()) {
config.featuresAllPluginsUrl = royalAppProxy.getFeaturesAllPluginsUrl();
}
$(".ts_plugins_more_info_button").attr("href", config.featuresAllPluginsUrl);
},
getInstalledPlugins: function(isStartup) {
pluginGallery.currentOperation = pluginGallery.OPERATION_GETINSTALLEDPLUGINS;
if (royalAppProxy.isAvailable()) {
pluginGallery.setInstalledPlugins(royalAppProxy.getInstalledPluginInfos(), isStartup);
} else { // TODO: Just for debugging without App
// No Plugins
pluginGallery.setInstalledPlugins(null, isStartup);
}
},
getAvailablePlugins: function() {
pluginGallery.currentOperation = pluginGallery.OPERATION_GETAVAILABLEPLUGINS;
pluginGallery.showProgress();
var args = { };
pluginService.call("PublicService_GetLatestCompatiblePluginInfos", args, function (response) {
if (response.State == pluginService.ResponseState_Success) {
pluginGallery.hideToolbarIcon();
if (response.ResponseData != null) {
pluginGallery.setAvailablePlugins(response.ResponseData);
}
} else {
var details = language.get(response.ErrorMessage);
if (response.ErrorDetails != null) {
details += " (" + response.ErrorDetails + ")";
}
//royalAppProxy.showMessageBox(language.get("Warning"), language.get("An error occurred") + ": " + details, language.get("OK"));
pluginGallery.showWarning(language.get("An error occurred") + ": " + details);
pluginGallery.setAvailablePlugins(null);
}
});
},
getUpdateablePlugins: function () {
pluginGallery.currentOperation = pluginGallery.OPERATION_GETUPDATEABLEPLUGINS;
pluginGallery.showProgress();
var plugins = new Array();
$.each(pluginGallery.installedPlugins, function(index, plugin) {
var newPlugin = jQuery.extend(true, {}, plugin);
newPlugin.ExtendedPluginInfo = null;
plugins.push(newPlugin);
});
var args = {
CurrentPluginInfos: plugins
};
pluginService.call("PublicService_GetUpdatablePluginInfos", args, function (response) {
if (response.State == pluginService.ResponseState_Success) {
pluginGallery.hideToolbarIcon();
if (response.ResponseData != null) {
pluginGallery.setUpdateablePlugins(response.ResponseData);
}
} else {
var details = language.get(response.ErrorMessage);
if (response.ErrorDetails != null) {
details += " (" + response.ErrorDetails + ")";
}
//royalAppProxy.showMessageBox(language.get("Warning"), language.get("An error occurred") + ": " + details, language.get("OK"));
pluginGallery.showWarning(language.get("An error occurred") + ": " + details);
}
});
},
setAvailablePlugins: function(plugins) {
if (pluginGallery.currentOperation != pluginGallery.OPERATION_GETAVAILABLEPLUGINS)
return;
pluginGallery.availablePlugins = plugins;
pluginGallery.hideUpdatesBar();
if (pluginGallery.availablePlugins != null && pluginGallery.availablePlugins.length > 0) {
pluginGallery.addPluginsToDom(plugins, false);
pluginGallery.showInstallAllPlugins();
} else {
pluginGallery.showNoPluginsAvailable();
$(".ts_plugins").fadeIn(pluginGallery.ANIMATION_SPEED);
}
},
setInstalledPlugins: function(plugins, isStartup) {
if (pluginGallery.currentOperation != pluginGallery.OPERATION_GETINSTALLEDPLUGINS)
return;
pluginGallery.installedPlugins = plugins;
if (pluginGallery.installedPlugins != null && pluginGallery.installedPlugins.length > 0) {
pluginGallery.addPluginsToDom(plugins, true);
pluginGallery.getUpdateablePlugins();
} else {
if (isStartup) {
pluginGallery.switchToAvailable();
} else {
pluginGallery.showNoPluginsInstalled();
$(".ts_plugins").fadeIn(pluginGallery.ANIMATION_SPEED);
}
}
},
setUpdateablePlugins: function (plugins) {
if (pluginGallery.currentOperation != pluginGallery.OPERATION_GETUPDATEABLEPLUGINS)
return;
pluginGallery.updateablePlugins = plugins;
pluginGallery.mergePlugins(plugins);
},
addPluginsToDom: function(plugins, installedPlugins) {
$.each(plugins, function(index, plugin) {
pluginGallery.addPluginToDom(plugin, installedPlugins);
});
$(".ts_plugins").fadeIn(pluginGallery.ANIMATION_SPEED);
},
mergePlugins: function(plugins) {
$.each(plugins, function(index, newPlugin) {
pluginGallery.updatePluginDom(newPlugin);
});
pluginGallery.setUpdatesAvailableCount(pluginGallery.updateablePlugins.length);
pluginGallery.showUpdatesBar(function() {
if (pluginGallery.updateablePlugins.length > 0) {
pluginGallery.reorderUpdatedPlugins();
}
});
},
reorderUpdatedPlugins: function() {
var rootEl = $(".ts_plugins");
rootEl.css({
position: "relative"
});
var pElH;
var pEl = $(".ts_plugin");
pEl.each(function(i, el){
var iY = $(el).position().top;
$.data(el, "h", iY);
if (i === 1)
pElH = iY;
});
var sortedEls = pEl.tsort({
attr: "class",
order: "desc"
});
var sortedElsCount = sortedEls.length;
sortedEls.each(function(i, el) {
var currEl = $(el);
var iFr = $.data(el, "h");
var iTo = i * pElH;
currEl.css({
position: "absolute",
top: iFr
}).animate({
top: iTo
}, pluginGallery.ANIMATION_SPEED, function() {
if (i >= sortedElsCount - 1) {
// when the last sort animation finishes, restore all styles to their original values
sortedEls.each(function(i2, el2) {
var currEl2 = $(el2);
currEl2.css({
position: "",
top: ""
});
});
rootEl.css({
position: ""
});
}
});
});
},
updatePluginDom: function(plugin) {
var tsp = $(".ts_plugin_id:contains(" + plugin.ID + ")").closest(".ts_plugin");
pluginGallery.setPluginDomProperties(tsp, plugin, true, true);
return tsp;
},
addPluginToDom: function(plugin, isInstalled) {
var tsp = $(".ts_plugin_template").clone();
tsp.removeClass("ts_plugin_template");
tsp.addClass("ts_plugin");
pluginGallery.setPluginDomProperties(tsp, plugin, false, isInstalled);
tsp.appendTo($(".ts_plugins"));
return tsp;
},
setPluginDomProperties: function(element, plugin, changeOnlyForUpdate, isInstalled) {
var installBtn = element.find(".ts_plugin_content_right").find(".ts_button");
var id = plugin.ExtendedPluginInfo.ID;
var name = plugin.ExtendedPluginInfo.Name;
var publisher = plugin.ExtendedPluginInfo.PublisherName;
var description = plugin.ExtendedPluginInfo.Description;
var licenseType = plugin.ExtendedPluginInfo.LicenseType;
var licenseUrl = plugin.ExtendedPluginInfo.LicenseURL;
var pluginUrl = plugin.ExtendedPluginInfo.PluginURL;
var supportUrl = plugin.ExtendedPluginInfo.SupportURL;
var releaseNotesUrl = plugin.ExtendedPluginInfo.ReleaseNotesURL;
var version = plugin.ExtendedPluginInfo.Version;
var shortDescription = null;
try {
shortDescription = plugin.ExtendedPluginInfo.ShortDescription;
} catch (ex) { }
var iconData48 = plugin.ExtendedPluginInfo.Icon48Data;
var iconData256 = plugin.ExtendedPluginInfo.Icon256Data;
var iconData = (utils.isRetina() && iconData256 != null && iconData256 != "")
? iconData256
: ((iconData48 != null && iconData48 != "") ? iconData48 : iconData256);
if (iconData != null &&
iconData != "") {
iconData = "url(data:image/png;base64," + iconData + ")";
}
if (publisher == null ||
publisher == "") {
publisher = language.get("N/A");
}
if (licenseType == null ||
licenseType == "") {
licenseType = language.get("N/A");
}
if (licenseUrl == null ||
licenseUrl == "") {
licenseUrl = "#";
}
if (pluginUrl == null ||
pluginUrl == "") {
pluginUrl = "#";
}
if (supportUrl == null ||
supportUrl == "") {
supportUrl = "#";
}
if (releaseNotesUrl == null ||
releaseNotesUrl == "") {
releaseNotesUrl = "#";
} else {
releaseNotesUrl = config.pluginServiceBaseUrl + releaseNotesUrl;
}
if (version == null ||
version == "") {
version = "0.0.0.0";
}
version = utils.formatPluginVersionForDisplay(version);
if (!changeOnlyForUpdate) {
element.removeClass("ts_plugin_update");
var elId = element.find(".ts_plugin_id");
var elIcon = element.find(".ts_plugin_content_info_icon");
var elName = element.find(".ts_plugin_content_info_name");
var elPublisher = element.find(".ts_plugin_content_info_publisher");
var elDescription = element.find(".ts_plugin_content_info_description");
var elLicense = element.find(".ts_plugin_content_info_license");
var elWebsite = element.find(".ts_plugin_content_info_website");
var elSupport = element.find(".ts_plugin_content_info_supportwebsite");
elId.html(id);
elIcon.css("background-image", iconData);
elName.html(name);
if (shortDescription != null &&
shortDescription != "" &&
shortDescription != " ") {
var elShortDescription = elPublisher.parent();
elShortDescription.html(shortDescription);
} else {
elPublisher.html(publisher);
}
elDescription.html(description);
elLicense.html(licenseType);
elLicense.attr("href", licenseUrl);
elWebsite.attr("href", pluginUrl);
elSupport.attr("href", supportUrl);
if (!isInstalled) {
installBtn.show();
installBtn.removeClass("ts_plugin_update_button");
installBtn.addClass("ts_plugin_install_button");
installBtn.find(".ts_button_content").html(language.get("Install"));
element.find(".ts_plugin_content_extended_content_bottom_left").find(".ts_button").hide();
} else {
installBtn.hide();
}
element.find(".ts_plugin_content_info_updateversion").parent().css("visibility", "hidden");
element.find(".ts_plugin_content_info_version").html(version);
} else {
element.addClass("ts_plugin_update");
if (!isInstalled) {
installBtn.find(".ts_button_content").html(language.get("Install"));
installBtn.hide();
} else {
installBtn.find(".ts_button_content").html(language.get("ToUpdate"));
installBtn.show();
element.find(".ts_plugin_content_info_updateversion").parent().css("visibility", "");
element.find(".ts_plugin_content_info_updateversion").html(version);
}
}
element.find(".ts_plugin_content_info_releasenotes").attr("href", releaseNotesUrl);
},
setUpdatesAvailableCount: function(count) {
var element = $(".ts_updates_bar_counter");
var msg = "";
if (count <= 0) {
msg = language.get("No Updates available");
} else {
msg = language.getFormat("{0} Update(s) available", count);
}
element.html(msg);
},
hideUpdatesBar: function() {
$(".ts_updates_bar").animate({ height: pluginGallery.UPDATES_BAR_HEIGHT_HIDDEN }, pluginGallery.ANIMATION_SPEED);
},
showUpdatesBar: function(onDone) {
$(".ts_updates_bar").animate({ height: pluginGallery.UPDATES_BAR_HEIGHT_VISIBLE }, pluginGallery.ANIMATION_SPEED, onDone);
},
hideToolbarIcon: function() {
$(".ts_toolbar_icon").fadeOut(pluginGallery.ANIMATION_SPEED);
},
showToolbarIcon: function() {
if (!$(".ts_toolbar_icon").is(":visible"))
$(".ts_toolbar_icon").fadeIn(pluginGallery.ANIMATION_SPEED);
},
showProgress: function() {
$(".ts_toolbar_icon").removeClass("ts_toolbar_warning").addClass("ts_toolbar_progress");
pluginGallery.showToolbarIcon();
},
showWarning: function(text) {
$(".ts_toolbar_icon").removeClass("ts_toolbar_progress").addClass("ts_toolbar_warning").attr("title", text);
pluginGallery.showToolbarIcon();
},
showNoPluginsInstalled: function() {
$(".ts_no_plugins_installed").clone().appendTo(".ts_plugins");
},
showNoPluginsAvailable: function() {
$(".ts_no_plugins_available").clone().appendTo(".ts_plugins");
},
showInstallAllPlugins: function() {
$(".ts_plugins_footer_container").clone().appendTo(".ts_plugins");
},
switchToInstalled: function(isStartup) {
$(".ts_toolbar_button_installed").removeClass("ts_toolbar_button");
$(".ts_toolbar_button_installed").addClass("ts_toolbar_button_active");
$(".ts_toolbar_button_available").removeClass("ts_toolbar_button_active");
$(".ts_toolbar_button_available").addClass("ts_toolbar_button");
pluginGallery.hideUpdatesBar();
$(".ts_plugins").fadeOut(pluginGallery.ANIMATION_SPEED, function () {
$(".ts_plugins").empty();
pluginGallery.getInstalledPlugins(isStartup);
});
},
switchToAvailable: function() {
$(".ts_toolbar_button_installed").removeClass("ts_toolbar_button_active");
$(".ts_toolbar_button_installed").addClass("ts_toolbar_button");
$(".ts_toolbar_button_available").removeClass("ts_toolbar_button");
$(".ts_toolbar_button_available").addClass("ts_toolbar_button_active");
pluginGallery.hideUpdatesBar();
$(".ts_plugins").fadeOut(pluginGallery.ANIMATION_SPEED, function () {
$(".ts_plugins").empty();
pluginGallery.getAvailablePlugins();
});
},
bindToolbarButtonsEventHandler: function() {
$(".ts_toolbar_button_installed").click(function() {
pluginGallery.switchToInstalled();
});
$(".ts_toolbar_button_available").click(function() {
pluginGallery.switchToAvailable();
});
},
bindMoreButtonEventHandler: function(rootElement) {
if (!rootElement)
rootElement = $("body");
$(rootElement).on("click", ".ts_plugin_bottom_button", function() {
var pressedBtn = $(this);
var extendedDiv = pressedBtn.closest(".ts_plugin").find(".ts_plugin_content_extended_content");
extendedDiv.toggle(100, function() {
if (extendedDiv.is(":visible"))
pressedBtn.html(language.get("Less") + " ...");
else
pressedBtn.html(language.get("More") + " ...");
});
});
},
bindUpdateButtonsEventHandler: function(rootElement) {
$(".ts_updates_bar_updateall_button").click(function() {
try {
royalAppProxy.updatePlugins(pluginGallery.updateablePlugins);
} catch (ex) {
// TODO: Handle Error
}
});
if (!rootElement) {
rootElement = $("body");
}
$(rootElement).on("click", ".ts_plugins_install_all_button", function() {
try {
royalAppProxy.installPlugins(pluginGallery.availablePlugins, true);
} catch (ex) {
// TODO: Handle Error
}
});
$(rootElement).on("click", ".ts_plugin_update_button, .ts_plugin_install_button", function() {
var pressedBtn = $(this);
var pluginId = pressedBtn.closest(".ts_plugin").find(".ts_plugin_id").html();
var plugin = null;
if ($(this).hasClass("ts_plugin_update_button"))
plugin = pluginGallery.getPluginById(pluginGallery.updateablePlugins, pluginId);
else if ($(this).hasClass("ts_plugin_install_button"))
plugin = pluginGallery.getPluginById(pluginGallery.availablePlugins, pluginId);
if (plugin == null)
return;
var pluginsArr = [ plugin ];
var err = false;
try {
if (!royalAppProxy.isAvailable())
err = true;
if (pressedBtn.hasClass("ts_plugin_update_button"))
royalAppProxy.updatePlugins(pluginsArr);
else if (pressedBtn.hasClass("ts_plugin_install_button"))
royalAppProxy.installPlugins(pluginsArr, false);
} catch (ex) {
// TODO: Handle Error
err = true;
}
if (err) {
var baseURL = config.pluginServiceBaseUrl;
var updateURL = plugin.ExtendedPluginInfo.UpdateURL;
var absoluteUpdateURL = updateURL;
if (updateURL != null &&
updateURL != undefined &&
!updateURL.toLowerCase().startsWith("http") &&
!updateURL.toLowerCase().startsWith(baseURL.toLowerCase())) {
absoluteUpdateURL = baseURL + updateURL;
}
location.href = absoluteUpdateURL;
}
});
},
bindUninstallButtonsEventHandler: function(rootElement) {
if (!rootElement)
rootElement = $("body");
$(rootElement).on("click", ".ts_plugin_uninstall_button", function() {
var pressedBtn = $(this);
var pluginId = pressedBtn.closest(".ts_plugin").find(".ts_plugin_id").html();
var plugin = pluginGallery.getPluginById(pluginGallery.installedPlugins, pluginId);
var pluginsArr = [ plugin ];
try {
royalAppProxy.uninstallPlugins(pluginsArr);
} catch (ex) {
// TODO: Handle Error
}
});
},
bindWarningButtonEventHandler: function(rootElement) {
if (!rootElement)
rootElement = $("body");
$(rootElement).on("click", ".ts_toolbar_warning", function() {
var pressedBtn = $(this);
try {
royalAppProxy.showMessageBox(language.get("Warning"), $(this).attr("title"), language.get("OK"));
} catch (ex) {
// TODO: Handle Error
}
});
},
getPluginById: function(pluginList, pluginId) {
var foundPlugin = null;
$.each(pluginList, function(index, plugin) {
if (plugin.ID == pluginId) {
foundPlugin = plugin;
return false; // = break
}
});
return foundPlugin;
},
bindEventHandlers: function() {
pluginGallery.bindToolbarButtonsEventHandler();
pluginGallery.bindMoreButtonEventHandler();
pluginGallery.bindUpdateButtonsEventHandler();
pluginGallery.bindUninstallButtonsEventHandler();
pluginGallery.bindWarningButtonEventHandler();
}
};

View File

@@ -5,7 +5,7 @@ CHINESE LANGUAGE FILE BY LIUZE
"File Transfer" = "文件传输";
"File Transfer Connection Settings" = "文件传输设置";
"File Transfer Template Settings" = "文件传输模板设置";
"File Transfer Default Settings" = "F文件传输默认设置";
"File Transfer Default Settings" = "文件传输默认设置";
"File Transfer connections allow you to browse and transfer files on FTP, SFTP and SCP file servers. The default port for FTP connections is 21, for SFTP and SCP it is 22." = "文件传输连接使您可以浏览和传输FTPSFTP和SCP文件服务器上的文件。 FTP连接的默认端口为21SFTP和SCP的默认端口为22.";
"The \"Computer Name\" must not be empty." = " \"计算机名称\" 不能为空.";
"Connection Type" = "连接类型";
@@ -133,4 +133,5 @@ CHINESE LANGUAGE FILE BY LIUZE
"General" = "一般";
"Changing owner and group of '{0}'" = "更改所有者和组 '{0}'";
"Please change either the owner/group or permissions but not both at once." = "请更改所有者/组或权限,但不要同时更改。";
"Rename" = "重命名";
"Rename" = "重命名";
"Authentication Agent" = "认证代理";

View File

@@ -56,4 +56,7 @@ CHINESE LANGUAGE FILE BY LIUZE
"Royal TSX can't open \"{0}\" because macOS doesn't recognise internet addresses starting with \"{1}:\"." = "Royal TSX 不能打开 \"{0}\" 因为 macOS 无法识别以开头的互联网地址 \"{1}:\".";
"Actual Size" = "正常大小";
"Zoom In" = "放大";
"Zoom Out" = "缩小";
"Zoom Out" = "缩小";
"Auto Fill Script" = "自动填充脚本";
"Inject at Document Start" = "在文档头部注入";
"Inject at Document End" = "在文档底部注入";

View File

@@ -21,7 +21,7 @@ CHINESE LANGUAGE FILE BY LIUZE
"Stop Hyper-V instance(s)" = "关闭 Hyper-V 实例";
"Save state of Hyper-V instance(s)" = "保存 Hyper-V 实例状态";
"Pause Hyper-V instance(s)" = "挂起 Hyper-V 实例";
"Connect (Ad hoc)" = "连接 (Ad hoc)";
"Connect (Ad hoc)" = "临时连接";
"Start" = "开启";
"Stop" = "停止";
"Save State" = "保存状态";

View File

@@ -67,7 +67,7 @@ CHINESE LANGUAGE FILE BY LIUZE
"Custom Commands" = "自定义命令";
"Custom Terminal" = "自定义终端";
"Command:" = "命令:";
"Command" = "Command";
"Command" = "命令";
"SSH" = "SSH 连接";
"Telnet" = "Telnet 连接";
"SSH Connection" = "SSH 连接";
@@ -80,7 +80,7 @@ CHINESE LANGUAGE FILE BY LIUZE
"Destination" = "目的地";
"Location" = "定位";
"IP Protocol" = "IP 协议";
"Secure shell (SSH) supports port forwarding (tunnels). Use this page to configure tunneling (remote and local port forwarding)." = "安全外壳(SSH支持端口转发(隧道)。使用此页面来配置隧道(远程和本地端口转发).";
"Secure shell (SSH) supports port forwarding (tunnels). Use this page to configure tunneling (remote and local port forwarding)." = "SSH 支持端口转发(隧道)。使用此页面来配置隧道(远程和本地端口转发).";
"Local" = "本地";
"Remote" = "远程";
"Dynamic" = "动态";
@@ -303,4 +303,8 @@ CHINESE LANGUAGE FILE BY LIUZE
"Please select a Serial Port to connect to." = "请选择要连接的串行端口.";
"Add all from Category" = "从类别中添加所有内容";
"Add all from all Categories" = "添加所有类别的所有内容";
"Focus session after right or middle click" = "右键或中键单击后聚焦会话";
"Focus session after right or middle click" = "右键或中键单击后聚焦会话";
"On this page, you can configure advanced, SSH-specific options for this terminal connection." = "在此页面,您可以为该终端连接配置高级 SSH 特定选项。";
"Certificate File Path" = "证书文件路径";
"Certificate file to use with the private key" = "与私钥一起使用的证书文件";
"OpenSSH certificate to use with the private key specified on the credentials page." = "要与凭证页面上指定的私钥一起使用的 OpenSSH 证书。";

View File

@@ -92,11 +92,18 @@ CHINESE LANGUAGE FILE BY LIUZE
"Host Name" = "主机名称";
"Host IP" = "主机IP";
"Connect with RDP (Ad hoc)" = "连接 RDP (Ad hoc)";
"Connect with VNC (Ad hoc)" = "连接 VNC (Ad hoc)";
"Connect with SSH (Ad hoc)" = "连接 SSH (Ad hoc)";
"Connect with RDP (Ad hoc)" = "连接 RDP (临时)";
"Connect with VNC (Ad hoc)" = "连接 VNC (临时)";
"Connect with SSH (Ad hoc)" = "连接 SSH (临时)";
"All have DHCP enabled" = "所有都启用了DHCP";
"All DNS Addresses" = "所有DNS地址";
"Current license or ESXi version prohibits execution of the requested operation." = "当前许可证或ESXi版本禁止执行请求的操作.";
"Some actions, like changing the power state and issuing remote control tickets are not supported when using VMware's free licenses. Please install a production license to be able to execute such actions." = "使用VMware的免费许可证时不支持某些操作例如更改电源状态和发出远程控制票证。请安装生产许可证以执行此类操作.";
"Ignore Certificate Errors" = "忽略所有凭证错误";
"Ignore Certificate Errors" = "忽略所有凭证错误";
"Configure advanced settings, such as port configuration or configure the connection to automatically connect to a specific Virtual Machine's console." = "配置高级设置,如端口配置或配置连接以自动连接到特定虚拟机的控制台。";
"SSH Port" = "SSH 端口";
"The SSH port is used for ad hoc Terminal connections to the VMware host." = "SSH 端口用于与 VMware 主机进行临时终端连接。";
"Automatically connect to Virtual Machine Console" = "自动连接到虚拟机控制台";
"Virtual Machine ID" = "虚拟机 ID";
"Specify a Virtual Machine ID (Management Object Reference) to directly start a VMware Remote Console session when establishing the connection." = "指定虚拟机 ID管理对象参考以便在建立连接时直接启动 VMware 远程控制台会话。";
"Connect to Host with SSH (Ad hoc)" = "使用 SSH 连接主机(临时)";

View File

@@ -53,6 +53,12 @@ Royal_TSX的简体中文汉化包适用于macOS系统。汉化过程中
## 三、更新日志
2023-12-24 更新日志
1. V6.0.2.1000版本适配
2. 全部插件汉化
3. GettingStarted页面汉化
4. 对应用程序安装目录进行了简易的检测
2023-05-31 更新日志
1. V5.1.2.1000版本适配

View File

@@ -1,69 +1,118 @@
#!/bin/bash
# 设置最大和最小支持版本号
readonly max_support_version="6.0.2"
readonly min_support_version="4.3.6"
# 获取当前脚本运行目录并切换到工作目录
basepath=$(cd `dirname $0`; pwd)
cd $basepath
base_path=$(cd "$(dirname "$0")" || exit; pwd)
cd "$base_path" || exit
# 获取主程序安装路径
main_app_path=""
if [ -d "/Applications/Royal TSX.app" ]; then
main_app_path="/Applications/Royal TSX.app"
elif [ -d "$HOME/Applications/Royal TSX.app" ]; then
main_app_path="$HOME/Applications/Royal TSX.app"
else
echo -e "\033[31m主程序未安装!\033[0m"
exit 1
fi
# 获取主程序版本号
get_version() {
defaults read "$1/Contents/Info.plist" CFBundleShortVersionString
}
# 检查主程序版本是否在支持范围内
check_version() {
local current_version="$1"
local min_version="$2"
local max_version="$3"
if [[ "$current_version" > "$max_version" ]]; then
echo -e "\033[31m主程序版本不匹配本程序支持的最大版本号为:${max_version},当前安装的版本为:${current_version}!\033[0m"
exit 1
elif [[ "$current_version" < "$min_version" ]]; then
echo -e "\033[31m主程序版本不匹配本程序支持的最小版本号为:${min_version},当前安装的版本为:${current_version}!\033[0m"
exit 1
else
echo "主程序版本匹配,当前安装的版本为:${current_version}"
fi
}
# 汉化主程序
cp -r Main\ Application/* /Applications/Royal\ TSX.app/Contents/Resources/
echo "主程序汉化完成!"
translate_main_app() {
cp -R Main\ Application/* "$1/Resources/"
echo "主程序汉化完成!"
}
# 汉化RDP插件
cp -r Plugins/1c919170-3ee3-437f-9326-a2316a9293a0.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/1c919170-3ee3-437f-9326-a2316a9293a0.plugin/Contents/Resources
echo "RDP插件汉化完成!"
# 汉化File Transfer插件
cp -r Plugins/3e63afa6-61f6-4f9f-85bf-a773ab0408b0.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/3e63afa6-61f6-4f9f-85bf-a773ab0408b0.plugin/Contents/Resources
echo "File Transfer插件汉化完成!"
# 汉化Web (based on WebKit)插件
cp -r Plugins/4a376bc0-9c23-11e1-a8b0-0800200c9a66.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/4a376bc0-9c23-11e1-a8b0-0800200c9a66.plugin/Contents/Resources
echo "Web (based on WebKit)插件汉化完成!"
# 汉化Windows Events View插件
cp -r Plugins/6b941bae-bff5-46a3-8a40-91ca66c54c89.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/6b941bae-bff5-46a3-8a40-91ca66c54c89.plugin/Contents/Resources
echo "Windows Events View插件汉化完成!"
# 汉化Terminal (based on iTerm2)插件
cp -r Plugins/7c84a650-9896-11e1-a8b0-0800200c9a66.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/7c84a650-9896-11e1-a8b0-0800200c9a66.plugin/Contents/Resources
echo "Terminal (based on iTerm2)插件汉化完成!"
# 汉化VMware插件
cp -r Plugins/9e13c958-7515-4ddd-b914-e00f77dd609b.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/9e13c958-7515-4ddd-b914-e00f77dd609b.plugin/Contents/Resources
echo "VMware插件汉化完成!"
# 汉化PowerShell插件
cp -r Plugins/21e6e2a4-50e7-49a9-a1b9-56e2eb6f9640.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/21e6e2a4-50e7-49a9-a1b9-56e2eb6f9640.plugin/Contents/Resources
echo "PowerShell插件汉化完成!"
# 汉化Hyper-V插件
cp -r Plugins/651a0888-d654-4d6e-b3c5-355fc392f3c9.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/651a0888-d654-4d6e-b3c5-355fc392f3c9.plugin/Contents/Resources
echo "Hyper-V插件汉化完成!"
# 汉化Windows Services插件
cp -r Plugins/49253779-c4b7-43c0-bf33-0654f1589481.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/49253779-c4b7-43c0-bf33-0654f1589481.plugin/Contents/Resources
echo "Windows Services插件汉化完成!"
# 汉化TeamViewer插件
cp -r Plugins/53945263-2109-409b-b682-90c282be9b58.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/53945263-2109-409b-b682-90c282be9b58.plugin/Contents/Resources
echo "TeamViewer插件汉化完成!"
# 汉化Windows Processes插件
cp -r Plugins/b395595d-c20f-49b6-87a0-375d8d8b052c.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/b395595d-c20f-49b6-87a0-375d8d8b052c.plugin/Contents/Resources
echo "Windows Processes插件汉化完成!"
# 汉化VNC (based on Apple Screen Sharing)插件
cp -r Plugins/c96b0f90-98be-456e-acc6-b9ee3896ffb5.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/c96b0f90-98be-456e-acc6-b9ee3896ffb5.plugin/Contents/Resources
echo "VNC (based on Apple Screen Sharing)插件汉化完成!"
# 汉化VNC (based on Chicken)插件
cp -r Plugins/dfd69050-9897-11e1-a8b0-0800200c9a66.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/dfd69050-9897-11e1-a8b0-0800200c9a66.plugin/Contents/Resources
echo "VNC (based on Chicken)插件汉化完成!"
# 汉化Terminal Services插件
cp -r Plugins/ecda13f4-a5b5-4791-a027-b947008c943f.plugin/Contents/Resources/* ~/Library/Application\ Support/Royal\ TSX/Plugins/Installed/ecda13f4-a5b5-4791-a027-b947008c943f.plugin/Contents/Resources
echo "Terminal Services插件汉化完成!"
# 汉化插件
translate_plugins() {
local plugin_list=("$@")
echo "目前共有${#plugin_list[@]}个插件支持汉化,开始检查并汉化,请留意后续汉化进度。"
for plugin in "${plugin_list[@]}"; do
# 获取 UUID 和名称
uuid=$(echo "${plugin}" | cut -d':' -f1)
name=$(echo "${plugin}" | cut -d':' -f2)
if [ -d "$HOME/Library/Application Support/Royal TSX/Plugins/Installed/$uuid.plugin" ]; then
cp -r "Plugins/$uuid.plugin/Contents/Resources/" "$HOME/Library/Application Support/Royal TSX/Plugins/Installed/$uuid.plugin/Contents/Resources"
echo "${name}插件汉化完成!"
else
echo -e "\033[33m${name}插件未安装!\033[0m"
fi
done
}
# 汉化插件中心
\cp -rf PluginGallery/* /Applications/Royal\ TSX.app/Contents/Resources/PluginGallery/
echo "插件中心汉化完成!"
translate_plugin_gallery() {
cp -rf "$1"/* "$2/Resources/PluginGallery/"
echo "插件中心汉化完成!"
}
# 汉化入门简介
translate_getting_started() {
cp -rf GettingStarted/* "$1/Resources/GettingStarted/"
echo "入门简介汉化完成!"
}
version=$(get_version "$main_app_path")
check_version "$version" "$min_support_version" "$max_support_version"
# 设置其他路径和插件中心路径
other_path=""
plugin_gallery_path="PluginGallery"
if [[ "$version" < "6.0.0" ]]; then
other_path="$main_app_path/Contents"
else
other_path="$main_app_path/Contents/Frameworks/RoyalTSXNativeUI.framework/Versions/A"
plugin_gallery_path="PluginGallery-6.x"
fi
# 插件列表
plugins=(
"1c919170-3ee3-437f-9326-a2316a9293a0:RDP"
"3e63afa6-61f6-4f9f-85bf-a773ab0408b0:File Transfer"
"4a376bc0-9c23-11e1-a8b0-0800200c9a66:Web (based on WebKit)"
"6b941bae-bff5-46a3-8a40-91ca66c54c89:Windows Events View"
"7c84a650-9896-11e1-a8b0-0800200c9a66:Terminal (based on iTerm2)"
"9e13c958-7515-4ddd-b914-e00f77dd609b:VMware"
"21e6e2a4-50e7-49a9-a1b9-56e2eb6f9640:PowerShell"
"651a0888-d654-4d6e-b3c5-355fc392f3c9:Hyper-V"
"49253779-c4b7-43c0-bf33-0654f1589481:Windows Services"
"53945263-2109-409b-b682-90c282be9b58:TeamViewer"
"b395595d-c20f-49b6-87a0-375d8d8b052c:Windows Processes"
"c96b0f90-98be-456e-acc6-b9ee3896ffb5:VNC (based on Apple Screen Sharing)"
"dfd69050-9897-11e1-a8b0-0800200c9a66:VNC (based on Chicken)"
"ecda13f4-a5b5-4791-a027-b947008c943f:Terminal Services"
)
# 汉化主程序
translate_main_app "$main_app_path"
# 汉化插件中心及其它
translate_plugin_gallery "$plugin_gallery_path" "$other_path"
# 汉化入门简介
translate_getting_started "$other_path"
# 汉化插件
translate_plugins "${plugins[@]}"