Changeset 111:3543a2c2192c


Ignore:
Timestamp:
04/26/12 14:54:40 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

The Flight Info tab is now internationalized

Location:
src/mlx
Files:
2 edited

Legend:

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

    r102 r111  
    33from common import *
    44
     5from mlx.i18n import xstr
    56import mlx.const as const
    67
    78class FlightInfo(gtk.VBox):
    89    """The flight info tab."""
    9     _delayCodes = [ (const.DELAYCODE_LOADING, "L_oading problems"),
    10                     (const.DELAYCODE_VATSIM, "_VATSIM problem"),
    11                     (const.DELAYCODE_NETWORK, "_Net problems"),
    12                     (const.DELAYCODE_CONTROLLER, "Controller's _fault"),
    13                     (const.DELAYCODE_SYSTEM, "S_ystem crash/freeze"),
    14                     (const.DELAYCODE_NAVIGATION, "Navi_gation problem"),
    15                     (const.DELAYCODE_TRAFFIC, "T_raffic problems"),
    16                     (const.DELAYCODE_APRON, "_Apron navigation problem"),
    17                     (const.DELAYCODE_WEATHER, "_Weather problems"),
    18                     (const.DELAYCODE_PERSONAL, "_Personal reasons") ]
     10    @staticmethod
     11    def _delayCodes():
     12        """Get an array of delay codes."""
     13        return [ (const.DELAYCODE_LOADING, xstr("info_delay_loading")),
     14                 (const.DELAYCODE_VATSIM, xstr("info_delay_vatsim")),
     15                 (const.DELAYCODE_NETWORK, xstr("info_delay_net")),
     16                 (const.DELAYCODE_CONTROLLER, xstr("info_delay_atc")),
     17                 (const.DELAYCODE_SYSTEM, xstr("info_delay_system")),
     18                 (const.DELAYCODE_NAVIGATION, xstr("info_delay_nav")),
     19                 (const.DELAYCODE_TRAFFIC, xstr("info_delay_traffic")),
     20                 (const.DELAYCODE_APRON, xstr("info_delay_apron")),
     21                 (const.DELAYCODE_WEATHER, xstr("info_delay_weather")),
     22                 (const.DELAYCODE_PERSONAL, xstr("info_delay_personal")) ]
    1923   
    2024    @staticmethod
     
    6165        commentsBox = gtk.HBox()
    6266
    63         (frame, self._comments) = FlightInfo._createCommentArea("_Comments")
     67        (frame, self._comments) = FlightInfo._createCommentArea(xstr("info_comments"))
    6468        commentsBox.pack_start(frame, True, True, 8)
    6569
    66         (frame, self._flightDefects) = FlightInfo._createCommentArea("Flight _defects")
     70        (frame, self._flightDefects) = \
     71             FlightInfo._createCommentArea(xstr("info_defects"))
    6772        commentsBox.pack_start(frame, True, True, 8)
    6873
     
    7075        self.pack_start(self._commentsAlignment, True, True, 8)
    7176
    72         frame = gtk.Frame(label = "Delay codes")
     77        frame = gtk.Frame(label = xstr("info_delay"))
    7378        label = frame.get_label_widget()
    7479        label.set_use_underline(True)
     
    8691
    8792        self._delayCodeWidgets = []
    88         for (_code, label) in FlightInfo._delayCodes:
     93        for (_code, label) in FlightInfo._delayCodes():
    8994            button = gtk.CheckButton(label)
    9095            button.set_use_underline(True)
  • src/mlx/i18n.py

    r110 r111  
    405405                 "you may try again later. Or it can be a bug;\n" \
    406406                 "see the debug log for more information.")
     407
     408        # C D
     409       
     410        self.add("info_comments", "_Comments")
     411        self.add("info_defects", "Flight _defects")
     412        self.add("info_delay", "Delay codes")
     413
     414        # O V N E Y T R A W P
     415       
     416        self.add("info_delay_loading", "L_oading problems")
     417        self.add("info_delay_vatsim", "_VATSIM problem")
     418        self.add("info_delay_net", "_Net problems")
     419        self.add("info_delay_atc", "Controll_er's fault")
     420        self.add("info_delay_system", "S_ystem crash/freeze")
     421        self.add("info_delay_nav", "Naviga_tion problem")
     422        self.add("info_delay_traffic", "T_raffic problems")
     423        self.add("info_delay_apron", "_Apron navigation problem")
     424        self.add("info_delay_weather", "_Weather problems")
     425        self.add("info_delay_personal", "_Personal reasons")
    407426                 
    408427#------------------------------------------------------------------------------
     
    702721                 "újra próbálkozhatsz. Lehet azonban hiba is a loggerben:\n" \
    703722                 "részletesebb információt találhatsz a debug naplóban.")
     723
     724        # M A
     725
     726        self.add("info_comments", "_Megjegyzések")
     727        self.add("info_defects", "Hib_ajelenségek")
     728        self.add("info_delay", "Késés kódok")
     729
     730        # B V H Y R G F E P Z
     731                 
     732        self.add("info_delay_loading", "_Betöltési problémák")
     733        self.add("info_delay_vatsim", "_VATSIM probléma")
     734        self.add("info_delay_net", "_Hálózati problémák")
     735        self.add("info_delay_atc", "Irán_yító hibája")
     736        self.add("info_delay_system", "_Rendszer elszállás/fagyás")
     737        self.add("info_delay_nav", "Navi_gációs probléma")
     738        self.add("info_delay_traffic", "_Forgalmi problémák")
     739        self.add("info_delay_apron", "_Előtér navigációs probléma")
     740        self.add("info_delay_weather", "Időjárási _problémák")
     741        self.add("info_delay_personal", "S_zemélyes okok")
    704742                 
    705743#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.