diff --git a/admin/templates/admin_users.html b/admin/templates/admin_users.html index 37fbf96..8d71a07 100644 --- a/admin/templates/admin_users.html +++ b/admin/templates/admin_users.html @@ -17,7 +17,7 @@ Email - is Admin + {% trans "admin?" %} diff --git a/dashboard/templates/base.html b/dashboard/templates/base.html index a0d31d9..df71ce4 100644 --- a/dashboard/templates/base.html +++ b/dashboard/templates/base.html @@ -183,7 +183,7 @@ {% csrf_token %} - + @@ -214,7 +214,7 @@ {% csrf_token %} - + {% get_current_language as LANGUAGE_CODE %} {% get_language_info_list for LANGUAGES as languages %} {{ LANGUAGE_CODE|get_language_code:languages }} diff --git a/dashboard/templates/unassigned_devices.html b/dashboard/templates/unassigned_devices.html index 369edd2..75caa26 100644 --- a/dashboard/templates/unassigned_devices.html +++ b/dashboard/templates/unassigned_devices.html @@ -35,19 +35,19 @@ - select + {%trans "select"%} - shortid + {%trans "shortid" %} - type + {%trans "type" %} - manufacturer + {%trans "manufacturer" %} - model + {%trans "model" %} @@ -75,7 +75,7 @@ {% endfor %} - Remove add + {% trans 'Remove' %} {% trans 'Add'%} diff --git a/device/forms.py b/device/forms.py index 6c4d6e2..e6a7827 100644 --- a/device/forms.py +++ b/device/forms.py @@ -1,8 +1,8 @@ from django import forms from utils.device import create_annotation, create_doc, create_index from utils.save_snapshots import move_json, save_in_disk - - +from django.utils.translation import gettext_lazy as _ +#TODO: translate device types DEVICE_TYPES = [ ("Desktop", "Desktop"), ("Laptop", "Laptop"), @@ -22,11 +22,11 @@ DEVICE_TYPES = [ class DeviceForm(forms.Form): - type = forms.ChoiceField(choices = DEVICE_TYPES, required=False) - amount = forms.IntegerField(required=False, initial=1) - custom_id = forms.CharField(required=False) - name = forms.CharField(required=False) - value = forms.CharField(required=False) + type = forms.ChoiceField(choices = DEVICE_TYPES, required=False, label= _(u"Type")) + amount = forms.IntegerField(required=False, initial=1, label= _(u"Amount")) + custom_id = forms.CharField(required=False, label=_(u"Custom id")) + name = forms.CharField(required=False, label= _(u"Name")) + value = forms.CharField(required=False, label=_(u"Value")) class BaseDeviceFormSet(forms.BaseFormSet):