diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-14 00:14:21 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-06-14 00:14:21 +0200 |
commit | 0f267a97dca3eea4c3317e36dfc3e8498f5769a5 (patch) | |
tree | a148966dcff2830f5c01fe26f9416f3beaa7f662 | |
parent | 7422ebfa33a90927b8658515293fb09b6dbff424 (diff) | |
download | Ishtar-0f267a97dca3eea4c3317e36dfc3e8498f5769a5.tar.bz2 Ishtar-0f267a97dca3eea4c3317e36dfc3e8498f5769a5.zip |
Manage units (closes #447)
-rw-r--r-- | ishtar/furnitures/forms_context_records.py | 8 | ||||
-rw-r--r-- | ishtar/furnitures/forms_files.py | 4 | ||||
-rw-r--r-- | ishtar/furnitures/forms_items.py | 8 | ||||
-rw-r--r-- | ishtar/furnitures/forms_operations.py | 4 | ||||
-rw-r--r-- | ishtar/furnitures/models.py | 30 | ||||
-rw-r--r-- | ishtar/locale/fr/LC_MESSAGES/django.po | 67 |
6 files changed, 64 insertions, 57 deletions
diff --git a/ishtar/furnitures/forms_context_records.py b/ishtar/furnitures/forms_context_records.py index 3a8ccb242..f5160a1bb 100644 --- a/ishtar/furnitures/forms_context_records.py +++ b/ishtar/furnitures/forms_context_records.py @@ -144,10 +144,10 @@ class RecordFormGeneral(forms.Form): validators=[validators.MaxLengthValidator(200)]) description = forms.CharField(label=_(u"Description"), widget=forms.Textarea, required=False) - length = forms.IntegerField(label=_(u"Length"), required=False) - width = forms.IntegerField(label=_(u"Width"), required=False) - thickness = forms.IntegerField(label=_(u"Thickness"), required=False) - depth = forms.IntegerField(label=_(u"Depth"), required=False) + length = forms.IntegerField(label=_(u"Length (cm)"), required=False) + width = forms.IntegerField(label=_(u"Width (cm)"), required=False) + thickness = forms.IntegerField(label=_(u"Thickness (cm)"), required=False) + depth = forms.IntegerField(label=_(u"Depth (cm)"), required=False) unit = forms.ChoiceField(label=_("Unit"), required=False, choices=models.Unit.get_types()) location = forms.CharField(label=_(u"Location"), widget=forms.Textarea, diff --git a/ishtar/furnitures/forms_files.py b/ishtar/furnitures/forms_files.py index da77eff85..9b45f0afc 100644 --- a/ishtar/furnitures/forms_files.py +++ b/ishtar/furnitures/forms_files.py @@ -193,7 +193,7 @@ class FileFormAddress(forms.Form): associated_models = {'town':models.Town} total_surface = forms.IntegerField(required=False, widget=widgets.AreaWidget, - label=_(u"Total surface"), + label=_(u"Total surface (m²)"), validators=[validators.MinValueValidator(0), validators.MaxValueValidator(999999999)]) address = forms.CharField(label=_(u"Main address"), widget=forms.Textarea) @@ -226,7 +226,7 @@ class FileFormPreventive(forms.Form): permit_reference = forms.CharField(label=_(u"Permit reference"), required=False, validators=[validators.MaxLengthValidator(60)]) total_developed_surface = forms.IntegerField(widget=widgets.AreaWidget, - label=_(u"Total developed surface"), + label=_(u"Total developed surface (m²)"), required=False, validators=[validators.MinValueValidator(0), validators.MaxValueValidator(999999999)]) if settings.COUNTRY == 'fr': diff --git a/ishtar/furnitures/forms_items.py b/ishtar/furnitures/forms_items.py index 05aa07170..2212ec253 100644 --- a/ishtar/furnitures/forms_items.py +++ b/ishtar/furnitures/forms_items.py @@ -102,8 +102,8 @@ class ItemForm(forms.Form): required=False) material_type = forms.ChoiceField(label=_("Material type"), choices=models.MaterialType.get_types()) - volume = FloatField(label=_(u"Volume"), required=False) - weight = FloatField(label=_(u"Weight"), required=False) + volume = FloatField(label=_(u"Volume (l)"), required=False) + weight = FloatField(label=_(u"Weight (g)"), required=False) item_number = forms.IntegerField(label=_(u"Item number"), required=False) class DateForm(forms.Form): @@ -237,8 +237,8 @@ class ResultItemForm(forms.Form): widget=forms.Textarea) material_type = forms.ChoiceField(label=_("Material type"), choices=models.MaterialType.get_types()) - volume = forms.IntegerField(label=_(u"Volume")) - weight = forms.IntegerField(label=_(u"Weight")) + volume = forms.IntegerField(label=_(u"Volume (l)")) + weight = forms.IntegerField(label=_(u"Weight (g)")) item_number = forms.IntegerField(label=_(u"Item number")) ResultItemFormSet = formset_factory(ResultItemForm, can_delete=True, diff --git a/ishtar/furnitures/forms_operations.py b/ishtar/furnitures/forms_operations.py index 75df6dd50..c362a21e4 100644 --- a/ishtar/furnitures/forms_operations.py +++ b/ishtar/furnitures/forms_operations.py @@ -234,7 +234,7 @@ class OperationFormGeneral(forms.Form): start_date = forms.DateField(label=_(u"Start date"), required=False, widget=widgets.JQueryDate) surface = forms.IntegerField(required=False, widget=widgets.AreaWidget, - label=_(u"Total surface"), + label=_(u"Total surface (m²)"), validators=[validators.MinValueValidator(0), validators.MaxValueValidator(999999999)]) year = forms.IntegerField(label=_(u"Year"), @@ -283,7 +283,7 @@ class OperationFormReference(forms.Form): class OperationFormPreventive(forms.Form): form_label = _("Preventive informations - excavation") - cost = forms.IntegerField(label=_(u"Cost"), required=False) + cost = forms.IntegerField(label=_(u"Cost (€)"), required=False) if settings.COUNTRY == 'fr': fnap_financing = forms.FloatField(required=False, label=u"Pourcentage de financement FNAP", diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index 437189464..3012511de 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -485,10 +485,10 @@ class File(BaseHistorizedItem, OwnPerms): verbose_name= u"Type de saisine") reference_number = models.IntegerField(_(u"Reference number"), blank=True, null=True) - total_surface = models.IntegerField(_(u"Total surface"), + total_surface = models.IntegerField(_(u"Total surface (m²)"), blank=True, null=True) - total_developed_surface = models.IntegerField(_(u"Total developed surface"), - blank=True, null=True) + total_developed_surface = models.IntegerField( + _(u"Total developed surface (m²)"), blank=True, null=True) address = models.TextField(_(u"Main address"), null=True, blank=True) address_complement = models.TextField(_(u"Main address - complement"), null=True, blank=True) @@ -584,7 +584,7 @@ class Operation(BaseHistorizedItem, OwnPerms): surface = models.IntegerField(_(u"Surface (m²)"), blank=True, null=True) remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains')) towns = models.ManyToManyField("Town", verbose_name=_(u"Towns")) - cost = models.IntegerField(_(u"Cost"), blank=True, null=True) + cost = models.IntegerField(_(u"Cost (€)"), blank=True, null=True) periods = models.ManyToManyField('Period', verbose_name=_(u"Periods")) if settings.COUNTRY == 'fr': code_patriarche = models.IntegerField(u"Code PATRIARCHE", null=True, @@ -754,10 +754,10 @@ class ContextRecord(BaseHistorizedItem, OwnPerms): related_name='context_record') label = models.CharField(_(u"ID"), max_length=200) description = models.TextField(_("Description"), blank=True, null=True) - length = models.IntegerField(_(u"Length"), blank=True, null=True) - width = models.IntegerField(_(u"Width"), blank=True, null=True) - thickness = models.IntegerField(_(u"Thickness"), blank=True, null=True) - depth = models.IntegerField(_(u"Depth"), blank=True, null=True) + length = models.IntegerField(_(u"Length (cm)"), blank=True, null=True) + width = models.IntegerField(_(u"Width (cm)"), blank=True, null=True) + thickness = models.IntegerField(_(u"Thickness (cm)"), blank=True, null=True) + depth = models.IntegerField(_(u"Depth (cm)"), blank=True, null=True) location = models.CharField(_(u"Location"), blank=True, null=True, max_length=200, help_text=_(u"A short description of the location of the context record")) @@ -923,8 +923,8 @@ class Item(BaseHistorizedItem, OwnPerms): description = models.TextField(_(u"Description"), blank=True, null=True) material_type = models.ForeignKey(MaterialType, verbose_name = _(u"Material type")) - volume = models.FloatField(_(u"Volume"), blank=True, null=True) - weight = models.FloatField(_(u"Weight"), blank=True, null=True) + volume = models.FloatField(_(u"Volume (l)"), blank=True, null=True) + weight = models.FloatField(_(u"Weight (g)"), blank=True, null=True) item_number = models.IntegerField(_("Item number"), blank=True, null=True) upstream_treatment = models.ForeignKey("Treatment", blank=True, null=True, related_name='downstream_treatment', verbose_name=_("Upstream treatment")) @@ -1073,10 +1073,10 @@ related_name='+', verbose_name=_(u"Person in charge of the scientific part")) if item]) class ContainerType(GeneralType): - length = models.IntegerField(_(u"Length")) - width = models.IntegerField(_(u"Width")) - height = models.IntegerField(_(u"Height")) - volume = models.IntegerField(_(u"Volume")) + length = models.IntegerField(_(u"Length (mm)")) + width = models.IntegerField(_(u"Width (mm)")) + height = models.IntegerField(_(u"Height (mm)")) + volume = models.IntegerField(_(u"Volume (l)")) reference = models.CharField(_(u"Reference"), max_length=30) class Meta: @@ -1111,7 +1111,7 @@ if settings.COUNTRY == 'fr': class Town(models.Model): name = models.CharField(_(u"Name"), max_length=100) - surface = models.IntegerField(_(u"Surface"), blank=True, null=True) + surface = models.IntegerField(_(u"Surface (m²)"), blank=True, null=True) center = models.PointField(_(u"Localisation"), srid=settings.SRID, blank=True, null=True) if settings.COUNTRY == 'fr': diff --git a/ishtar/locale/fr/LC_MESSAGES/django.po b/ishtar/locale/fr/LC_MESSAGES/django.po index 47fc8a02a..6d042173f 100644 --- a/ishtar/locale/fr/LC_MESSAGES/django.po +++ b/ishtar/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: alpha\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-13 21:27+0200\n" +"POT-Creation-Date: 2011-06-14 00:13+0200\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -63,15 +63,15 @@ msgstr "Il y a des éléments identiques." msgid "Enter a valid name consisting of letters, spaces and hyphens." msgstr "Entrez un nom correct composé de lettres, espaces et tirets." -#: furnitures/forms.py:75 furnitures/forms_common.py:324 +#: furnitures/forms.py:84 furnitures/forms_common.py:324 msgid "Confirm" msgstr "Confirmation" -#: furnitures/forms.py:191 +#: furnitures/forms.py:200 msgid "Yes" msgstr "Oui" -#: furnitures/forms.py:193 +#: furnitures/forms.py:202 msgid "No" msgstr "Non" @@ -333,21 +333,19 @@ msgid "Description" msgstr "Description" #: furnitures/forms_context_records.py:147 furnitures/models.py:757 -#: furnitures/models.py:1076 -msgid "Length" +msgid "Length (cm)" msgstr "Longueur (cm)" #: furnitures/forms_context_records.py:148 furnitures/models.py:758 -#: furnitures/models.py:1077 -msgid "Width" +msgid "Width (cm)" msgstr "Largeur (cm)" #: furnitures/forms_context_records.py:149 furnitures/models.py:759 -msgid "Thickness" +msgid "Thickness (cm)" msgstr "Épaisseur (cm)" #: furnitures/forms_context_records.py:150 furnitures/models.py:760 -msgid "Depth" +msgid "Depth (cm)" msgstr "Profondeur (cm)" #: furnitures/forms_context_records.py:151 furnitures/models.py:765 @@ -474,8 +472,8 @@ msgstr "Dossier en relation avec" #: furnitures/forms_files.py:196 furnitures/forms_operations.py:237 #: furnitures/models.py:488 -msgid "Total surface" -msgstr "Surface totale" +msgid "Total surface (m²)" +msgstr "Surface totale (m²)" #: furnitures/forms_files.py:199 furnitures/models.py:492 msgid "Main address" @@ -510,9 +508,9 @@ msgstr "Type de permis" msgid "Permit reference" msgstr "Référence du permis" -#: furnitures/forms_files.py:229 furnitures/models.py:490 -msgid "Total developed surface" -msgstr "Surface totale aménagée" +#: furnitures/forms_files.py:229 furnitures/models.py:491 +msgid "Total developed surface (m²)" +msgstr "Surface totale aménagée (m²)" #: furnitures/forms_files.py:235 furnitures/models.py:479 msgid "Reception date" @@ -555,14 +553,13 @@ msgstr "Type de matériau" #: furnitures/forms_items.py:105 furnitures/forms_items.py:240 #: furnitures/models.py:926 furnitures/models.py:1079 -msgid "Volume" -msgstr "Volume" +msgid "Volume (l)" +msgstr "Volume (l)" #: furnitures/forms_items.py:106 furnitures/forms_items.py:241 -#: furnitures/models.py:927 templates/sheet_contextrecord.html:108 -#: templates/sheet_ope_modif.html:155 templates/sheet_operation.html:157 -msgid "Weight" -msgstr "Poids" +#: furnitures/models.py:927 +msgid "Weight (g)" +msgstr "Poids (g)" #: furnitures/forms_items.py:107 furnitures/forms_items.py:242 #: furnitures/models.py:928 @@ -671,8 +668,8 @@ msgid "Preventive informations - excavation" msgstr "Information archéologie préventive - fouille" #: furnitures/forms_operations.py:286 furnitures/models.py:587 -msgid "Cost" -msgstr "Coût" +msgid "Cost (€)" +msgstr "Cout (€)" #: furnitures/forms_operations.py:294 msgid "Preventive informations - diagnostic" @@ -1033,7 +1030,7 @@ msgstr "Responsable" msgid "File" msgstr "Dossier" -#: furnitures/models.py:584 +#: furnitures/models.py:584 furnitures/models.py:1114 msgid "Surface (m²)" msgstr "Area (m²)" @@ -1316,9 +1313,17 @@ msgstr "Peut changer son propre Acte administratif" msgid "Can delete own Administrative act" msgstr "Peut supprimer son propre Acte administratif" +#: furnitures/models.py:1076 +msgid "Length (mm)" +msgstr "Longueur (mm) :" + +#: furnitures/models.py:1077 +msgid "Width (mm)" +msgstr "Largeur (mm) :" + #: furnitures/models.py:1078 -msgid "Height" -msgstr "Hauteur" +msgid "Height (mm)" +msgstr "Hauteur (mm)" #: furnitures/models.py:1084 msgid "Container types" @@ -1328,10 +1333,6 @@ msgstr "Types de contenant" msgid "Containers" msgstr "Contenants" -#: furnitures/models.py:1114 -msgid "Surface" -msgstr "Surface" - #: furnitures/models.py:1115 templates/sheet_contextrecord.html:72 #: templates/sheet_contextrecord.html:86 templates/sheet_file.html:43 #: templates/sheet_ope.html:46 templates/sheet_ope.html.py:107 @@ -1700,6 +1701,11 @@ msgstr "Mobilier" msgid "Find" msgstr "Mobilier" +#: templates/sheet_contextrecord.html:108 templates/sheet_ope_modif.html:155 +#: templates/sheet_operation.html:157 +msgid "Weight" +msgstr "Poids" + #: templates/sheet_contextrecord.html:109 templates/sheet_ope_modif.html:156 #: templates/sheet_operation.html:158 msgid "Numbers" @@ -2100,3 +2106,4 @@ msgid "You are now registered. Activation email sent." msgstr "" "Vous être maintenant enregistré. Un courriel d'activation de votre compte " "vous a été envoyé." + |