Changeset 108:3ebb3c906fd1


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

Location:
src/mlx
Files:
2 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()
  • src/mlx/i18n.py

    r107 r108  
    125125        """Initialize the strings."""
    126126        self.add("tab_flight", "_Flight")
     127        self.add("tab_flight_tooltip", "Flight wizard")
    127128        self.add("tab_flight_info", "Flight _info")
     129        self.add("tab_flight_info_tooltip", "Further information regarding the flight")
    128130        self.add("tab_log", "_Log")
     131        self.add("tab_log_tooltip",
     132                 "The log of your flight that will be sent to the MAVA website")
    129133        self.add("tab_debug_log", "_Debug log")
    130134        self.add("tab_help", "_Help")
    131135        self.add("tab_gates", "_Gates")
     136
     137        self.add("conn_failed", "Cannot connect to the simulator.")
     138        self.add("conn_failed_sec",
     139                 "Rectify the situation, and press <b>Try again</b> "
     140                 "to try the connection again, "
     141                 "or <b>Cancel</b> to cancel the flight.")
     142        self.add("conn_broken",
     143                 "The connection to the simulator failed unexpectedly.")
     144        self.add("conn_broken_sec",
     145                 "If the simulator has crashed, restart it "
     146                 "and restore your flight as much as possible "
     147                 "to the state it was in before the crash. "
     148                 "Then press <b>Reconnect</b> to reconnect.\n\n"
     149                 "If you want to cancel the flight, press <b>Cancel</b>.")
     150        self.add("button_cancel", "_Cancel")
     151        self.add("button_tryagain", "_Try again")
     152        self.add("button_reconnect", "_Reconnect")
    132153       
    133154        self.add("login", "Login")
     
    384405        """Initialize the strings."""
    385406        self.add("tab_flight", "_Járat")
     407        self.add("tab_flight_tooltip", "Járat varázsló")
    386408        self.add("tab_flight_info", "Járat _info")
     409        self.add("tab_flight_info_tooltip", "Egyéb információk a járat teljesítésével kapcsolatban")
    387410        self.add("tab_log", "_Napló")
     411        self.add("tab_log_tooltip",
     412                 "A járat naplója, amit majd el lehet küldeni a MAVA szerverére")
    388413        self.add("tab_debug_log", "_Debug napló")
    389414        self.add("tab_help", "_Segítség")
    390415        self.add("tab_gates", "_Kapuk")       
    391416
     417        self.add("conn_failed", "Nem tudtam kapcsolódni a szimulátorhoz.")
     418        self.add("conn_failed_sec",
     419                 "Korrigáld a problémát, majd nyomd meg az "
     420                 "<b>Próbáld újra</b> gombot a újrakapcsolódáshoz, "
     421                 "vagy a <b>Mégse</b> gombot a járat megszakításához.")
     422        self.add("conn_broken",
     423                 "A szimulátorral való kapcsolat váratlanul megszakadt.")
     424        self.add("conn_broken_sec",
     425                 "Ha a szimulátor elszállt, indítsd újra "
     426                 "és állítsd vissza a repülésed elszállás előtti "
     427                 "állapotát amennyire csak lehet. "
     428                 "Ezután nyomd meg az <b>Újrakapcsolódás</b> gombot "
     429                 "a kapcsolat ismételt felvételéhez.\n\n"
     430                 "Ha meg akarod szakítani a repülést, nyomd meg a "
     431                 "<b>Mégse</b> gombot.")
     432        self.add("button_cancel", "_Mégse")
     433        self.add("button_tryagain", "_Próbáld újra")
     434        self.add("button_reconnect", "Újra_kapcsolódás")
     435       
    392436        self.add("login", "Bejelentkezés")
    393437        self.add("loginHelp",
Note: See TracChangeset for help on using the changeset viewer.