Ignore:
Timestamp:
04/27/12 18:04:43 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The status icon is internationalized

File:
1 edited

Legend:

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

    r77 r114  
    66
    77import mlx.const as const
     8from mlx.i18n import xstr
    89
    910#-------------------------------------------------------------------------------
     
    3435
    3536        self._showHideMenuItem = gtk.CheckMenuItem() 
    36         self._showHideMenuItem.set_label("Show main window"
     37        self._showHideMenuItem.set_label(xstr("statusicon_showmain")
    3738        self._showHideMenuItem.set_active(True)
    3839        self._showHideMenuItem.connect("toggled", self._showHideToggled)
     
    4142
    4243        self._showMonitorMenuItem = gtk.CheckMenuItem() 
    43         self._showMonitorMenuItem.set_label("Show monitor window"
     44        self._showMonitorMenuItem.set_label(xstr("statusicon_showmonitor")
    4445        self._showMonitorMenuItem.set_active(False)
    4546        self._showMonitorMenuItem.connect("toggled", self._showMonitorToggled)
     
    5253
    5354        self._quitMenuItem = gtk.MenuItem() 
    54         self._quitMenuItem.set_label("Quit"
     55        self._quitMenuItem.set_label(xstr("statusicon_quit")
    5556        self._quitMenuItem.show() 
    5657        self._quitMenuItem.connect("activate", self._gui._quit)
     
    142143    def _updateFlightStatus(self):
    143144        """Update the flight status."""
    144         stage = "-" if self._stage is None else const.stage2string(self._stage)
     145        stage = "-" if self._stage is None \
     146                else xstr("flight_stage_" + const.stage2string(self._stage))
    145147       
    146148        if self._noGoReason is None:
     
    150152
    151153        if appIndicator:
    152             self._stageMenuItem.set_label("Stage: %s" % (stage,))
    153             self._ratingMenuItem.set_label("Rating: %s" % (rating,))
     154            self._stageMenuItem.set_label("%s %s" % (xstr("statusicon_stage"), stage))
     155            self._ratingMenuItem.set_label("%s: %s" %
     156                                           (xstr("statusicon_rating"), rating))
    154157        else:
    155158            if self._noGoReason is not None:
    156159                rating = '<span foreground="red">' + rating + '</span>'
    157             markup = "MAVA Logger X %s\n\nStage: %s\nRating: %s" %\
    158                      (const.VERSION, stage, rating)
     160            markup = "MAVA Logger X %s\n\n%s: %s\n%s: %s" %\
     161                     (const.VERSION, xstr("statusicon_stage"), stage,
     162                      xstr("statusicon_rating"), rating)
    159163            self._statusIcon.set_tooltip_markup(markup)
Note: See TracChangeset for help on using the changeset viewer.