Currently menu items are shown in alphabetical order in applications and
no clear order in system configuration. This is done using static
weights for menu items based on English names that does not work for
other locales.
Sorting can't be done at the time of adding menu items as users of
multiple locales may use the interface at the same time.
Implement a sorting mechanism based on existing order as well as labels
of menu item. This allows the flexiblity of grouping menu items in
future as it may be need for system configuration. In case of help menu
Remove sort order for all modules except for help menu as here we want
that specific order.
- There is no reason to limit the number of languages supported by the
application. This is what happens when LANGUAGES is set during Django
configuration. Users should be able to set a language using browser
preferences and see at least the Django translated messages even if
Plinth messages are not translated (example user create/edit form).
- If we wish to limit the number of language options shown duing
language selection (for quality perception reasons), we should perform
the limiting at the time of configuration.
- Note that when a new language is requested in translation tool, we
create an empty file and that may lead to language being shown but
with few strings actually translated. This will have poor impact on
user experience. I wonder if we should filter language at all,
keeping this in mind.
- The last part of the module import path is the module name. This also
becomes the Django app name. Apps names have to be unique. Hence,
there is no scope for two different modules with same name but
different load path to exist in the project.
- Most uses of list of loaded modules are dealing with app names instead
of full module load path. This is due to the fact that Django deals
with app names and not module paths.
- It is also somewhat clumsy to access a loaded module as we are
re-importing every time to get access module.
- Simplify all of the above by using app names are module identifiers
and maintaing an ordered dictionary of app names to loadded modules.
- Remove unused imports.
- Minor styling fixes.
- In appears that in Debian it is possible to set the timezones from one
of the listed items in zonetab.info or addtitional timezones from the
directory /usr/share/zoneinfo/Etc/. Add these too.
- By default all FreedomBox images have Etc/UTC as time zone. This is
now properly listed.
- After a time zone is set, don't show the option 'No time zone set' any
more.
- Change the label to 'no time zone set'
- Update the help text to 'time zone' instead of 'timezone'.
- For each application, add ./tests directory and __init__.py file
within it.
- Modify test controllers (coverage.py, runtests.py) to find the new
test directories for testing and coverage analysis.
- Move existing application-specific test modules (test_pagekite.py) to
the newly created directories.
- Don't allow strings to be sent as arguments. The mixup with
lists/tuples could be dangerous.
- Don't escape arguments. subprocess.Popen takes care that arguments
are passed on nicely to the actions.
- Update tests.