user-specific language selection

More details to do for the support of user-specific language selection.

lino.apps.dsbe.models.CefLevel overrides display_text, and this method wasn’t yet adapted to yesterday’s changes.

There were still some places where Lino translates too early:

  • the headers of tabs

  • labels of buttons and menus

Worked on the French translations which are far from being perfect but start to get usable.

Das Geschlecht (m/w) einer Person wird in Englisch “Gender” und nicht “Sex” genannt. Ich habe jetzt wenigstens die Feldbezeichnung geändert. Bei Gelegenheit auch den internen Feldnamen (obschon das mehr Arbeit sein wird).

There is one conceptual detail which needed a design decision: how to mark hotkey letters in menu items. Until now we had the following temporary solution:

def prepare_label(mi):
    label = unicode(mi.label) # trigger translation
    n = label.find(mi.HOTKEY_MARKER)
    if n != -1:
        label = label.replace(mi.HOTKEY_MARKER,'')
    return label

This method doesn’t work any longer with lazy translation. But anyway it wasn’t used since lino.ui.extjs3 simply removed the markers.


Optimizations when printing a Listing:

  • It didn’t use the DavLink applet when lino.Lino.use_davlink was True. Fixed.

  • It no longer uses a hard-coded site-wide template “Listing.odt” but a Default.odt in the model’s config directory.

Check-in 20111112b

Miscellaneous Bugfixes

  • Candidates of a Course : this print action was erroneously moved from Course to CourseOffer. Fixed.

  • The Labels of menu entries for Listings were strange: twice the listing title, separated by a space. Fixed.

  • There is now also a command to view the existing records for each Listing type. Explorer ‣ Listings.

  • Fixed the “Irritating scrollbar” bug: The welcome page gets a vertical scrollbar when it has more than a screenful of information to display. That’s normal, but it was irritating that this scrollbar “didn’t disappear” when another window is opened. And even worse, it disturbed the layout of some windows (e.g. detail of a course) because their layout manager isn’t obviously aware of that scrollbar when creating the canvas, and thus each window now also has a horizontal scrollbar.

    • html_lines inserts the welcome.html now only if not on_ready.

    • Quick Links now also use a http: instead of a javascript: link.

Check-in 20111112c


Started a new experimental application for internal use.

Some general optimizations:

  • Added new configuration setting languages.

  • e.g. PersonMixin replaced by Person. Note that in lino.modlib.contacts.models, Person and Company are abstract and are not automatically subclasses of Contact. There may be applications who want “persons” that are not a Contact.

  • Field “sex” renamed to “gender” (this will need data migration)

Added new module lino.modlib.tickets.

Check-in 20111113b