Ignore:
Timestamp:
04/25/12 17:51:10 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The connection failure dialogs are now internationalized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r107 r108  
    7878        label = gtk.Label(xstr("tab_flight"))
    7979        label.set_use_underline(True)
    80         label.set_tooltip_text("Flight wizard")
     80        label.set_tooltip_text(xstr("tab_flight_tooltip"))
    8181        self._notebook.append_page(self._wizard, label)
    8282
     
    8484        label = gtk.Label(xstr("tab_flight_info"))
    8585        label.set_use_underline(True)
    86         label.set_tooltip_text("Flight information")
     86        label.set_tooltip_text(xstr("tab_flight_info_tooltip"))
    8787        self._notebook.append_page(self._flightInfo, label)
    8888        self._flightInfo.disable()
     
    9191        label = gtk.Label(xstr("tab_log"))
    9292        label.set_use_underline(True)
    93         label.set_tooltip_text("The log of your flight that will be sent to the MAVA website")
     93        label.set_tooltip_text(xstr("tab_log_tooltip"))
    9494        self._notebook.append_page(logWidget, label)
    9595
     
    294294        dialog = gtk.MessageDialog(parent = self._mainWindow,
    295295                                   type = MESSAGETYPE_ERROR,
    296                                    message_format =
    297                                    "Cannot connect to the simulator.")
     296                                   message_format = xstr("conn_failed"))
     297   
    298298        dialog.set_title(WINDOW_TITLE_BASE)
    299         dialog.format_secondary_markup("Rectify the situation, and press <b>Try again</b> "
    300                                        "to try the connection again, "
    301                                        "or <b>Cancel</b> to cancel the flight.")
    302        
    303         dialog.add_button("_Cancel", 0)
    304         dialog.add_button("_Try again", 1)
     299        dialog.format_secondary_markup(xstr("conn_failed_sec"))
     300       
     301        dialog.add_button(xstr("button_cancel"), 0)
     302        dialog.add_button(xstr("button_tryagain"), 1)
    305303        dialog.set_default_response(1)
    306304       
     
    325323
    326324        dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
    327                                    message_format =
    328                                    "The connection to the simulator failed unexpectedly.",
     325                                   message_format = xstr("conn_broken"),
    329326                                   parent = self._mainWindow)
    330327        dialog.set_title(WINDOW_TITLE_BASE)
    331         dialog.format_secondary_markup("If the simulator has crashed, restart it "
    332                                        "and restore your flight as much as possible "
    333                                        "to the state it was in before the crash. "
    334                                        "Then press <b>Reconnect</b> to reconnect.\n\n"
    335                                        "If you want to cancel the flight, press <b>Cancel</b>.")
    336 
    337         dialog.add_button("_Cancel", 0)
    338         dialog.add_button("_Reconnect", 1)
     328        dialog.format_secondary_markup(xstr("conn_broken_sec"))
     329
     330        dialog.add_button(xstr("button_cancel"), 0)
     331        dialog.add_button(xstr("button_reconnect"), 1)
    339332        dialog.set_default_response(1)
    340333
     
    342335        dialog.hide()
    343336        if result == 1:
    344             self.beginBusy("Connecting to the simulator.")
     337            self.beginBusy(xstr("connect_busy"))
    345338            self._reconnecting = True
    346339            self._simulator.reconnect()
Note: See TracChangeset for help on using the changeset viewer.