From 00d6effd69f4108e46473f0c00852c4dabf3d4a5 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 11 Jan 2024 18:33:52 +0800 Subject: [PATCH] pref: stash --- apps/locale/luna/en.json | 201 ++++++++++++++++++++++++++++++++++++ apps/locale/luna/ja.json | 206 +++++++++++++++++++++++++++++++++++++ apps/locale/luna/zh.json | 209 ++++++++++++++++++++++++++++++++++++++ apps/settings/api/i18n.py | 12 +-- 4 files changed, 621 insertions(+), 7 deletions(-) create mode 100644 apps/locale/luna/en.json create mode 100644 apps/locale/luna/ja.json create mode 100644 apps/locale/luna/zh.json diff --git a/apps/locale/luna/en.json b/apps/locale/luna/en.json new file mode 100644 index 000000000..a31c9b2c3 --- /dev/null +++ b/apps/locale/luna/en.json @@ -0,0 +1,201 @@ +{ + "Are you sure to reconnect it?(RDP not support)": "Are you sure to reconnect it?(RDP not support)", + "Reselect connection method": "Reselect asset connection method", + "Right click asset": "Right click on the asset", + "Expand all asset": "Expand all assets under the current node", + "Right click node": "Right click node", + "Asset tree loading method": "Configure Asset Tree Loading Method", + "Settings or basic settings": "Settings → Basic Settings", + "Download the latest client": "Download the latest client", + "Help or download": "Help → Download", + "Keyboard switch session": "Switch session → Shortcut keys", + "Keyboard keys": "Option + Left / Option + Right", + "Cancel": "Cancel", + "Choose a User": "Choose a User", + "Clone Connect": "Clone Connect", + "Close All Tabs": "Close All Tabs", + "Close Current Tab": "Close Current Tab", + "Close Left Tabs": "Close Left Tabs", + "Close Other Tabs": "Close Other Tabs", + "Close Right Tabs": "Close Right Tabs", + "Confirm": "Confirm", + "Connect": "Connect", + "Disconnect": "Disconnect", + "Disfavor": "Disfavor", + "Document": "Document", + "Favorite": "Favorite", + "File Manager": "File Manager", + "CLI font size": "CLI font size", + "Found": "Found", + "Full Screen": "Full Screen", + "Multi Screen": "Multi Screen", + "Help": "Help", + "Hide left manager": "Hide left manager", + "Language": "Language", + "Load tree async": "Load tree async", + "Backspace as Ctrl+H": "CLI Backspace As Ctrl+H", + "Loading": "Loading", + "Password": "Password", + "Please choose an account": "Please choose an account", + "Please input password": "Please input password", + "Reconnect": "Reconnect", + "Search": "Search", + "Refresh": "Refresh", + "Checkbox": "Checkbox", + "Batch connect": "Batch connect", + "RDP resolution": "RDP resolution", + "RDP smart size": "RDP smart size", + "Send text to all ssh terminals": "Send text to all ssh terminals", + "Switch to quick command": "Switch to quick command", + "Switch to input command": "Switch to input command", + "Not quick command": "Not quick command", + "Save command": "Save command", + "Save success": "Save success", + "Send command": "Send command", + "Current session": "Current session", + "All sessions": "All sessions", + "Module": "Module", + "Setting": "Setting", + "Show left manager": "Show left manager", + "Skip": "Skip", + "Skip manual password": "Skip manual password", + "Speed": "Speed", + "Support": "Support", + "Tab List": "Tab List", + "Username": "Username", + "Expire time": "Expire time", + "Users": "", + "View": "View", + "Website": "Website", + "asset": "asset", + "cols": "cols", + "confirm": "confirm", + "download": "download", + "rows": "rows", + "start time": "start time", + "success": "success", + "system user": "system user", + "user": "user", + "Open in new window": "Open in new window", + "Split connect": "Split connect", + "Split vertically": "Split vertically", + "Close split connect": "Close split connect", + "Split connect number": "One session can support up to three split screen connection", + "Right mouse quick paste": "Right mouse quick paste", + "SQL Client": "SQL Client", + "Info": "Info", + "LeftInfo": "Click the command record to quickly locate the video", + "Database disabled": "This type of connection is not supported, please contact an administrator.", + "Asset disabled": "This asset has been disabled, please contact an administrator", + "User: ": "User: {{value}}", + "Asset: ": "Asset: {{value}}", + "Account: ": "Account: {{value}}", + "Start Time: ": "Start time: {{value}}", + "Protocol: ": "Protocol: {{value}}", + "My assets": "My assets", + "My applications": "My applications", + "Type tree": "Type tree", + "Databases": "Databases", + "Remote apps": "Remote apps", + "Kubernetes": "Kubernetes", + "Command Line": "Command Line", + "Force refresh": "Force refresh", + "Select account": "Select account", + "No matching found": "No matching found", + "Connect Method": "Connect Method", + "No available connect method": "No available connect method", + "Need to use": "Need to use", + "Download the client": "Please download", + "Yes": "Yes", + "No": "No", + "Web Terminal": "Web Terminal", + "Remember password": "Remember me", + "Account info": "Account info", + "Download": "Download", + "Tool download": "Tool download", + "Launch Program": "Launch Program", + "RDP client options": "RDP client options", + "Full screen": "Full screen", + "Driver redirect": "Driver redirect", + "RDP File": "RDP File", + "RDP Client": "RDP Client", + "Remember select": "Remember selected", + "Automatic login next": "Automatic Login next time (right click asset Connection to re-select)", + "Don't prompt again": "Don't prompt again", + "Username@Domain": "Username@Domain", + "InstallClientMsg": "JumpServer client not found, Go to download and install?", + "LoginExpireMsg": "Login session expired, please re-login", + "No permission": "No permission", + "Last login": "Last login", + "Log out": "Log out", + "Host": "Host", + "Port": "Port", + "Disable auto completion": "Disable auto completion", + "Advanced option": "Advanced option", + "Protocol": "Protocol", + "Database": "Database", + "Click to copy": "Click to copy", + "Copied": "Copied", + "Database info": "Database info", + "Command line": "Command line", + "Run it by client": "Run it by client", + "Name": "Name", + "Tips": "Tips", + "Asset not found or You have no permission to access it, please refresh asset tree": "Asset not found or You have no permission to access it, please refresh asset tree", + "With secret accounts": "With secret accounts", + "Close": "Close", + "Manual accounts": "Manual accounts", + "Native": "Native", + "Applet": "Applet", + "General": "General", + "GUI": "GUI", + "CLI": "CLI", + "Applet connect method": "Applet connect method", + "Client": "Client", + "Keyboard layout": "Keyboard layout", + "UK English keyboard layout": "UK English (Qwerty)", + "US English keyboard layout": "US English (Qwerty)", + "Japanese keyboard layout": "Japanese (Qwerty)", + "French keyboard layout": "French (Azerty)", + "Swiss French keyboard layout": "Swiss French (Qwertz)", + "Belgian French keyboard layout": "Belgian French (Azerty)", + "Turkey keyboard layout": "Turkish-Q (Qwerty)", + "Login reminder": "Login reminder", + "ACL reject login asset": "This login has been rejected due to access control policy restrictions", + "Need review for login asset": "This login needs manual review. Do you want to continue?", + "Ticket review pending for login asset": "The login asset has been submitted, waiting for review by the assignee, you can also copy the link and send it to he", + "Assignees": "Assignees", + "Do not close this page": "Do not close this page", + "Ticket review rejected for login asset": "This login review has been rejected, and the asset cannot be connected", + "Ticket review closed for login asset": "This login review has been closed, and the asset cannot be connected", + "Account not found": "Account not found", + "Copy link": "Copy link", + "Login review approved": "Login review has been approved, connecting assets...", + "No account available": "No available accounts", + "Set reusable": "Set reusable", + "Re-use for a long time after opening": "Re-use for a long time after opening", + "The connection method is invalid, please refresh the page": "The connection method is invalid, please refresh the page", + "Special accounts": "Special accounts", + "Database token help text": "The database type token that the client connects to will be cached by the component for 5 minutes, which means that the token will not be invalidated immediately after it is used, but five minutes after the client disconnects", + "Help text": "Help text", + "Pause task has been send": "Pause task has been send", + "Resume task has been send": "Resume task has been send", + "Action: ": "Action:", + "Pause": "Pause", + "Resume": "Resume", + "connect info": "connect info", + "Connect command line": "Connect command line", + "Using token": "Using token", + "Directly": "Directly", + "Connect checked": "Connect checked", + "Batch actions": "Batch actions", + "Expand": "Expand", + "Expand all": "Expand all", + "Collapse": "Collapse", + "Password is token password on the table": "Password is token password on the table", + "Password is your password login to system": "Password is your password login to system", + "Current online": "Current online", + "Token expired": "Token has expired", + "No protocol available": "No protocol available", + "VirtualApp":"Virtual App" +} diff --git a/apps/locale/luna/ja.json b/apps/locale/luna/ja.json new file mode 100644 index 000000000..d0549fb84 --- /dev/null +++ b/apps/locale/luna/ja.json @@ -0,0 +1,206 @@ +{ + "Are you sure to reconnect it?(RDP not support)": "本当に再接続しますか? (RDPは一時的にサポートしていない)", + "Reselect connection method": "資産の接続方法の再選択", + "Right click asset": "右クリック資産", + "Expand all asset": "現在のノードの下にあるすべてのアセットを展開", + "Right click node": "右クリックノード", + "Asset tree loading method": "資産ツリーのロード方法の設定", + "Settings or basic settings": "設定 → 基本設定", + "Download the latest client": "最新クライアントのダウンロード", + "Help or download": "ヘルプ → ダウンロード", + "Keyboard switch session": "セッションの切り替え → ショートカットキー", + "Keyboard keys": "Option + Left / Option + Right", + "Cancel": "キャンセル", + "Choose a User": "ユーザーを選択します", + "Clone Connect": "コピーウィンドウ", + "Close All Tabs": "すべてを閉じる", + "Close Current Tab": "現在を閉じる", + "Close Left Tabs": "左側を閉じる", + "Close Other Tabs": "その他を閉じる", + "Close Right Tabs": "右側を閉じる", + "Confirm": "確認", + "Connect": "接続", + "Disconnect": "リンクを切断", + "Disfavor": "コレクションをキャンセル", + "Document": "ドキュメント", + "Favorite": "コレクション", + "File Manager": "ファイル管理", + "CLI font size": "文字端末のフォントサイズ", + "Found": "発見", + "Full Screen": "全画面表示", + "Multi Screen": "マルチスクリーン", + "Help": "ヘルプ", + "Hide left manager": "左サイドバーを非表示", + "Language": "言語", + "Load tree async": "アセットツリーの非同期ロード", + "Backspace as Ctrl+H": "文字端末backspacas Ctrl H", + "Loading": "ロード中", + "Password": "パスワード", + "Please choose an account": "ユーザーを選択してください", + "Please input password": "パスワードを入力してください", + "Reconnect": "再接続", + "Search": "検索", + "Refresh": "リフレッシュ", + "Checkbox": "複数選択", + "Batch connect": "バッチ接続", + "RDP resolution": "RDP 解像度", + "RDP smart size": "RDP スマート・サイズ", + "RDP color quality": "RDP 色品質", + "Send text to all ssh terminals": "すべてのssh端末にテキストを送信します", + "Switch to quick command": "クイックコマンドに切り替え", + "Switch to input command": "入力コマンドに切り替え", + "Not quick command": "非高速コマンド", + "Save command": "保存コマンド", + "Save success": "保存に成功", + "Send command": "コマンドを送信", + "Current session": "現在のセッション", + "All sessions": "すべてのセッション", + "Module": "ユニット", + "Setting": "設定", + "Show left manager": "左サイドバーを表示", + "Skip": "スキップ", + "Skip manual password": "手動パスワードウィンドウをスキップします", + "Speed": "スピード", + "Support": "サポート", + "Tab List": "ウィンドウリスト", + "Username": "ユーザー名", + "Expire time": "期限切れ", + "Users": "ユーザー", + "View": "ビュー", + "Website": "公式サイト", + "asset": "資産", + "cols": "列数", + "confirm": "確認", + "download": "ダウンロード", + "rows": "行数", + "start time": "開始時間", + "success": "成功", + "system user": "システムユーザー", + "user": "ユーザー", + "Open in new window": "新しいウィンドウが開きます", + "Split connect": "スクリーン接続", + "Split vertically": "垂直分割", + "Close split connect": "分割表示を閉じる", + "Split connect number": "1つのセッションで最大3つの画面分割接続をサポート", + "Right mouse quick paste": "右クイック貼り付け", + "SQL Client": "SQLクライアント", + "Database disabled": "このリンク方式をサポートしていない、管理者に連絡してください", + "Info": "ヒント", + "LeftInfo": "コマンドログをクリックして迅速に定位できるビデオ", + "Asset disabled": "この資産はすでに無効になっている場合、管理者に連絡してください", + "User: ": "ユーザー: {{value}}", + "Asset: ": "アセット: {{value}}", + "Account: ": "アカウント: {{value}}", + "Start Time: ": "開始時間: {{value}}", + "Protocol: ": "プロトコル: {{value}}", + "My assets": "マイ資産", + "My applications": "私の応用", + "Type tree": "タイプツリー", + "Databases": "データベース", + "Remote apps": "リモートアプリケーション", + "Kubernetes": "Kubernetes", + "Command Line": "コマンドライン", + "Force refresh": "強制更新", + "Select account": "システムユーザーの選択", + "No matching found": "マッチがありません", + "Connect Method": "接続方法", + "No available connect method": "接続方法がありません", + "Need to use": "使用する必要がある", + "Yes": "はい", + "No": "いいえ", + "Web Terminal": "Web端末", + "Remember password": "パスワードを覚える", + "Account info": "アカウント情報", + "Download": "ダウンロード", + "Tool download": "ツールダウンロード", + "Launch Program": "起動プログラム", + "RDP client options": "RDPクライアントオプション", + "Full screen": "全画面", + "Driver redirect": "ディスクマウント", + "RDP Client": "RDPクライアント", + "RDP File": "RDPファイル", + "Remember select": "選択を覚える", + "Automatic login next": "次回の自動登録 (右クリック資産接続は再選択できます)", + "Don't prompt again": "次回は提示しない", + "Username@Domain": "ユーザー名 @ ADドメイン", + "InstallClientMsg": "JumpServerクライアントがインストールされていない、今ダウンロードしてインストールしますか?", + "LoginExpireMsg": "ログインが期限切れになりました。ログインし直してください", + "No permission": "権限がありません", + "Last login": "前回ログイン", + "Log out": "ログインを終了", + "Disable auto completion": "自動補完の無効化", + "Advanced option": "上級オプション", + "Host": "ホスト", + "Port": "ポート", + "Protocol": "プロトコル", + "Database": "データベース", + "Click to copy": "クリックしてコピーする", + "Copied": "複製済み", + "Database info": "データベース接続情報", + "Command line": "命令行", + "Close": "閉鎖", + "Manual accounts": "手動アカウント", + "Native": "クライアント", + "Applet": "アプレット", + "General": "基本構成", + "GUI": "グラフィカル", + "CLI": "コマンドライン", + "Asset not found or You have no permission to access it, please refresh asset tree": "アセットが見つからないか、アクセスする権限がありません。アセット ツリーを更新してください", + "Run it by client": "クライアントで実行する", + "Name": "めいしょう", + "Failed to open address": "アドレスを開くことができませんでした", + "Normal accounts": "通常のログインアカウント", + "Special accounts": "特別ログインアカウント", + "Tips": "ヒント", + "Applet connect method": "アプレット接続方法", + "Client": "お客様", + "Keyboard layout": "キーボードレイアウト", + "UK English keyboard layout": "UK English (Qwerty)", + "US English keyboard layout": "US English (Qwerty)", + "Japanese keyboard layout": "Japanese (Qwerty)", + "French keyboard layout": "French (Azerty)", + "Swiss French keyboard layout": "Swiss French (Qwertz)", + "Belgian French keyboard layout": "Belgian French (Azerty)", + "Turkey keyboard layout": "Turkish-Q (Qwerty)", + "Login reminder": "ログインリマインダー", + "ACL reject login asset": "アクセス制御ポリシーの制限により、このログインは拒否されました", + "Need review for login asset": "このログインは手動で確認する必要があります。続行しますか?", + "Ticket review pending for login asset": "ログイン アプリケーションが送信され、承認者が確認するのを待っています。リンクをコピーして承認者に送信することもできます。", + "Assignees": "受信者", + "Do not close this page": "このページを閉じないでください", + "Ticket review rejected for login asset": "このログイン レビューは拒否されたため、アセットを接続できません", + "Ticket review closed for login asset": "このログイン レビューは終了しており、アセットを接続できません", + "Account not found": "アカウントが見つかりません", + "Copy link": "リンクをコピーする", + "Login review approved": "ログイン監査に合格し、アセットを接続しています...", + "No account available": "アカウントがありません", + "Set reusable": "再利用可能な", + "Re-use for a long time after opening": "開いた後、長い間再利用する", + "Charset": "文字セット", + "The connection method is invalid, please refresh the page": "接続方法が無効です。ページを更新してください", + "Special account": "特別なアカウント", + "Database token help text": " クライアントが接続するデータベースの種類のトークンは、コンポーネントによって5分間キャッシュされます。つまり、トークンは使用後すぐに無効になるわけではありませんが、クライアントが切断されてから5分後に無効になります", + "Help text": "します", + "Pause task has been send": "一時停止タスクが送信されました", + "Resume task has been send": "タスクが再開されました", + "Action: ": "アクション: ", + "Pause": "タスクを一時停止", + "Resume": "タスクを再開", + "connect info": "接続情報", + "Connect command line": "接続コマンドライン", + "Using token": "トークンを使用する", + "Directly": "直接接続", + "Connect checked": "接続済み", + "Batch actions": "バッチ操作", + "Expand": "展開", + "Fold": "折りたたみ", + "Expand all": "すべて展開", + "Fold all": "すべて折りたたみ", + "Password is token password on the table": "パスワードは、テーブルのトークンパスワードです", + "Password is your password login to system": "パスワードは、システムにログインするためのパスワードです", + "Current online": "現在オンライン", + "Token expired": "トークンの有効期限が切れました", + "No protocol available": "利用可能なプロトコルがありません", + "Stop": "Stop", + "VirtualApp": "仮想アプリケーション" +} diff --git a/apps/locale/luna/zh.json b/apps/locale/luna/zh.json new file mode 100644 index 000000000..34b5261f7 --- /dev/null +++ b/apps/locale/luna/zh.json @@ -0,0 +1,209 @@ +{ + "Are you sure to reconnect it?(RDP not support)": "确定要重新连接吗? (RDP暂不支持)", + "Reselect connection method": "可重新选择连接方式", + "Right click asset": "右击资产 → 连接", + "Expand all asset": "展开节点下的所有资产", + "Right click node": "右击节点 → 展开全部", + "Asset tree loading method": "配置资产树加载方式", + "Settings or basic settings": "菜单设置 → 基本设置", + "Download the latest client": "下载最新客户端", + "Help or download": "菜单帮助 → 下载", + "Keyboard switch session": "切换会话 → 快捷键", + "Keyboard keys": "Option + Left / Option + Right", + "Cancel": "取消", + "Choose a User": "选择一个用户", + "Clone Connect": "复制窗口", + "Close All Tabs": "关闭所有", + "Close Current Tab": "关闭当前", + "Close Left Tabs": "关闭左侧", + "Close Other Tabs": "关闭其它", + "Close Right Tabs": "关闭右侧", + "Confirm": "确认", + "Connect": "连接", + "Disconnect": "断开链接", + "Disfavor": "取消收藏", + "Document": "文档", + "Favorite": "收藏", + "File Manager": "文件管理", + "CLI font size": "字符终端字体大小", + "Found": "发现", + "Full Screen": "全屏显示", + "Multi Screen": "多屏显示", + "Help": "帮助", + "Hide left manager": "隐藏左边栏", + "Language": "语言", + "Load tree async": "异步加载资产树", + "Backspace as Ctrl+H": "字符终端Backspace As Ctrl+H", + "Loading": "加载中", + "Password": "密码", + "Please choose an account": "请选择一个用户", + "Please input password": "请输入密码", + "Reconnect": "重新连接", + "Search": "搜索", + "Refresh": "刷新", + "Checkbox": "多选", + "Batch connect": "批量连接", + "RDP resolution": "RDP 分辨率", + "RDP smart size": "RDP 智能大小", + "RDP color quality": "RDP 颜色质量", + "Send text to all ssh terminals": "发送文本到所有ssh终端", + "Switch to quick command": "切换到快捷命令", + "Switch to input command": "切换到输入命令", + "Not quick command": "暂无快捷命令", + "Save command": "保存命令", + "Save success": "保存成功", + "Send command": "发送命令", + "Current session": "当前会话", + "All sessions": "全部会话", + "Module": "模块", + "Setting": "设置", + "Show left manager": "显示左边栏", + "Skip": "跳过", + "Skip manual password": "跳过手动密码窗", + "Speed": "速度", + "Support": "支持", + "Tab List": "窗口列表", + "Username": "用户名", + "Expire time": "过期时间", + "Users": "用户", + "View": "视图", + "Website": "官网", + "asset": "资产", + "cols": "列数", + "confirm": "确认", + "download": "下载", + "rows": "行数", + "start time": "开始时间", + "success": "成功", + "system user": "系统用户", + "user": "用户", + "Open in new window": "新窗口打开", + "Split connect": "分屏连接", + "Split vertically": "垂直分屏", + "Close split connect": "关闭分屏", + "Split connect number": "一个会话最多支持3个分屏连接", + "Right mouse quick paste": "右键快速粘贴", + "SQL Client": "SQL 客户端", + "Database disabled": "不支持此种链接方式,请联系管理员", + "Info": "提示", + "LeftInfo": "点击命令记录可快速定位录像", + "Asset disabled": "该资产已被禁用,请联系管理员", + "User: ": "用户: {{value}}", + "Asset: ": "资产: {{value}}", + "Account: ": "账号: {{value}}", + "Start Time: ": "开始时间: {{value}}", + "Protocol: ": "协议: {{value}}", + "My assets": "我的资产", + "My applications": "我的应用", + "Type tree": "类型树", + "Databases": "数据库", + "Remote apps": "远程应用", + "Kubernetes": "Kubernetes", + "Command Line": "命令行", + "Force refresh": "强制刷新", + "Select account": "选择账号", + "No matching found": "没有匹配项", + "Connect Method": "连接方式", + "No available connect method": "没有可用的连接方法", + "Need to use": "需要使用", + "Yes": "是", + "No": "否", + "Web Terminal": "Web终端", + "Remember password": "记住密码", + "Account info": "账号信息", + "Download": "下载", + "Tool download": "工具下载", + "Launch Program": "启动程序", + "RDP client options": "RDP 客户端选项", + "Full screen": "全屏", + "Driver redirect": "磁盘挂载", + "RDP Client": "RDP 客户端", + "RDP File": "RDP 文件", + "Remember select": "记住选择", + "Automatic login next": "下次自动登录 (右击资产连接可以重新选择)", + "Don't prompt again": "下次不再提示", + "Username@Domain": "用户名@AD域", + "InstallClientMsg": "JumpServer 客户端没有安装,现在去下载安装?", + "LoginExpireMsg": "登录已过期,请重新登录", + "No permission": "没有权限", + "Last login": "上次登录", + "Log out": "退出登录", + "Host": "主机", + "Port": "端口", + "User": "用户", + "Disable auto completion": "禁用自动补全", + "Advanced option": "高级选项", + "Protocol": "协议", + "Database": "数据库", + "Click to copy": "点击复制", + "Copied": "已复制", + "Database info": "数据库信息", + "Database connect info": "数据库连接信息", + "Command line": "连接命令行", + "Run it by client": "使用客户端执行", + "Name": "名称", + "Failed to open address": "打开地址失败", + "With secret accounts": "托管账号", + "Manual accounts": "手动账号", + "Native": "客户端", + "Applet": "远程应用", + "GUI": "图形化", + "Tips": "提示", + "Asset not found or You have no permission to access it, please refresh asset tree": "未找到资产或您无权访问它,请刷新资产树", + "CLI": "命令行", + "Close": "关闭", + "General": "基本配置", + "Applet connect method": "远程应用连接方式", + "Client": "客户端", + "Charset": "字符集", + "Keyboard layout": "键盘布局", + "UK English keyboard layout": "UK English (Qwerty)", + "US English keyboard layout": "US English (Qwerty)", + "Japanese keyboard layout": "Japanese (Qwerty)", + "French keyboard layout": "French (Azerty)", + "Swiss French keyboard layout": "Swiss French (Qwertz)", + "Belgian French keyboard layout": "Belgian French (Azerty)", + "Turkey keyboard layout": "Turkish-Q (Qwerty)", + "Login reminder": "登录提醒", + "ACL reject login asset": "本次登录已拒绝,原因是访问控制策略的限制", + "Need review for login asset": "本次登录需要进行人工审核,是否继续?", + "Ticket review pending for login asset": "登录申请已提交,等待受理人进行复核,你也可以复制链接发给他", + "Assignees": "受理人", + "Do not close this page": "不要关闭本页面", + "Ticket review approved for login asset": "本次登录审核已通过,是否连接资产?", + "Ticket review rejected for login asset": "本次登录审核已拒绝,不能连接资产", + "Ticket review closed for login asset": "本次登录审核已关闭,不能连接资产", + "Account not found": "账号未找到", + "Copy link": "复制链接", + "Login review approved": "登录审核已通过, 正在连接资产...", + "No account available": "没有可用账号", + "Set reusable": "开启复用", + "Re-use for a long time after opening": "开启后该连接信息可长时间多次使用", + "The connection method is invalid, please refresh the page": "该连接方式已失效,请刷新页面", + "Special accounts": "特殊账号", + "Database token help text": "数据库类型 token 会缓存 5 分钟,也就是说 token 使用后,不会立刻失效,而是客户端断开 5 分钟后,这个 token 才会完全失效", + "Help text": "说明", + "Pause task has been send": "暂停任务已发送", + "Resume task has been send": "恢复任务已发送", + "Action: ": "操作: ", + "Pause": "暂停", + "Resume": "恢复", + "connect info": "连接信息", + "Connect command line": "连接命令行", + "Using token": "使用 Token", + "Directly": "用户名指定连接的资产和账号", + "Connect checked": "连接选中", + "Batch actions": "批量操作", + "Expand": "展开", + "Fold": "折叠", + "Expand all": "展开全部", + "Fold all": "折叠全部", + "Password is token password on the table": "密码是表格中的 Token 密码", + "Password is your password login to system": "密码是你登录系统的密码", + "Current online": "当前在线", + "Token expired": "Token 已过期, 请重新连接", + "No protocol available": "没有可用的协议", + "Stop": "停止", + "VirtualApp": "虚拟应用" +} + diff --git a/apps/settings/api/i18n.py b/apps/settings/api/i18n.py index b198b7c85..a6098526e 100644 --- a/apps/settings/api/i18n.py +++ b/apps/settings/api/i18n.py @@ -12,12 +12,6 @@ class ComponentI18nApi(RetrieveAPIView): base_path = 'locale' permission_classes = [AllowAny] - def get_path(self): - pass - - def head(self, request, *args, **kwargs): - return Response() - def retrieve(self, request, *args, **kwargs): name = kwargs.get('name') component_dir = safe_join(settings.APPS_DIR, 'locale', name) @@ -30,6 +24,10 @@ class ComponentI18nApi(RetrieveAPIView): _lang = file.split('.')[0] with open(safe_join(component_dir, file), 'r') as f: data[_lang] = json.load(f) + if lang: - data = {lang: data.get(lang) or {}} + data = data.get(lang) or {} + flat = request.query_params.get('flat', '1') + if flat == '0': + data = {lang: data} return Response(data)