Merge commit '5d95877d2c856bc7336d2032ecb2a4d5c24c75c6' into i18n2

This commit is contained in:
blitzmann
2020-07-01 20:47:50 -04:00
5 changed files with 88 additions and 24 deletions

View File

@@ -10,17 +10,16 @@ from service.fit import Fit
_t = wx.GetTranslation _t = wx.GetTranslation
optionMap = OrderedDict((
('High Security', FitSystemSecurity.HISEC),
('Low Security', FitSystemSecurity.LOWSEC),
('Null Security', FitSystemSecurity.NULLSEC),
('W-Space', FitSystemSecurity.WSPACE)))
class FitSystemSecurityMenu(ContextMenuUnconditional): class FitSystemSecurityMenu(ContextMenuUnconditional):
def __init__(self): def __init__(self):
self.mainFrame = gui.mainFrame.MainFrame.getInstance() self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.optionMap = OrderedDict((
(_t('High Security'), FitSystemSecurity.HISEC),
(_t('Low Security'), FitSystemSecurity.LOWSEC),
(_t('Null Security'), FitSystemSecurity.NULLSEC),
(_t('W-Space'), FitSystemSecurity.WSPACE)))
def display(self, callingWindow, srcContext): def display(self, callingWindow, srcContext):
if srcContext != "fittingShip": if srcContext != "fittingShip":
@@ -50,7 +49,7 @@ class FitSystemSecurityMenu(ContextMenuUnconditional):
msw = True if "wxMSW" in wx.PlatformInfo else False msw = True if "wxMSW" in wx.PlatformInfo else False
self.optionIds = {} self.optionIds = {}
sub = wx.Menu() sub = wx.Menu()
for optionLabel, optionValue in optionMap.items(): for optionLabel, optionValue in self.optionMap.items():
menuItem = self.addOption(rootMenu if msw else sub, optionLabel) menuItem = self.addOption(rootMenu if msw else sub, optionLabel)
sub.Append(menuItem) sub.Append(menuItem)
menuItem.Check(fit.getSystemSecurity() == optionValue) menuItem.Check(fit.getSystemSecurity() == optionValue)
@@ -59,7 +58,7 @@ class FitSystemSecurityMenu(ContextMenuUnconditional):
def handleMode(self, event): def handleMode(self, event):
optionLabel = self.optionIds[event.Id] optionLabel = self.optionIds[event.Id]
optionValue = optionMap[optionLabel] optionValue = self.optionMap[optionLabel]
self.mainFrame.command.Submit(cmd.GuiChangeFitSystemSecurityCommand( self.mainFrame.command.Submit(cmd.GuiChangeFitSystemSecurityCommand(
fitID=self.mainFrame.getActiveFit(), fitID=self.mainFrame.getActiveFit(),
secStatus=optionValue)) secStatus=optionValue))

View File

@@ -14,6 +14,11 @@ class ChangeShipTacticalMode(ContextMenuUnconditional):
def __init__(self): def __init__(self):
self.mainFrame = gui.mainFrame.MainFrame.getInstance() self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.modeMap = {
'Defense': _t('Defense'),
'Propulsion': _t('Propulsion'),
'Sharpshooter': _t('Sharpshooter')
}
def display(self, callingWindow, srcContext): def display(self, callingWindow, srcContext):
if self.mainFrame.getActiveFit() is None or srcContext != "fittingShip": if self.mainFrame.getActiveFit() is None or srcContext != "fittingShip":
@@ -32,7 +37,9 @@ class ChangeShipTacticalMode(ContextMenuUnconditional):
return _t("Tactical Mode") return _t("Tactical Mode")
def addMode(self, menu, mode): def addMode(self, menu, mode):
label = mode.item.name.rsplit()[-2] key = mode.item.typeName.rsplit()[-2]
label = self.modeMap[key]
id = ContextMenuUnconditional.nextID() id = ContextMenuUnconditional.nextID()
self.modeIds[id] = mode self.modeIds[id] = mode
menuItem = wx.MenuItem(menu, id, label, kind=wx.ITEM_RADIO) menuItem = wx.MenuItem(menu, id, label, kind=wx.ITEM_RADIO)

