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
optionMap = OrderedDict((
('High Security', FitSystemSecurity.HISEC),
('Low Security', FitSystemSecurity.LOWSEC),
('Null Security', FitSystemSecurity.NULLSEC),
('W-Space', FitSystemSecurity.WSPACE)))
class FitSystemSecurityMenu(ContextMenuUnconditional):
def __init__(self):
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):
if srcContext != "fittingShip":
@@ -50,7 +49,7 @@ class FitSystemSecurityMenu(ContextMenuUnconditional):
msw = True if "wxMSW" in wx.PlatformInfo else False
self.optionIds = {}
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)
sub.Append(menuItem)
menuItem.Check(fit.getSystemSecurity() == optionValue)
@@ -59,7 +58,7 @@ class FitSystemSecurityMenu(ContextMenuUnconditional):
def handleMode(self, event):
optionLabel = self.optionIds[event.Id]
optionValue = optionMap[optionLabel]
optionValue = self.optionMap[optionLabel]
self.mainFrame.command.Submit(cmd.GuiChangeFitSystemSecurityCommand(
fitID=self.mainFrame.getActiveFit(),
secStatus=optionValue))

View File

@@ -14,6 +14,11 @@ class ChangeShipTacticalMode(ContextMenuUnconditional):
def __init__(self):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.modeMap = {
'Defense': _t('Defense'),
'Propulsion': _t('Propulsion'),
'Sharpshooter': _t('Sharpshooter')
}
def display(self, callingWindow, srcContext):
if self.mainFrame.getActiveFit() is None or srcContext != "fittingShip":
@@ -32,7 +37,9 @@ class ChangeShipTacticalMode(ContextMenuUnconditional):
return _t("Tactical 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()
self.modeIds[id] = mode
menuItem = wx.MenuItem(menu, id, label, kind=wx.ITEM_RADIO)

View File

@@ -30,7 +30,7 @@ class TargetProfileSwitcher(ContextMenuUnconditional):
def getText(self, callingWindow, itmContext):
# We take into consideration just target resists, so call menu item accordingly
return 'Target Resists'
return _t('Target Resists')
def handleResistSwitch(self, event):
profile = self.profileEventMap.get(event.Id, False)
@@ -80,7 +80,7 @@ class TargetProfileSwitcher(ContextMenuUnconditional):
def makeMenu(container, parentMenu, first=False):
menu = wx.Menu()
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)
mitem.Check(checked)
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
pyfalog = Logger(__name__)
_t = wx.GetTranslation
class FitItem(SFItem.SFBrowserItem):
@@ -103,9 +104,9 @@ class FitItem(SFItem.SFBrowserItem):
self.SetDraggable()
self.boosterBtn = self.toolbar.AddButton(self.boosterBmp, "Booster", show=self.fitBooster)
self.toolbar.AddButton(self.copyBmp, "Copy", self.copyBtnCB)
self.renameBtn = self.toolbar.AddButton(self.renameBmp, "Rename", self.renameBtnCB)
self.toolbar.AddButton(self.deleteBmp, "Delete", self.deleteBtnCB)
self.toolbar.AddButton(self.copyBmp, _t("Copy"), self.copyBtnCB)
self.renameBtn = self.toolbar.AddButton(self.renameBmp, _t("Rename"), self.renameBtnCB)
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),
wx.TE_PROCESS_ENTER)
@@ -223,13 +224,13 @@ class FitItem(SFItem.SFBrowserItem):
# menu.AppendSubMenu(boosterMenu, 'Set Booster')
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)
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)
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.PopupMenu(menu, pos)

View File

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