Changeset 112:d8661c37cda9 for src/mlx
- Timestamp:
- 04/26/12 17:20:50 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/statusbar.py
r80 r112 6 6 7 7 import mlx.const as const 8 from mlx.i18n import xstr 8 9 9 10 import math … … 36 37 self._connStateArea = gtk.DrawingArea() 37 38 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")) 42 40 43 41 if pygobject: … … 54 52 55 53 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")) 58 59 self._stageLabel.set_alignment(0.0, 0.5) 59 60 … … 64 65 self._timeLabel = gtk.Label("--:--:--") 65 66 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")) 67 68 self._timeLabel.set_alignment(1.0, 0.5) 68 69 … … 73 74 self._ratingLabel = gtk.Label() 74 75 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")) 76 77 self._ratingLabel.set_alignment(0.0, 0.5) 77 78 … … 80 81 self._busyLabel = gtk.Label() 81 82 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")) 83 84 self._busyLabel.set_alignment(1.0, 0.5) 84 85 statusBox.pack_start(self._busyLabel, True, True, 8) … … 126 127 def _updateFlightStatus(self): 127 128 """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) 130 134 131 135 if self._noGoReason is None: -
src/mlx/i18n.py
r111 r112 424 424 self.add("info_delay_weather", "_Weather problems") 425 425 self.add("info_delay_personal", "_Personal reasons") 426 427 self.add("statusbar_conn_tooltip", 428 'The state of the connection.\n' 429 '<span foreground="grey">Grey</span> means idle.\n' 430 '<span foreground="red">Red</span> means trying to connect.\n' 431 '<span foreground="green">Green</span> means connected.') 432 self.add("statusbar_stage_tooltip", "The flight stage") 433 self.add("statusbar_time_tooltip", "The simulator time in UTC") 434 self.add("statusbar_rating_tooltip", "The flight rating") 435 self.add("statusbar_busy_tooltip", "The status of the background tasks.") 436 437 self.add("flight_stage_boarding", "boarding") 438 self.add("flight_stage_pushback and taxi", "pushback and taxi") 439 self.add("flight_stage_takeoff", "takeoff") 440 self.add("flight_stage_RTO", "RTO") 441 self.add("flight_stage_climb", "climb") 442 self.add("flight_stage_cruise", "cruise") 443 self.add("flight_stage_descent", "descent") 444 self.add("flight_stage_landing", "landing") 445 self.add("flight_stage_taxi", "taxi") 446 self.add("flight_stage_parking", "parking") 447 self.add("flight_stage_go-around", "go-around") 448 self.add("flight_stage_end", "end") 426 449 427 450 #------------------------------------------------------------------------------ … … 741 764 self.add("info_delay_personal", "S_zemélyes okok") 742 765 766 self.add("statusbar_conn_tooltip", 767 'A kapcsolat állapota.\n' 768 '<span foreground="grey">Szürke</span>: nincs kapcsolat.\n' 769 '<span foreground="red">Piros</span>: kapcsolódás folyamatban.\n' 770 '<span foreground="green">Zöld</span>: a kapcsolat él.') 771 self.add("statusbar_stage_tooltip", "A repülés fázisa") 772 self.add("statusbar_time_tooltip", "A szimulátor ideje UTC-ben") 773 self.add("statusbar_rating_tooltip", "A repülés pontszáma") 774 self.add("statusbar_busy_tooltip", "A háttérfolyamatok állapota.") 775 776 self.add("flight_stage_boarding", u"beszállás") 777 self.add("flight_stage_pushback and taxi", u"hátratolás és kigurulás") 778 self.add("flight_stage_takeoff", u"felszállás") 779 self.add("flight_stage_RTO", u"megszakított felszállás") 780 self.add("flight_stage_climb", u"emelkedés") 781 self.add("flight_stage_cruise", u"utazó") 782 self.add("flight_stage_descent", u"süllyedés") 783 self.add("flight_stage_landing", u"leszállás") 784 self.add("flight_stage_taxi", u"begurulás") 785 self.add("flight_stage_parking", u"parkolás") 786 self.add("flight_stage_go-around", u"átstartolás") 787 self.add("flight_stage_end", u"kész") 788 743 789 #------------------------------------------------------------------------------ 744 790
Note:
See TracChangeset
for help on using the changeset viewer.