View File

@@ -30,7 +30,7 @@ class TargetProfileSwitcher(ContextMenuUnconditional):
def getText(self, callingWindow, itmContext): def getText(self, callingWindow, itmContext):
# We take into consideration just target resists, so call menu item accordingly # We take into consideration just target resists, so call menu item accordingly
return 'Target Resists' return _t('Target Resists')
def handleResistSwitch(self, event): def handleResistSwitch(self, event):
profile = self.profileEventMap.get(event.Id, False) profile = self.profileEventMap.get(event.Id, False)
@@ -80,7 +80,7 @@ class TargetProfileSwitcher(ContextMenuUnconditional):
def makeMenu(container, parentMenu, first=False): def makeMenu(container, parentMenu, first=False):
menu = wx.Menu() menu = wx.Menu()
if first: if first:
mitem, checked = self._addProfile(rootMenu if msw else parentMenu, None, 'No Profile') mitem, checked = self._addProfile(rootMenu if msw else parentMenu, None, _t('No Profile'))
menu.Append(mitem) menu.Append(mitem)
mitem.Check(checked) mitem.Check(checked)
if len(container[0]) > 0 or len(container[1]) > 0: if len(container[0]) > 0 or len(container[1]) > 0:

View File

@@ -20,6 +20,7 @@ from service.fit import Fit
from .events import BoosterListUpdated, FitSelected, ImportSelected, SearchSelected, Stage3Selected from .events import BoosterListUpdated, FitSelected, ImportSelected, SearchSelected, Stage3Selected
pyfalog = Logger(__name__) pyfalog = Logger(__name__)
_t = wx.GetTranslation
class FitItem(SFItem.SFBrowserItem): class FitItem(SFItem.SFBrowserItem):
@@ -103,9 +104,9 @@ class FitItem(SFItem.SFBrowserItem):
self.SetDraggable() self.SetDraggable()
self.boosterBtn = self.toolbar.AddButton(self.boosterBmp, "Booster", show=self.fitBooster) self.boosterBtn = self.toolbar.AddButton(self.boosterBmp, "Booster", show=self.fitBooster)
self.toolbar.AddButton(self.copyBmp, "Copy", self.copyBtnCB) self.toolbar.AddButton(self.copyBmp, _t("Copy"), self.copyBtnCB)
self.renameBtn = self.toolbar.AddButton(self.renameBmp, "Rename", self.renameBtnCB) self.renameBtn = self.toolbar.AddButton(self.renameBmp, _t("Rename"), self.renameBtnCB)
self.toolbar.AddButton(self.deleteBmp, "Delete", self.deleteBtnCB) self.toolbar.AddButton(self.deleteBmp, _t("Delete"), self.deleteBtnCB)
self.tcFitName = wx.TextCtrl(self, wx.ID_ANY, "%s" % self.fitName, wx.DefaultPosition, (self.editWidth, -1), self.tcFitName = wx.TextCtrl(self, wx.ID_ANY, "%s" % self.fitName, wx.DefaultPosition, (self.editWidth, -1),
wx.TE_PROCESS_ENTER) wx.TE_PROCESS_ENTER)
@@ -223,13 +224,13 @@ class FitItem(SFItem.SFBrowserItem):
# menu.AppendSubMenu(boosterMenu, 'Set Booster') # menu.AppendSubMenu(boosterMenu, 'Set Booster')
if fit: if fit:
newTabItem = menu.Append(wx.ID_ANY, "Open in new tab") newTabItem = menu.Append(wx.ID_ANY, _t("Open in new tab"))
self.Bind(wx.EVT_MENU, self.OpenNewTab, newTabItem) self.Bind(wx.EVT_MENU, self.OpenNewTab, newTabItem)
projectedItem = menu.Append(wx.ID_ANY, "Project onto Active Fit") projectedItem = menu.Append(wx.ID_ANY, _t("Project onto Active Fit"))
self.Bind(wx.EVT_MENU, self.OnProjectToFit, projectedItem) self.Bind(wx.EVT_MENU, self.OnProjectToFit, projectedItem)
commandItem = menu.Append(wx.ID_ANY, "Add Command Booster") commandItem = menu.Append(wx.ID_ANY, _t("Add Command Booster"))
self.Bind(wx.EVT_MENU, self.OnAddCommandFit, commandItem) self.Bind(wx.EVT_MENU, self.OnAddCommandFit, commandItem)
self.PopupMenu(menu, pos) self.PopupMenu(menu, pos)

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pyfa 2.22.0\n" "Project-Id-Version: pyfa 2.22.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-06-30 17:04+0800\n" "POT-Creation-Date: 2020-07-01 11:18+0800\n"
"PO-Revision-Date: 2020-06-30 17:08+0800\n" "PO-Revision-Date: 2020-07-01 11:19+0800\n"
"Last-Translator: zhaoweny <zhaoweny@users.noreply.github.com>\n" "Last-Translator: zhaoweny <zhaoweny@users.noreply.github.com>\n"
"Language-Team: Chinese (simplified)\n" "Language-Team: Chinese (simplified)\n"
"Language: zh_CN\n" "Language: zh_CN\n"
@@ -209,6 +209,10 @@ msgstr "添加角色"
msgid "Add Character Error" msgid "Add Character Error"
msgstr "添加角色错误" msgstr "添加角色错误"
#: gui/builtinShipBrowser/fitItem.py:233
msgid "Add Command Booster"
msgstr "添加指挥增效剂"
#: gui/builtinContextMenus/fitAddCurrentlyOpen.py:29 #: gui/builtinContextMenus/fitAddCurrentlyOpen.py:29
msgid "Add Currently Open Fit" msgid "Add Currently Open Fit"
msgstr "添加当前装配" msgstr "添加当前装配"
@@ -526,7 +530,7 @@ msgstr "弹药"
msgid "Citadel" msgid "Citadel"
msgstr "堡垒" msgstr "堡垒"
#: gui/builtinContextMenus/fitSystemSecurity.py:38 #: gui/builtinContextMenus/fitSystemSecurity.py:37
msgid "Citadel System Security" msgid "Citadel System Security"
msgstr "堡垒星系安等" msgstr "堡垒星系安等"
@@ -648,6 +652,7 @@ msgstr "沃尔夫-拉叶星"
#: gui/builtinItemStatsViews/itemDescription.py:43 #: gui/builtinItemStatsViews/itemDescription.py:43
#: gui/builtinItemStatsViews/itemTraits.py:25 #: gui/builtinItemStatsViews/itemTraits.py:25
#: gui/builtinShipBrowser/fitItem.py:107
msgid "Copy" msgid "Copy"
msgstr "复制" msgstr "复制"
@@ -729,6 +734,14 @@ msgstr "默认价格源:"
msgid "Default Value: %0.3f" msgid "Default Value: %0.3f"
msgstr "默认值:%0.3f" msgstr "默认值:%0.3f"
#: gui/builtinContextMenus/shipModeChange.py:18
msgid "Defense"
msgstr "防御"
#: gui/builtinShipBrowser/fitItem.py:109
msgid "Delete"
msgstr "删除"
#: gui/builtinPreferenceViews/pyfaDatabasePreferences.py:79 #: gui/builtinPreferenceViews/pyfaDatabasePreferences.py:79
msgid "Delete All Damage Pattern Profiles" msgid "Delete All Damage Pattern Profiles"
msgstr "删除所有伤害模型配置" msgstr "删除所有伤害模型配置"
@@ -759,7 +772,7 @@ msgstr "驱逐"
#: gui/builtinContextMenus/envEffectAdd.py:118 #: gui/builtinContextMenus/envEffectAdd.py:118
msgid "Destructible Beacons" msgid "Destructible Beacons"
msgstr "" msgstr "可破坏信标"
#: gui/mainMenuBar.py:167 #: gui/mainMenuBar.py:167
msgid "Dev Tools" msgid "Dev Tools"
@@ -1312,6 +1325,10 @@ msgstr "隐藏空的舰船类型"
msgid "High" msgid "High"
msgstr "高" msgstr "高"
#: gui/builtinContextMenus/fitSystemSecurity.py:19
msgid "High Security"
msgstr "高安"
#: gui/builtinStatsViews/rechargeViewFull.py:78 #: gui/builtinStatsViews/rechargeViewFull.py:78
msgid "Hull repair amount" msgid "Hull repair amount"
msgstr "结构修量" msgstr "结构修量"
@@ -1586,6 +1603,10 @@ msgstr "更长距离"
msgid "Low" msgid "Low"
msgstr "低" msgstr "低"
#: gui/builtinContextMenus/fitSystemSecurity.py:20
msgid "Low Security"
msgstr "低安"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:114 #: gui/builtinStatsViews/targetingMiscViewMinimal.py:114
msgid "Maintenance bay" msgid "Maintenance bay"
msgstr "维护舱" msgstr "维护舱"
@@ -1741,6 +1762,10 @@ msgstr "新装配"
msgid "No" msgid "No"
msgstr "否" msgstr "否"
#: gui/builtinContextMenus/targetProfile/switcher.py:83
msgid "No Profile"
msgstr "无伤害模型"
#: gui/characterSelection.py:230 #: gui/characterSelection.py:230
msgid "No active fit" msgid "No active fit"
msgstr "没有选中的装配" msgstr "没有选中的装配"
@@ -1781,6 +1806,10 @@ msgstr "未学习"
msgid "Notes" msgid "Notes"
msgstr "备注" msgstr "备注"
#: gui/builtinContextMenus/fitSystemSecurity.py:21
msgid "Null Security"
msgstr "零安"
#: gui/mainMenuBar.py:167 #: gui/mainMenuBar.py:167
msgid "Open &Dev Tools" msgid "Open &Dev Tools"
msgstr "打开开发者工具(&D)" msgstr "打开开发者工具(&D)"
@@ -1817,6 +1846,10 @@ msgstr "默认在新标签页打开装配"
msgid "Open in Fitting Browser" msgid "Open in Fitting Browser"
msgstr "在装配浏览器中打开" msgstr "在装配浏览器中打开"
#: gui/builtinShipBrowser/fitItem.py:227
msgid "Open in new tab"
msgstr "在新标签页打开"
#: gui/copySelectDialog.py:50 #: gui/copySelectDialog.py:50
msgid "Optimize Prices" msgid "Optimize Prices"
msgstr "优化价格" msgstr "优化价格"
@@ -1872,7 +1905,7 @@ msgstr "请确认Pyfa偏好保存位置。"
#: gui/builtinContextMenus/graphFitAmmoPicker.py:29 #: gui/builtinContextMenus/graphFitAmmoPicker.py:29
msgid "Plot with Different Ammo..." msgid "Plot with Different Ammo..."
msgstr "" msgstr "使用不同的弹药..."
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:164 #: gui/builtinStatsViews/targetingMiscViewMinimal.py:164
msgid "Pod" msgid "Pod"
@@ -1918,6 +1951,10 @@ msgstr "目标属性已导出到剪贴板"
msgid "Profiles successfully imported from clipboard" msgid "Profiles successfully imported from clipboard"
msgstr "已成功从剪贴板导入目标属性" msgstr "已成功从剪贴板导入目标属性"
#: gui/builtinShipBrowser/fitItem.py:230
msgid "Project onto Active Fit"
msgstr "施加远程效果到当前装配"
#: gui/builtinPreferenceViews/pyfaContextMenuPreferences.py:61 #: gui/builtinPreferenceViews/pyfaContextMenuPreferences.py:61
msgid "Project onto Fit" msgid "Project onto Fit"
msgstr "施加远程效果到装配" msgstr "施加远程效果到装配"
@@ -1942,6 +1979,10 @@ msgstr "远程效果物品"
msgid "Properties" msgid "Properties"
msgstr "属性" msgstr "属性"
#: gui/builtinContextMenus/shipModeChange.py:19
msgid "Propulsion"
msgstr "高速"
#: gui/builtinPreferenceViews/pyfaNetworkPreferences.py:49 #: gui/builtinPreferenceViews/pyfaNetworkPreferences.py:49
msgid "Proxy settings" msgid "Proxy settings"
msgstr "代理设置" msgstr "代理设置"
@@ -2062,6 +2103,10 @@ msgstr "删除物品的自定义属性"
msgid "Remove {}{}" msgid "Remove {}{}"
msgstr "移除{}{}" msgstr "移除{}{}"
#: gui/builtinShipBrowser/fitItem.py:108
msgid "Rename"
msgstr "重命名"
#: gui/builtinPreferenceViews/pyfaGeneralPreferences.py:55 #: gui/builtinPreferenceViews/pyfaGeneralPreferences.py:55
msgid "Reopen previous fits on startup" msgid "Reopen previous fits on startup"
msgstr "重新启动时打开之前的装配" msgstr "重新启动时打开之前的装配"
@@ -2229,6 +2274,10 @@ msgid ""
msgstr "" msgstr ""
"设置为阿尔法克隆不会替换角色技能等级,但会设置技能等级上限为阿尔法状态。" "设置为阿尔法克隆不会替换角色技能等级,但会设置技能等级上限为阿尔法状态。"
#: gui/builtinContextMenus/shipModeChange.py:20
msgid "Sharpshooter"
msgstr "狙击"
#: gui/builtinStatsViews/resistancesViewFull.py:112 #: gui/builtinStatsViews/resistancesViewFull.py:112
msgid "Shield resistance" msgid "Shield resistance"
msgstr "护盾抗性" msgstr "护盾抗性"
@@ -2369,7 +2418,7 @@ msgstr "有{0}个未提示的版本更新"
msgid "Sustained" msgid "Sustained"
msgstr "持续回充" msgstr "持续回充"
#: gui/builtinContextMenus/shipModeChange.py:32 #: gui/builtinContextMenus/shipModeChange.py:37
#: gui/builtinViewColumns/baseName.py:101 gui/builtinViews/fittingView.py:657 #: gui/builtinViewColumns/baseName.py:101 gui/builtinViews/fittingView.py:657
msgid "Tactical Mode" msgid "Tactical Mode"
msgstr "战术模式" msgstr "战术模式"
@@ -2390,6 +2439,10 @@ msgstr "目标属性编辑器"
msgid "Target Profile name already in use, please choose another." msgid "Target Profile name already in use, please choose another."
msgstr "目标属性名已使用,请选择其他名称。" msgstr "目标属性名已使用,请选择其他名称。"
#: gui/builtinContextMenus/targetProfile/switcher.py:33
msgid "Target Resists"
msgstr "目标抗性"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:40 #: gui/builtinStatsViews/targetingMiscViewMinimal.py:40
msgid "Targeting && Misc" msgid "Targeting && Misc"
msgstr "目标和杂项" msgstr "目标和杂项"
@@ -2631,6 +2684,10 @@ msgstr "变种"
msgid "View Raw Data" msgid "View Raw Data"
msgstr "显示原始数据" msgstr "显示原始数据"
#: gui/builtinContextMenus/fitSystemSecurity.py:22
msgid "W-Space"
msgstr "虫洞"
#: gui/ssoLogin.py:62 #: gui/ssoLogin.py:62
msgid "Waiting for character login through EVE Single Sign-On." msgid "Waiting for character login through EVE Single Sign-On."
msgstr "正在等待角色通过EvE登录。" msgstr "正在等待角色通过EvE登录。"
@@ -2763,4 +2820,4 @@ msgstr "{}属性"
#: gui/builtinViewColumns/baseName.py:103 #: gui/builtinViewColumns/baseName.py:103
msgid "{} {} Slot" msgid "{} {} Slot"
msgstr "{}{}槽" msgstr "{} {}槽"