i18n: improve translations across horilla (#1014)
- Added trans() / _() translations to models, forms and templates. - Updated Spanish locale (django.po). - Fixed missing verbose_name translations. Known issues: - "Leave Type" label in horilla/leave/forms.py not translating. - "Performance" and "Mails automations" still pending.
This commit is contained in:
@@ -15,7 +15,8 @@ from django.core.exceptions import ValidationError
|
||||
from django.db.models import Q
|
||||
from django.forms.widgets import TextInput
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy as trans
|
||||
|
||||
from base.forms import ModelForm as BaseModelForm
|
||||
from base.methods import filtersubordinatesemployeemodel, reload_queryset
|
||||
@@ -707,8 +708,8 @@ class AssignLeaveForm(HorillaForm):
|
||||
attrs={"class": "oh-select oh-select-2 mb-2", "required": True}
|
||||
),
|
||||
empty_label=None,
|
||||
label="Leave Type",
|
||||
required=False,
|
||||
label=trans("Leave Type"),
|
||||
)
|
||||
employee_id = HorillaMultiSelectField(
|
||||
queryset=Employee.objects.all(),
|
||||
@@ -719,7 +720,7 @@ class AssignLeaveForm(HorillaForm):
|
||||
filter_template_path="employee_filters.html",
|
||||
required=True,
|
||||
),
|
||||
label="Employee",
|
||||
label=trans("Employee"),
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
|
||||
Reference in New Issue
Block a user