Changeset 107:35310bf5309c


Ignore:
Timestamp:
04/24/12 19:02:56 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for internationalization and translated most of the flight wizard into Hungarian

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • notes.txt

    r100 r107  
    1818- Saved PIREP: can only be sent with a separate program
    1919
     20-------------------------------------------------------------------------------
     21
     22- Alt combinations:
     23  Fixed:
     24 
     25     English: D, F, G, H, I, L
     26
     27         Alt+F: Flight Tab
     28         Alt+I: Flight info
     29         Alt+L: Log
     30         Alt+D: Debug Log   
     31         Alt+H: Help
     32         Alt+G: Gates
     33     
     34     Magyar: D, I, J, K, N, S
     35
     36        Alt+J: Járat
     37        Alt+I: Járat info
     38        Alt+N: Napló
     39        Alt+D: Debug Napló
     40        Alt+S: Segítség
     41        Alt+K: Kapuk
     42       
  • src/mlx/config.py

    r45 r107  
    2929
    3030        self._modified = False
     31
     32        self._language = ""
    3133
    3234    @property
     
    103105        self._updateURL = self._get(config, "update", "url",
    104106                                    Config.DEFAULT_UPDATE_URL)
     107
     108        self._language = self._get(config, "general", "language", "")
     109       
    105110        self._modified = False
    106111
     
    123128        config.set("update", "url", self._updateURL)
    124129
     130        config.add_section("general")
     131        if self._language:
     132            config.set("general", "language", self._language)
     133       
    125134        try:
    126135            fd = os.open(configPath, os.O_CREAT|os.O_TRUNC|os.O_WRONLY,
     
    146155               else default
    147156
     157    def getLanguage(self):
     158        """Get the language to be used."""
     159        if self._language:
     160            return self._language
     161        else:
     162            import locale
     163            return locale.getdefaultlocale()[0]
     164
    148165#-------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r106 r107  
    88import mlx.util as util
    99from mlx.pirep import PIREP
     10from mlx.i18n import xstr
    1011
    1112import datetime
     
    121122        self._mainAlignment.add(widget)
    122123
    123     def addButton(self, label, default = False):
     124    def addButton(self, label, default = False, sensitive = True,
     125                  tooltip = None, clicked = None):
    124126        """Add a button with the given label.
    125127
     
    131133            button.set_can_default(True)
    132134            self._defaultButton = button
     135        button.set_sensitive(sensitive)
     136        if tooltip is not None:
     137            button.set_tooltip_text(tooltip)
     138        if clicked is not None:
     139            button.connect("clicked", clicked)
    133140        return button
     141
     142    def addPreviousButton(self, sensitive = True, clicked = None):
     143        """Add the 'Next' button to the page."""
     144        return self.addButton(xstr("button_previous"),
     145                              sensitive = sensitive,
     146                              tooltip = xstr("button_previous_tooltip"),
     147                              clicked = clicked)
     148
     149    def addNextButton(self, default = True, sensitive = True,
     150                      clicked = None):
     151        """Add the 'Next' button to the page."""
     152        return self.addButton(xstr("button_next"),
     153                              default = default,
     154                              sensitive = sensitive,
     155                              tooltip = xstr("button_next_tooltip"),
     156                              clicked = clicked)
    134157
    135158    def initialize(self):
     
    184207    def __init__(self, wizard):
    185208        """Construct the login page."""
    186         help = "Enter your MAVA pilot's ID and password to\n" \
    187         "log in to the MAVA website and download\n" \
    188         "your booked flights."
    189         super(LoginPage, self).__init__(wizard, "Login", help)
     209        super(LoginPage, self).__init__(wizard, xstr("login"),
     210                                        xstr("loginHelp"))
    190211
    191212        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    198219        self.setMainWidget(alignment)
    199220
    200         labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    201         label = gtk.Label("Pilot _ID:")
     221        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
     222                                       xscale = 0.0, yscale = 0.0)
     223        label = gtk.Label(xstr("label_pilotID"))
    202224        label.set_use_underline(True)
    203225        labelAlignment.add(label)
     
    206228        self._pilotID = gtk.Entry()
    207229        self._pilotID.connect("changed", self._setLoginButton)
    208         self._pilotID.set_tooltip_text("Enter your MAVA pilot's ID. This "
    209                                        "usually starts with a "
    210                                        "'P' followed by 3 digits.")
     230        self._pilotID.set_tooltip_text(xstr("login_pilotID_tooltip"))
    211231        table.attach(self._pilotID, 1, 2, 0, 1)
    212232        label.set_mnemonic_widget(self._pilotID)
    213233
    214         labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    215         label = gtk.Label("_Password:")
     234        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
     235                                       xscale = 0.0, yscale = 0.0)
     236        label = gtk.Label(xstr("label_password"))
    216237        label.set_use_underline(True)
    217238        labelAlignment.add(label)
     
    221242        self._password.set_visibility(False)
    222243        self._password.connect("changed", self._setLoginButton)
    223         self._password.set_tooltip_text("Enter the password for your pilot's ID")
     244        self._password.set_tooltip_text(xstr("login_password_tooltip"))
    224245        table.attach(self._password, 1, 2, 1, 2)
    225246        label.set_mnemonic_widget(self._password)
    226247
    227         self._rememberButton = gtk.CheckButton("_Remember password")
     248        self._rememberButton = gtk.CheckButton(xstr("remember_password"))
    228249        self._rememberButton.set_use_underline(True)
    229         self._rememberButton.set_tooltip_text("If checked, your password will "
    230                                               "be stored, so that you should "
    231                                               "not have to enter it every time. "
    232                                               "Note, however, that the password "
    233                                               "is stored as text, and anybody "
    234                                               "who can access your files will "
    235                                               "be able to read it.")
     250        self._rememberButton.set_tooltip_text(xstr("login_remember_tooltip"))
    236251        table.attach(self._rememberButton, 1, 2, 2, 3, ypadding = 8)
    237252
    238         self._loginButton = self.addButton("_Login", default = True)
     253        self._loginButton = self.addButton(xstr("button_login"), default = True)
    239254        self._loginButton.set_sensitive(False)
    240255        self._loginButton.connect("clicked", self._loginClicked)
    241         self._loginButton.set_tooltip_text("Click to log in.")       
     256        self._loginButton.set_tooltip_text(xstr("login_button_tooltip"))       
    242257
    243258    def activate(self):
     
    260275        self._loginButton.set_sensitive(False)
    261276        gui = self._wizard.gui
    262         gui.beginBusy("Logging in...")
     277        gui.beginBusy(xstr("login_busy"))
    263278        gui.webHandler.login(self._loginResultCallback,
    264279                            self._pilotID.get_text(),
     
    292307                                           type = MESSAGETYPE_ERROR,
    293308                                           buttons = BUTTONSTYPE_OK,
    294                                            message_format =
    295                                            "Invalid pilot's ID or password.")
     309                                           message_format = xstr("login_invalid"))
    296310                dialog.set_title(WINDOW_TITLE_BASE)
    297                 dialog.format_secondary_markup("Check the ID and try to reenter"
    298                                                " the password.")
     311                dialog.format_secondary_markup(xstr("login_invalid_sec"))
    299312                dialog.run()
    300313                dialog.hide()
     
    303316                                       type = MESSAGETYPE_ERROR,
    304317                                       buttons = BUTTONSTYPE_OK,
    305                                        message_format =
    306                                        "Failed to connect to the MAVA website.")
     318                                       message_format = xstr("login_failconn"))
    307319            dialog.set_title(WINDOW_TITLE_BASE)
    308             dialog.format_secondary_markup("Try again in a few minutes.")
     320            dialog.format_secondary_markup(xstr("login_failconn_sec"))
     321           
    309322            dialog.run()
    310323            dialog.hide()
     
    316329    def __init__(self, wizard):
    317330        """Construct the flight selection page."""
    318         help = "Select the flight you want to perform."
    319         completedHelp = "You have selected the flight highlighted below."
    320         super(FlightSelectionPage, self).__init__(wizard, "Flight selection",
     331        help = xstr("flightsel_help")
     332        completedHelp = xstr("flightsel_chelp")
     333        super(FlightSelectionPage, self).__init__(wizard, xstr("flightsel_title"),
    321334                                                  help, completedHelp = completedHelp)
    322335
     
    324337        self._listStore = gtk.ListStore(str, str, str, str)
    325338        self._flightList = gtk.TreeView(self._listStore)
    326         column = gtk.TreeViewColumn("Flight no.", gtk.CellRendererText(),
     339        column = gtk.TreeViewColumn(xstr("flightsel_no"), gtk.CellRendererText(),
    327340                                    text = 1)
    328341        column.set_expand(True)
    329342        self._flightList.append_column(column)
    330         column = gtk.TreeViewColumn("Departure time [UTC]", gtk.CellRendererText(),
     343        column = gtk.TreeViewColumn(xstr("flightsel_deptime"), gtk.CellRendererText(),
    331344                                    text = 0)
    332345        column.set_expand(True)
    333346        self._flightList.append_column(column)
    334         column = gtk.TreeViewColumn("From", gtk.CellRendererText(),
     347        column = gtk.TreeViewColumn(xstr("flightsel_from"), gtk.CellRendererText(),
    335348                                    text = 2)
    336349        column.set_expand(True)
    337350        self._flightList.append_column(column)
    338         column = gtk.TreeViewColumn("To", gtk.CellRendererText(),
     351        column = gtk.TreeViewColumn(xstr("flightsel_to"), gtk.CellRendererText(),
    339352                                    text = 3)
    340353        column.set_expand(True)
     
    359372        self.setMainWidget(alignment)
    360373
    361         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    362         self._button.set_use_stock(True)
    363         self._button.set_sensitive(False)
    364         self._button.connect("clicked", self._forwardClicked)
     374        self._button = self.addNextButton(sensitive = False,
     375                                          clicked =  self._forwardClicked)
    365376
    366377    def activate(self):
     
    432443class GateSelectionPage(Page):
    433444    """Page to select a free gate at LHBP.
    434 
    435445    This page should be displayed only if we have fleet information!."""
    436446    def __init__(self, wizard):
    437447        """Construct the gate selection page."""
    438         help = "The airplane's gate position is invalid.\n\n" \
    439                "Select the gate from which you\n" \
    440                "would like to begin the flight."
    441         super(GateSelectionPage, self).__init__(wizard,
    442                                                 "LHBP gate selection",
    443                                                 help)
    444 
     448        super(GateSelectionPage, self).__init__(wizard, xstr("gatesel_title"),
     449                                                xstr("gatesel_help"))
     450       
    445451        self._listStore = gtk.ListStore(str)
    446452        self._gateList = gtk.TreeView(self._listStore)
     
    469475        self.setMainWidget(alignment)       
    470476
    471         button = self.addButton(gtk.STOCK_GO_BACK)
    472         button.set_use_stock(True)
    473         button.connect("clicked", self._backClicked)
    474        
    475         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    476         self._button.set_use_stock(True)
    477         self._button.set_sensitive(False)
    478         self._button.connect("clicked", self._forwardClicked)
     477        self.addPreviousButton(clicked = self._backClicked)
     478       
     479        self._button = self.addNextButton(sensitive = False,
     480                                          clicked = self._forwardClicked)
    479481
    480482    def activate(self):
     
    523525                                       type = MESSAGETYPE_ERROR,
    524526                                       buttons = BUTTONSTYPE_OK,
    525                                        message_format = "Gate conflict detected again")
     527                                       message_format = xstr("gatesel_conflict"))
    526528            dialog.set_title(WINDOW_TITLE_BASE)
    527             dialog.format_secondary_markup("Try to select a different gate.")
     529            dialog.format_secondary_markup(xstr("gatesel_conflict_sec"))
    528530            dialog.run()
    529531            dialog.hide()
     
    548550               "Then press the Connect button to connect to the simulator."
    549551        completedHelp = "The basic data of your flight can be read below."
    550         super(ConnectPage, self).__init__(wizard,
    551                                           "Connect to the simulator",
    552                                           help, completedHelp = completedHelp)
     552        super(ConnectPage, self).__init__(wizard, xstr("connect_title"),
     553                                          xstr("connect_help"),
     554                                          completedHelp = xstr("connect_chelp"))
    553555       
    554556        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    563565
    564566        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    565         label = gtk.Label("Flight number:")
     567        label = gtk.Label(xstr("connect_flightno"))
    566568        labelAlignment.add(label)
    567569        table.attach(labelAlignment, 0, 1, 0, 1)
     
    575577
    576578        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    577         label = gtk.Label("Aircraft:")
     579        label = gtk.Label(xstr("connect_acft"))
    578580        labelAlignment.add(label)
    579581        table.attach(labelAlignment, 0, 1, 1, 2)
     
    587589
    588590        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    589         label = gtk.Label("Tail number:")
     591        label = gtk.Label(xstr("connect_tailno"))
    590592        labelAlignment.add(label)
    591593        table.attach(labelAlignment, 0, 1, 2, 3)
     
    599601
    600602        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    601         label = gtk.Label("Airport:")
     603        label = gtk.Label(xstr("connect_airport"))
    602604        labelAlignment.add(label)
    603605        table.attach(labelAlignment, 0, 1, 3, 4)
     
    611613
    612614        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    613         label = gtk.Label("Gate:")
     615        label = gtk.Label(xstr("connect_gate"))
    614616        labelAlignment.add(label)
    615617        table.attach(labelAlignment, 0, 1, 4, 5)
     
    622624        table.attach(labelAlignment, 1, 2, 4, 5)
    623625
    624         button = self.addButton(gtk.STOCK_GO_BACK)
    625         button.set_use_stock(True)
    626         button.connect("clicked", self._backClicked)
    627 
    628         self._button = self.addButton("_Connect", default = True)
    629         self._button.set_use_underline(True)
     626        self.addPreviousButton(clicked = self._backClicked)
     627
     628        self._button = self.addButton(xstr("button_connect"), default = True,
     629                                      tooltip = xstr("button_connect_tooltip"))
    630630        self._clickedID = self._button.connect("clicked", self._connectClicked)
    631631
    632632    def activate(self):
    633633        """Setup the departure information."""
    634         self._button.set_label("_Connect")
     634        self._button.set_label(xstr("button_connect"))
    635635        self._button.set_use_underline(True)
     636        self._button.set_tooltip_text(xstr("button_connect_tooltip"))
    636637        self._button.disconnect(self._clickedID)
    637638        self._clickedID = self._button.connect("clicked", self._connectClicked)
     
    655656    def finalize(self):
    656657        """Finalize the page."""
    657         self._button.set_label(gtk.STOCK_GO_FORWARD)
    658         self._button.set_use_stock(True)
     658        self._button.set_label(xstr("button_next"))
     659        self._button.set_use_underline(True)
     660        self._button.set_tooltip_text(xstr("button_next_tooltip"))
    659661        self._button.disconnect(self._clickedID)
    660662        self._clickedID = self._button.connect("clicked", self._forwardClicked)
     
    678680    def __init__(self, wizard):
    679681        """Construct the page."""
    680         help = "The briefing contains the weights below.\n" \
    681                "Setup the cargo weight here and the payload weight in the simulator.\n\n" \
    682                "You can also check here what the simulator reports as ZFW."
    683         completedHelp = "You can see the weights in the briefing\n" \
    684                         "and the cargo weight you have selected below.\n\n" \
    685                         "You can also query the ZFW reported by the simulator."
    686         super(PayloadPage, self).__init__(wizard, "Payload", help,
    687                                           completedHelp = completedHelp)
     682        super(PayloadPage, self).__init__(wizard, xstr("payload_title"),
     683                                          xstr("payload_help"),
     684                                          completedHelp = xstr("payload_chelp"))
    688685
    689686        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    697694        self.setMainWidget(alignment)
    698695
    699         label = gtk.Label("Crew:")
     696        label = gtk.Label(xstr("payload_crew"))
    700697        label.set_alignment(0.0, 0.5)
    701698        table.attach(label, 0, 1, 0, 1)
     
    706703        table.attach(self._numCrew, 1, 2, 0, 1)
    707704       
    708         label = gtk.Label("Passengers:")
     705        label = gtk.Label(xstr("payload_pax"))
    709706        label.set_alignment(0.0, 0.5)
    710707        table.attach(label, 0, 1, 1, 2)
     
    715712        table.attach(self._numPassengers, 1, 2, 1, 2)
    716713       
    717         label = gtk.Label("Baggage:")
     714        label = gtk.Label(xstr("payload_bag"))
    718715        label.set_alignment(0.0, 0.5)
    719716        table.attach(label, 0, 1, 2, 3)
     
    726723        table.attach(gtk.Label("kg"), 2, 3, 2, 3)
    727724       
    728         label = gtk.Label("_Cargo:")
     725        label = gtk.Label(xstr("payload_cargo"))
    729726        label.set_use_underline(True)
    730727        label.set_alignment(0.0, 0.5)
     
    734731        self._cargoWeight.set_width_chars(6)
    735732        self._cargoWeight.connect("integer-changed", self._cargoWeightChanged)
    736         self._cargoWeight.set_tooltip_text("The weight of the cargo for your flight.")
     733        self._cargoWeight.set_tooltip_text(xstr("payload_cargo_tooltip"))
    737734        table.attach(self._cargoWeight, 1, 2, 3, 4)
    738735        label.set_mnemonic_widget(self._cargoWeight)
     
    740737        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
    741738       
    742         label = gtk.Label("Mail:")
     739        label = gtk.Label(xstr("payload_mail"))
    743740        label.set_alignment(0.0, 0.5)
    744741        table.attach(label, 0, 1, 4, 5)
     
    751748        table.attach(gtk.Label("kg"), 2, 3, 4, 5)
    752749       
    753         label = gtk.Label("<b>Calculated ZFW:</b>")
     750        label = gtk.Label("<b>" + xstr("payload_zfw") + "</b>")
    754751        label.set_alignment(0.0, 0.5)
    755752        label.set_use_markup(True)
     
    763760        table.attach(gtk.Label("kg"), 2, 3, 5, 6)
    764761
    765         self._zfwButton = gtk.Button("_ZFW from FS:")
     762        self._zfwButton = gtk.Button(xstr("payload_fszfw"))
    766763        self._zfwButton.set_use_underline(True)
    767764        self._zfwButton.connect("clicked", self._zfwRequested)
     765        self._zfwButton.set_tooltip_text(xstr("payload_fszfw_tooltip"))
    768766        table.attach(self._zfwButton, 0, 1, 6, 7)
    769767
     
    776774        table.attach(gtk.Label("kg"), 2, 3, 6, 7)
    777775
    778         self._backButton = self.addButton(gtk.STOCK_GO_BACK)
    779         self._backButton.set_use_stock(True)
    780         self._backButton.connect("clicked", self._backClicked)
    781 
    782         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    783         self._button.set_use_stock(True)
    784         self._button.connect("clicked", self._forwardClicked)
     776        self._backButton = self.addPreviousButton(clicked = self._backClicked)
     777        self._button = self.addNextButton(clicked = self._forwardClicked)
    785778
    786779    @property
     
    839832        self._button.set_sensitive(False)
    840833        gui = self._wizard.gui
    841         gui.beginBusy("Querying ZFW...")
     834        gui.beginBusy(xstr("payload_zfw_busy"))
    842835        gui.simulator.requestZFW(self._handleZFW)
    843836
     
    870863    current time from the flight simulator."""
    871864    def __init__(self, wizard):
    872         help = "The departure and arrival times are displayed below in UTC.\n\n" \
    873                "You can also query the current UTC time from the simulator.\n" \
    874                "Ensure that you have enough time to properly prepare for the flight."
    875         completedHelp = "The departure and arrival times are displayed below in UTC.\n\n" \
    876                         "You can also query the current UTC time from the simulator.\n"
    877         super(TimePage, self).__init__(wizard, "Time", help,
    878                                        completedHelp = completedHelp)
     865        super(TimePage, self).__init__(wizard, xstr("time_title"),
     866                                       xstr("time_help"),
     867                                       completedHelp = xstr("time_chelp"))
    879868
    880869        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    888877        self.setMainWidget(alignment)
    889878
    890         label = gtk.Label("Departure:")
     879        label = gtk.Label(xstr("time_departure"))
    891880        label.set_alignment(0.0, 0.5)
    892881        table.attach(label, 0, 1, 0, 1)
     
    896885        table.attach(self._departure, 1, 2, 0, 1)
    897886       
    898         label = gtk.Label("Arrival:")
     887        label = gtk.Label(xstr("time_arrival"))
    899888        label.set_alignment(0.0, 0.5)
    900889        table.attach(label, 0, 1, 1, 2)
     
    904893        table.attach(self._arrival, 1, 2, 1, 2)
    905894
    906         self._timeButton = gtk.Button("_Time from FS:")
     895        self._timeButton = gtk.Button(xstr("time_fs"))
    907896        self._timeButton.set_use_underline(True)
     897        self._timeButton.set_tooltip_text(xstr("time_fs_tooltip"))
    908898        self._timeButton.connect("clicked", self._timeRequested)
    909899        table.attach(self._timeButton, 0, 1, 2, 3)
     
    913903        table.attach(self._simulatorTime, 1, 2, 2, 3)
    914904
    915         self._backButton = self.addButton(gtk.STOCK_GO_BACK)
    916         self._backButton.set_use_stock(True)
    917         self._backButton.connect("clicked", self._backClicked)
    918 
    919         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    920         self._button.set_use_stock(True)
    921         self._button.connect("clicked", self._forwardClicked)
     905        self._backButton = self.addPreviousButton(clicked = self._backClicked)
     906        self._button = self.addNextButton(clicked = self._forwardClicked)
    922907
    923908    def activate(self):
     
    934919        self._backButton.set_sensitive(False)
    935920        self._button.set_sensitive(False)
    936         self._wizard.gui.beginBusy("Querying time...")
     921        self._wizard.gui.beginBusy(xstr("time_busy"))
    937922        self._wizard.gui.simulator.requestTime(self._handleTime)
    938923
     
    980965    """The page containing the route and the flight level."""
    981966    def __init__(self, wizard):
    982         help = "Set your cruise flight level below, and\n" \
    983                "if necessary, edit the flight plan."
    984         completedHelp = "If necessary, you can modify the cruise level and\n" \
    985                         "the flight plan below during flight.\n" \
    986                         "If so, please, add a comment on why " \
    987                         "the modification became necessary."
    988         super(RoutePage, self).__init__(wizard, "Route", help,
    989                                         completedHelp = completedHelp)
     967        super(RoutePage, self).__init__(wizard, xstr("route_title"),
     968                                        xstr("route_help"),
     969                                        completedHelp = xstr("route_chelp"))
    990970
    991971        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    998978        levelBox = gtk.HBox()
    999979
    1000         label = gtk.Label("_Cruise level")
     980        label = gtk.Label(xstr("route_level"))
    1001981        label.set_use_underline(True)
    1002982        levelBox.pack_start(label, True, True, 0)
     
    1005985        self._cruiseLevel.set_increments(step = 10, page = 100)
    1006986        self._cruiseLevel.set_range(min = 50, max = 500)
    1007         self._cruiseLevel.set_tooltip_text("The cruise flight level.")
     987        self._cruiseLevel.set_tooltip_text(xstr("route_level_tooltip"))
    1008988        self._cruiseLevel.set_numeric(True)
    1009989        self._cruiseLevel.connect("value-changed", self._cruiseLevelChanged)
     
    10241004        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
    10251005                                  xscale = 0.0, yscale = 0.0)
    1026         label = gtk.Label("_Route")
     1006        label = gtk.Label(xstr("route_route"))
    10271007        label.set_use_underline(True)
    10281008        alignment.add(label)
     
    10391019
    10401020        self._route = gtk.TextView()
    1041         self._route.set_tooltip_text("The planned flight route.")
     1021        self._route.set_tooltip_text(xstr("route_route_tooltip"))
    10421022        self._route.get_buffer().connect("changed", self._routeChanged)
    10431023        routeWindow.add(self._route)
     
    10481028        mainBox.pack_start(routeBox, True, True, 8)
    10491029
    1050         self._backButton = self.addButton(gtk.STOCK_GO_BACK)
    1051         self._backButton.set_use_stock(True)
    1052         self._backButton.connect("clicked", self._backClicked)
    1053 
    1054         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    1055         self._button.set_use_stock(True)
    1056         self._button.connect("clicked", self._forwardClicked)
     1030        self._backButton = self.addPreviousButton(clicked = self._backClicked)       
     1031        self._button = self.addNextButton(clicked = self._forwardClicked)
    10571032
    10581033    @property
     
    11081083            bookedFlight = self._wizard._bookedFlight
    11091084            self._filedCruiseLevel = self.cruiseLevel
    1110             self._wizard.gui.beginBusy("Downloading NOTAMs...")
     1085            self._wizard.gui.beginBusy(xstr("route_down_notams"))
    11111086            self._wizard.gui.webHandler.getNOTAMs(self._notamsCallback,
    11121087                                                  bookedFlight.departureICAO,
     
    11271102
    11281103        bookedFlight = self._wizard._bookedFlight
    1129         self._wizard.gui.beginBusy("Downloading METARs...")
     1104        self._wizard.gui.beginBusy(xstr("route_down_metars"))
    11301105        self._wizard.gui.webHandler.getMETARs(self._metarsCallback,
    11311106                                              [bookedFlight.departureICAO,
     
    11601135        self._departure = departure
    11611136       
    1162         title = "Briefing (%d/2): %s" % (1 if departure else 2,
    1163                                         "departure" if departure
    1164                                          else "arrival")
    1165                                                                
    1166         help = "Read carefully the NOTAMs and METAR below.\n\n" \
    1167                "You can edit the METAR if your simulator or network\n" \
    1168                "provides different weather."
    1169         completedHelp = "If your simulator or network provides a different\n" \
    1170                         "weather, you can edit the METAR below."
    1171         super(BriefingPage, self).__init__(wizard, title, help,
    1172                                            completedHelp = completedHelp)
     1137        title = xstr("briefing_title") % (1 if departure else 2,
     1138                                          xstr("briefing_departure")
     1139                                          if departure
     1140                                          else xstr("briefing_arrival"))
     1141        super(BriefingPage, self).__init__(wizard, title, xstr("briefing_help"),
     1142                                           completedHelp = xstr("briefing_chelp"))
    11731143
    11741144        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    11801150
    11811151        self._notamsFrame = gtk.Frame()
    1182         self._notamsFrame.set_label("LHBP NOTAMs")
     1152        self._notamsFrame.set_label(xstr("briefing_notams_init"))
    11831153        scrolledWindow = gtk.ScrolledWindow()
    11841154        scrolledWindow.set_size_request(-1, 128)
     
    12021172       
    12031173        self._metarFrame = gtk.Frame()
    1204         self._metarFrame.set_label("LHBP METAR")
     1174        self._metarFrame.set_label(xstr("briefing_metar_init"))
    12051175        scrolledWindow = gtk.ScrolledWindow()
    12061176        scrolledWindow.set_size_request(-1, 32)
     
    12231193        self.metarEdited = False
    12241194
    1225         button = self.addButton(gtk.STOCK_GO_BACK)
    1226         button.set_use_stock(True)
    1227         button.connect("clicked", self._backClicked)
    1228 
    1229         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    1230         self._button.set_use_stock(True)
    1231         self._button.connect("clicked", self._forwardClicked)
     1195        self.addPreviousButton(clicked = self._backClicked)
     1196        self._button = self.addNextButton(clicked = self._forwardClicked)
    12321197
    12331198    @property
     
    12461211        """Activate the page."""
    12471212        if not self._departure:
    1248             self._button.set_label("I have read the briefing and am ready to fly!")
     1213            self._button.set_label(xstr("briefing_button"))
     1214            self._button.set_has_tooltip(False)
    12491215            self._button.set_use_stock(False)
    12501216
     
    12581224                 else self._wizard._arrivalMETAR
    12591225
    1260         self._notamsFrame.set_label(icao + " NOTAMs")
     1226        self._notamsFrame.set_label(xstr("briefing_notams_template") % (icao,))
    12611227        buffer = self._notams.get_buffer()
    12621228        if notams is None:
    1263             buffer.set_text("Could not download NOTAMs")
     1229            buffer.set_text(xstr("briefing_notams_failed"))
    12641230        elif not notams:
    1265             buffer.set_text("Could not download NOTAM for this airport")
     1231            buffer.set_text(xstr("briefing_notams_missing"))
    12661232        else:
    12671233            s = ""
     
    12791245            buffer.set_text(s)
    12801246
    1281         self._metarFrame.set_label(icao + " METAR")
     1247        self._metarFrame.set_label(xstr("briefing_metar_template") % (icao,))
    12821248        buffer = self._metar.get_buffer()
    12831249        if metar is None:
    1284             buffer.set_text("Could not download METAR")
     1250            buffer.set_text(xstr("briefing_metar_failed"))
    12851251        else:
    12861252            buffer.set_text(metar)
     1253
     1254        label = self._metarFrame.get_label_widget()
     1255        label.set_use_underline(True)
     1256        label.set_mnemonic_widget(self._metar)
    12871257
    12881258        self.metarEdited = False
     
    12971267            if not self._completed:
    12981268                self._wizard.gui.startMonitoring()
    1299                 self._button.set_use_stock(True)
    1300                 self._button.set_label(gtk.STOCK_GO_FORWARD)
     1269                self._button.set_label(xstr("button_next"))
     1270                self._button.set_tooltip_text(xstr("button_next_tooltip"))
    13011271                self.complete()
    13021272
     
    13161286    def __init__(self, wizard):
    13171287        """Construct the takeoff page."""
    1318         help = "Enter the runway and SID used, as well as the speeds."
    1319         completedHelp = "The runway, SID and takeoff speeds logged can be seen below."
    1320 
    1321         super(TakeoffPage, self).__init__(wizard, "Takeoff", help,
    1322                                           completedHelp = completedHelp)
     1288        super(TakeoffPage, self).__init__(wizard, xstr("takeoff_title"),
     1289                                          xstr("takeoff_help"),
     1290                                          completedHelp = xstr("takeoff_chelp"))
    13231291
    13241292        self._forwardAllowed = False
     
    13341302        self.setMainWidget(alignment)
    13351303
    1336         label = gtk.Label("Run_way:")
     1304        label = gtk.Label(xstr("takeoff_runway"))
    13371305        label.set_use_underline(True)
    13381306        label.set_alignment(0.0, 0.5)
     
    13411309        self._runway = gtk.Entry()
    13421310        self._runway.set_width_chars(10)
    1343         self._runway.set_tooltip_text("The runway the takeoff is performed from.")
     1311        self._runway.set_tooltip_text(xstr("takeoff_runway_tooltip"))
    13441312        self._runway.connect("changed", self._valueChanged)
    13451313        table.attach(self._runway, 1, 3, 0, 1)
    13461314        label.set_mnemonic_widget(self._runway)
    13471315       
    1348         label = gtk.Label("_SID:")
     1316        label = gtk.Label(xstr("takeoff_sid"))
    13491317        label.set_use_underline(True)
    13501318        label.set_alignment(0.0, 0.5)
     
    13531321        self._sid = gtk.Entry()
    13541322        self._sid.set_width_chars(10)
    1355         self._sid.set_tooltip_text("The name of the Standard Instrument Deparature procedure followed.")
     1323        self._sid.set_tooltip_text(xstr("takeoff_sid_tooltip"))
    13561324        self._sid.connect("changed", self._valueChanged)
    13571325        table.attach(self._sid, 1, 3, 1, 2)
    13581326        label.set_mnemonic_widget(self._sid)
    13591327       
    1360         label = gtk.Label("V<sub>_1</sub>:")
     1328        label = gtk.Label(xstr("takeoff_v1"))
    13611329        label.set_use_markup(True)
    13621330        label.set_use_underline(True)
     
    13661334        self._v1 = IntegerEntry()
    13671335        self._v1.set_width_chars(4)
    1368         self._v1.set_tooltip_markup("The takeoff decision speed in knots.")
     1336        self._v1.set_tooltip_markup(xstr("takeoff_v1_tooltip"))
    13691337        self._v1.connect("integer-changed", self._valueChanged)
    13701338        table.attach(self._v1, 2, 3, 2, 3)
    13711339        label.set_mnemonic_widget(self._v1)
    13721340       
    1373         table.attach(gtk.Label("knots"), 3, 4, 2, 3)
    1374        
    1375         label = gtk.Label("V<sub>_R</sub>:")
     1341        table.attach(gtk.Label(xstr("label_knots")), 3, 4, 2, 3)
     1342       
     1343        label = gtk.Label(xstr("takeoff_vr"))
    13761344        label.set_use_markup(True)
    13771345        label.set_use_underline(True)
     
    13811349        self._vr = IntegerEntry()
    13821350        self._vr.set_width_chars(4)
    1383         self._vr.set_tooltip_markup("The takeoff rotation speed in knots.")
     1351        self._vr.set_tooltip_markup(xstr("takeoff_vr_tooltip"))
    13841352        self._vr.connect("integer-changed", self._valueChanged)
    13851353        table.attach(self._vr, 2, 3, 3, 4)
    13861354        label.set_mnemonic_widget(self._vr)
    13871355       
    1388         table.attach(gtk.Label("knots"), 3, 4, 3, 4)
    1389        
    1390         label = gtk.Label("V<sub>_2</sub>:")
     1356        table.attach(gtk.Label(xstr("label_knots")), 3, 4, 3, 4)
     1357       
     1358        label = gtk.Label(xstr("takeoff_v2"))
    13911359        label.set_use_markup(True)
    13921360        label.set_use_underline(True)
     
    13961364        self._v2 = IntegerEntry()
    13971365        self._v2.set_width_chars(4)
    1398         self._v2.set_tooltip_markup("The takeoff safety speed in knots.")
     1366        self._v2.set_tooltip_markup(xstr("takeoff_v2_tooltip"))
    13991367        self._v2.connect("integer-changed", self._valueChanged)
    14001368        table.attach(self._v2, 2, 3, 4, 5)
    14011369        label.set_mnemonic_widget(self._v2)
    14021370       
    1403         table.attach(gtk.Label("knots"), 3, 4, 4, 5)
    1404        
    1405         button = self.addButton(gtk.STOCK_GO_BACK)
    1406         button.set_use_stock(True)
    1407         button.connect("clicked", self._backClicked)
    1408 
    1409         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    1410         self._button.set_use_stock(True)
    1411         self._button.connect("clicked", self._forwardClicked)
     1371        table.attach(gtk.Label(xstr("label_knots")), 3, 4, 4, 5)
     1372
     1373        self.addPreviousButton(clicked = self._backClicked)
     1374
     1375        self._button = self.addNextButton(clicked = self._forwardClicked)
    14121376
    14131377    @property
     
    14941458    def __init__(self, wizard):
    14951459        """Construct the landing page."""
    1496         help = "Enter the STAR and/or transition, runway,\n" \
    1497                "approach type and V<sub>Ref</sub> used."
    1498         completedHelp = "The STAR and/or transition, runway, approach\n" \
    1499                         "type and V<sub>Ref</sub> logged can be seen below."
    1500 
    1501         super(LandingPage, self).__init__(wizard, "Landing", help,
    1502                                           completedHelp = completedHelp)
     1460        super(LandingPage, self).__init__(wizard, xstr("landing_title"),
     1461                                          xstr("landing_help"),
     1462                                          completedHelp = xstr("landing_chelp"))
    15031463
    15041464        self._flightEnded = False
     
    15181478        table.attach(self._starButton, 0, 1, 0, 1)
    15191479
    1520         label = gtk.Label("_STAR:")
     1480        label = gtk.Label(xstr("landing_star"))
    15211481        label.set_use_underline(True)
    15221482        label.set_alignment(0.0, 0.5)
     
    15251485        self._star = gtk.Entry()
    15261486        self._star.set_width_chars(10)
    1527         self._star.set_tooltip_text("The name of Standard Terminal Arrival Route followed.")
     1487        self._star.set_tooltip_text(xstr("landing_star_tooltip"))
    15281488        self._star.connect("changed", self._updateForwardButton)
    15291489        self._star.set_sensitive(False)
     
    15351495        table.attach(self._transitionButton, 0, 1, 1, 2)
    15361496
    1537         label = gtk.Label("_Transition:")
     1497        label = gtk.Label(xstr("landing_transition"))
    15381498        label.set_use_underline(True)
    15391499        label.set_alignment(0.0, 0.5)
     
    15421502        self._transition = gtk.Entry()
    15431503        self._transition.set_width_chars(10)
    1544         self._transition.set_tooltip_text("The name of transition executed or VECTORS if vectored by ATC.")
     1504        self._transition.set_tooltip_text(xstr("landing_transition_tooltip"))
    15451505        self._transition.connect("changed", self._updateForwardButton)
    15461506        self._transition.set_sensitive(False)
     
    15481508        label.set_mnemonic_widget(self._transitionButton)
    15491509
    1550         label = gtk.Label("Run_way:")
     1510        label = gtk.Label(xstr("landing_runway"))
    15511511        label.set_use_underline(True)
    15521512        label.set_alignment(0.0, 0.5)
     
    15551515        self._runway = gtk.Entry()
    15561516        self._runway.set_width_chars(10)
    1557         self._runway.set_tooltip_text("The runway the landing is performed on.")
     1517        self._runway.set_tooltip_text(xstr("landing_runway_tooltip"))
    15581518        self._runway.connect("changed", self._updateForwardButton)
    15591519        table.attach(self._runway, 2, 4, 2, 3)
    15601520        label.set_mnemonic_widget(self._runway)
    15611521
    1562         label = gtk.Label("_Approach type:")
     1522        label = gtk.Label(xstr("landing_approach"))
    15631523        label.set_use_underline(True)
    15641524        label.set_alignment(0.0, 0.5)
     
    15671527        self._approachType = gtk.Entry()
    15681528        self._approachType.set_width_chars(10)
    1569         self._approachType.set_tooltip_text("The type of the approach, e.g. ILS or VISUAL.")
     1529        self._approachType.set_tooltip_text(xstr("landing_approach_tooltip"))
    15701530        self._approachType.connect("changed", self._updateForwardButton)
    15711531        table.attach(self._approachType, 2, 4, 3, 4)
    15721532        label.set_mnemonic_widget(self._approachType)
    15731533
    1574         label = gtk.Label("V<sub>_Ref</sub>:")
     1534        label = gtk.Label(xstr("landing_vref"))
    15751535        label.set_use_markup(True)
    15761536        label.set_use_underline(True)
     
    15801540        self._vref = IntegerEntry()
    15811541        self._vref.set_width_chars(5)
    1582         self._vref.set_tooltip_markup("The approach reference speed in knots.")
     1542        self._vref.set_tooltip_markup(xstr("landing_vref_tooltip"))
    15831543        self._vref.connect("integer-changed", self._vrefChanged)
    15841544        table.attach(self._vref, 3, 4, 5, 6)
    15851545        label.set_mnemonic_widget(self._vref)
    15861546       
    1587         table.attach(gtk.Label("knots"), 4, 5, 5, 6)
    1588        
    1589         button = self.addButton(gtk.STOCK_GO_BACK)
    1590         button.set_use_stock(True)
    1591         button.connect("clicked", self._backClicked)
    1592 
    1593         self._button = self.addButton(gtk.STOCK_GO_FORWARD, default = True)
    1594         self._button.set_use_stock(True)
    1595         self._button.connect("clicked", self._forwardClicked)
     1547        table.attach(gtk.Label(xstr("label_knots")), 4, 5, 5, 6)
     1548
     1549        self.addPreviousButton(clicked = self._backClicked)
     1550
     1551        self._button = self.addNextButton(clicked = self._forwardClicked)
    15961552
    15971553        # These are needed for correct size calculations
     
    17151671class FinishPage(Page):
    17161672    """Flight finish page."""
    1717     _flightTypes = [ ("scheduled", const.FLIGHTTYPE_SCHEDULED),
    1718                      ("old-timer", const.FLIGHTTYPE_OLDTIMER),
    1719                      ("VIP", const.FLIGHTTYPE_VIP),
    1720                      ("charter", const.FLIGHTTYPE_CHARTER) ]
     1673    _flightTypes = [ ("flighttype_scheduled", const.FLIGHTTYPE_SCHEDULED),
     1674                     ("flighttype_ot", const.FLIGHTTYPE_OLDTIMER),
     1675                     ("flighttype_vip", const.FLIGHTTYPE_VIP),
     1676                     ("flighttype_charter", const.FLIGHTTYPE_CHARTER) ]
    17211677   
    17221678    def __init__(self, wizard):
    17231679        """Construct the finish page."""
    1724         help = "There are some statistics about your flight below.\n\n" \
    1725                "Review the data, also on earlier pages, and if you are\n" \
    1726                "satisfied, you can save or send your PIREP."
    1727 
    1728         super(FinishPage, self).__init__(wizard, "Finish", help)
     1680        super(FinishPage, self).__init__(wizard, xstr("finish_title"),
     1681                                         xstr("finish_help"))
    17291682       
    17301683        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    17391692
    17401693        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1741         label = gtk.Label("Flight rating:")
     1694        label = gtk.Label(xstr("finish_rating"))
    17421695        labelAlignment.add(label)
    17431696        table.attach(labelAlignment, 0, 1, 0, 1)
     
    17521705
    17531706        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1754         label = gtk.Label("Flight time:")
     1707        label = gtk.Label(xstr("finish_flight_time"))
    17551708        labelAlignment.add(label)
    17561709        table.attach(labelAlignment, 0, 1, 1, 2)
     
    17651718
    17661719        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1767         label = gtk.Label("Block time:")
     1720        label = gtk.Label(xstr("finish_block_time"))
    17681721        labelAlignment.add(label)
    17691722        table.attach(labelAlignment, 0, 1, 2, 3)
     
    17781731
    17791732        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1780         label = gtk.Label("Distance flown:")
     1733        label = gtk.Label(xstr("finish_distance"))
    17811734        labelAlignment.add(label)
    17821735        table.attach(labelAlignment, 0, 1, 3, 4)
     
    17911744       
    17921745        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1793         label = gtk.Label("Fuel used:")
     1746        label = gtk.Label(xstr("finish_fuel"))
    17941747        labelAlignment.add(label)
    17951748        table.attach(labelAlignment, 0, 1, 4, 5)
     
    18031756        table.attach(labelAlignment, 1, 2, 4, 5)
    18041757
    1805         labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
    1806         label = gtk.Label("_Type:")
     1758        labelAlignment = gtk.Alignment(xalign = 1.0, xscale = 0.0,
     1759                                       yalign = 0.5, yscale = 0.0)
     1760        label = gtk.Label(xstr("finish_type"))
    18071761        label.set_use_underline(True)
    18081762        labelAlignment.add(label)
     
    18111765        flightTypeModel = gtk.ListStore(str, int)
    18121766        for (name, type) in FinishPage._flightTypes:
    1813             flightTypeModel.append([name, type])
     1767            flightTypeModel.append([xstr(name), type])
    18141768
    18151769        self._flightType = gtk.ComboBox(model = flightTypeModel)
     
    18171771        self._flightType.pack_start(renderer, True)
    18181772        self._flightType.add_attribute(renderer, "text", 0)
    1819         self._flightType.set_tooltip_text("Select the type of the flight.")
     1773        self._flightType.set_tooltip_text(xstr("finish_type_tooltip"))
    18201774        self._flightType.set_active(0)
    18211775        self._flightType.connect("changed", self._flightTypeChanged)
     
    18251779        label.set_mnemonic_widget(self._flightType)       
    18261780
    1827         self._onlineFlight = gtk.CheckButton("_Online flight")
     1781        self._onlineFlight = gtk.CheckButton(xstr("finish_online"))
    18281782        self._onlineFlight.set_use_underline(True)
    1829         self._onlineFlight.set_tooltip_text("Check if your flight was online, uncheck otherwise.")
     1783        self._onlineFlight.set_tooltip_text(xstr("finish_online_tooltip"))
    18301784        onlineFlightAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
    18311785        onlineFlightAlignment.add(self._onlineFlight)
    18321786        table.attach(onlineFlightAlignment, 1, 2, 6, 7)
    18331787
    1834         button = self.addButton(gtk.STOCK_GO_BACK)
    1835         button.set_use_stock(True)
    1836         button.connect("clicked", self._backClicked)
    1837 
    1838         self._saveButton = self.addButton("S_ave PIREP...")
    1839         self._saveButton.set_use_underline(True)
    1840         self._saveButton.set_sensitive(False)
    1841         #self._saveButton.connect("clicked", self._saveClicked)
    1842        
    1843         self._sendButton = self.addButton("_Send PIREP...", True)
    1844         self._sendButton.set_use_underline(True)
    1845         self._sendButton.set_sensitive(False)
    1846         self._sendButton.connect("clicked", self._sendClicked)
     1788        self.addPreviousButton(clicked = self._backClicked)
     1789
     1790        self._saveButton = self.addButton(xstr("finish_save"),
     1791                                          sensitive = False,
     1792                                          tooltip = xstr("finish_send_tooltip"))
     1793       
     1794        self._sendButton = self.addButton(xstr("finish_send"), default = True,
     1795                                          sensitive = False,
     1796                                          clicked = self._sendClicked,
     1797                                          tooltip = xstr("finish_send_tooltip"))
    18471798       
    18481799    @property
     
    18981849        pirep = PIREP(self._wizard.gui)
    18991850        gui = self._wizard.gui
    1900         gui.beginBusy("Sending PIREP...")
     1851        gui.beginBusy(xstr("finish_send_busy"))
    19011852        gui.webHandler.sendPIREP(self._pirepSentCallback, pirep)
    19021853
     
    19131864            if result.success:
    19141865                type = MESSAGETYPE_INFO
    1915                 messageFormat = "The PIREP was sent successfully."
    1916                 secondaryMarkup = "Await the thorough scrutiny by our fearless PIREP correctors! :)"
     1866                messageFormat = xstr("finish_send_success")
     1867                secondaryMarkup = xstr("finish_send_success_sec")
    19171868            elif result.alreadyFlown:
    1918                 messageFormat = "The PIREP for this flight has already been sent!"
    1919                 secondaryMarkup = "You may clear the old PIREP on the MAVA website."
     1869                messageFormat = xstr("finish_send_already")
     1870                secondaryMarkup = xstr("finish_send_already_sec")
    19201871            elif result.notAvailable:
    1921                 messageFormat = "This flight is not available anymore!"
     1872                messageFormat = xstr("finish_send_notavail")
    19221873            else:
    1923                 messageFormat = "The MAVA website returned with an unknown error."
    1924                 secondaryMarkup = "See the debug log for more information."
     1874                messageFormat = xstr("finish_send_unknown")
     1875                secondaryMarkup = xstr("finish_send_unknown_sec")
    19251876        else:
    19261877            print "PIREP sending failed", result
    1927             messageFormat = "Could not send the PIREP to the MAVA website."
    1928             secondaryMarkup = "This can be a network problem, in which case\n" \
    1929                               "you may try again later. Or it can be a bug;\n" \
    1930                               "see the debug log for more information."
     1878            messageFormat = xstr("finish_send_failed")
     1879            secondaryMarkup = xstr("finish_send_failed_sec")
    19311880       
    19321881        dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
     
    21782127            callback(self._fleet)
    21792128
    2180         self.gui.beginBusy("Retrieving fleet...")
     2129        self.gui.beginBusy(xstr("fleet_busy"))
    21812130        self._fleetCallback = callback
    21822131        self.gui.webHandler.getFleet(self._fleetResultCallback)
     
    21972146                                       type = MESSAGETYPE_ERROR,
    21982147                                       buttons = BUTTONSTYPE_OK,
    2199                                        message_format =
    2200                                        "Failed to retrieve the information on "
    2201                                        "the fleet.")
     2148                                       message_format = xstr("fleet_failed"))
    22022149            dialog.set_title(WINDOW_TITLE_BASE)
    22032150            dialog.run()
     
    22082155    def _updatePlane(self, callback, tailNumber, status, gateNumber = None):
    22092156        """Update the given plane's gate information."""
    2210         self.gui.beginBusy("Updating plane status...")
     2157        self.gui.beginBusy(xstr("fleet_update_busy"))
    22112158        self._updatePlaneCallback = callback
    22122159        self.gui.webHandler.updatePlane(self._updatePlaneResultCallback,
     
    22292176                                       buttons = BUTTONSTYPE_OK,
    22302177                                       message_format =
    2231                                        "Failed to update the statuis of "
    2232                                        "the airplane.")
     2178                                       xstr("fleet_update_failed"))
    22332179            dialog.set_title(WINDOW_TITLE_BASE)
    22342180            dialog.run()
  • src/mlx/gui/gui.py

    r105 r107  
    1515import mlx.acft as acft
    1616import mlx.web as web
     17from  mlx.i18n import xstr
    1718
    1819import time
     
    7576
    7677        self._wizard = Wizard(self)
    77         label = gtk.Label("Fligh_t")
     78        label = gtk.Label(xstr("tab_flight"))
    7879        label.set_use_underline(True)
    7980        label.set_tooltip_text("Flight wizard")
     
    8182
    8283        self._flightInfo = FlightInfo(self)
    83         label = gtk.Label("Flight _info")
     84        label = gtk.Label(xstr("tab_flight_info"))
    8485        label.set_use_underline(True)
    8586        label.set_tooltip_text("Flight information")
     
    8889
    8990        (logWidget, self._logView)  = self._buildLogWidget()
    90         label = gtk.Label("_Log")
     91        label = gtk.Label(xstr("tab_log"))
    9192        label.set_use_underline(True)
    9293        label.set_tooltip_text("The log of your flight that will be sent to the MAVA website")
     
    307308        dialog.hide()
    308309        if result == 1:
    309             self.beginBusy("Connecting to the simulator.")
     310            self.beginBusy(xstr("connect_busy"))
    310311            self._simulator.reconnect()
    311312        else:
     
    569570        self._flight.simulator = self._simulator
    570571
    571         self.beginBusy("Connecting to the simulator...")
     572        self.beginBusy(xstr("connect_busy"))
    572573        self._statusbar.updateConnection(self._connecting, self._connected)
    573574
     
    635636        """Toggle the debug log."""
    636637        if menuItem.get_active():
    637             label = gtk.Label("_Debug log")
     638            label = gtk.Label(xstr("tab_debug_log"))
    638639            label.set_use_underline(True)
    639640            label.set_tooltip_text("Log with debugging information.")       
  • src/mlx/mlx.py

    r40 r107  
    44
    55from config import Config
     6from i18n import setLanguage
    67
    78import os
     
    3132    config = Config()
    3233    config.load()
     34
     35    setLanguage(config.getLanguage())
    3336   
    3437    gui = GUI(programDirectory, config)
Note: See TracChangeset for help on using the changeset viewer.