Browse Source

Merge pull request #17 from Azeirah/master

Fixed some language issues and added dutch language
pull/29/head
Chris 10 years ago
parent
commit
520589e4c0
3 changed files with 30 additions and 8 deletions
  1. 13
      gooey/gooey_decorator.py
  2. 5
      gooey/gui/advanced_config.py
  3. 20
      gooey/languages/dutch.json

13
gooey/gooey_decorator.py

@ -12,12 +12,6 @@ from gooey.gui.component_factory import ComponentFactory
import i18n
import i18n_config
import source_parser
from gooey.gui.client_app import ClientApp
from gooey.gui.client_app import EmptyClientApp
from gooey.gui.base_window import BaseWindow
from gooey.gui.advanced_config import AdvancedConfigPanel
from gooey.gui.basic_config_panel import BasicConfigPanel
def Gooey(f=None, advanced=True,
language='english', config=True,
@ -42,6 +36,13 @@ def Gooey(f=None, advanced=True,
i18n.load(language)
# load gui components after loading the language pack
from gooey.gui.client_app import ClientApp
from gooey.gui.client_app import EmptyClientApp
from gooey.gui.base_window import BaseWindow
from gooey.gui.advanced_config import AdvancedConfigPanel
from gooey.gui.basic_config_panel import BasicConfigPanel
if config:
parser = get_parser(module_path)
client_app = ClientApp(parser, payload)

5
gooey/gui/advanced_config.py

@ -7,6 +7,7 @@ Created on Dec 28, 2013
import wx
from wx.lib.scrolledpanel import ScrolledPanel
from gooey import i18n
from gooey.gui.component_factory import ComponentFactory
from gooey.gui.option_reader import OptionReader
import styling
@ -39,9 +40,9 @@ class AdvancedConfigPanel(ScrolledPanel, OptionReader):
def _init_components(self):
self._msg_req_args = (styling.H1(self, "Required Arguments")
self._msg_req_args = (styling.H1(self, i18n.translate("required_args_msg"))
if self._positionals else None)
self._msg_opt_args = styling.H1(self, "Optional Arguments")
self._msg_opt_args = styling.H1(self, i18n.translate("optional_args_msg"))
def _do_layout(self):
STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, PADDING)

20
gooey/languages/dutch.json

@ -0,0 +1,20 @@
{
"cancel": "Annuleren",
"close": "Sluiten",
"close_program": "Programma sluiten?",
"error_title": "Error",
"execution_finished": "Uitvoering is klaar",
"finished_msg": "Alles is klaar, je kunt het programma nu veilig afsluiten",
"finished_title": "Klaar",
"optional_args_msg": "Optionele Argumenten",
"required_args_msg": "Verplichte Argumenten",
"running_msg": "Wacht alstublieft totdat het programma klaar is met draaien,dit kan even duren",
"running_title": "Bezig",
"settings_title": "Opties",
"simple_config": "Voer Command Line argumenten in",
"start": "Start",
"status": "Status",
"success_message": "Programma is succesvol voltooid!\nDruk op de OK knop om af te sluiten",
"sure_you_want_to_exit": "Weet je zeker dat je wilt afsluiten?",
"uh_oh": "\nUh oh! Er is iets misgegaan. \nKopieër de te error hieronder om de ontwikkelaar te laten weten wat er mis is gegaan.\n\n{} \t\t\n\t\t"
}
Loading…
Cancel
Save