Changeset 592:1d9795bde55c


Ignore:
Timestamp:
12/23/14 09:29:51 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added help about the minimum and recommended (if known) amounts of landing fuel to the fuel page (re #236)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r590 r592  
    582582msgstr "Fuel"
    583583
    584 msgid "fuel_help"
     584msgid "fuel_help_pre"
    585585msgstr ""
    586586"Enter the amount of fuel in kilograms that need to be present "
    587 "in each tank below.\n"
    588 "\n"
     587"in each tank below."
     588
     589msgid "fuel_help_min"
     590msgstr ""
     591" \n\n"
     592"The minimal amount of landing fuel of your aircraft is <b>%u kgs</b>."
     593
     594msgid "fuel_help_min_rec"
     595msgstr ""
     596" \n\n"
     597"The minimal amount of landing fuel of your aircraft is <b>%u kgs</b>,\n"
     598"and it is recommended to land with %u kgs."
     599
     600msgid "fuel_help_post"
     601msgstr ""
     602" \n\n"
    589603"When you press <b>Next</b>, the necessary amount of fuel\n"
    590604"will be pumped into or out of the tanks."
  • locale/hu/mlx.po

    r590 r592  
    585585msgstr "Üzemanyag"
    586586
    587 msgid "fuel_help"
    588 msgstr ""
    589 "Írd be az egyes tartályokba szükséges üzemanyag mennyiségét kilogrammban.\n"
    590 "\n"
     587msgid "fuel_help_pre"
     588msgstr ""
     589"Írd be az egyes tartályokba szükséges üzemanyag mennyiségét kilogrammban"
     590
     591msgid "fuel_help_min"
     592msgstr ""
     593" \n\n"
     594"A repülőgép leszállási üzemanyagának minimális mennyisége: <b>%u kg</b>."
     595
     596msgid "fuel_help_min_rec"
     597msgstr ""
     598" \n\n"
     599"A repülőgép leszállási üzemanyagának minimális mennyisége: <b>%u kg</b>,\n"
     600"és ajánlott %u kg üzemanyaggal földet érni."
     601
     602msgid "fuel_help_post"
     603msgstr ""
     604" \n\n"
    591605"Ha megnyomod az <b>Előre</b> gombot, a megadott mennyiségű\n"
    592606"üzemanyag bekerül a tartályokba."
  • src/mlx/acft.py

    r591 r592  
    9191        return _classes[flight.aircraftType](flight)
    9292
    93     def __init__(self, flight, minLandingFuel = None):
     93    def __init__(self, flight, minLandingFuel = None,
     94                 recommendedLandingFuel = None):
    9495        """Construct the aircraft for the given type."""
    9596        self._flight = flight
    9697        self._minLandingFuel = minLandingFuel
     98        self._recommendedLandingFuel = recommendedLandingFuel
    9799
    98100        self._name = None
     
    211213        """Get the flight the aircraft belongs to."""
    212214        return self._flight
     215
     216    @property
     217    def minLandingFuel(self):
     218        """Get the minimum acceptable amount of the landing fuel."""
     219        return self._minLandingFuel
     220
     221    @property
     222    def recommendedLandingFuel(self):
     223        """Get the recommended amount of the landing fuel."""
     224        return self._recommendedLandingFuel
    213225
    214226    @property
     
    639651    - n1: left, right
    640652    - reverser: left, right"""
    641     def __init__(self, flight, minLandingFuel = 2500):
    642         super(Boeing737, self).__init__(flight, minLandingFuel = minLandingFuel)
     653    def __init__(self, flight, minLandingFuel = 2500,
     654                 recommendedLandingFuel = 3500):
     655        super(Boeing737, self).__init__(flight,
     656                                        minLandingFuel = minLandingFuel,
     657                                        recommendedLandingFuel =
     658                                        recommendedLandingFuel)
    643659
    644660        self.gearSpeedLimit = 270
     
    703719    """Base class for the various aircraft in the Boeing 737 Classic family."""
    704720    def __init__(self, flight):
    705         super(Boeing737CL, self).__init__(flight, minLandingFuel = 3500)
     721        super(Boeing737CL, self).__init__(flight, minLandingFuel = 3500,
     722                                          recommendedLandingFuel = None)
    706723
    707724#---------------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r590 r592  
    16031603        """Construct the page."""
    16041604        super(FuelPage, self).__init__(wizard, xstr("fuel_title"),
    1605                                        xstr("fuel_help"),
     1605                                       xstr("fuel_help_pre") +
     1606                                       xstr("fuel_help_post"),
    16061607                                       completedHelp = xstr("fuel_chelp"))
    16071608
     
    16251626        """Activate the page."""
    16261627        self._setupTanks(self._wizard._fuelData)
     1628
     1629        aircraft = self._wizard.gui.flight.aircraft
     1630        minLandingFuel = aircraft.minLandingFuel
     1631        recommendedLandingFuel = aircraft.recommendedLandingFuel
     1632
     1633        middleHelp = "" if minLandingFuel is None else \
     1634            (xstr("fuel_help_min") % (minLandingFuel,)) \
     1635            if recommendedLandingFuel is None else \
     1636            (xstr("fuel_help_min_rec") % (minLandingFuel,
     1637                                          recommendedLandingFuel))
     1638        self.setHelp(xstr("fuel_help_pre") + middleHelp + xstr("fuel_help_post"))
    16271639
    16281640    def finalize(self):
Note: See TracChangeset for help on using the changeset viewer.