20110826

Before releasing 1.2.2 I wanted to get a design problem of Lino’s translation system fixed:

  1. Die dummy_messages.py steht ja momentan im lino.Lino.source_dir der jeweiligen Lino-Anwendung. Aber das ist falsch, denn deshalb müssen die Texte aus der linolib.js für jede Anwendung neu übersetzt werden. Idealerweise müsste ich es wie der Django-Befehl makemessages machen, also pro .dtl-Datei eine .dtl.py-Datei erzeugen, und ebenfalls eine linolib.js.py.

So now Lino no longer generates a file dummy_messages.py per application, but instead:

  • Each .dtl file gets a companion .dtl.py generated in the same directory. Note that these files would not be imported by a Python process because there is no __init__.py in their directory, but the makemessages command doesn’t check this and gets fooled: it parses them anyway (and that’s what we want).

  • The linolib.js has a similar companion linolib.js.py.

These files are generated by the makedocs command, and no longer each time when the Lino server starts up. The makedocs command itself is called from /Makefile.

Modified also /.hgignore to not care about them.

Checkin 20110826.