Changeset 1144:a73548e0c689


Ignore:
Timestamp:
04/21/24 14:20:42 (3 days ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Tags:
tip
Message:

More info is provided for the weight calculations (re #386)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r1139 r1144  
    653653msgstr "Too many infants (maximum: %d)."
    654654
     655msgid "payload_flight_type"
     656msgstr "Flight type:"
     657
    655658msgid "payload_crew"
    656659msgstr "C_rew:"
     
    660663
    661664msgid "payload_crew_info"
    662 msgstr "cockpit + cabin"
     665msgstr "cockpit + cabin (%d kg)"
    663666
    664667msgid "payload_pax"
     
    675678
    676679msgid "payload_pax_info"
    677 msgstr "adults + children + infants"
     680msgstr "adults (%d kg) + children (%d kg) +\ninfants (%d kg)"
    678681
    679682msgid "payload_bag"
     
    15491552"<b><span foreground=\"orange\">yellow</span></b>."
    15501553
     1554msgid "weighthelp_flight_type"
     1555msgstr "Flight type:"
     1556
    15511557msgid "weighthelp_crew"
    15521558msgstr "Crew (%s):"
    15531559
     1560msgid "weighthelp_crew_info"
     1561msgstr "(DOW cabin crew: %s)"
     1562
    15541563msgid "weighthelp_pax"
    15551564msgstr "Passengers (%s):"
     1565
     1566msgid "weighthelp_pax_info"
     1567msgstr "(adult: %s kg, child: %s kg\ninfant: %s kg)"
    15561568
    15571569msgid "weighthelp_baggage"
  • locale/hu/mlx.po

    r1139 r1144  
    657657msgstr "Túl sok csecsemő (legfeljebb %d lehet)."
    658658
     659msgid "payload_flight_type"
     660msgstr "Járattípus:"
     661
    659662msgid "payload_crew"
    660663msgstr "_Legénység:"
     
    664667
    665668msgid "payload_crew_info"
    666 msgstr "pilóta + kabin"
     669msgstr "pilóta + kabin (%d kg)"
    667670
    668671msgid "payload_pax"
     
    679682
    680683msgid "payload_pax_info"
    681 msgstr "felnőtt + gyermek + csecsemő"
     684msgstr "felnőtt (%d kg) + gyermek (%d kg) + csecsemő (%d kg)"
    682685
    683686msgid "payload_bag"
     
    15521555"<b><span foreground=\"orange\">sárga</span></b> színben olvasható."
    15531556
     1557msgid "weighthelp_flight_type"
     1558msgstr "Járattípus:"
     1559
    15541560msgid "weighthelp_crew"
    15551561msgstr "Legénység (%s):"
    15561562
     1563msgid "weighthelp_crew_info"
     1564msgstr "(DOW kabin személyzet: %s fő)"
     1565
    15571566msgid "weighthelp_pax"
    15581567msgstr "Utasok (%s):"
     1568
     1569msgid "weighthelp_pax_info"
     1570msgstr "(felnőtt: %s kg, gyermek: %s kg\ncsecsemő: %s kg)"
    15591571
    15601572msgid "weighthelp_baggage"
  • src/mlx/gui/flight.py

    r1143 r1144  
    24272427                                  xscale = 0.0, yscale = 0.0)
    24282428
    2429         table = Gtk.Table(7, 3)
     2429        table = Gtk.Table(8, 3)
    24302430        table.set_row_spacings(4)
    24312431        table.set_col_spacings(16)
     
    24362436        row  = 0
    24372437
     2438        label = Gtk.Label(xstr("payload_flight_type"))
     2439        label.set_alignment(0.0, 0.5)
     2440        table.attach(label, 0, 1, row, row+1)
     2441
     2442        self._flightType = label = Gtk.Label(xstr("flighttype_scheduled"))
     2443        label.set_alignment(1.0, 0.5)
     2444        table.attach(label, 1, 2, row, row + 1)
     2445
     2446        row += 1
     2447
    24382448        self._crewLabel = label = Gtk.Label(xstr("payload_crew"))
    24392449        label.set_use_underline(True)
     
    24572467        label.set_mnemonic_widget(self._numCabinCrew)
    24582468
    2459         label = Gtk.Label(xstr("payload_crew_info"))
     2469        label = Gtk.Label(xstr("payload_crew_info") % (const.WEIGHT_CABIN_CREW))
    24602470        label.set_halign(Gtk.Align.START)
    24612471        table.attach(label, 2, 3, row, row+1)
     
    24932503        label.set_mnemonic_widget(self._numPassengers)
    24942504
    2495         label = Gtk.Label(xstr("payload_pax_info"))
     2505        self._paxInfo = label = Gtk.Label(xstr("payload_pax_info") % (
     2506            const.WEIGHT_PASSENGER, const.WEIGHT_CHILD, const.WEIGHT_INFANT))
    24962507        label.set_halign(Gtk.Align.START)
    24972508        table.attach(label, 2, 3, row, row+1)
     
    26382649        """Setup the information."""
    26392650        bookedFlight = self._wizard._bookedFlight
     2651
     2652        self._flightType.set_text(xstr("flighttype_" +
     2653                                       const.flightType2string(bookedFlight.flightType)))
     2654
     2655        self._paxInfo.set_text(xstr("payload_pax_info") % (
     2656            bookedFlight.passengerWeight, const.WEIGHT_CHILD, const.WEIGHT_INFANT))
    26402657
    26412658        self._numCockpitCrew.set_markup("<b>" +
  • src/mlx/gui/weighthelp.py

    r1143 r1144  
    5858
    5959       
    60         self._weightsTable = table = Gtk.Table(16, 5)
     60        self._weightsTable = table = Gtk.Table(17, 5)
    6161        table.set_homogeneous(False)
    6262        table.set_row_spacings(4)
     
    9595
    9696       
     97        label = Gtk.Label(xstr("weighthelp_flight_type"))
     98        label.set_alignment(0.0, 0.5)
     99        table.attach(label, 0, 1, row, row+1)
     100
     101        self._flightTypeLabel = label = Gtk.Label(xstr("flighttype_scheduled"))
     102        label.set_alignment(1.0, 0.5)
     103        table.attach(label, 1, 2, row, row + 1)
     104
     105        row += 1
    97106
    98107        self._crewLabel = Gtk.Label(xstr("weighthelp_crew") % ("99",))
     
    109118       
    110119        table.attach(Gtk.Label("kg"), 2, 3, row, row+1)
     120
     121        self._crewInfo = Gtk.Label(xstr("weighthelp_crew_info") % ("-",))
     122        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
     123                                  xscale = 0.0, yscale = 0.0)
     124        alignment.add(self._crewInfo)
     125        table.attach(alignment, 3, 5, row, row+1)
    111126       
    112127        row += 1
     
    129144        table.attach(Gtk.Label("kg"), 2, 3, row, row+1)
    130145       
     146        self._paxInfo = Gtk.Label(xstr("weighthelp_pax_info") %
     147                                  ("-", "-", "-"))
     148        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
     149                                  xscale = 0.0, yscale = 0.0)
     150        alignment.add(self._paxInfo)
     151        table.attach(alignment, 3, 5, row, row+1)
     152
    131153        row += 1
    132154
     
    382404        crewWeight = self._getCrewWeight()
    383405        if crewWeight is None:
     406            self._flightTypeLabel.set_text("-")
    384407            self._crewLabel.set_text(xstr("weighthelp_crew") % ("-",))
    385408            self._crewWeight.set_text("-")
    386         else:
     409            self._crewInfo.set_text(xstr("weighthelp_crew_info") % ("-",))
     410        else:
     411            self._flightTypeLabel.set_text(xstr("flighttype_" +
     412                                                const.flightType2string(self._flightType)))
    387413            self._crewLabel.set_text(xstr("weighthelp_crew") %
    388414                                    (str(self._cockpitCrew) + "+" +
    389415                                     str(self._cabinCrew),))
    390416            self._crewWeight.set_text("%.0f" % (crewWeight,))
     417            self._crewInfo.set_text(xstr("weighthelp_crew_info") %
     418                                    (self._dowCabinCrew,))
     419
    391420
    392421        paxWeight = self._getPaxWeight()
     
    394423            self._paxLabel.set_text(xstr("weighthelp_pax") % ("-",))
    395424            self._paxWeight.set_text("-")
     425            self._paxInfo.set_text(xstr("weighthelp_pax_info") % ("-", "-", "-"))
    396426        else:
    397427            self._paxLabel.set_text(xstr("weighthelp_pax") %
     
    400430                                     str(self._infants),))
    401431            self._paxWeight.set_text("%.0f" % (paxWeight,))
     432            self._paxInfo.set_text(xstr("weighthelp_pax_info") %
     433                                   (const.getPassengerWeight(self._flightType),
     434                                    const.WEIGHT_CHILD, const.WEIGHT_INFANT))
    402435
    403436        self._setWeightLabel(self._bagWeight, self._bag)
Note: See TracChangeset for help on using the changeset viewer.