Ignore:
Timestamp:
04/26/12 14:54:40 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The Flight Info tab is now internationalized

File:
1 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)
Note: See TracChangeset for help on using the changeset viewer.