diff --git a/src/documents/apps.py b/src/documents/apps.py index 4278029cc..e21e14097 100644 --- a/src/documents/apps.py +++ b/src/documents/apps.py @@ -1,10 +1,14 @@ from django.apps import AppConfig +from django.utils.translation import gettext_lazy as _ + class DocumentsConfig(AppConfig): name = "documents" + verbose_name = _("Documents") + def ready(self): from .signals import document_consumption_finished from .signals.handlers import ( diff --git a/src/documents/models.py b/src/documents/models.py index 3022b45a8..3f0e331d0 100755 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -29,12 +29,12 @@ class MatchingModel(models.Model): MATCH_AUTO = 6 MATCHING_ALGORITHMS = ( - (MATCH_ANY, _("Any")), - (MATCH_ALL, _("All")), - (MATCH_LITERAL, _("Literal")), - (MATCH_REGEX, _("Regular Expression")), - (MATCH_FUZZY, _("Fuzzy Match")), - (MATCH_AUTO, _("Automatic Classification")), + (MATCH_ANY, _("Any word")), + (MATCH_ALL, _("All words")), + (MATCH_LITERAL, _("Exact match")), + (MATCH_REGEX, _("Regular expression")), + (MATCH_FUZZY, _("Fuzzy word")), + (MATCH_AUTO, _("Automatic")), ) name = models.CharField( @@ -312,11 +312,11 @@ class Document(models.Model): class Log(models.Model): LEVELS = ( - (logging.DEBUG, "Debugging"), - (logging.INFO, "Informational"), - (logging.WARNING, "Warning"), - (logging.ERROR, "Error"), - (logging.CRITICAL, "Critical"), + (logging.DEBUG, _("debug")), + (logging.INFO, _("information")), + (logging.WARNING, _("warning")), + (logging.ERROR, _("error")), + (logging.CRITICAL, _("critical")), ) group = models.UUIDField( diff --git a/src/paperless/urls.py b/src/paperless/urls.py index e44762aee..6adb1be5b 100755 --- a/src/paperless/urls.py +++ b/src/paperless/urls.py @@ -7,6 +7,8 @@ from django.views.generic import RedirectView from rest_framework.authtoken import views from rest_framework.routers import DefaultRouter +from django.utils.translation import gettext_lazy as _ + from documents.views import ( CorrespondentViewSet, DocumentViewSet, @@ -103,4 +105,4 @@ admin.site.site_header = 'Paperless-ng' # Text at the end of each page's