Ignore:
Timestamp:
04/26/12 17:20:50 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Internationalized the status bar

File:
1 edited

Legend:

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

    r80 r112  
    66
    77import mlx.const as const
     8from mlx.i18n import xstr
    89
    910import math
     
    3637        self._connStateArea = gtk.DrawingArea()
    3738        self._connStateArea.set_size_request(16, 16)
    38         self._connStateArea.set_tooltip_markup('The state of the connection.\n'
    39                                                '<span foreground="grey">Grey</span> means idle.\n'
    40                                                '<span foreground="red">Red</span> means trying to connect.\n'
    41                                                '<span foreground="green">Green</span> means connected.')
     39        self._connStateArea.set_tooltip_markup(xstr("statusbar_conn_tooltip"))
    4240
    4341        if pygobject:
     
    5452
    5553        self._stageLabel = gtk.Label()
    56         self._stageLabel.set_width_chars(20)
    57         self._stageLabel.set_tooltip_text("The flight stage")
     54        longestStage = xstr("flight_stage_" +
     55                            const.stage2string(const.STAGE_PUSHANDTAXI))
     56        print len(longestStage)
     57        self._stageLabel.set_width_chars(len(longestStage) + 3)
     58        self._stageLabel.set_tooltip_text(xstr("statusbar_stage_tooltip"))
    5859        self._stageLabel.set_alignment(0.0, 0.5)
    5960       
     
    6465        self._timeLabel = gtk.Label("--:--:--")
    6566        self._timeLabel.set_width_chars(8)
    66         self._timeLabel.set_tooltip_text("The simulator time in UTC")
     67        self._timeLabel.set_tooltip_text(xstr("statusbar_time_tooltip"))
    6768        self._timeLabel.set_alignment(1.0, 0.5)
    6869       
     
    7374        self._ratingLabel = gtk.Label()
    7475        self._ratingLabel.set_width_chars(12)
    75         self._ratingLabel.set_tooltip_text("The flight rating")
     76        self._ratingLabel.set_tooltip_text(xstr("statusbar_rating_tooltip"))
    7677        self._ratingLabel.set_alignment(0.0, 0.5)
    7778       
     
    8081        self._busyLabel = gtk.Label()
    8182        self._busyLabel.set_width_chars(30)
    82         self._busyLabel.set_tooltip_text("The status of the background tasks.")
     83        self._busyLabel.set_tooltip_text(xstr("statusbar_busy_tooltip"))
    8384        self._busyLabel.set_alignment(1.0, 0.5)
    8485        statusBox.pack_start(self._busyLabel, True, True, 8)
     
    126127    def _updateFlightStatus(self):
    127128        """Update the flight status information."""
    128         self._stageLabel.set_text("-" if self._stage is None
    129                                   else const.stage2string(self._stage).upper())
     129        if self._stage is None:
     130            text = "-"
     131        else:
     132            text = xstr("flight_stage_" + const.stage2string(self._stage)).upper()
     133        self._stageLabel.set_text(text)
    130134   
    131135        if self._noGoReason is None:
Note: See TracChangeset for help on using the changeset viewer.