diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-10-17 01:47:53 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-10-17 01:47:53 +0200 |
commit | b8e826cc4b5be3d935f647b7b74e202578f5e4e8 (patch) | |
tree | 9a7da668af18ab59c0fb283568d306c67601ac2f | |
parent | 5134f84b99674294d60d90d74ca979afd2ee40ec (diff) | |
download | Ishtar-b8e826cc4b5be3d935f647b7b74e202578f5e4e8.tar.bz2 Ishtar-b8e826cc4b5be3d935f647b7b74e202578f5e4e8.zip |
Update french translation
-rw-r--r-- | archaeological_files/locale/fr/LC_MESSAGES/django.po | 108 | ||||
-rw-r--r-- | archaeological_finds/models.py | 3 | ||||
-rw-r--r-- | archaeological_operations/admin.py | 14 | ||||
-rw-r--r-- | archaeological_operations/forms.py | 31 | ||||
-rw-r--r-- | archaeological_operations/models.py | 25 | ||||
-rw-r--r-- | archaeological_operations/views.py | 10 |
6 files changed, 113 insertions, 78 deletions
diff --git a/archaeological_files/locale/fr/LC_MESSAGES/django.po b/archaeological_files/locale/fr/LC_MESSAGES/django.po index f2951cc68..8f58f8619 100644 --- a/archaeological_files/locale/fr/LC_MESSAGES/django.po +++ b/archaeological_files/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: 2014-10-15 01:32+0200\n" +"POT-Creation-Date: 2014-10-17 01:46+0200\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -18,29 +18,29 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" -#: forms.py:55 forms.py:169 forms.py:209 forms.py:320 forms.py:360 +#: forms.py:55 forms.py:181 forms.py:221 forms.py:332 forms.py:372 #: models.py:67 templates/ishtar/sheet_file.html:98 #: templates/ishtar/sheet_file.html:126 msgid "Year" msgstr "Année" -#: forms.py:56 forms.py:173 forms.py:211 forms.py:359 models.py:69 +#: forms.py:56 forms.py:185 forms.py:223 forms.py:371 models.py:69 msgid "Numeric reference" msgstr "Référence numérique" -#: forms.py:58 forms.py:175 forms.py:362 +#: forms.py:58 forms.py:187 forms.py:374 msgid "Other reference" msgstr "Autre référence" -#: forms.py:60 forms.py:342 +#: forms.py:60 forms.py:354 msgid "File name" msgstr "Nom du dossier" -#: forms.py:61 forms.py:130 forms.py:180 models.py:74 +#: forms.py:61 forms.py:134 forms.py:192 models.py:74 msgid "File type" msgstr "Type de dossier" -#: forms.py:62 forms.py:132 forms.py:248 +#: forms.py:62 forms.py:136 forms.py:260 msgid "Saisine type" msgstr "Type de saisine" @@ -52,23 +52,23 @@ msgstr "Parcelle (section/numéro)" msgid "Is active?" msgstr "Est actif ?" -#: forms.py:66 forms.py:222 forms.py:345 models.py:81 +#: forms.py:66 forms.py:234 forms.py:357 models.py:81 msgid "General contractor" msgstr "Aménageur" -#: forms.py:73 forms.py:352 +#: forms.py:73 forms.py:364 msgid "Organization of general contractor" msgstr "Organisation de l'aménageur" -#: forms.py:80 forms.py:364 templates/ishtar/sheet_file.html:102 +#: forms.py:80 forms.py:376 templates/ishtar/sheet_file.html:102 msgid "In charge" msgstr "Responsable" -#: forms.py:87 forms.py:373 +#: forms.py:87 forms.py:385 msgid "Created by" msgstr "Créé par" -#: forms.py:94 forms.py:241 forms.py:371 models.py:90 +#: forms.py:94 forms.py:253 forms.py:383 models.py:90 msgid "Permit reference" msgstr "Référence du permis" @@ -88,129 +88,133 @@ msgstr "années" msgid "months" msgstr "mois" -#: forms.py:128 +#: forms.py:126 forms.py:190 models.py:95 +msgid "Creation date" +msgstr "Date de création" + +#: forms.py:127 forms.py:262 models.py:97 +msgid "Reception date" +msgstr "Date de réception" + +#: forms.py:130 msgid "Slicing" msgstr "Découpage" -#: forms.py:134 +#: forms.py:132 +msgid "Date get from" +msgstr "Date utilisée" + +#: forms.py:138 msgid "Creation date after" msgstr "Date de création après" -#: forms.py:136 +#: forms.py:140 msgid "Creation date before" msgstr "Date de création avant" -#: forms.py:159 templates/ishtar/sheet_file.html:24 +#: forms.py:171 templates/ishtar/sheet_file.html:24 msgid "General" msgstr "Général" -#: forms.py:163 models.py:76 +#: forms.py:175 models.py:76 msgid "Person in charge" msgstr "Responsable" -#: forms.py:177 models.py:73 +#: forms.py:189 models.py:73 msgid "Name" msgstr "Nom" -#: forms.py:178 models.py:95 -msgid "Creation date" -msgstr "Date de création" - -#: forms.py:181 models.py:99 +#: forms.py:193 models.py:99 msgid "Related file" msgstr "Dossier en relation avec" -#: forms.py:185 forms.py:291 models.py:115 templates/ishtar/sheet_file.html:85 +#: forms.py:197 forms.py:303 models.py:115 templates/ishtar/sheet_file.html:85 msgid "Comment" msgstr "Commentaire" -#: forms.py:189 models.py:106 +#: forms.py:201 models.py:106 msgid "Total surface (m²)" msgstr "Surface totale des terrains (m²)" -#: forms.py:192 models.py:110 +#: forms.py:204 models.py:110 msgid "Main address" msgstr "Adresse des terrains" -#: forms.py:193 models.py:111 +#: forms.py:205 models.py:111 msgid "Main address - complement" msgstr "Adresse des terrains - complément" -#: forms.py:204 +#: forms.py:216 #, python-format msgid "<br/>(last recorded: %s)" msgstr "<br/>(dernier enregistrement : %s)" -#: forms.py:217 +#: forms.py:229 msgid "Preventive informations" msgstr "Information archéologie préventive" -#: forms.py:231 models.py:86 +#: forms.py:243 models.py:86 msgid "Responsible for town planning service" msgstr "Responsable au service instructeur" -#: forms.py:239 models.py:52 models.py:88 +#: forms.py:251 models.py:52 models.py:88 msgid "Permit type" msgstr "Type de permis" -#: forms.py:244 models.py:109 +#: forms.py:256 models.py:109 msgid "Total developed surface (m²)" msgstr "Surface totale aménagée (m²)" -#: forms.py:250 models.py:97 -msgid "Reception date" -msgstr "Date de réception" - -#: forms.py:261 templates/ishtar/sheet_file.html:75 +#: forms.py:273 templates/ishtar/sheet_file.html:75 #: templates/ishtar/dashboards/dashboard_file.html:42 msgid "Research archaeology" msgstr "Archéologie programmée" -#: forms.py:269 models.py:118 templates/ishtar/sheet_file.html:76 +#: forms.py:281 models.py:118 templates/ishtar/sheet_file.html:76 msgid "Departments" msgstr "Départements" -#: forms.py:279 models.py:130 +#: forms.py:291 models.py:130 msgid "Scientist in charge" msgstr "Responsable scientifique" -#: forms.py:281 models.py:123 templates/ishtar/sheet_file.html:78 +#: forms.py:293 models.py:123 templates/ishtar/sheet_file.html:78 msgid "Requested operation type" msgstr "Type d'opération demandée" -#: forms.py:283 +#: forms.py:295 msgid "Lead organization" msgstr "Organisation porteuse du projet" -#: forms.py:300 models.py:134 templates/ishtar/sheet_file.html:83 +#: forms.py:312 models.py:134 templates/ishtar/sheet_file.html:83 msgid "Classified area" msgstr "Au sein d'un site classé" -#: forms.py:302 models.py:136 templates/ishtar/sheet_file.html:84 +#: forms.py:314 models.py:136 templates/ishtar/sheet_file.html:84 msgid "Protected area" msgstr "Au sein d'un secteur sauvegardé" -#: forms.py:313 +#: forms.py:325 msgid "Would you like to close this archaeological file?" msgstr "Voulez vous clore ce dossier archéologique ?" -#: forms.py:317 +#: forms.py:329 msgid "Would you like to delete this archaelogical file ?" msgstr "Voulez vous supprimer ce dossier archéologique ?" -#: forms.py:321 +#: forms.py:333 msgid "Index" msgstr "Index" -#: forms.py:325 forms.py:337 forms.py:402 +#: forms.py:337 forms.py:349 forms.py:414 msgid "Act type" msgstr "Type d'acte" -#: forms.py:338 +#: forms.py:350 msgid "Signature date after" msgstr "Date de signature après" -#: forms.py:340 +#: forms.py:352 msgid "Signature date before" msgstr "Date de signature avant" @@ -339,15 +343,15 @@ msgstr "Peut fermer un dossier" msgid "FILE" msgstr "DOSSIER" -#: models.py:312 +#: models.py:315 msgid "Intercommunal" msgstr "Intercommunal" -#: models.py:376 +#: models.py:379 msgid "File" msgstr "Dossier" -#: models.py:377 +#: models.py:380 msgid "Department" msgstr "Département" diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 26eb4cbd1..47b577215 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -341,7 +341,8 @@ class TreatmentType(GeneralType): ordering = ('label',) class Treatment(BaseHistorizedItem, OwnPerms): - container = models.ForeignKey(Container, verbose_name=_(u"Container"), + if WAREHOUSE_AVAILABLE: + container = models.ForeignKey(Container, verbose_name=_(u"Container"), blank=True, null=True) description = models.TextField(_(u"Description"), blank=True, null=True) treatment_type = models.ForeignKey(TreatmentType, diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py index e0d33a13e..c012b00e2 100644 --- a/archaeological_operations/admin.py +++ b/archaeological_operations/admin.py @@ -24,8 +24,14 @@ from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models +FILES_AVAILABLE = 'archaeological_files' in settings.INSTALLED_APPS + class AdministrativeActAdmin(HistorizedObjectAdmin): - list_display = ('year', 'index', 'operation', 'associated_file', 'act_type') + if FILES_AVAILABLE: + list_display = ('year', 'index', 'operation', 'associated_file', + 'act_type') + else: + list_display = ('year', 'index', 'operation', 'act_type') list_filter = ('act_type',) search_fields = ('year', 'index') model = models.AdministrativeAct @@ -69,7 +75,11 @@ class OperationSourceAdmin(admin.ModelAdmin): admin.site.register(models.OperationSource, OperationSourceAdmin) class ParcelAdmin(HistorizedObjectAdmin): - list_display = ('section', 'parcel_number', 'operation', 'associated_file') + if FILES_AVAILABLE: + list_display = ('section', 'parcel_number', 'operation', + 'associated_file') + else: + list_display = ('section', 'parcel_number', 'operation',) search_fields = ('operation__name',) model = models.Parcel diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index d31d5c542..78e5a4ed4 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -35,7 +35,11 @@ from django.utils.safestring import mark_safe from ishtar_common.models import valid_id, PersonType, Person, Town, \ DocumentTemplate, Organization, OrganizationType -from archaeological_files.models import File + +FILES_AVAILABLE = 'archaeological_files' in settings.INSTALLED_APPS + +if FILES_AVAILABLE: + from archaeological_files.models import File import models from widgets import ParcelWidget, SelectParcelWidget @@ -292,14 +296,15 @@ class OperationCodeInput(forms.TextInput): 'url':reverse_lazy('get_available_operation_code')} return mark_safe(rendered + js) -class OperationFormFileChoice(forms.Form): - form_label = _(u"Associated file") - associated_models = {'associated_file':File,} - currents = {'associated_file':File} - associated_file = forms.IntegerField(label=_(u"Archaelogical file"), - widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-file'), - associated_model=File), - validators=[valid_id(File)], required=False) +if FILES_AVAILABLE: + class OperationFormFileChoice(forms.Form): + form_label = _(u"Associated file") + associated_models = {'associated_file':File,} + currents = {'associated_file':File} + associated_file = forms.IntegerField(label=_(u"Archaelogical file"), + widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-file'), + associated_model=File), + validators=[valid_id(File)], required=False) class OperationFormGeneral(forms.Form): form_label = _(u"General") @@ -419,9 +424,10 @@ class OperationFormGeneral(forms.Form): return self.cleaned_data class OperationFormModifGeneral(OperationFormGeneral): - currents = {'associated_file':File} operation_code = forms.IntegerField(label=_(u"Operation code")) - associated_file = forms.IntegerField(label=_(u"Archaelogical file"), + if FILES_AVAILABLE: + currents = {'associated_file':File} + associated_file = forms.IntegerField(label=_(u"Archaelogical file"), widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-file'), associated_model=File), validators=[valid_id(File)], required=False) @@ -435,7 +441,8 @@ class OperationFormModifGeneral(OperationFormGeneral): OperationFormModifGeneral.associated_models = \ OperationFormGeneral.associated_models.copy() -OperationFormModifGeneral.associated_models['associated_file'] = File +if FILES_AVAILABLE: + OperationFormModifGeneral.associated_models['associated_file'] = File class OperationFormPreventive(forms.Form): diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index c7a8c94ac..ca649d2d0 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -134,6 +134,9 @@ class ArchaeologicalSite(BaseHistorizedItem): class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem): TABLE_COLS = ['year_index', 'operation_type', 'remains', 'towns', + 'start_date', 'excavation_end_date'] + if FILES_AVAILABLE: + TABLE_COLS = ['year_index', 'operation_type', 'remains', 'towns', 'associated_file_short_label', 'start_date', 'excavation_end_date'] start_date = models.DateField(_(u"Start date"), null=True, blank=True) @@ -434,7 +437,7 @@ def operation_post_save(sender, **kwargs): operation.fnap_financing = fnap_percent operation.save() cached_label_changed(sender, **kwargs) - if operation.associated_file: + if FILES_AVAILABLE and operation.associated_file: operation.associated_file.update_short_menu_class() post_save.connect(operation_post_save, sender=Operation) @@ -493,6 +496,9 @@ class ActType(GeneralType): class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): TABLE_COLS = ['full_ref', 'year', 'index', 'act_type', 'signature_date', + 'operation'] + if FILES_AVAILABLE: + TABLE_COLS = ['full_ref', 'year', 'index', 'act_type', 'signature_date', 'associated_file', 'operation'] TABLE_COLS_FILE = ['full_ref', 'year', 'index', 'act_type', 'associated_file', 'associated_file.towns',] @@ -550,9 +556,10 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): ) def __unicode__(self): - return settings.JOINT.join([unicode(item) - for item in [self.operation, self.associated_file, self.act_object] - if item]) + items = [self.operation, self.act_object] + if FILES_AVAILABLE: + items = [self.operation, self.associated_file, self.act_object] + return settings.JOINT.join([unicode(item) for item in items if item]) full_ref_lbl = _(u"Ref.") @property @@ -568,7 +575,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): @property def towns(self): - if self.associated_file: + if FILES_AVAILABLE and self.associated_file: return self.associated_file.towns.all() elif self.operation: return self.operation.towns.all() @@ -577,7 +584,8 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): @property def related_item(self): - return self.operation if self.operation else self.associated_file + return self.operation if self.operation \ + else FILES_AVAILABLE and self.associated_file def get_filename(self): filename = self.related_item.associated_filename @@ -643,7 +651,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): self._get_index() super(AdministrativeAct, self).save(*args, **kwargs) - if hasattr(self, 'associated_file') and self.associated_file: + if FILES_AVAILABLE and self.associated_file: self.associated_file.update_has_admin_act() self.associated_file.update_short_menu_class() @@ -720,7 +728,8 @@ class Parcel(LightHistorizedItem): return res def long_label(self): - items = [unicode(self.operation or self.associated_file)] + items = [unicode(self.operation or + (FILES_AVAILABLE and self.associated_file))] items += [unicode(item) for item in [self.section, self.parcel_number] if item] return settings.JOINT.join(items) diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 6e623db88..5e6385de7 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -181,8 +181,7 @@ operation_search_wizard = SearchWizard.as_view([ label=_(u"Operation search"), url_name='operation_search',) -operation_creation_wizard = OperationWizard.as_view([ - ('filechoice-operation_creation', OperationFormFileChoice), +wizard_steps = [ ('general-operation_creation', OperationFormGeneral), ('preventive-operation_creation', OperationFormPreventive), ('preventivediag-operation_creation', OperationFormPreventiveDiag), @@ -192,7 +191,12 @@ operation_creation_wizard = OperationWizard.as_view([ ('parcels-operation_creation', SelectedParcelFormSet), ('remains-operation_creation', RemainFormset), ('periods-operation_creation', PeriodFormset), - ('final-operation_creation', FinalForm)], + ('final-operation_creation', FinalForm)] +if FILES_AVAILABLE: + wizard_steps.insert(0, ('filechoice-operation_creation', + OperationFormFileChoice)) + +operation_creation_wizard = OperationWizard.as_view(wizard_steps, label=_(u"New operation"), condition_dict={ 'preventive-operation_creation':\ |