Changeset 114:30060f58ad79 for src/mlx


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

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

    r112 r114  
    447447        self.add("flight_stage_go-around", "go-around")
    448448        self.add("flight_stage_end", "end")
     449
     450        self.add("statusicon_showmain", "Show main window")
     451        self.add("statusicon_showmonitor", "Show monitor window")
     452        self.add("statusicon_quit", "Quit")
     453        self.add("statusicon_stage", "Stage:")
     454        self.add("statusicon_rating", "Rating:")
    449455                 
    450456#------------------------------------------------------------------------------
     
    786792        self.add("flight_stage_go-around", u"átstartolás")
    787793        self.add("flight_stage_end", u"kész")
    788                  
     794
     795        self.add("statusicon_showmain", "Mutasd a főablakot")
     796        self.add("statusicon_showmonitor", "Mutasd a monitor ablakot")
     797        self.add("statusicon_quit", "Kilépés")
     798        self.add("statusicon_stage", "Fázis:")
     799        self.add("statusicon_rating", "Pontszám:")
     800
    789801#------------------------------------------------------------------------------
    790802
Note: See TracChangeset for help on using the changeset viewer.