Makefile, settings: Use full paths in pot files
-
As reported on IRC, links to source code files in Weblate are broken. This is due to incorrect paths to files inside the POT file. Instead of plinth/views.py it contains views.py. This might be a regression introduced when switching to Makefile for all build tasks.
-
To fix, we need to run 'django-admin makemessages' command at the topic level directory in the source code repository. However, running at the top-level has problems:
-
Various unnecessary directories are considered. This was remedied using --ignore aruments.
-
The default locales directory was not being detected. This was remedied using LOCALE_PATHS in Django settings.
-
Django settings file was not being picked up. This was remedied using --settings option.
-
Django settings were being picked up from system's module path. This was remedied using --pythonpath . option.
-
Tests:
-
Running 'make update-translations' updates all the files. Newly generated POT file contains plinth/ in the file paths. All locales were updated. There are no other major changes POT or language files (other than what seemed to be pending updates).
-
Running freedombox-develop, locale can be changed to Spanish. The changed locale is visible in UI. Changes to .po file are reflected in the UI after running 'django-admin compilemessages'.
-
After running freedombox using plinth.service systemd unit, locale can be changed to Spanish. The changed locale is visible in UI. Changes to .po file are reflected in the UI after running 'make build install'.
Signed-off-by: Sunil Mohan Adapa sunil@medhas.org