Merge pull request #2201 from pyfa-org/i18n_zhaoweny

I18n - zhaoweny
This commit is contained in:
Ryan Holmes
2020-06-19 23:22:40 -04:00
committed by GitHub
17 changed files with 542 additions and 261 deletions

View File

@@ -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" />

View File

@@ -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>

View File

@@ -3,6 +3,7 @@ import config
import os
from logbook import Logger
pyfalog = Logger(__name__)
from service.settings import LocaleSettings
class PyfaApp(wx.App):
def OnInit(self):
@@ -37,7 +38,7 @@ class PyfaApp(wx.App):
#-----------------------------------------------------------------------
def UpdateLanguage(self, lang = "en_US"):
def UpdateLanguage(self, lang_override = None):
"""
Update the language to the requested one.
@@ -52,13 +53,10 @@ class PyfaApp(wx.App):
# Language domain.
langDomain = "lang"
lang = lang_override or LocaleSettings.getInstance().get('locale')
# Languages you want to support.
supLang = {
"en_US": wx.LANGUAGE_ENGLISH,
"zh_CN": wx.LANGUAGE_CHINESE_SIMPLIFIED,
"de": wx.LANGUAGE_GERMAN
}
supLang = LocaleSettings.supported_langauges
# If an unsupported language is requested default to English.
if lang in supLang:

View File

@@ -23,6 +23,8 @@ from gui.statsView import StatsView
from gui.bitmap_loader import BitmapLoader
from gui.utils.numberFormatter import formatAmount, roundToPrec
_ = wx.GetTranslation
class CapacitorViewFull(StatsView):
name = "capacitorViewFull"
@@ -32,7 +34,7 @@ class CapacitorViewFull(StatsView):
self.parent = parent
def getHeaderText(self, fit):
return "Capacitor"
return _("Capacitor")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -52,7 +54,7 @@ class CapacitorViewFull(StatsView):
sizerCapacitor.Add(baseBox, 0, wx.ALIGN_LEFT)
bitmap = BitmapLoader.getStaticBitmap("capacitorInfo_big", parent, "gui")
tooltip = wx.ToolTip("Capacitor stability")
tooltip = wx.ToolTip(_("Capacitor stability"))
bitmap.SetToolTip(tooltip)
baseBox.Add(bitmap, 0, wx.ALIGN_CENTER)
@@ -62,7 +64,7 @@ class CapacitorViewFull(StatsView):
hbox = wx.BoxSizer(wx.HORIZONTAL)
box.Add(hbox, 0, wx.ALIGN_LEFT)
hbox.Add(wx.StaticText(parent, wx.ID_ANY, "Total: "), 0, wx.ALIGN_LEFT | wx.LEFT, 3)
hbox.Add(wx.StaticText(parent, wx.ID_ANY, _("Total: ")), 0, wx.ALIGN_LEFT | wx.LEFT, 3)
lbl = wx.StaticText(parent, wx.ID_ANY, "0.0")
setattr(self, "label%sCapacitorCapacity" % panel.capitalize(), lbl)
hbox.Add(lbl, 0, wx.ALIGN_LEFT)
@@ -72,11 +74,11 @@ class CapacitorViewFull(StatsView):
hbox = wx.BoxSizer(wx.HORIZONTAL)
box.Add(hbox, 0, wx.ALIGN_LEFT)
lbl = wx.StaticText(parent, wx.ID_ANY, "Lasts ")
lbl = wx.StaticText(parent, wx.ID_ANY, _("Lasts "))
hbox.Add(lbl, 0, wx.ALIGN_LEFT | wx.LEFT, 3)
setattr(self, "label%sCapacitorState" % panel.capitalize(), lbl)
lbl = wx.StaticText(parent, wx.ID_ANY, "0s")
lbl = wx.StaticText(parent, wx.ID_ANY, _("0s"))
setattr(self, "label%sCapacitorTime" % panel.capitalize(), lbl)
hbox.Add(lbl, 0, wx.ALIGN_LEFT)
@@ -85,7 +87,7 @@ class CapacitorViewFull(StatsView):
sizerCapacitor.Add(baseBox, 0, wx.ALIGN_CENTER_HORIZONTAL)
tooltip = wx.ToolTip("Extra stats")
tooltip = wx.ToolTip(_("Extra stats"))
bitmap = BitmapLoader.getStaticBitmap("capacitorRecharge_big", parent, "gui")
bitmap.SetToolTip(tooltip)
baseBox.Add(bitmap, 0, wx.ALIGN_CENTER)
@@ -166,7 +168,7 @@ class CapacitorViewFull(StatsView):
else:
t = "%ds" % capState
s = "Stable: " if capStable else "Lasts "
s = _("Stable: ") if capStable else _("Lasts ")
getattr(self, lblNameTime % panel).SetLabel(t)
getattr(self, lblNameState % panel).SetLabel(s)

View File

@@ -28,6 +28,8 @@ from gui.statsView import StatsView
from gui.utils.numberFormatter import formatAmount, roundToPrec
from service.fit import Fit
_ = wx.GetTranslation
class FirepowerViewFull(StatsView):
name = "firepowerViewFull"
@@ -38,7 +40,7 @@ class FirepowerViewFull(StatsView):
self._cachedValues = []
def getHeaderText(self, fit):
return "Firepower"
return _("Firepower")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -71,7 +73,7 @@ class FirepowerViewFull(StatsView):
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.ALIGN_CENTER)
box.Add(wx.StaticText(parent, wx.ID_ANY, damageType.capitalize()), 0, wx.ALIGN_LEFT)
box.Add(wx.StaticText(parent, wx.ID_ANY, _(damageType).capitalize()), 0, wx.ALIGN_LEFT)
hbox = wx.BoxSizer(wx.HORIZONTAL)
box.Add(hbox, 1, wx.ALIGN_CENTER)
@@ -95,14 +97,14 @@ class FirepowerViewFull(StatsView):
lbl = wx.StaticText(parent, wx.ID_ANY, "0.0")
setattr(self, "label%sVolleyTotal" % panel.capitalize(), lbl)
gridS.Add(wx.StaticText(parent, wx.ID_ANY, " Volley: "), 0, wx.ALL | wx.ALIGN_RIGHT)
gridS.Add(wx.StaticText(parent, wx.ID_ANY, _(" Volley: ")), 0, wx.ALL | wx.ALIGN_RIGHT)
gridS.Add(lbl, 0, wx.ALIGN_LEFT)
self._cachedValues.append(0)
lbl = wx.StaticText(parent, wx.ID_ANY, "0.0")
setattr(self, "label%sDpsTotal" % panel.capitalize(), lbl)
gridS.Add(wx.StaticText(parent, wx.ID_ANY, " DPS: "), 0, wx.ALL | wx.ALIGN_RIGHT)
gridS.Add(wx.StaticText(parent, wx.ID_ANY, _(" DPS: ")), 0, wx.ALL | wx.ALIGN_RIGHT)
self._cachedValues.append(0)
@@ -110,7 +112,7 @@ class FirepowerViewFull(StatsView):
image = BitmapLoader.getBitmap("mining_small", "gui")
self.miningyield = wx.BitmapButton(contentPanel, -1, image)
self.miningyield.SetToolTip(wx.ToolTip("Click to toggle to Mining Yield "))
self.miningyield.SetToolTip(wx.ToolTip(_("Click to toggle to Mining Yield ")))
self.miningyield.Bind(wx.EVT_BUTTON, self.switchToMiningYieldView)
sizerFirepower.Add(self.miningyield, 0, wx.ALIGN_LEFT)

View File

@@ -25,6 +25,7 @@ from gui.bitmap_loader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
from service.fit import Fit
_ = wx.GetTranslation
class MiningYieldViewFull(StatsView):
name = "miningyieldViewFull"
@@ -35,7 +36,7 @@ class MiningYieldViewFull(StatsView):
self._cachedValues = []
def getHeaderText(self, fit):
return "Mining Yield"
return _("Mining Yield")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -64,7 +65,7 @@ class MiningYieldViewFull(StatsView):
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.ALIGN_CENTER)
box.Add(wx.StaticText(parent, wx.ID_ANY, miningType.capitalize()), 0, wx.ALIGN_LEFT)
box.Add(wx.StaticText(parent, wx.ID_ANY, _(miningType).capitalize()), 0, wx.ALIGN_LEFT)
hbox = wx.BoxSizer(wx.HORIZONTAL)
box.Add(hbox, 1, wx.ALIGN_CENTER)
@@ -85,7 +86,7 @@ class MiningYieldViewFull(StatsView):
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.EXPAND)
box.Add(wx.StaticText(parent, wx.ID_ANY, "Total"), 0, wx.ALIGN_LEFT)
box.Add(wx.StaticText(parent, wx.ID_ANY, _("Total")), 0, wx.ALIGN_LEFT)
hbox = wx.BoxSizer(wx.HORIZONTAL)
box.Add(hbox, 1, wx.EXPAND)
@@ -98,7 +99,7 @@ class MiningYieldViewFull(StatsView):
image = BitmapLoader.getBitmap("turret_small", "gui")
firepower = wx.BitmapButton(contentPanel, -1, image)
firepower.SetToolTip(wx.ToolTip("Click to toggle to Firepower View"))
firepower.SetToolTip(wx.ToolTip(_("Click to toggle to Firepower View")))
firepower.Bind(wx.EVT_BUTTON, self.switchToFirepowerView)
sizerMiningYield.Add(firepower, 0, wx.ALIGN_LEFT)

View File

@@ -25,6 +25,7 @@ from gui.utils.numberFormatter import formatAmount, roundToPrec
from eos.utils.spoolSupport import SpoolType, SpoolOptions
import eos.config
_ = wx.GetTranslation
stats = [
(
@@ -62,7 +63,7 @@ class OutgoingViewFull(StatsView):
self._cachedValues = []
def getHeaderText(self, fit):
return "Remote Reps"
return _("Remote Reps")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)

View File

@@ -24,6 +24,7 @@ from gui.utils.numberFormatter import formatAmount, roundToPrec
from eos.utils.spoolSupport import SpoolType, SpoolOptions
import eos.config
_ = wx.GetTranslation
stats = [
(
@@ -61,7 +62,7 @@ class OutgoingViewMinimal(StatsView):
self._cachedValues = []
def getHeaderText(self, fit):
return "Remote Reps"
return _("Remote Reps")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)

View File

@@ -25,6 +25,8 @@ from gui.utils.numberFormatter import formatAmount
from service.price import Fit, Price
from service.settings import MarketPriceSettings
_ = wx.GetTranslation
class PriceViewFull(StatsView):
name = "priceViewFull"
@@ -35,7 +37,7 @@ class PriceViewFull(StatsView):
self.settings = MarketPriceSettings.getInstance()
def getHeaderText(self, fit):
return "Price"
return _("Price")
def populatePanel(self, contentPanel, headerPanel):
contentSizer = contentPanel.GetSizer()
@@ -67,7 +69,7 @@ class PriceViewFull(StatsView):
vbox = wx.BoxSizer(wx.VERTICAL)
box.Add(vbox, 1, wx.EXPAND)
vbox.Add(wx.StaticText(contentPanel, wx.ID_ANY, _type.capitalize()), 0, wx.ALIGN_LEFT)
vbox.Add(wx.StaticText(contentPanel, wx.ID_ANY, _(_type).capitalize()), 0, wx.ALIGN_LEFT)
hbox = wx.BoxSizer(wx.HORIZONTAL)
vbox.Add(hbox)

View File

@@ -25,6 +25,8 @@ from gui.utils.numberFormatter import formatAmount
from service.price import Fit, Price
from service.settings import MarketPriceSettings
_ = wx.GetTranslation
class PriceViewMinimal(StatsView):
name = "priceViewMinimal"
@@ -61,7 +63,7 @@ class PriceViewMinimal(StatsView):
vbox = wx.BoxSizer(wx.VERTICAL)
box.Add(vbox, 1, wx.EXPAND)
vbox.Add(wx.StaticText(contentPanel, wx.ID_ANY, _type.capitalize()), 0, wx.ALIGN_LEFT)
vbox.Add(wx.StaticText(contentPanel, wx.ID_ANY, _(_type).capitalize()), 0, wx.ALIGN_LEFT)
hbox = wx.BoxSizer(wx.HORIZONTAL)
vbox.Add(hbox)

View File

@@ -27,6 +27,8 @@ from gui.statsView import StatsView
from gui.utils.numberFormatter import formatAmount
from service.fit import Fit
_ = wx.GetTranslation
class RechargeViewFull(StatsView):
name = "rechargeViewFull"
@@ -38,7 +40,7 @@ class RechargeViewFull(StatsView):
self.mainFrame.Bind(GE.EFFECTIVE_HP_TOGGLED, self.toggleEffective)
def getHeaderText(self, fit):
return "Recharge rates"
return _("Recharge rates")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -70,10 +72,10 @@ class RechargeViewFull(StatsView):
# Add an empty label first for correct alignment.
sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, ""), 0)
toolTipText = {
"shieldPassive": "Passive shield recharge",
"shieldActive": "Active shield boost",
"armorActive": "Armor repair amount",
"hullActive": "Hull repair amount"}
"shieldPassive": _("Passive shield recharge"),
"shieldActive": _("Active shield boost"),
"armorActive": _("Armor repair amount"),
"hullActive": _("Hull repair amount")}
for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"):
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[tankType])
@@ -81,8 +83,8 @@ class RechargeViewFull(StatsView):
sizerTankStats.Add(bitmap, 0, wx.ALIGN_CENTER)
toolTipText = {
"reinforced": "Reinforced",
"sustained": "Sustained"}
"reinforced": _("Reinforced"),
"sustained": _("Sustained")}
for stability in ("reinforced", "sustained"):
bitmap = BitmapLoader.getStaticBitmap("regen%s_big" % stability.capitalize(), contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[stability])

View File

@@ -28,6 +28,8 @@ from gui.statsView import StatsView
from gui.utils import fonts
from gui.utils.numberFormatter import formatAmount
_ = wx.GetTranslation
class ResistancesViewFull(StatsView):
name = "resistancesViewFull"
@@ -42,7 +44,7 @@ class ResistancesViewFull(StatsView):
self.mainFrame.Bind(GE.EFFECTIVE_HP_TOGGLED, self.ehpSwitch)
def getHeaderText(self, fit):
return "Resistances"
return _("Resistances")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -79,8 +81,12 @@ class ResistancesViewFull(StatsView):
# Add an empty label, then the rest.
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", "explosive": "Explosive resistance"}
toolTipText = {
"em": _("Electromagnetic resistance"),
"thermal": _("Thermal resistance"),
"kinetic": _("Kinetic resistance"),
"explosive": _("Explosive resistance")
}
for damageType in ("em", "thermal", "kinetic", "explosive"):
bitmap = BitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[damageType])
@@ -88,7 +94,7 @@ class ResistancesViewFull(StatsView):
sizerResistances.Add(bitmap, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
col += 1
self.stEHPs = wx.Button(contentPanel, style=wx.BU_EXACTFIT, label="EHP")
self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP"))
self.stEHPs.SetToolTip(wx.ToolTip(_("Click to toggle between effective HP and raw HP")))
self.stEHPs.Bind(wx.EVT_BUTTON, self.toggleEHP)
@@ -102,8 +108,12 @@ class ResistancesViewFull(StatsView):
gaugeColours = (((38, 133, 198), (52, 86, 98)), ((198, 38, 38), (83, 65, 67)), ((163, 163, 163), (74, 90, 93)),
((198, 133, 38), (81, 83, 67)))
toolTipText = {"shield": "Shield resistance", "armor": "Armor resistance", "hull": "Hull resistance",
"damagePattern": "Incoming damage pattern"}
toolTipText = {
"shield": _("Shield resistance"),
"armor": _("Armor resistance"),
"hull": _("Hull resistance"),
"damagePattern": _("Incoming damage pattern")
}
for tankType in ("shield", "armor", "hull", "separator", "damagePattern"):
if tankType != "separator":
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
@@ -156,7 +166,7 @@ class ResistancesViewFull(StatsView):
row += 1
col = 0
self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP"))
self.stEHPs.SetToolTip(wx.ToolTip(_("Click to toggle between effective HP and raw HP")))
def toggleEHP(self, event):
wx.PostEvent(self.mainFrame, GE.EffectiveHpToggled(effective=self.stEHPs.GetLabel() == "HP"))
@@ -200,7 +210,7 @@ class ResistancesViewFull(StatsView):
rrFactor = fit.ehp[tankType] / fit.hp[tankType]
lbl.SetLabel(formatAmount(ehp[tankType], 3, 0, 9))
lbl.SetToolTip(
wx.ToolTip("%s: %d\nResist Multiplier: x%.2f" % (tankType.capitalize(), ehp[tankType], rrFactor)))
wx.ToolTip("%s: %d\nResist Multiplier: x%.2f" % (tankType.capitalize(), ehp[tankType], rrFactor)))
else:
lbl.SetLabel("0")

View File

@@ -30,6 +30,8 @@ from eos.const import FittingHardpoint
from gui.utils.numberFormatter import formatAmount
_ = wx.GetTranslation
class ResourcesViewFull(StatsView):
name = "resourcesViewFull"
@@ -79,7 +81,7 @@ class ResourcesViewFull(StatsView):
self.headerPanel.Layout()
def getHeaderText(self, fit):
return "Resources"
return _("Resources")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -105,8 +107,13 @@ class ResourcesViewFull(StatsView):
base = sizerResources
sizer.AddStretchSpacer()
# Turrets & launcher hardslots display
tooltipText = {"turret": "Turret hardpoints", "launcher": "Launcher hardpoints", "drones": "Drones active",
"fighter": "Fighter squadrons active", "calibration": "Calibration"}
tooltipText = {
"turret": _("Turret hardpoints"),
"launcher": _("Launcher hardpoints"),
"drones": _("Drones active"),
"fighter": _("Fighter squadrons active"),
"calibration": _("Calibration")
}
for type_ in ("turret", "launcher", "drones", "fighter", "calibration"):
box = wx.BoxSizer(wx.HORIZONTAL)
@@ -118,8 +125,10 @@ class ResourcesViewFull(StatsView):
sizer.Add(box, 0, wx.ALIGN_CENTER)
suffix = {'turret': 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes',
'calibration': 'Points'}
suffix = {
'turret': 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes',
'calibration': 'Points'
}
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type_.capitalize(), suffix[type_].capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5)
@@ -140,8 +149,14 @@ class ResourcesViewFull(StatsView):
gauge_font = wx.Font(fonts.NORMAL, wx.SWISS, wx.NORMAL, wx.NORMAL, False)
# PG, Cpu & drone stuff
tooltipText = {"cpu": "CPU", "pg": "PowerGrid", "droneBay": "Drone bay", "fighterBay": "Fighter bay",
"droneBandwidth": "Drone bandwidth", "cargoBay": "Cargo bay"}
tooltipText = {
"cpu": _("CPU"),
"pg": _("PowerGrid"),
"droneBay": _("Drone bay"),
"fighterBay": _("Fighter bay"),
"droneBandwidth": _("Drone bandwidth"),
"cargoBay": _("Cargo bay")
}
for i, group in enumerate((("cpu", "pg"), ("cargoBay", "droneBay", "fighterBay", "droneBandwidth"))):
main = wx.BoxSizer(wx.VERTICAL)
base.Add(main, 1, wx.ALIGN_CENTER)

View File

@@ -23,6 +23,8 @@ from gui.statsView import StatsView
from gui.utils.numberFormatter import formatAmount
from collections import OrderedDict
_ = wx.GetTranslation
class TargetingMiscViewMinimal(StatsView):
name = "targetingMiscViewMinimal"
@@ -33,7 +35,7 @@ class TargetingMiscViewMinimal(StatsView):
self._cachedValues = []
def getHeaderText(self, fit):
return "Targeting && Misc"
return _("Targeting && Misc")
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent(text)
@@ -55,11 +57,11 @@ class TargetingMiscViewMinimal(StatsView):
gridTargetingMisc.Add(gridTargeting, 0, wx.ALIGN_LEFT | wx.ALL, 5)
labels = (("Targets", "Targets", ""),
("Range", "Range", "km"),
("Scan res.", "ScanRes", "mm"),
("Sensor str.", "SensorStr", ""),
("Drone range", "CtrlRange", "km"))
labels = ((_("Targets"), "Targets", ""),
(_("Range"), "Range", "km"),
(_("Scan res."), "ScanRes", "mm"),
(_("Sensor str."), "SensorStr", ""),
(_("Drone range"), "CtrlRange", "km"))
for header, labelShort, unit in labels:
gridTargeting.Add(wx.StaticText(contentPanel, wx.ID_ANY, "%s: " % header), 0, wx.ALIGN_LEFT)
@@ -79,11 +81,11 @@ class TargetingMiscViewMinimal(StatsView):
gridMisc.AddGrowableCol(1)
gridTargetingMisc.Add(gridMisc, 0, wx.ALIGN_LEFT | wx.ALL, 5)
labels = (("Speed", "Speed", "m/s"),
("Align time", "AlignTime", "s"),
("Signature", "SigRadius", "m"),
("Warp Speed", "WarpSpeed", "AU/s"),
("Cargo", "Cargo", "m\u00B3"))
labels = ((_("Speed"), "Speed", "m/s"),
(_("Align time"), "AlignTime", "s"),
(_("Signature"), "SigRadius", "m"),
(_("Warp Speed"), "WarpSpeed", "AU/s"),
(_("Cargo"), "Cargo", "m\u00B3"))
for header, labelShort, unit in labels:
gridMisc.Add(wx.StaticText(contentPanel, wx.ID_ANY, "%s: " % header), 0, wx.ALIGN_LEFT)
@@ -105,23 +107,23 @@ class TargetingMiscViewMinimal(StatsView):
"jamChance": lambda: fit.jamChance}
cargoNamesOrder = OrderedDict((
("fleetHangarCapacity", "Fleet hangar"),
("shipMaintenanceBayCapacity", "Maintenance bay"),
("specialAmmoHoldCapacity", "Ammo hold"),
("specialFuelBayCapacity", "Fuel bay"),
("specialShipHoldCapacity", "Ship hold"),
("specialSmallShipHoldCapacity", "Small ship hold"),
("specialMediumShipHoldCapacity", "Medium ship hold"),
("specialLargeShipHoldCapacity", "Large ship hold"),
("specialIndustrialShipHoldCapacity", "Industrial ship hold"),
("specialOreHoldCapacity", "Ore hold"),
("specialMineralHoldCapacity", "Mineral hold"),
("specialMaterialBayCapacity", "Material bay"),
("specialGasHoldCapacity", "Gas hold"),
("specialSalvageHoldCapacity", "Salvage hold"),
("specialCommandCenterHoldCapacity", "Command center hold"),
("specialPlanetaryCommoditiesHoldCapacity", "Planetary goods hold"),
("specialQuafeHoldCapacity", "Quafe hold")))
("fleetHangarCapacity", _("Fleet hangar")),
("shipMaintenanceBayCapacity", _("Maintenance bay")),
("specialAmmoHoldCapacity", _("Ammo hold")),
("specialFuelBayCapacity", _("Fuel bay")),
("specialShipHoldCapacity", _("Ship hold")),
("specialSmallShipHoldCapacity", _("Small ship hold")),
("specialMediumShipHoldCapacity", _("Medium ship hold")),
("specialLargeShipHoldCapacity", _("Large ship hold")),
("specialIndustrialShipHoldCapacity", _("Industrial ship hold")),
("specialOreHoldCapacity", _("Ore hold")),
("specialMineralHoldCapacity", _("Mineral hold")),
("specialMaterialBayCapacity", _("Material bay")),
("specialGasHoldCapacity", _("Gas hold")),
("specialSalvageHoldCapacity", _("Salvage hold")),
("specialCommandCenterHoldCapacity", _("Command center hold")),
("specialPlanetaryCommoditiesHoldCapacity", _("Planetary goods hold")),
("specialQuafeHoldCapacity", _("Quafe hold"))))
cargoValues = {
"main": lambda: fit.ship.getModifiedItemAttr("capacity"),

View File

@@ -1,172 +1,379 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# Chinese translations for pyfa package.
# Copyright (C) 2020 THE pyfa'S COPYRIGHT HOLDER
# This file is distributed under the same license as the pyfa package.
# zhaoweny <zhaoweny@users.noreply.github.com>, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2020-05-15 22:13-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"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"
"Last-Translator: zhaoweny <zhaoweny@users.noreply.github.com>\n"
"Language-Team: Chinese (simplified)\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 2.3.1\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ./gui/app.py:34 ./gui/mainFrame.py:181
msgid "Market"
#: gui/builtinStatsViews/firepowerViewFull.py:106
msgid " DPS: "
msgstr ""
#: ./gui/mainFrame.py:185
msgid "Fittings"
#: gui/builtinStatsViews/capacitorViewFull.py:70
msgid " GJ"
msgstr ""
#: ./gui/mainFrame.py:272
msgid "Loading previous fits..."
#: gui/builtinStatsViews/firepowerViewFull.py:99
msgid " Volley: "
msgstr "齐射"
#: gui/builtinStatsViews/capacitorViewFull.py:79
msgid "0s"
msgstr "0秒"
#: gui/builtinStatsViews/rechargeViewFull.py:74
msgid "Active shield boost"
msgstr "主动维修"
#: gui/additionsPane.py:44
msgid "Additions"
msgstr "附加装备"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:83
msgid "Align time"
msgstr "起跳时间"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:110
msgid "Ammo hold"
msgstr ""
#: ./gui/mainFrame.py:465
msgid "Save Fitting As..."
msgstr ""
#: gui/builtinStatsViews/rechargeViewFull.py:75
msgid "Armor repair amount"
msgstr "装甲维修"
#: ./gui/mainFrame.py:466
msgid "EVE XML fitting files (*.xml)|*.xml"
msgstr ""
#: gui/builtinStatsViews/resistancesViewFull.py:111
msgid "Armor resistance"
msgstr "装甲抗性"
#: ./gui/mainFrame.py:643
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/mainFrame.py:645 ./gui/mainFrame.py:651
msgid "Confirm"
msgstr ""
#: ./gui/mainFrame.py:650
msgid "Re-enabling fitting restrictions for this fit will also remove any illegal items from the fit. Do you want to continue?"
msgstr ""
#: ./gui/mainFrame.py:669
msgid "Manage Characters"
msgstr ""
#: ./gui/mainFrame.py:686
msgid "&Turn Overrides Off"
msgstr ""
#: ./gui/mainFrame.py:686
msgid "&Turn Overrides On"
msgstr ""
#: ./gui/mainFrame.py:719
msgid "Please Wait..."
msgstr ""
#: ./gui/mainFrame.py:769
msgid "Drones"
msgstr ""
#: ./gui/mainFrame.py:773
msgid "Fighters"
msgstr ""
#: ./gui/mainFrame.py:777
msgid "Implants"
msgstr ""
#: ./gui/mainFrame.py:781
#: gui/additionsPane.py:77
msgid "Boosters"
msgstr "增效剂"
#: gui/builtinStatsViews/resourcesViewFull.py:151
msgid "CPU"
msgstr ""
#: ./gui/mainFrame.py:785
#: gui/builtinStatsViews/resourcesViewFull.py:113
msgid "Calibration"
msgstr "校准"
#: gui/builtinStatsViews/capacitorViewFull.py:35
msgid "Capacitor"
msgstr "电容"
#: gui/builtinStatsViews/capacitorViewFull.py:55
msgid "Capacitor stability"
msgstr "电容稳定性"
#: gui/additionsPane.py:71 gui/builtinStatsViews/targetingMiscViewMinimal.py:86
msgid "Cargo"
msgstr "货舱"
#: gui/builtinStatsViews/resourcesViewFull.py:156
msgid "Cargo bay"
msgstr "货舱"
#: gui/builtinStatsViews/resistancesViewFull.py:95
#: gui/builtinStatsViews/resistancesViewFull.py:167
msgid "Click to toggle between effective HP and raw HP"
msgstr "点击切换有效HP和原始HP"
#: gui/builtinStatsViews/miningyieldViewFull.py:101
msgid "Click to toggle to Firepower View"
msgstr "点击切换到火力视图"
#: gui/builtinStatsViews/firepowerViewFull.py:114
msgid "Click to toggle to Mining Yield "
msgstr "点击切换到矿物产出视图"
#: gui/additionsPane.py:83
msgid "Command"
msgstr "指令"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:122
msgid "Command center hold"
msgstr ""
#: ./gui/mainFrame.py:803
msgid "Export Skills Needed As..."
#: gui/builtinStatsViews/resourcesViewFull.py:155
msgid "Drone bandwidth"
msgstr "无人机带宽"
#: gui/builtinStatsViews/resourcesViewFull.py:153
msgid "Drone bay"
msgstr "无人机仓库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:62
msgid "Drone range"
msgstr "无人机半径"
#: gui/additionsPane.py:65
msgid "Drones"
msgstr "无人机"
#: gui/builtinStatsViews/resourcesViewFull.py:111
msgid "Drones active"
msgstr "激活的无人机"
#: gui/builtinStatsViews/resistancesViewFull.py:83
msgid "Electromagnetic resistance"
msgstr "电磁抗性"
#: gui/builtinStatsViews/resistancesViewFull.py:86
msgid "Explosive resistance"
msgstr "爆炸抗性"
#: gui/builtinStatsViews/capacitorViewFull.py:88
msgid "Extra stats"
msgstr "额外状态"
#: gui/builtinStatsViews/resourcesViewFull.py:154
msgid "Fighter bay"
msgstr "铁骑舰载机仓库"
#: gui/builtinStatsViews/resourcesViewFull.py:112
msgid "Fighter squadrons active"
msgstr "激活的铁骑舰载机中队"
#: gui/additionsPane.py:68
msgid "Fighters"
msgstr "铁骑舰载机"
#: gui/builtinStatsViews/firepowerViewFull.py:41
msgid "Firepower"
msgstr "火力"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:108
msgid "Fleet hangar"
msgstr "舰队机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:111
msgid "Fuel bay"
msgstr "燃料机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:120
msgid "Gas hold"
msgstr "气态矿物仓库"
#: gui/builtinStatsViews/rechargeViewFull.py:76
msgid "Hull repair amount"
msgstr "结构维修"
#: gui/builtinStatsViews/resistancesViewFull.py:112
msgid "Hull resistance"
msgstr "结构抗性"
#: gui/additionsPane.py:74
msgid "Implants"
msgstr "植入体"
#: gui/builtinStatsViews/resistancesViewFull.py:113
msgid "Incoming damage pattern"
msgstr "敌对伤害模型"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:116
msgid "Industrial ship hold"
msgstr ""
#: ./gui/mainFrame.py:804
msgid "EVEMon skills training file (*.emp)|*.emp|EVEMon skills training XML file (*.xml)|*.xml|Text skills training file (*.txt)|*.txt"
#: gui/builtinStatsViews/resistancesViewFull.py:85
msgid "Kinetic resistance"
msgstr "动能抗性"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:115
msgid "Large ship hold"
msgstr ""
#: ./gui/mainFrame.py:823
msgid "Exporting skills needed..."
#: gui/builtinStatsViews/capacitorViewFull.py:75
#: gui/builtinStatsViews/capacitorViewFull.py:169
msgid "Lasts "
msgstr "可维持"
#: gui/builtinStatsViews/resourcesViewFull.py:110
msgid "Launcher hardpoints"
msgstr "发射器"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:109
msgid "Maintenance bay"
msgstr "维护机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:119
msgid "Material bay"
msgstr "矿物机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:114
msgid "Medium ship hold"
msgstr "中型舰船机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:118
msgid "Mineral hold"
msgstr "矿物机库"
#: gui/builtinStatsViews/miningyieldViewFull.py:38
msgid "Mining Yield"
msgstr "矿物产出"
#: gui/additionsPane.py:86
msgid "Notes"
msgstr "备注"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:117
msgid "Ore hold"
msgstr "矿石机库"
#: gui/builtinStatsViews/rechargeViewFull.py:73
msgid "Passive shield recharge"
msgstr "被动回充"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:123
msgid "Planetary goods hold"
msgstr "星系开发机库"
#: gui/builtinStatsViews/resourcesViewFull.py:152
msgid "PowerGrid"
msgstr ""
#: ./gui/mainFrame.py:830
msgid "Open One Or More Fitting Files"
#: gui/builtinStatsViews/priceViewFull.py:38
msgid "Price"
msgstr "价格"
#: gui/additionsPane.py:80
msgid "Projected"
msgstr ""
#: ./gui/mainFrame.py:831
msgid "EVE XML fitting files (*.xml)|*.xml|EFT text fitting files (*.cfg)|*.cfg|All Files (*)|*"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:124
msgid "Quafe hold"
msgstr ""
#: ./gui/mainFrame.py:838
msgid "Importing fits"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:59
msgid "Range"
msgstr "锁定范围"
#: gui/builtinStatsViews/rechargeViewFull.py:41
msgid "Recharge rates"
msgstr "回充速度"
#: gui/builtinStatsViews/rechargeViewFull.py:84
msgid "Reinforced"
msgstr "加强回充"
#: gui/builtinStatsViews/outgoingViewFull.py:65
#: gui/builtinStatsViews/outgoingViewMinimal.py:64
msgid "Remote Reps"
msgstr "遥修"
#: gui/builtinStatsViews/resistancesViewFull.py:45
msgid "Resistances"
msgstr "抗性"
#: gui/builtinStatsViews/resourcesViewFull.py:82
msgid "Resources"
msgstr "装配资源"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:121
msgid "Salvage hold"
msgstr "打捞件机库"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:60
msgid "Scan res."
msgstr "扫描精度"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:61
msgid "Sensor str."
msgstr "传感器强度"
#: gui/builtinStatsViews/resistancesViewFull.py:110
msgid "Shield resistance"
msgstr "护盾抗性"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:112
msgid "Ship hold"
msgstr ""
#: ./gui/mainFrame.py:852
msgid "Save Backup As..."
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:84
msgid "Signature"
msgstr "信号半径"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:113
msgid "Small ship hold"
msgstr ""
#: ./gui/mainFrame.py:853
msgid "EVE XML fitting file (*.xml)|*.xml"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:82
msgid "Speed"
msgstr "亚光速航速"
#: gui/builtinStatsViews/capacitorViewFull.py:169
msgid "Stable: "
msgstr "稳定:"
#: gui/builtinStatsViews/rechargeViewFull.py:85
msgid "Sustained"
msgstr "持续回充"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:36
msgid "Targeting && Misc"
msgstr "目标锁定和其他"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:58
msgid "Targets"
msgstr "最大锁定数"
#: gui/builtinStatsViews/resistancesViewFull.py:84
msgid "Thermal resistance"
msgstr "热能抗性"
#: gui/builtinStatsViews/miningyieldViewFull.py:88
msgid "Total"
msgstr "总容量"
#: gui/builtinStatsViews/capacitorViewFull.py:65
msgid "Total: "
msgstr "总容量:"
#: gui/builtinStatsViews/resourcesViewFull.py:109
msgid "Turret hardpoints"
msgstr "炮台"
#: gui/builtinStatsViews/targetingMiscViewMinimal.py:85
msgid "Warp Speed"
msgstr "曲速航速"
#: gui/builtinStatsViews/firepowerViewFull.py:66
#: gui/builtinStatsViews/miningyieldViewFull.py:58
msgid "drone"
msgstr "无人机"
#: gui/builtinStatsViews/firepowerViewFull.py:66
msgid "droneDPS"
msgstr ""
#: ./gui/mainFrame.py:866 ./gui/mainFrame.py:894
msgid "Backup fits"
#: gui/builtinStatsViews/firepowerViewFull.py:57
msgid "full"
msgstr ""
#: ./gui/mainFrame.py:867
msgid "Backing up %d fits to: %s"
#: gui/builtinStatsViews/miningyieldViewFull.py:58
msgid "miner"
msgstr "采矿器"
#: gui/builtinStatsViews/miningyieldViewFull.py:58
msgid "mining"
msgstr ""
#: ./gui/mainFrame.py:886
msgid ""
"Invalid Path\n"
"\n"
"The following path is invalid or does not exist: \n"
"%s\n"
"\n"
"Please verify path location pyfa's preferences."
msgstr ""
#: ./gui/mainFrame.py:887
msgid "Error"
msgstr ""
#: ./gui/mainFrame.py:895
msgid "Generating HTML file at: %s"
msgstr ""
#: ./gui/mainFrame.py:937
msgid "Export Error"
msgstr ""
#: ./gui/mainFrame.py:937
msgid "Import Error"
msgstr ""
#: ./gui/mainFrame.py:940
msgid ""
"The following error was generated\n"
"\n"
"%s\n"
"\n"
"Be aware that already processed fits were not saved"
msgstr ""
#: ./gui/mainFrame.py:999
msgid "Open One Or More Character Files"
msgstr ""
#: ./gui/mainFrame.py:1000
msgid "EVE API XML character files (*.xml)|*.xml|All Files (*)|*"
msgstr ""
#: ./gui/mainFrame.py:1005
msgid "Importing Character..."
msgstr ""
#: gui/builtinStatsViews/firepowerViewFull.py:66
msgid "turret"
msgstr "炮台"
#: gui/builtinStatsViews/firepowerViewFull.py:66
msgid "weapon"
msgstr "武器"

View File

@@ -74,7 +74,7 @@ parser.add_option("-s", "--savepath", action="store", dest="savepath", help="Set
parser.add_option("-l", "--logginglevel", action="store", dest="logginglevel", help="Set desired logging level [Critical|Error|Warning|Info|Debug]", default="Error")
parser.add_option("-p", "--profile", action="store", dest="profile_path", help="Set location to save profileing.", default=None)
parser.add_option("-i", "--language", action="store", dest="language", help="Set the language for pyfa", default="en_US")
parser.add_option("-i", "--language", action="store", dest="language", help="Set the language for pyfa", default=None)
(options, args) = parser.parse_args()

View File

@@ -22,6 +22,7 @@ import os.path
import urllib.request
import urllib.error
import urllib.parse
import wx
from logbook import Logger
@@ -533,3 +534,32 @@ class GraphSettings:
def set(self, type, value):
self.settings[type] = value
class LocaleSettings:
_instance = None
supported_langauges = {
"en_US": wx.LANGUAGE_ENGLISH,
"zh_CN": wx.LANGUAGE_CHINESE_SIMPLIFIED,
# todo: add the others that EVE supports
}
@classmethod
def getInstance(cls):
if cls._instance is None:
cls._instance = LocaleSettings()
return cls._instance
def __init__(self):
defaults = {
'locale': "en_US"
}
self.settings = SettingsProvider.getInstance().getSettings('localeSettings', defaults)
def get(self, key):
return self.settings[key]
def set(self, key, value):
self.settings[key] = value