i18n/zh_CN: reformat code and ignore _
1. update `Pyfa_Inspections.xml` to ignore `_` i18n module `gettext` will do a `gettext.install(...)` to put `_` function into `builtin` module. Currently PyCharm does not recognize this as a function and report as unresolved reference. 2. reformat code to remove padding for vertical dicts 3. update `Pyfa_CodeStyle.xml` to not pad vertical dicts (cherry picked from commit e5a570a0078f05fe34c473841af6b7746e06bfca)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<option name="RIGHT_MARGIN" value="165" />
|
||||
<Python>
|
||||
<option name="NEW_LINE_AFTER_COLON" value="true" />
|
||||
<option name="DICT_ALIGNMENT" value="2" />
|
||||
<option name="DICT_NEW_LINE_AFTER_LEFT_BRACE" value="true" />
|
||||
<option name="DICT_NEW_LINE_BEFORE_RIGHT_BRACE" value="true" />
|
||||
<option name="USE_CONTINUATION_INDENT_FOR_ARGUMENTS" value="true" />
|
||||
|
||||
@@ -1,54 +1,61 @@
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Pyfa" />
|
||||
<inspection_tool class="IgnoreUnusedEntry" enabled="false" level="UNUSED ENTRY" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="ProblematicWhitespace" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyBehaveInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ourVersions">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="2.7" />
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Pyfa" />
|
||||
<inspection_tool class="IgnoreUnusedEntry" enabled="false" level="UNUSED ENTRY" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="ProblematicWhitespace" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyBehaveInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ourVersions">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="2.7" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyMissingTypeHintsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="wxPython" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="TYPO" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E203" />
|
||||
<option value="E127" />
|
||||
<option value="E128" />
|
||||
<option value="E126" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyMissingTypeHintsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="wxPython" />
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="TYPO" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N802" />
|
||||
<option value="N806" />
|
||||
<option value="N803" />
|
||||
<option value="N814" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="TYPO" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E203" />
|
||||
<option value="E127" />
|
||||
<option value="E128" />
|
||||
<option value="E126" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="TYPO" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N802" />
|
||||
<option value="N806" />
|
||||
<option value="N803" />
|
||||
<option value="N814" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyShadowingNamesInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyShadowingNamesInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="_" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
|
||||
@@ -80,9 +80,9 @@ class ResistancesViewFull(StatsView):
|
||||
sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition(row, col), wx.GBSpan(1, 1))
|
||||
col += 1
|
||||
toolTipText = {
|
||||
"em" : _("Electromagnetic resistance"),
|
||||
"thermal" : _("Thermal resistance"),
|
||||
"kinetic" : _("Kinetic resistance"),
|
||||
"em": _("Electromagnetic resistance"),
|
||||
"thermal": _("Thermal resistance"),
|
||||
"kinetic": _("Kinetic resistance"),
|
||||
"explosive": _("Explosive resistance")
|
||||
}
|
||||
for damageType in ("em", "thermal", "kinetic", "explosive"):
|
||||
@@ -107,9 +107,9 @@ class ResistancesViewFull(StatsView):
|
||||
((198, 133, 38), (81, 83, 67)))
|
||||
|
||||
toolTipText = {
|
||||
"shield" : _("Shield resistance"),
|
||||
"armor" : _("Armor resistance"),
|
||||
"hull" : _("Hull resistance"),
|
||||
"shield": _("Shield resistance"),
|
||||
"armor": _("Armor resistance"),
|
||||
"hull": _("Hull resistance"),
|
||||
"damagePattern": _("Incoming damage pattern")
|
||||
}
|
||||
for tankType in ("shield", "armor", "hull", "separator", "damagePattern"):
|
||||
|
||||
@@ -106,10 +106,10 @@ class ResourcesViewFull(StatsView):
|
||||
sizer.AddStretchSpacer()
|
||||
# Turrets & launcher hardslots display
|
||||
tooltipText = {
|
||||
"turret" : _("Turret hardpoints"),
|
||||
"launcher" : _("Launcher hardpoints"),
|
||||
"drones" : _("Drones active"),
|
||||
"fighter" : _("Fighter squadrons active"),
|
||||
"turret": _("Turret hardpoints"),
|
||||
"launcher": _("Launcher hardpoints"),
|
||||
"drones": _("Drones active"),
|
||||
"fighter": _("Fighter squadrons active"),
|
||||
"calibration": _("Calibration")
|
||||
}
|
||||
for type_ in ("turret", "launcher", "drones", "fighter", "calibration"):
|
||||
@@ -124,7 +124,7 @@ class ResourcesViewFull(StatsView):
|
||||
sizer.Add(box, 0, wx.ALIGN_CENTER)
|
||||
|
||||
suffix = {
|
||||
'turret' : 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes',
|
||||
'turret': 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes',
|
||||
'calibration': 'Points'
|
||||
}
|
||||
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
|
||||
@@ -148,12 +148,12 @@ class ResourcesViewFull(StatsView):
|
||||
|
||||
# PG, Cpu & drone stuff
|
||||
tooltipText = {
|
||||
"cpu" : _("CPU"),
|
||||
"pg" : _("PowerGrid"),
|
||||
"droneBay" : _("Drone bay"),
|
||||
"fighterBay" : _("Fighter bay"),
|
||||
"cpu": _("CPU"),
|
||||
"pg": _("PowerGrid"),
|
||||
"droneBay": _("Drone bay"),
|
||||
"fighterBay": _("Fighter bay"),
|
||||
"droneBandwidth": _("Drone bandwidth"),
|
||||
"cargoBay" : _("Cargo bay")
|
||||
"cargoBay": _("Cargo bay")
|
||||
}
|
||||
for i, group in enumerate((("cpu", "pg"), ("cargoBay", "droneBay", "fighterBay", "droneBandwidth"))):
|
||||
main = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
Reference in New Issue
Block a user