From d28665f172a46ef579d08cd70a4eb797505c88a9 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Sat, 20 Jun 2020 16:03:42 +0800 Subject: [PATCH 1/5] i18n/zh_CN: add lots of UI translation --- locale/zh_CN/LC_MESSAGES/lang.po | 1160 +++++++++++++++++++++++++++--- 1 file changed, 1046 insertions(+), 114 deletions(-) diff --git a/locale/zh_CN/LC_MESSAGES/lang.po b/locale/zh_CN/LC_MESSAGES/lang.po index 7eb229e8c..60791f9e3 100644 --- a/locale/zh_CN/LC_MESSAGES/lang.po +++ b/locale/zh_CN/LC_MESSAGES/lang.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: pyfa 2.22.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-18 17:46+0800\n" -"PO-Revision-Date: 2020-06-18 17:55+0800\n" +"POT-Creation-Date: 2020-06-20 11:57+0800\n" +"PO-Revision-Date: 2020-06-20 15:59+0800\n" "Last-Translator: zhaoweny \n" "Language-Team: Chinese (simplified)\n" "Language: zh_CN\n" @@ -18,362 +18,1294 @@ msgstr "" "X-Generator: Poedit 2.3.1\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: gui/builtinStatsViews/firepowerViewFull.py:106 +#: gui/builtinStatsViews/firepowerViewFull.py:107 msgid " DPS: " -msgstr "" +msgstr " DPS: " -#: gui/builtinStatsViews/capacitorViewFull.py:70 -msgid " GJ" -msgstr "" - -#: gui/builtinStatsViews/firepowerViewFull.py:99 +#: gui/builtinStatsViews/firepowerViewFull.py:100 msgid " Volley: " msgstr "齐射" -#: gui/builtinStatsViews/capacitorViewFull.py:79 +#: gui/patternEditor.py:184 +#, python-format +msgid "%s patterns %s clipboard" +msgstr "" + +#: gui/characterEditor.py:385 +#, python-format +msgid "%s skills %s clipboard" +msgstr "" + +#: gui/mainMenuBar.py:73 +msgid "&Backup All Fittings" +msgstr "备份所有装配(&B)" + +#: gui/mainMenuBar.py:104 +msgid "&Browse ESI Fittings" +msgstr "浏览游戏内装配(&B)" + +#: gui/mainMenuBar.py:111 +msgid "&Character" +msgstr "角色(&C)" + +#: gui/mainMenuBar.py:144 +msgid "&Character Editor" +msgstr "角色编辑器(&C)" + +#: gui/mainMenuBar.py:70 +msgid "&Close All Tabs" +msgstr "关闭所有标签页(&C)" + +#: gui/mainMenuBar.py:69 +msgid "&Close Tab" +msgstr "关闭标签页(&C)" + +#: gui/mainMenuBar.py:150 +msgid "&Damage Pattern Editor" +msgstr "伤害模型编辑器(&D)" + +#: gui/mainMenuBar.py:143 +msgid "&Editors" +msgstr "编辑器(&E)" + +#: gui/mainMenuBar.py:92 +msgid "&Export Fitting" +msgstr "导出装配(&E)" + +#: gui/mainMenuBar.py:119 +msgid "&Export Skills Needed" +msgstr "导出所需技能列表(&E)" + +#: gui/mainMenuBar.py:66 +msgid "&File" +msgstr "文件(&F)" + +#: gui/mainMenuBar.py:161 +msgid "&Forums" +msgstr "论坛(&F)" + +#: gui/mainMenuBar.py:88 +msgid "&From Clipboard" +msgstr "从剪贴板导入(&F)" + +#: gui/mainMenuBar.py:135 +msgid "&Global" +msgstr "全局设置(&G)" + +#: gui/mainMenuBar.py:96 +msgid "&Graphs" +msgstr "图表(&G)" + +#: gui/mainMenuBar.py:159 +msgid "&Help" +msgstr "帮助(&H)" + +#: gui/mainMenuBar.py:147 +msgid "&Implant Set Editor" +msgstr "植入体配置编辑器(&I)" + +#: gui/mainMenuBar.py:118 +msgid "&Import Character File" +msgstr "导入角色文件(&I)" + +#: gui/mainMenuBar.py:91 +msgid "&Import Fittings" +msgstr "导入装配(&I)" + +#: gui/mainMenuBar.py:122 +msgid "&Manage ESI Characters" +msgstr "管理ESI角色(&M)" + +#: gui/mainMenuBar.py:68 +msgid "&New Tab" +msgstr "新标签页(&N)" + +#: gui/mainMenuBar.py:95 +msgid "&Optimize Fit Price" +msgstr "优化装配价格(&O)" + +#: gui/mainMenuBar.py:137 +msgid "&Preferences" +msgstr "偏好设置(&P)" + +#: gui/mainMenuBar.py:84 +msgid "&Redo" +msgstr "恢复(&R)" + +#: gui/mainMenuBar.py:115 +msgid "&Revert Character" +msgstr "还原角色(&R)" + +#: gui/mainMenuBar.py:113 +msgid "&Save Character" +msgstr "保存角色(&S)" + +#: gui/mainMenuBar.py:153 +msgid "&Target Profile Editor" +msgstr "目标属性编辑器(&T)" + +#: gui/mainMenuBar.py:87 +msgid "&To Clipboard" +msgstr "导出到剪贴板(&T)" + +#: gui/mainFrame.py:689 +msgid "&Turn Overrides Off" +msgstr "启用自定义属性(&T)" + +#: gui/mainFrame.py:689 gui/mainMenuBar.py:131 +msgid "&Turn Overrides On" +msgstr "启用自定义属性(&T)" + +#: gui/mainMenuBar.py:83 +msgid "&Undo" +msgstr "撤销(&R)" + +#: gui/mainMenuBar.py:160 +msgid "&Wiki" +msgstr "百科(&W)" + +#: gui/builtinStatsViews/capacitorViewFull.py:81 msgid "0s" msgstr "0秒" -#: gui/builtinStatsViews/rechargeViewFull.py:74 +#: gui/builtinStatsViews/rechargeViewFull.py:76 msgid "Active shield boost" msgstr "主动维修" -#: gui/additionsPane.py:44 +#: gui/esiFittings.py:350 +msgid "Add Character" +msgstr "添加角色" + +#: gui/esiFittings.py:183 +msgid "Add Character Error" +msgstr "添加角色错误" + +#: gui/fitBrowserLite.py:17 +msgid "Add Fits" +msgstr "添加装配" + +#: gui/additionsPane.py:45 msgid "Additions" msgstr "附加装备" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:83 +#: gui/itemStats.py:196 +msgid "Affected by" +msgstr "影响因素" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:85 msgid "Align time" msgstr "起跳时间" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:110 +#: gui/aboutData.py:32 +msgid "All EVE-Online related materials are property of CCP hf." +msgstr "所有 EvE Online 相关材料版权归CCP所有" + +#: gui/mainFrame.py:839 gui/mainFrame.py:1014 +msgid "All Files" +msgstr "所有文件" + +#: gui/characterSelection.py:238 +msgid "All skill prerequisites have been met" +msgstr "已达到所有技能要求" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:112 msgid "Ammo hold" msgstr "" -#: gui/builtinStatsViews/rechargeViewFull.py:75 -msgid "Armor repair amount" -msgstr "装甲维修" +#: gui/propertyEditor.py:145 +msgid "Are you sure you want to delete all overrides?" +msgstr "您确定要删除所有自定义属性吗?" -#: gui/builtinStatsViews/resistancesViewFull.py:111 +#: gui/mainFrame.py:646 +msgid "" +"Are you sure you wish to ignore fitting restrictions for the current fit? " +"This could lead to wildly inaccurate results and possible errors." +msgstr "您确定要忽略当前装配资源限制吗?这可能导致不准确或错误的结果。" + +#: gui/builtinStatsViews/rechargeViewFull.py:77 +msgid "Armor repair amount" +msgstr "装甲修量" + +#: gui/builtinStatsViews/resistancesViewFull.py:113 msgid "Armor resistance" msgstr "装甲抗性" -#: gui/additionsPane.py:77 +#: gui/mainMenuBar.py:128 +msgid "Attribute &Overrides" +msgstr "自定义属性(&O)" + +#: gui/propertyEditor.py:27 +msgid "Attribute Editor" +msgstr "属性编辑器" + +#: gui/itemStats.py:177 +msgid "Attributes" +msgstr "属性" + +#: gui/mainFrame.py:874 +msgid "Backing up {} fits to: {}" +msgstr "" + +#: gui/mainMenuBar.py:73 +msgid "Backup all fittings to a XML file" +msgstr "备份所有装配到XML文件" + +#: gui/mainFrame.py:873 gui/mainFrame.py:904 +msgid "Backup fits" +msgstr "备份装配" + +#: gui/mainFrame.py:952 +msgid "Be aware that already processed fits were not saved" +msgstr "" + +#: gui/additionsPane.py:78 msgid "Boosters" msgstr "增效剂" -#: gui/builtinStatsViews/resourcesViewFull.py:151 -msgid "CPU" -msgstr "" +#: gui/esiFittings.py:32 +msgid "Browse EVE Fittings" +msgstr "浏览游戏内装配" -#: gui/builtinStatsViews/resourcesViewFull.py:113 +#: gui/builtinStatsViews/resourcesViewFull.py:153 +msgid "CPU" +msgstr "CPU" + +#: gui/builtinStatsViews/resourcesViewFull.py:115 msgid "Calibration" msgstr "校准" -#: gui/builtinStatsViews/capacitorViewFull.py:35 +#: gui/builtinStatsViews/capacitorViewFull.py:37 msgid "Capacitor" msgstr "电容" -#: gui/builtinStatsViews/capacitorViewFull.py:55 +#: gui/builtinStatsViews/capacitorViewFull.py:57 msgid "Capacitor stability" msgstr "电容稳定性" -#: gui/additionsPane.py:71 gui/builtinStatsViews/targetingMiscViewMinimal.py:86 +#: gui/additionsPane.py:72 gui/builtinStatsViews/targetingMiscViewMinimal.py:88 msgid "Cargo" msgstr "货舱" -#: gui/builtinStatsViews/resourcesViewFull.py:156 +#: gui/builtinStatsViews/resourcesViewFull.py:158 msgid "Cargo bay" msgstr "货舱" -#: gui/builtinStatsViews/resistancesViewFull.py:95 -#: gui/builtinStatsViews/resistancesViewFull.py:167 +#: gui/characterEditor.py:90 gui/esiFittings.py:341 +msgid "Character" +msgstr "角色" + +#: gui/characterEditor.py:137 +msgid "Character Editor" +msgstr "角色编辑器" + +#: gui/esiFittings.py:342 +msgid "Character ID" +msgstr "角色ID" + +#: gui/characterEditor.py:78 +msgid "Character name already in use, please choose another." +msgstr "角色名已占用,请使用其他名称。" + +#: gui/characterEditor.py:771 +msgid "Character:" +msgstr "角色:" + +#: gui/characterSelection.py:47 +msgid "Character: " +msgstr "角色:" + +#: gui/propertyEditor.py:39 +msgid "Clear All" +msgstr "清除所有" + +#: gui/propertyEditor.py:39 +msgid "Clear all overrides" +msgstr "清除所有自定义属性" + +#: gui/builtinStatsViews/resistancesViewFull.py:97 +#: gui/builtinStatsViews/resistancesViewFull.py:169 msgid "Click to toggle between effective HP and raw HP" msgstr "点击切换有效HP和原始HP" -#: gui/builtinStatsViews/miningyieldViewFull.py:101 +#: gui/builtinStatsViews/miningyieldViewFull.py:102 msgid "Click to toggle to Firepower View" msgstr "点击切换到火力视图" -#: gui/builtinStatsViews/firepowerViewFull.py:114 +#: gui/builtinStatsViews/firepowerViewFull.py:115 msgid "Click to toggle to Mining Yield " msgstr "点击切换到矿物产出视图" -#: gui/additionsPane.py:83 +#: gui/additionsPane.py:84 msgid "Command" msgstr "指令" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:122 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:124 msgid "Command center hold" msgstr "" -#: gui/builtinStatsViews/resourcesViewFull.py:155 +#: gui/itemStats.py:182 +msgid "Compare" +msgstr "对比" + +#: gui/mainFrame.py:648 gui/mainFrame.py:654 +msgid "Confirm" +msgstr "确认" + +#: gui/esiFittings.py:157 gui/propertyEditor.py:146 +msgid "Confirm Delete" +msgstr "删除确认" + +#: gui/esiFittings.py:126 gui/esiFittings.py:169 gui/esiFittings.py:311 +msgid "Connection error, please check your internet connection" +msgstr "连接错误,请检查您的网络连接" + +#: gui/characterSelection.py:105 +msgid "Copy Missing Skills" +msgstr "复制所需技能" + +#: gui/ssoLogin.py:18 +msgid "Copy and paste the block of text provided by pyfa.io" +msgstr "" + +#: gui/patternEditor.py:290 gui/setEditor.py:222 gui/targetProfileEditor.py:366 +msgid "Could not import from clipboard" +msgstr "" + +#: gui/targetProfileEditor.py:359 +msgid "Could not import from clipboard:" +msgstr "" + +#: gui/patternEditor.py:283 gui/setEditor.py:218 +msgid "Could not import from clipboard: unknown errors" +msgstr "" + +#: gui/patternEditor.py:99 +msgid "Damage Pattern Editor" +msgstr "伤害模型编辑器" + +#: gui/patternEditor.py:65 +msgid "Damage Profile" +msgstr "伤害模型" + +#: gui/patternEditor.py:53 +msgid "Damage Profile name already in use, please choose another." +msgstr "伤害模型名已占用,请使用其他名称。" + +#: gui/propertyEditor.py:270 +#, python-format +msgid "Default Value: %0.3f" +msgstr "" + +#: gui/esiFittings.py:65 +msgid "Delete from EVE" +msgstr "从游戏内删除" + +#: gui/itemStats.py:189 +msgid "Dependents" +msgstr "" + +#: gui/itemStats.py:174 +msgid "Description" +msgstr "简介" + +#: gui/mainMenuBar.py:167 +msgid "Dev Tools" +msgstr "开发者工具" + +#: gui/mainMenuBar.py:101 gui/mainMenuBar.py:202 +msgid "Disable Fitting Re&strictions" +msgstr "关闭装配资源限制(&S)" + +#: gui/esiFittings.py:156 +msgid "Do you really want to delete {} ({}) from EVE?" +msgstr "" + +#: gui/updateDialog.py:102 +msgid "Don't remind me again for this release" +msgstr "不再提示此更新" + +#: gui/characterEditor.py:789 +msgid "Don't see your EVE character in the list?" +msgstr "没看到你的EvE角色?" + +#: gui/updateDialog.py:113 +msgid "Download" +msgstr "下载" + +#: gui/builtinStatsViews/resourcesViewFull.py:157 msgid "Drone bandwidth" msgstr "无人机带宽" -#: gui/builtinStatsViews/resourcesViewFull.py:153 +#: gui/builtinStatsViews/resourcesViewFull.py:155 msgid "Drone bay" msgstr "无人机仓库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:62 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:64 msgid "Drone range" msgstr "无人机半径" -#: gui/additionsPane.py:65 +#: gui/additionsPane.py:66 msgid "Drones" msgstr "无人机" -#: gui/builtinStatsViews/resourcesViewFull.py:111 +#: gui/builtinStatsViews/resourcesViewFull.py:113 msgid "Drones active" msgstr "激活的无人机" -#: gui/builtinStatsViews/resistancesViewFull.py:83 +#: gui/mainMenuBar.py:105 +msgid "E&xport to ESI" +msgstr "导出到游戏(&X)" + +#: gui/mainFrame.py:838 +msgid "EFT text fitting files" +msgstr "EFT装配文本文件" + +#: gui/targetProfileEditor.py:119 +msgid "EM resistance" +msgstr "电磁抗性" + +#: gui/esiFittings.py:313 gui/esiFittings.py:317 gui/esiFittings.py:325 +msgid "ERROR" +msgstr "" + +#: gui/mainFrame.py:1013 +msgid "EVE API XML character files" +msgstr "" + +#: gui/characterEditor.py:162 +msgid "EVE SSO" +msgstr "" + +#: gui/mainFrame.py:860 +msgid "EVE XML fitting file" +msgstr "" + +#: gui/mainFrame.py:837 +msgid "EVE XML fitting files" +msgstr "" + +#: gui/mainFrame.py:467 +msgid "EVE XML fitting files (*.xml)|*.xml" +msgstr "" + +#: gui/mainFrame.py:809 +msgid "EVEMon skills training XML file" +msgstr "" + +#: gui/mainFrame.py:808 +msgid "EVEMon skills training file" +msgstr "" + +#: gui/itemStats.py:192 +msgid "Effects" +msgstr "效果" + +#: gui/builtinStatsViews/resistancesViewFull.py:85 msgid "Electromagnetic resistance" msgstr "电磁抗性" -#: gui/builtinStatsViews/resistancesViewFull.py:86 +#: gui/multiSwitch.py:40 +msgid "Empty Tab" +msgstr "空白标签页" + +#: gui/mainMenuBar.py:200 +msgid "Enable Fitting Re&strictions" +msgstr "开启装配限制(&S)" + +#: gui/characterEditor.py:281 +msgid "Enter a name for your new Character:" +msgstr "请为新角色输入一个名称:" + +#: gui/characterEditor.py:83 gui/characterEditor.py:463 +#: gui/characterEditor.py:898 gui/characterSelection.py:174 +#: gui/mainFrame.py:897 gui/patternEditor.py:58 gui/setEditor.py:55 +#: gui/targetProfileEditor.py:78 +msgid "Error" +msgstr "" + +#: gui/characterEditor.py:897 gui/characterSelection.py:173 +msgid "Error fetching skill information" +msgstr "" + +#: gui/errorDialog.py:68 +msgid "Error!" +msgstr "" + +#: gui/builtinStatsViews/resistancesViewFull.py:88 +#: gui/targetProfileEditor.py:122 msgid "Explosive resistance" msgstr "爆炸抗性" -#: gui/builtinStatsViews/capacitorViewFull.py:88 +#: gui/characterEditor.py:373 gui/propertyEditor.py:38 +msgid "Export" +msgstr "" + +#: gui/mainMenuBar.py:74 +msgid "Export All Fittings to &HTML" +msgstr "导出所有装配到网页" + +#: gui/mainFrame.py:947 +msgid "Export Error" +msgstr "导出错误" + +#: gui/esiFittings.py:224 +msgid "Export Fit" +msgstr "导出装配" + +#: gui/mainFrame.py:806 +msgid "Export Skills Needed As..." +msgstr "导出所需技能列表到..." + +#: gui/mainMenuBar.py:87 +msgid "Export a fit to the clipboard" +msgstr "导出装配到剪贴板" + +#: gui/esiFittings.py:211 +msgid "Export fit to EVE" +msgstr "导出装配到游戏" + +#: gui/mainMenuBar.py:74 +msgid "Export fits to HTML file (set in Preferences)" +msgstr "导出装配到网页(通过偏好设置指定)" + +#: gui/mainMenuBar.py:92 +msgid "Export fitting to another format" +msgstr "导出装配为其他格式" + +#: gui/mainMenuBar.py:119 +msgid "Export skills needed for this fitting" +msgstr "导出使用本装配所需技能" + +#: gui/mainFrame.py:828 +msgid "Exporting skills needed..." +msgstr "正在导出所需技能..." + +#: gui/builtinStatsViews/capacitorViewFull.py:90 msgid "Extra stats" msgstr "额外状态" -#: gui/builtinStatsViews/resourcesViewFull.py:154 +#: gui/esiFittings.py:294 +msgid "Failed to generate export data" +msgstr "无法生成导出数据" + +#: gui/aboutData.py:34 +msgid "Fat Cow Icons by fatcow.com - Creative Commons Attribution 3.0 License" +msgstr "" + +#: gui/esiFittings.py:44 +msgid "Fetch Fits" +msgstr "" + +#: gui/esiFittings.py:111 +msgid "Fetching fits, please wait..." +msgstr "" + +#: gui/mainMenuBar.py:81 +msgid "Fi&t" +msgstr "装配(&T)" + +#: gui/builtinStatsViews/resourcesViewFull.py:156 msgid "Fighter bay" msgstr "铁骑舰载机仓库" -#: gui/builtinStatsViews/resourcesViewFull.py:112 +#: gui/builtinStatsViews/resourcesViewFull.py:114 msgid "Fighter squadrons active" msgstr "激活的铁骑舰载机中队" -#: gui/additionsPane.py:68 +#: gui/additionsPane.py:69 msgid "Fighters" msgstr "铁骑舰载机" -#: gui/builtinStatsViews/firepowerViewFull.py:41 +#: gui/builtinStatsViews/firepowerViewFull.py:43 msgid "Firepower" msgstr "火力" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:108 +#: gui/mainFrame.py:186 +msgid "Fittings" +msgstr "装配列表" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:110 msgid "Fleet hangar" msgstr "舰队机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:111 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:113 msgid "Fuel bay" msgstr "燃料机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:120 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:122 msgid "Gas hold" msgstr "气态矿物仓库" -#: gui/builtinStatsViews/rechargeViewFull.py:76 -msgid "Hull repair amount" -msgstr "结构维修" +#: gui/mainFrame.py:905 +msgid "Generating HTML file at: {}" +msgstr "" -#: gui/builtinStatsViews/resistancesViewFull.py:112 +#: gui/characterEditor.py:778 +msgid "Get Skills" +msgstr "" + +#: gui/mainMenuBar.py:161 +msgid "Go to EVE Online Forum thread" +msgstr "转到EvE Online论坛讨论贴" + +#: gui/mainMenuBar.py:160 +msgid "Go to wiki on GitHub" +msgstr "转到GitHub上的百科页" + +#: gui/characterSelection.py:102 +msgid "Grant Missing Skills" +msgstr "" + +#: gui/builtinStatsViews/rechargeViewFull.py:78 +msgid "Hull repair amount" +msgstr "结构修量" + +#: gui/builtinStatsViews/resistancesViewFull.py:114 msgid "Hull resistance" msgstr "结构抗性" -#: gui/additionsPane.py:74 +#: gui/setEditor.py:62 +msgid "Implant Set" +msgstr "植入体配置" + +#: gui/setEditor.py:122 +msgid "Implant Set Editor" +msgstr "植入体配置编辑器" + +#: gui/setEditor.py:50 +msgid "Implant Set name already in use, please choose another." +msgstr "植入体配置名已使用,请选择其他名称。" + +#: gui/additionsPane.py:75 gui/characterEditor.py:161 msgid "Implants" msgstr "植入体" -#: gui/builtinStatsViews/resistancesViewFull.py:113 +#: gui/characterEditor.py:372 gui/propertyEditor.py:37 +msgid "Import" +msgstr "" + +#: gui/mainFrame.py:947 +msgid "Import Error" +msgstr "导入错误" + +#: gui/characterEditor.py:442 +msgid "Import Skills" +msgstr "导入技能" + +#: gui/mainMenuBar.py:88 +msgid "Import a fit from the clipboard" +msgstr "从剪贴板导入装配" + +#: gui/mainMenuBar.py:118 +msgid "Import characters into pyfa from file" +msgstr "从文件导入角色信息" + +#: gui/mainMenuBar.py:91 +msgid "Import fittings into pyfa" +msgstr "从文件导入装配" + +#: gui/propertyEditor.py:37 gui/propertyEditor.py:38 +msgid "Import overrides" +msgstr "导入自定义属性" + +#: gui/propertyEditor.py:106 +msgid "Import pyfa override file" +msgstr "导入Pyfa自定义配置文件" + +#: gui/esiFittings.py:64 +msgid "Import to pyfa" +msgstr "导入到Pyfa" + +#: gui/mainFrame.py:1020 +msgid "Importing Character..." +msgstr "正在导入角色..." + +#: gui/mainFrame.py:845 +msgid "Importing fits" +msgstr "正在导入装配" + +#: gui/characterEditor.py:440 +msgid "" +"Importing skills into this character will set the skill levels as pending. " +"To save the skills permanently, please click the Save button at the bottom " +"of the window after importing" +msgstr "" +"导入技能到该角色将设置技能等级为等待状态。若需要永久保存技能,请在导入后点击" +"窗口底部的保存按钮" + +#: gui/builtinStatsViews/resistancesViewFull.py:115 msgid "Incoming damage pattern" msgstr "敌对伤害模型" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:116 +#: gui/targetProfileEditor.py:50 +msgid "Incorrect formatting (decimals only)" +msgstr "" + +#: gui/targetProfileEditor.py:52 +msgid "Incorrect range (must be 0-100)" +msgstr "" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:118 msgid "Industrial ship hold" msgstr "" -#: gui/builtinStatsViews/resistancesViewFull.py:85 +#: gui/mainFrame.py:893 +msgid "Invalid Path" +msgstr "" + +#: gui/esiFittings.py:198 +msgid "Invalid Token" +msgstr "" + +#: gui/itemStats.py:58 +msgid "Item stats" +msgstr "物品属性" + +#: gui/builtinStatsViews/resistancesViewFull.py:87 +#: gui/targetProfileEditor.py:121 msgid "Kinetic resistance" msgstr "动能抗性" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:115 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:117 msgid "Large ship hold" msgstr "" -#: gui/builtinStatsViews/capacitorViewFull.py:75 -#: gui/builtinStatsViews/capacitorViewFull.py:169 +#: gui/builtinStatsViews/capacitorViewFull.py:77 +#: gui/builtinStatsViews/capacitorViewFull.py:171 msgid "Lasts " msgstr "可维持" -#: gui/builtinStatsViews/resourcesViewFull.py:110 +#: gui/builtinStatsViews/resourcesViewFull.py:112 msgid "Launcher hardpoints" msgstr "发射器" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:109 +#: gui/characterEditor.py:343 +msgid "Level" +msgstr "" + +#: gui/characterEditor.py:591 gui/characterEditor.py:616 +#: gui/characterEditor.py:649 +msgid "Level {}" +msgstr "" + +#: gui/characterEditor.py:532 +msgid "Level {}d" +msgstr "" + +#: gui/mainFrame.py:273 +msgid "Loading previous fits..." +msgstr "正在打开之前的装配..." + +#: gui/characterEditor.py:794 +msgid "Log In with EVE SSO" +msgstr "通过EVE登录" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:111 msgid "Maintenance bay" msgstr "维护机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:119 +#: gui/mainFrame.py:672 +msgid "Manage Characters" +msgstr "管理角色" + +#: gui/mainFrame.py:182 +msgid "Market" +msgstr "市场" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:121 msgid "Material bay" msgstr "矿物机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:114 +#: gui/targetProfileEditor.py:124 +msgid "Maximum speed" +msgstr "亚光速航速" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:116 msgid "Medium ship hold" msgstr "中型舰船机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:118 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:120 msgid "Mineral hold" msgstr "矿物机库" -#: gui/builtinStatsViews/miningyieldViewFull.py:38 +#: gui/builtinStatsViews/miningyieldViewFull.py:39 msgid "Mining Yield" msgstr "矿物产出" -#: gui/additionsPane.py:86 +#: gui/itemStats.py:170 +msgid "Mutations" +msgstr "变质" + +#: gui/esiFittings.py:300 +msgid "Need at least one ESI character to export" +msgstr "" + +#: gui/esiFittings.py:114 +msgid "Need at least one ESI character to fetch" +msgstr "" + +#: gui/characterSelection.py:230 +#, fuzzy +#| msgid "Drones active" +msgid "No active fit" +msgstr "激活的无人机" + +#: gui/characterEditor.py:855 +msgid "None" +msgstr "" + +#: gui/additionsPane.py:87 msgid "Notes" msgstr "备注" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:117 +#: gui/mainMenuBar.py:167 +msgid "Open &Dev Tools" +msgstr "打开开发者工具(&D)" + +#: gui/characterSelection.py:150 +msgid "Open Character Editor" +msgstr "打开角色编辑器" + +#: gui/mainFrame.py:1011 +msgid "Open One Or More Character Files" +msgstr "打开多个角色文件" + +#: gui/mainFrame.py:835 +msgid "Open One Or More Fitting Files" +msgstr "打开多个装配文件" + +#: gui/mainMenuBar.py:166 +msgid "Open Wid&gets Inspect tool" +msgstr "打开控件检查工具(&G)" + +#: gui/mainMenuBar.py:166 +msgid "Open Widgets Inspect tool" +msgstr "打开控件检查工具" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:119 msgid "Ore hold" msgstr "矿石机库" -#: gui/builtinStatsViews/rechargeViewFull.py:73 +#: gui/builtinStatsViews/rechargeViewFull.py:75 msgid "Passive shield recharge" msgstr "被动回充" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:123 +#: gui/patternEditor.py:295 +msgid "Patterns exported to clipboard" +msgstr "伤害模型已导出到剪贴板" + +#: gui/patternEditor.py:276 gui/setEditor.py:210 +msgid "Patterns successfully imported from clipboard" +msgstr "从剪贴板导入伤害模型成功" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:125 msgid "Planetary goods hold" msgstr "星系开发机库" -#: gui/builtinStatsViews/resourcesViewFull.py:152 +#: gui/mainFrame.py:722 +msgid "Please Wait..." +msgstr "请稍候..." + +#: gui/esiFittings.py:281 +msgid "Please select an active fitting in the main window" +msgstr "请在主窗口选择一个装配" + +#: gui/characterEditor.py:758 +msgid "Please select another character or make a new one." +msgstr "请选择另一角色或创建新角色。" + +#: gui/mainFrame.py:896 +msgid "Please verify path location pyfa's preferences." +msgstr "请确认Pyfa偏好保存位置。" + +#: gui/builtinStatsViews/resourcesViewFull.py:154 msgid "PowerGrid" msgstr "" -#: gui/builtinStatsViews/priceViewFull.py:38 +#: gui/preferenceDialog.py:31 +msgid "Preferences" +msgstr "偏好设置" + +#: gui/builtinStatsViews/priceViewFull.py:40 msgid "Price" msgstr "价格" -#: gui/additionsPane.py:80 +#: gui/targetProfileEditor.py:372 +msgid "Profiles exported to clipboard" +msgstr "" + +#: gui/targetProfileEditor.py:352 +msgid "Profiles successfully imported from clipboard" +msgstr "" + +#: gui/additionsPane.py:81 msgid "Projected" msgstr "" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:124 +#: gui/aboutData.py:49 +msgid "" +"Pyfa (the Python Fitting Assistant) is an open-source standalone application " +"able to create and simulate fittings for EVE-Online SciFi MMORPG with a very " +"high degree of accuracy. Pyfa can run on all platforms where Python and " +"wxWidgets are supported." +msgstr "" +"Python装配助手(the Python Fitting Assistant, Pyfa)是一个开源独立应用,可用" +"于为星战前线(EvE Online)创建和模拟非常准确的装配方案。Pyfa可在python和" +"wxWidgets支持的所有平台运行。" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:126 msgid "Quafe hold" msgstr "" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:59 +#: gui/targetProfileEditor.py:126 +msgid "Radius" +msgstr "信号半径" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:61 msgid "Range" msgstr "锁定范围" -#: gui/builtinStatsViews/rechargeViewFull.py:41 +#: gui/mainFrame.py:653 +msgid "" +"Re-enabling fitting restrictions for this fit will also remove any illegal " +"items from the fit. Do you want to continue?" +msgstr "重新启用装配限制将删除所有无效物品。您要继续吗?" + +#: gui/builtinStatsViews/rechargeViewFull.py:43 msgid "Recharge rates" msgstr "回充速度" -#: gui/builtinStatsViews/rechargeViewFull.py:84 +#: gui/mainMenuBar.py:84 +msgid "Redo the most recent undone action" +msgstr "恢复最近一次撤销的操作" + +#: gui/characterSelection.py:68 +msgid "Refresh Skills" +msgstr "刷新技能" + +#: gui/builtinStatsViews/rechargeViewFull.py:86 msgid "Reinforced" msgstr "加强回充" -#: gui/builtinStatsViews/outgoingViewFull.py:65 -#: gui/builtinStatsViews/outgoingViewMinimal.py:64 +#: gui/builtinStatsViews/outgoingViewFull.py:66 +#: gui/builtinStatsViews/outgoingViewMinimal.py:65 msgid "Remote Reps" msgstr "遥修" -#: gui/builtinStatsViews/resistancesViewFull.py:45 +#: gui/esiFittings.py:353 +msgid "Remove Character" +msgstr "删除角色" + +#: gui/propertyEditor.py:70 +msgid "Remove Overides for Item" +msgstr "删除物品的自定义属性" + +#: gui/itemStats.py:185 +msgid "Requirements" +msgstr "技能需求" + +#: gui/builtinStatsViews/resistancesViewFull.py:47 msgid "Resistances" msgstr "抗性" -#: gui/builtinStatsViews/resourcesViewFull.py:82 +#: gui/builtinStatsViews/resourcesViewFull.py:84 msgid "Resources" msgstr "装配资源" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:121 +#: gui/esiFittings.py:334 +msgid "SSO Character Management" +msgstr "游戏内人物管理" + +#: gui/ssoLogin.py:13 gui/ssoLogin.py:47 +msgid "SSO Login" +msgstr "通过EVE登录" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:123 msgid "Salvage hold" msgstr "打捞件机库" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:60 +#: gui/mainFrame.py:859 +msgid "Save Backup As..." +msgstr "保存备份为..." + +#: gui/mainMenuBar.py:114 +msgid "Save Character &As..." +msgstr "保存角色为...(&A)" + +#: gui/characterEditor.py:282 +msgid "Save Character As..." +msgstr "保存角色为..." + +#: gui/mainFrame.py:466 +msgid "Save Fitting As..." +msgstr "保存装配为..." + +#: gui/propertyEditor.py:129 +msgid "Save Overrides As..." +msgstr "保存自定义属性为..." + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:62 msgid "Scan res." msgstr "扫描精度" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:61 +#: gui/characterEditor.py:356 +#, python-brace-format +msgid "Sec Status: {0:.2f}" +msgstr "安全等级: {0:.2f}" + +#: gui/characterEditor.py:914 +msgid "Security Status is used in some CONCORD hull calculations" +msgstr "安全等级会用于计算CONCORD警察船体属性" + +#: gui/esiFittings.py:284 +msgid "Sending request and awaiting response" +msgstr "正在发送请求和接收响应" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:63 msgid "Sensor str." msgstr "传感器强度" -#: gui/builtinStatsViews/resistancesViewFull.py:110 +#: gui/characterEditor.py:907 +msgid "Set Security Status" +msgstr "设置安全等级" + +#: gui/setEditor.py:229 +msgid "Sets exported to clipboard" +msgstr "植入体配置已导出到剪贴板" + +#: gui/characterEditor.py:326 +msgid "" +"Setting an Alpha clone does not replace the character's skills, but rather " +"caps them to Alpha levels." +msgstr "" +"设置为阿尔法克隆不会替换角色技能等级,但会设置技能等级上限为阿尔法状态。" + +#: gui/builtinStatsViews/resistancesViewFull.py:112 msgid "Shield resistance" msgstr "护盾抗性" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:112 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:114 msgid "Ship hold" msgstr "" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:84 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:86 msgid "Signature" msgstr "信号半径" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:113 +#: gui/targetProfileEditor.py:125 +msgid "" +"Signature radius\n" +"Leave blank for infinitely big value" +msgstr "" +"信号半径\n" +"保持为空表示信号半径无限大" + +#: gui/aboutData.py:33 +msgid "" +"Silk Icons Set by famfamfam.com - Creative Commons Attribution 2.5 License" +msgstr "" + +#: gui/characterEditor.py:342 +msgid "Skill" +msgstr "技能" + +#: gui/characterEditor.py:160 +msgid "Skills" +msgstr "技能列表" + +#: gui/characterSelection.py:242 +msgid "Skills required:" +msgstr "所需技能:" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:115 msgid "Small ship hold" msgstr "" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:82 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:84 msgid "Speed" msgstr "亚光速航速" -#: gui/builtinStatsViews/capacitorViewFull.py:169 +#: gui/builtinStatsViews/capacitorViewFull.py:171 msgid "Stable: " msgstr "稳定:" -#: gui/builtinStatsViews/rechargeViewFull.py:85 +#: gui/characterEditor.py:901 +msgid "Success" +msgstr "成功" + +#: gui/characterEditor.py:901 +msgid "Successfully fetched skills" +msgstr "成功获取到技能列表" + +#: gui/builtinStatsViews/rechargeViewFull.py:87 msgid "Sustained" msgstr "持续回充" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:36 +#: gui/targetProfileEditor.py:86 +msgid "Target Profile" +msgstr "目标属性" + +#: gui/targetProfileEditor.py:130 +msgid "Target Profile Editor" +msgstr "目标属性编辑器" + +#: gui/targetProfileEditor.py:73 +msgid "Target Profile name already in use, please choose another." +msgstr "目标属性名已使用,请选择其他名称。" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:38 msgid "Targeting && Misc" msgstr "目标锁定和其他" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:58 +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:60 msgid "Targets" msgstr "最大锁定数" -#: gui/builtinStatsViews/resistancesViewFull.py:84 +#: gui/mainFrame.py:810 +msgid "Text skills training file" +msgstr "技能列表文本文件" + +#: gui/mainFrame.py:950 +msgid "The following error was generated" +msgstr "Pyfa 遇到以下错误" + +#: gui/mainFrame.py:894 +msgid "The following path is invalid or does not exist:" +msgstr "下述路径无效或不存在:" + +#: gui/characterEditor.py:463 +msgid "There was an error importing skills, please see log file" +msgstr "导入技能列表出错,详见日志文件" + +#: gui/esiFittings.py:196 +msgid "" +"There was an error validating characters' SSO token. Please try logging into " +"the character again to reset the token." +msgstr "验证EvE角色登录信息出错,请重试登录以刷新信息。" + +#: gui/esiFittings.py:179 +msgid "" +"There was an issue starting up the localized server, try setting Login " +"Authentication Method to Manual by going to Preferences -> EVE SS0 -> Login " +"Authentication Method. If this doesn't fix the problem please file an issue " +"on Github." +msgstr "" +"无法启动本地服务器,请尝试转到偏好设置->EVE SSO->登录验证方法并设置为手动模" +"式。如果仍然遇到问题,请在Github填写issue以报告该问题。" + +#: gui/builtinStatsViews/resistancesViewFull.py:86 +#: gui/targetProfileEditor.py:120 msgid "Thermal resistance" msgstr "热能抗性" -#: gui/builtinStatsViews/miningyieldViewFull.py:88 +#: gui/builtinStatsViews/miningyieldViewFull.py:89 msgid "Total" msgstr "总容量" -#: gui/builtinStatsViews/capacitorViewFull.py:65 +#: gui/builtinStatsViews/capacitorViewFull.py:67 msgid "Total: " msgstr "总容量:" -#: gui/builtinStatsViews/resourcesViewFull.py:109 +#: gui/itemStats.py:166 +msgid "Traits" +msgstr "特征" + +#: gui/builtinStatsViews/resourcesViewFull.py:111 msgid "Turret hardpoints" msgstr "炮台" -#: gui/builtinStatsViews/targetingMiscViewMinimal.py:85 +#: gui/mainMenuBar.py:83 +msgid "Undo the most recent action" +msgstr "撤销最近一次操作" + +#: gui/characterEditor.py:614 +msgid "Unlearn" +msgstr "" + +#: gui/updateDialog.py:54 +msgid "Update Available" +msgstr "有更新可用" + +#: gui/ssoLogin.py:60 +msgid "Waiting for character login through EVE Single Sign-On." +msgstr "正在等待角色通过EvE登录。" + +#: gui/builtinStatsViews/targetingMiscViewMinimal.py:87 msgid "Warp Speed" msgstr "曲速航速" -#: gui/builtinStatsViews/firepowerViewFull.py:66 -#: gui/builtinStatsViews/miningyieldViewFull.py:58 +#: gui/characterEditor.py:757 +msgid "You cannot link All 0 or All 5 characters to an EVE character." +msgstr "你不能关联全0级或全5级到一个EvE角色。" + +#: gui/characterEditor.py:76 +msgid "You must supply a name for the Character!" +msgstr "您必须填写一个角色名!" + +#: gui/setEditor.py:48 +msgid "You must supply a name for the Implant Set!" +msgstr "您必须填写一个植入体配置名!" + +#: gui/patternEditor.py:51 +msgid "You must supply a name for your Damage Profile!" +msgstr "您必须填写一个伤害模型名!" + +#: gui/targetProfileEditor.py:71 +msgid "You must supply a name for your Target Profile!" +msgstr "您必须填写一个目标属性名!" + +#: gui/characterEditor.py:372 gui/patternEditor.py:171 gui/setEditor.py:148 +#: gui/targetProfileEditor.py:221 +msgid "from" +msgstr "" + +#: gui/errorDialog.py:69 +msgid "pyfa error" +msgstr "" + +#: gui/errorDialog.py:76 +msgid "" +"pyfa has experienced an unexpected issue. Below is a message that contains " +"crucial \n" +"information about how this was triggered. Please contact the developers with " +"the \n" +"information provided through the EVE Online forums or file a GitHub issue." +msgstr "" + +#: gui/aboutData.py:31 +msgid "pyfa is released under GNU GPLv3 - see included LICENSE file" +msgstr "" + +#: gui/characterEditor.py:373 gui/patternEditor.py:172 gui/setEditor.py:149 +#: gui/targetProfileEditor.py:222 +msgid "to" +msgstr "" + +#: gui/itemStats.py:87 +#, python-brace-format +msgid "{context}Stats: {name}{debug_info}" +msgstr "" + +#: gui/characterEditor.py:284 +msgid "{} Copy" +msgstr "" + +#: gui/setEditor.py:161 +msgid "{} implant sets {} clipboard" +msgstr "{}植入体配置{}剪贴板" + +#: gui/targetProfileEditor.py:234 +msgid "{} profiles {} clipboard" +msgstr "{}目标属性{}剪贴板" + msgid "drone" msgstr "无人机" -#: gui/builtinStatsViews/firepowerViewFull.py:66 -msgid "droneDPS" -msgstr "" - -#: gui/builtinStatsViews/firepowerViewFull.py:57 -msgid "full" -msgstr "" - -#: gui/builtinStatsViews/miningyieldViewFull.py:58 msgid "miner" msgstr "采矿器" -#: gui/builtinStatsViews/miningyieldViewFull.py:58 -msgid "mining" -msgstr "" - -#: gui/builtinStatsViews/firepowerViewFull.py:66 msgid "turret" msgstr "炮台" -#: gui/builtinStatsViews/firepowerViewFull.py:66 msgid "weapon" msgstr "武器" From a05e7dbad1b5e8df0d7455cbbe620c6fe49d76a9 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Sat, 20 Jun 2020 17:42:52 +0800 Subject: [PATCH 2/5] i18n/zh_CN: add more UI translation --- gui/builtinShipBrowser/navigationPanel.py | 20 +-- gui/builtinStatsViews/resistancesViewFull.py | 4 +- gui/characterEditor.py | 2 +- gui/chrome_tabs.py | 4 +- gui/multiSwitch.py | 2 +- locale/zh_CN/LC_MESSAGES/lang.po | 140 ++++++++++++------- 6 files changed, 103 insertions(+), 69 deletions(-) diff --git a/gui/builtinShipBrowser/navigationPanel.py b/gui/builtinShipBrowser/navigationPanel.py index dfd1c4963..b03808de5 100644 --- a/gui/builtinShipBrowser/navigationPanel.py +++ b/gui/builtinShipBrowser/navigationPanel.py @@ -14,8 +14,8 @@ from service.fit import Fit from utils.cjk import isStringCjk from .events import FitSelected, SearchSelected, ImportSelected, Stage1Selected, Stage2Selected, Stage3Selected - pyfalog = Logger(__name__) +_ = wx.GetTranslation class NavigationPanel(SFItem.SFBrowserItem): @@ -45,20 +45,20 @@ class NavigationPanel(SFItem.SFBrowserItem): self.recentBmp = self.AdjustChannels(self.recentBmpH) self.newBmp = self.AdjustChannels(self.newBmpH) - self.toolbar.AddButton(self.resetBmp, "Ship groups", clickCallback=self.OnHistoryReset, + self.toolbar.AddButton(self.resetBmp, _("Ship groups"), clickCallback=self.OnHistoryReset, hoverBitmap=self.resetBmpH) - self.toolbar.AddButton(self.rewBmp, "Back", clickCallback=self.OnHistoryBack, hoverBitmap=self.rewBmpH) - self.btnNew = self.toolbar.AddButton(self.newBmp, "New fitting", clickCallback=self.OnNewFitting, + self.toolbar.AddButton(self.rewBmp, _("Back"), clickCallback=self.OnHistoryBack, hoverBitmap=self.rewBmpH) + self.btnNew = self.toolbar.AddButton(self.newBmp, _("New fitting"), clickCallback=self.OnNewFitting, hoverBitmap=self.newBmpH, show=False) - self.btnSwitch = self.toolbar.AddButton(self.switchBmpD, "Hide empty ship groups", + self.btnSwitch = self.toolbar.AddButton(self.switchBmpD, _("Hide empty ship groups"), clickCallback=self.ToggleEmptyGroupsView, hoverBitmap=self.switchBmpH, show=False) - self.btnRecent = self.toolbar.AddButton(self.recentBmpD, "Recent Fits", + self.btnRecent = self.toolbar.AddButton(self.recentBmpD, _("Recent Fits"), clickCallback=self.ToggleRecentShips, hoverBitmap=self.recentBmpH, show=True) modifier = "CTRL" if 'wxMac' not in wx.PlatformInfo else "CMD" - self.toolbar.AddButton(self.searchBmp, "Search fittings ({}+F)".format(modifier), clickCallback=self.ToggleSearchBox, + self.toolbar.AddButton(self.searchBmp, _("Search fittings") + " ({}+F)".format(modifier), clickCallback=self.ToggleSearchBox, hoverBitmap=self.searchBmpH) self.padding = 4 @@ -70,7 +70,7 @@ class NavigationPanel(SFItem.SFBrowserItem): w, h = size self.BrowserSearchBox = wx.TextCtrl(self, wx.ID_ANY, "", wx.DefaultPosition, (-1, h - 2 if 'wxGTK' in wx.PlatformInfo else -1), - (wx.BORDER_NONE if 'wxGTK' in wx.PlatformInfo else 0)) + (wx.BORDER_NONE if 'wxGTK' in wx.PlatformInfo else 0)) self.BrowserSearchBox.Show(False) # self.BrowserSearchBox.Bind(wx.EVT_TEXT_ENTER, self.OnBrowserSearchBoxEnter) @@ -144,11 +144,11 @@ class NavigationPanel(SFItem.SFBrowserItem): def ToggleEmptyGroupsView(self): if self.shipBrowser.filterShipsWithNoFits: self.shipBrowser.filterShipsWithNoFits = False - self.btnSwitch.label = "Hide empty ship groups" + self.btnSwitch.label = _("Hide empty ship groups") self.btnSwitch.normalBmp = self.switchBmpD else: self.shipBrowser.filterShipsWithNoFits = True - self.btnSwitch.label = "Show empty ship groups" + self.btnSwitch.label = _("Show empty ship groups") self.btnSwitch.normalBmp = self.switchBmp stage = self.shipBrowser.GetActiveStage() diff --git a/gui/builtinStatsViews/resistancesViewFull.py b/gui/builtinStatsViews/resistancesViewFull.py index 63f1c3d7e..05ef64283 100644 --- a/gui/builtinStatsViews/resistancesViewFull.py +++ b/gui/builtinStatsViews/resistancesViewFull.py @@ -58,7 +58,7 @@ class ResistancesViewFull(StatsView): # Custom header EHP headerContentSizer = self.headerPanel.Parent.GetHeaderContentSizer() - self.stEff = wx.StaticText(headerPanel, wx.ID_ANY, "( Effective HP: ") + self.stEff = wx.StaticText(headerPanel, wx.ID_ANY, "(" + _("Effective HP") + ": ") headerContentSizer.Add(self.stEff) headerPanel.GetParent().AddToggleItem(self.stEff) @@ -66,7 +66,7 @@ class ResistancesViewFull(StatsView): headerContentSizer.Add(self.labelEhp, 0) headerPanel.GetParent().AddToggleItem(self.labelEhp) - stCls = wx.StaticText(headerPanel, wx.ID_ANY, " )") + stCls = wx.StaticText(headerPanel, wx.ID_ANY, ")") headerPanel.GetParent().AddToggleItem(stCls) headerContentSizer.Add(stCls) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index b551de716..c80feb015 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -340,7 +340,7 @@ class SkillTreeView(wx.Panel): self.skillBookDirtyImageId = self.imageList.Add(wx.Icon(BitmapLoader.getBitmap("skill_small_red", "gui"))) tree.AppendColumn(_("Skill")) - tree.AppendColumn(_("Level"), align=wx.ALIGN_CENTER) + tree.AppendColumn(_("Level")) # tree.SetMainColumn(0) self.root = tree.GetRootItem() diff --git a/gui/chrome_tabs.py b/gui/chrome_tabs.py index 8ca0f92a0..ad777186e 100644 --- a/gui/chrome_tabs.py +++ b/gui/chrome_tabs.py @@ -24,7 +24,7 @@ from gui.bitmap_loader import BitmapLoader from gui.utils import color as color_utils, draw, fonts from service.fit import Fit - +_ = wx.GetTranslation _PageChanging, EVT_NOTEBOOK_PAGE_CHANGING = wx.lib.newevent.NewEvent() _PageChanged, EVT_NOTEBOOK_PAGE_CHANGED = wx.lib.newevent.NewEvent() _PageAdding, EVT_NOTEBOOK_PAGE_ADDING = wx.lib.newevent.NewEvent() @@ -227,7 +227,7 @@ class ChromeNotebook(wx.Panel): self.page_container.Layout() self._pages.append(win) - self.tabs_container.AddTab(title, image, closeable) + self.tabs_container.AddTab(_(title), image, closeable) self._active_page = win self.ShowActive(True) diff --git a/gui/multiSwitch.py b/gui/multiSwitch.py index 8ba7d1dec..530563b24 100644 --- a/gui/multiSwitch.py +++ b/gui/multiSwitch.py @@ -37,7 +37,7 @@ class MultiSwitch(ChromeNotebook): if h: h(type, info) - def AddPage(self, tabWnd=None, tabTitle=_("Empty Tab"), tabImage=None): + def AddPage(self, tabWnd=None, tabTitle="Empty Tab", tabImage=None): if tabWnd is None: tabWnd = gui.builtinViews.emptyView.BlankPage(self) tabWnd.handleDrag = lambda type, info: self.handleDrag(type, info) diff --git a/locale/zh_CN/LC_MESSAGES/lang.po b/locale/zh_CN/LC_MESSAGES/lang.po index 60791f9e3..5aa12dd60 100644 --- a/locale/zh_CN/LC_MESSAGES/lang.po +++ b/locale/zh_CN/LC_MESSAGES/lang.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: pyfa 2.22.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 11:57+0800\n" -"PO-Revision-Date: 2020-06-20 15:59+0800\n" +"POT-Creation-Date: 2020-06-20 17:09+0800\n" +"PO-Revision-Date: 2020-06-20 17:40+0800\n" "Last-Translator: zhaoweny \n" "Language-Team: Chinese (simplified)\n" "Language: zh_CN\n" @@ -114,7 +114,7 @@ msgstr "导入装配(&I)" #: gui/mainMenuBar.py:122 msgid "&Manage ESI Characters" -msgstr "管理ESI角色(&M)" +msgstr "管理游戏内角色(&M)" #: gui/mainMenuBar.py:68 msgid "&New Tab" @@ -242,6 +242,10 @@ msgstr "属性编辑器" msgid "Attributes" msgstr "属性" +#: gui/builtinShipBrowser/navigationPanel.py:50 +msgid "Back" +msgstr "返回" + #: gui/mainFrame.py:874 msgid "Backing up {} fits to: {}" msgstr "" @@ -256,7 +260,7 @@ msgstr "备份装配" #: gui/mainFrame.py:952 msgid "Be aware that already processed fits were not saved" -msgstr "" +msgstr "请注意已处理的装配未作保存" #: gui/additionsPane.py:78 msgid "Boosters" @@ -365,19 +369,19 @@ msgstr "复制所需技能" #: gui/ssoLogin.py:18 msgid "Copy and paste the block of text provided by pyfa.io" -msgstr "" +msgstr "请复制和粘贴pyfa.io提供的字符串" #: gui/patternEditor.py:290 gui/setEditor.py:222 gui/targetProfileEditor.py:366 msgid "Could not import from clipboard" -msgstr "" +msgstr "无法从剪贴板导入" #: gui/targetProfileEditor.py:359 msgid "Could not import from clipboard:" -msgstr "" +msgstr "无法从剪贴板导入:" #: gui/patternEditor.py:283 gui/setEditor.py:218 msgid "Could not import from clipboard: unknown errors" -msgstr "" +msgstr "无法从剪贴板导入:未知错误" #: gui/patternEditor.py:99 msgid "Damage Pattern Editor" @@ -394,11 +398,11 @@ msgstr "伤害模型名已占用,请使用其他名称。" #: gui/propertyEditor.py:270 #, python-format msgid "Default Value: %0.3f" -msgstr "" +msgstr "默认值:%0.3f" #: gui/esiFittings.py:65 msgid "Delete from EVE" -msgstr "从游戏内删除" +msgstr "删除游戏内装配" #: gui/itemStats.py:189 msgid "Dependents" @@ -418,7 +422,7 @@ msgstr "关闭装配资源限制(&S)" #: gui/esiFittings.py:156 msgid "Do you really want to delete {} ({}) from EVE?" -msgstr "" +msgstr "真的要从游戏内删除 {} ({})吗?" #: gui/updateDialog.py:102 msgid "Don't remind me again for this release" @@ -426,7 +430,7 @@ msgstr "不再提示此更新" #: gui/characterEditor.py:789 msgid "Don't see your EVE character in the list?" -msgstr "没看到你的EvE角色?" +msgstr "列表中没有你的EvE角色?" #: gui/updateDialog.py:113 msgid "Download" @@ -466,7 +470,7 @@ msgstr "电磁抗性" #: gui/esiFittings.py:313 gui/esiFittings.py:317 gui/esiFittings.py:325 msgid "ERROR" -msgstr "" +msgstr "错误" #: gui/mainFrame.py:1013 msgid "EVE API XML character files" @@ -474,27 +478,31 @@ msgstr "" #: gui/characterEditor.py:162 msgid "EVE SSO" -msgstr "" +msgstr "连接到EvE" #: gui/mainFrame.py:860 msgid "EVE XML fitting file" -msgstr "" +msgstr "EvE装配XML文件" #: gui/mainFrame.py:837 msgid "EVE XML fitting files" -msgstr "" +msgstr "EvE装配XML文件" #: gui/mainFrame.py:467 msgid "EVE XML fitting files (*.xml)|*.xml" -msgstr "" +msgstr "EvE装配XML文件 (*.xml)|*.xml" #: gui/mainFrame.py:809 msgid "EVEMon skills training XML file" -msgstr "" +msgstr "EvEMon技能训练XML文件" #: gui/mainFrame.py:808 msgid "EVEMon skills training file" -msgstr "" +msgstr "EvEMon技能训练文件" + +#: gui/builtinStatsViews/resistancesViewFull.py:61 +msgid "Effective HP" +msgstr "有效HP" #: gui/itemStats.py:192 msgid "Effects" @@ -521,15 +529,15 @@ msgstr "请为新角色输入一个名称:" #: gui/mainFrame.py:897 gui/patternEditor.py:58 gui/setEditor.py:55 #: gui/targetProfileEditor.py:78 msgid "Error" -msgstr "" +msgstr "错误" #: gui/characterEditor.py:897 gui/characterSelection.py:173 msgid "Error fetching skill information" -msgstr "" +msgstr "无法获取技能信息" #: gui/errorDialog.py:68 msgid "Error!" -msgstr "" +msgstr "错误!" #: gui/builtinStatsViews/resistancesViewFull.py:88 #: gui/targetProfileEditor.py:122 @@ -594,11 +602,11 @@ msgstr "" #: gui/esiFittings.py:44 msgid "Fetch Fits" -msgstr "" +msgstr "获取装配" #: gui/esiFittings.py:111 msgid "Fetching fits, please wait..." -msgstr "" +msgstr "正在获取装配,请稍候..." #: gui/mainMenuBar.py:81 msgid "Fi&t" @@ -642,7 +650,7 @@ msgstr "" #: gui/characterEditor.py:778 msgid "Get Skills" -msgstr "" +msgstr "获取技能列表" #: gui/mainMenuBar.py:161 msgid "Go to EVE Online Forum thread" @@ -656,6 +664,11 @@ msgstr "转到GitHub上的百科页" msgid "Grant Missing Skills" msgstr "" +#: gui/builtinShipBrowser/navigationPanel.py:53 +#: gui/builtinShipBrowser/navigationPanel.py:147 +msgid "Hide empty ship groups" +msgstr "隐藏空的舰船类型" + #: gui/builtinStatsViews/rechargeViewFull.py:78 msgid "Hull repair amount" msgstr "结构修量" @@ -735,15 +748,15 @@ msgstr "" #: gui/builtinStatsViews/resistancesViewFull.py:115 msgid "Incoming damage pattern" -msgstr "敌对伤害模型" +msgstr "伤害分布" #: gui/targetProfileEditor.py:50 msgid "Incorrect formatting (decimals only)" -msgstr "" +msgstr "格式无效(仅允许小数)" #: gui/targetProfileEditor.py:52 msgid "Incorrect range (must be 0-100)" -msgstr "" +msgstr "范围无效(必须是 0-100)" #: gui/builtinStatsViews/targetingMiscViewMinimal.py:118 msgid "Industrial ship hold" @@ -751,11 +764,11 @@ msgstr "" #: gui/mainFrame.py:893 msgid "Invalid Path" -msgstr "" +msgstr "无效路径" #: gui/esiFittings.py:198 msgid "Invalid Token" -msgstr "" +msgstr "无效登录信息" #: gui/itemStats.py:58 msgid "Item stats" @@ -781,16 +794,16 @@ msgstr "发射器" #: gui/characterEditor.py:343 msgid "Level" -msgstr "" +msgstr "技能等级" #: gui/characterEditor.py:591 gui/characterEditor.py:616 #: gui/characterEditor.py:649 msgid "Level {}" -msgstr "" +msgstr "等级" #: gui/characterEditor.py:532 msgid "Level {}d" -msgstr "" +msgstr "等级" #: gui/mainFrame.py:273 msgid "Loading previous fits..." @@ -838,17 +851,19 @@ msgstr "变质" #: gui/esiFittings.py:300 msgid "Need at least one ESI character to export" -msgstr "" +msgstr "请为导出至少选择一个游戏内角色" #: gui/esiFittings.py:114 msgid "Need at least one ESI character to fetch" -msgstr "" +msgstr "请为获取至少选择一个游戏内角色" + +#: gui/builtinShipBrowser/navigationPanel.py:51 +msgid "New fitting" +msgstr "新装配" #: gui/characterSelection.py:230 -#, fuzzy -#| msgid "Drones active" msgid "No active fit" -msgstr "激活的无人机" +msgstr "没有选中的装配" #: gui/characterEditor.py:855 msgid "None" @@ -920,7 +935,7 @@ msgstr "请确认Pyfa偏好保存位置。" #: gui/builtinStatsViews/resourcesViewFull.py:154 msgid "PowerGrid" -msgstr "" +msgstr "PG" #: gui/preferenceDialog.py:31 msgid "Preferences" @@ -932,15 +947,15 @@ msgstr "价格" #: gui/targetProfileEditor.py:372 msgid "Profiles exported to clipboard" -msgstr "" +msgstr "目标属性已导出到剪贴板" #: gui/targetProfileEditor.py:352 msgid "Profiles successfully imported from clipboard" -msgstr "" +msgstr "已成功从剪贴板导入目标属性" #: gui/additionsPane.py:81 msgid "Projected" -msgstr "" +msgstr "环境效果" #: gui/aboutData.py:49 msgid "" @@ -971,6 +986,10 @@ msgid "" "items from the fit. Do you want to continue?" msgstr "重新启用装配限制将删除所有无效物品。您要继续吗?" +#: gui/builtinShipBrowser/navigationPanel.py:56 +msgid "Recent Fits" +msgstr "最近使用的装配" + #: gui/builtinStatsViews/rechargeViewFull.py:43 msgid "Recharge rates" msgstr "回充速度" @@ -1048,6 +1067,10 @@ msgstr "保存自定义属性为..." msgid "Scan res." msgstr "扫描精度" +#: gui/builtinShipBrowser/navigationPanel.py:61 +msgid "Search fittings" +msgstr "搜索装配" + #: gui/characterEditor.py:356 #, python-brace-format msgid "Sec Status: {0:.2f}" @@ -1084,10 +1107,18 @@ msgstr "" msgid "Shield resistance" msgstr "护盾抗性" +#: gui/builtinShipBrowser/navigationPanel.py:48 +msgid "Ship groups" +msgstr "舰船类型" + #: gui/builtinStatsViews/targetingMiscViewMinimal.py:114 msgid "Ship hold" msgstr "" +#: gui/builtinShipBrowser/navigationPanel.py:151 +msgid "Show empty ship groups" +msgstr "显示空的舰船类型" + #: gui/builtinStatsViews/targetingMiscViewMinimal.py:86 msgid "Signature" msgstr "信号半径" @@ -1220,7 +1251,7 @@ msgstr "撤销最近一次操作" #: gui/characterEditor.py:614 msgid "Unlearn" -msgstr "" +msgstr "忘掉" #: gui/updateDialog.py:54 msgid "Update Available" @@ -1261,7 +1292,7 @@ msgstr "" #: gui/errorDialog.py:69 msgid "pyfa error" -msgstr "" +msgstr "Pyfa错误" #: gui/errorDialog.py:76 msgid "" @@ -1271,10 +1302,13 @@ msgid "" "the \n" "information provided through the EVE Online forums or file a GitHub issue." msgstr "" +"Pyfa遇到了未知问题。下方文本框显示了该问题如何发生的关键信息。\n" +"请通过EvE论坛或GitHub issue联系开发者,并提供下方文本框中的信息。" #: gui/aboutData.py:31 msgid "pyfa is released under GNU GPLv3 - see included LICENSE file" msgstr "" +"pyfa基于GNU通用公共许可证第三版(GPLv3)发布 - 详见应用目录下的LICENSE文件" #: gui/characterEditor.py:373 gui/patternEditor.py:172 gui/setEditor.py:149 #: gui/targetProfileEditor.py:222 @@ -1288,7 +1322,7 @@ msgstr "" #: gui/characterEditor.py:284 msgid "{} Copy" -msgstr "" +msgstr "复制{}" #: gui/setEditor.py:161 msgid "{} implant sets {} clipboard" @@ -1298,14 +1332,14 @@ msgstr "{}植入体配置{}剪贴板" msgid "{} profiles {} clipboard" msgstr "{}目标属性{}剪贴板" -msgid "drone" -msgstr "无人机" +#~ msgid "drone" +#~ msgstr "无人机" -msgid "miner" -msgstr "采矿器" +#~ msgid "miner" +#~ msgstr "采矿器" -msgid "turret" -msgstr "炮台" +#~ msgid "turret" +#~ msgstr "炮台" -msgid "weapon" -msgstr "武器" +#~ msgid "weapon" +#~ msgstr "武器" From 49cf03759b63d5a818ffd5ddfdebed4a9fe9a177 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Sat, 20 Jun 2020 17:57:01 +0800 Subject: [PATCH 3/5] i18n: fix unresolved reference Inspection errors --- config.py | 1 + gui/propertyEditor.py | 8 +++++--- gui/ssoLogin.py | 12 +++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/config.py b/config.py index 91d9ff3ec..5bdaec471 100644 --- a/config.py +++ b/config.py @@ -41,6 +41,7 @@ cipher = None clientHash = None experimentalFeatures = None version = None +language = None ESI_CACHE = 'esi_cache' diff --git a/gui/propertyEditor.py b/gui/propertyEditor.py index c2a2ecee6..a649d5808 100644 --- a/gui/propertyEditor.py +++ b/gui/propertyEditor.py @@ -19,7 +19,9 @@ from service.market import Market pyfalog = Logger(__name__) -_ = wx.GetTranslation +_t = wx.GetTranslation + + class AttributeEditor(AuxiliaryFrame): def __init__(self, parent): @@ -142,8 +144,8 @@ class AttributeEditor(AuxiliaryFrame): def OnClear(self, event): with wx.MessageDialog( self, - _("Are you sure you want to delete all overrides?"), - _("Confirm Delete"), + _t("Are you sure you want to delete all overrides?"), + _t("Confirm Delete"), wx.YES | wx.NO | wx.ICON_EXCLAMATION ) as dlg: if dlg.ShowModal() == wx.ID_YES: diff --git a/gui/ssoLogin.py b/gui/ssoLogin.py index 8a1cf1912..07b342780 100644 --- a/gui/ssoLogin.py +++ b/gui/ssoLogin.py @@ -3,6 +3,8 @@ import gui.mainFrame import webbrowser import gui.globalEvents as GE +_t = wx.GetTranslation + class SsoLogin(wx.Dialog): @@ -10,12 +12,12 @@ class SsoLogin(wx.Dialog): mainFrame = gui.mainFrame.MainFrame.getInstance() super().__init__( - mainFrame, id=wx.ID_ANY, title=_("SSO Login"), style=wx.DEFAULT_DIALOG_STYLE, - size=wx.Size(450, 240) if "wxGTK" in wx.PlatformInfo else wx.Size(400, 240)) + mainFrame, id=wx.ID_ANY, title=_t("SSO Login"), style=wx.DEFAULT_DIALOG_STYLE, + size=wx.Size(450, 240) if "wxGTK" in wx.PlatformInfo else wx.Size(400, 240)) bSizer1 = wx.BoxSizer(wx.VERTICAL) - text = wx.StaticText(self, wx.ID_ANY, _("Copy and paste the block of text provided by pyfa.io")) + text = wx.StaticText(self, wx.ID_ANY, _t("Copy and paste the block of text provided by pyfa.io")) bSizer1.Add(text, 0, wx.ALL | wx.EXPAND, 10) self.ssoInfoCtrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, (-1, -1), style=wx.TE_MULTILINE) @@ -44,7 +46,7 @@ class SsoLoginServer(wx.Dialog): def __init__(self, port): self.mainFrame = gui.mainFrame.MainFrame.getInstance() - super().__init__(self.mainFrame, id=wx.ID_ANY, title=_("SSO Login"), size=(-1, -1), style=wx.DEFAULT_DIALOG_STYLE) + super().__init__(self.mainFrame, id=wx.ID_ANY, title=_t("SSO Login"), size=(-1, -1), style=wx.DEFAULT_DIALOG_STYLE) from service.esi import Esi @@ -57,7 +59,7 @@ class SsoLoginServer(wx.Dialog): self.mainFrame.Bind(GE.EVT_SSO_LOGIN, self.OnLogin) self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy) - text = wx.StaticText(self, wx.ID_ANY, _("Waiting for character login through EVE Single Sign-On.")) + text = wx.StaticText(self, wx.ID_ANY, _t("Waiting for character login through EVE Single Sign-On.")) bSizer1.Add(text, 0, wx.ALL | wx.EXPAND, 10) bSizer3 = wx.BoxSizer(wx.VERTICAL) From e4e49cef54581bc5b30999c4df59ffc834e8da30 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Sat, 20 Jun 2020 21:21:55 +0800 Subject: [PATCH 4/5] i18n: extend locale/README.md and add translation workflow detail --- locale/README.md | 83 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/locale/README.md b/locale/README.md index faeb0ea91..1d29d112d 100644 --- a/locale/README.md +++ b/locale/README.md @@ -1,12 +1,81 @@ -On my Windows wsl2 (more generic explaination is needed): +# Pyfa Internationalization(i18n) and Localization(l10n) -`find ./gui -iname "*.py" | xargs pygettext3 -d lang -o locale/lang.pot` +Below is a summary of [GNU gettext](https://www.gnu.org/software/gettext/) manual, adapted for Pyfa i18n workflow. -This will generate the pot that should be carried over to the various language directories and renamed .po +[Poedit](https://poedit.net/) offers a nice GUI for same GNU gettext translation workflow. -`msgfmt -o lang.mo lang` +## i18n with command line -Run in each language directory, will compile the .po files to .mo files +Windows users can get these tools via Git for windows, Msys2 or Cygwin; or just use WSL / WSL2. +For Linux and macOS users these tools might be avaliable out-of-box. -## Issues -`zh_CH` doesn't seem to work. AddCatalog is not functioning. See https://discuss.wxpython.org/t/localization-not-working-with-zh-ch-addcatalog-returns-false/34628 +### To generate new template for translation: + +```console +$ find */ *.py -name "*.py" | xgettext -o locale/lang.pot -d lang -k_t -k_r - +``` + +explaination: + +* `find */ *.py -name "*.py"`: collect all `.py` file path in root dir and all sub-folder, write it to stdout +* `xgettext`: a utility looking for keyword and put string literals in a specific format for human translation + * `-o locale/lang.pot`: let `xgettext` write to `locale/lang.pot` + * `-d lang`: default language domain is `lang` + * `-k_t -k_r`: besides default keyword (including `_`, see `info xgettext` for detail), also look for `_t` and `_r` + * `-`: let `xgettext` to read from stdin, which is connected to `find` stdout + +this `locale/lang.pot` is called PO template, which is throwed away once actual `ll_CC/LC_MESSAGES/lang.po` is ready for use. + +### To initalize PO file for new language + +```console +$ msginit -i locale/lang.pot -l ll_CC -o locale/ll_CC/LC_MESSAGES/lang.po +``` + +explaination: + +* `-i locale/lang.pot`: input file location +* `-l ll_CC`: target locale. `ll` should be a language code, and `CC` should be a country code +* `-o locale/ll_CC/LC_MESSAGES/lang.po`: output file + * `ll_CC`: same as above + * `LC_MESSAGES`: GNU gettext conventional path to search for localized messages + * `lang.po`: language domain and file format + +this `locale/ll_CC/LC_MESSAGES/lang.po` should be checked into VCS, later it will be converted into mechine readable format (MO). + +### To update PO file for existing translation + +```console +$ msgmerge locale/ll_CC/LC_MESSAGES/lang.po locale/lang.pot +``` + +### To do actual translation + +just edit the `lang.po` file :) + +### To generate mechine readable MO file + +For a single locale: + +```console +$ msgfmt locale/ll_CC/LC_MESSAGES/lang.po -o locale/ll_CC/LC_MESSAGES/lang.mo +``` + +For all avaliable locale: +```bash +for $f in locale/*/; do + msgfmt $f/LC_MESSAGES/lang.po -o $f/LC_MESSAGES/lang.mo +done +``` + +## i18n with Poedit + +### To update PO file for existing translation + +1. open a existing `locale/ll_CC/LC_MESSAGES/lang.po` +2. *Catalog* -> *Update form POT file* +3. select pre-prepared `lang.pot` file + +### To translate and generate MO file + +edit the translation and hit Save :) \ No newline at end of file From 413bc5d46cb6b965b641e4a2cdca077b83d5e7c9 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sat, 20 Jun 2020 14:59:49 -0400 Subject: [PATCH 5/5] Minor tweaks per PR review --- gui/chrome_tabs.py | 5 +++-- gui/multiSwitch.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/chrome_tabs.py b/gui/chrome_tabs.py index ad777186e..551ac688e 100644 --- a/gui/chrome_tabs.py +++ b/gui/chrome_tabs.py @@ -215,7 +215,8 @@ class ChromeNotebook(wx.Panel): wx.PostEvent(self, PageChanged(current_page, new_page)) - def AddPage(self, win=None, title="Empty Tab", image: wx.Image=None, closeable=True): + def AddPage(self, win=None, title=None, image: wx.Image=None, closeable=True): + title = title or "Empty Tab" if self._active_page: self._active_page.Hide() @@ -227,7 +228,7 @@ class ChromeNotebook(wx.Panel): self.page_container.Layout() self._pages.append(win) - self.tabs_container.AddTab(_(title), image, closeable) + self.tabs_container.AddTab(title, image, closeable) self._active_page = win self.ShowActive(True) diff --git a/gui/multiSwitch.py b/gui/multiSwitch.py index 530563b24..8a975d2b9 100644 --- a/gui/multiSwitch.py +++ b/gui/multiSwitch.py @@ -37,7 +37,8 @@ class MultiSwitch(ChromeNotebook): if h: h(type, info) - def AddPage(self, tabWnd=None, tabTitle="Empty Tab", tabImage=None): + def AddPage(self, tabWnd=None, tabTitle=None, tabImage=None): + tabTitle = tabTitle or _("Empty Tab") if tabWnd is None: tabWnd = gui.builtinViews.emptyView.BlankPage(self) tabWnd.handleDrag = lambda type, info: self.handleDrag(type, info)