- This is so that the methods will be checked by mypy. This should help identify
any incorrect initialization of components.
- Remove unused self.repos in GitwebApp.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
module.app property usage is greatly reduced because setup() and force_upgrade()
method are now part of App class instead of at the module level. Remove the
remaining minor cases of usage and drop the property altogether.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is needed for the apps to get enabled soon after installation. In case of
'sharing' app, a shortcut will appear on the apps page. This also brings
uniformity to help later refactoring.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- It is reported on the mailing list that first setup operation on the help app
fails. The logs indicate that /usr/share/freedombox/manual directory is not
present on the system. Although this situation does not occur on a normal
installation, catch, log and ignore this error to be safe.
- Also ensure that this static files component is added in post_init so that
basic setup is not at all affected by it.
Tests:
- In the development directory, move doc/manual to doc/manual.bak. Observe that
the error message is printed during initialization but the process continues.
- With the manual directory properly restored, the full help manual is displayed
properly with images.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- ugettext functions will be removed in Django 4.0. Each use emits a warning
when running with Django 3.2. Since we have warnings enabled in developer mode,
we see quite a few messages because of this.
- ugettext is already a simple alias of gettext. So, no regressions are
expected.
Tests:
- Accessing an affected app in UI with Django 3.2 and Django 2.2 works fine.
- Using Django 3.2 there are no warnings related to removal of ugettext
functions.
- Ran regular unit tests.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
The word "Manual" means 'user guide' in case of help and 'not automatically' in
case of networking app.
After change, POT file is produced as follows:
msgctxt "User guide"
msgid "Manual"
msgstr ""
msgctxt "Not automatically"
msgid "Manual"
msgstr ""
Closes: #1922.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Tests performed:
- Print the calls to _mount_static_directory() before and after the changes.
They should print the same.
- With English as the preferred language, visit the user manual. Images should
be visible. Visit MediaWiki manual page with learn more link in MediaWiki.
Images should be visible.
- Repeat with Spanish as the preferred language.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
- Remove the need to pass all the individual information elements to the AppView
separately. This eliminates many issues with elements that were mistakenly not
sent to AppView. Also reduces a lot of code duplication.
- Create App classes for power and sso for consistency.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>