summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-10 10:22:08 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:43:03 +0200
commit440e5021bd0eb229d369d6e91c084e53fe097b23 (patch)
tree80e1e0b4e0d56a2f836fb90ffc1beaca1117732b /archaeological_operations
parent6eb800b65c10252bc27198d21eb52899e31bb8e0 (diff)
downloadIshtar-440e5021bd0eb229d369d6e91c084e53fe097b23.tar.bz2
Ishtar-440e5021bd0eb229d369d6e91c084e53fe097b23.zip
✏️ Operation: rename "operation code" to "yearly index"
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/forms.py10
-rw-r--r--archaeological_operations/models.py8
2 files changed, 9 insertions, 9 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 2b5e7c8f0..488f7d74e 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -488,7 +488,7 @@ class OperationSelect(GeoItemSelect):
label=_("Full text search"), widget=widgets.SearchWidget(
'archaeological-operations', 'operation'))
year = forms.IntegerField(label=_("Year"))
- operation_code = forms.IntegerField(label=_("Numeric reference"))
+ operation_code = forms.IntegerField(label=_("Yearly index"))
code_patriarche = forms.CharField(
max_length=500,
widget=OAWidget,
@@ -918,17 +918,17 @@ class OperationFormGeneral(CustomForm, ManageOldType):
Max('operation_code'))["operation_code__max"]
if year and max_val:
msg = _(
- "Operation code already exists for year: %(year)d - use a "
- "value bigger than %(last_val)d") % {
+ "This index already exists for year: %(year)d - use a "
+ "value bigger than %(last_val)d or empty the yearly index field.") % {
'year': year, 'last_val': max_val}
else:
- msg = _("Bad operation code")
+ msg = _("Bad operation index")
raise forms.ValidationError(msg)
return self.cleaned_data
class OperationFormModifGeneral(OperationFormGeneral):
- operation_code = forms.IntegerField(label=_("Operation code"),
+ operation_code = forms.IntegerField(label=_("Yearly index"),
required=False)
currents = {'associated_file': File}
associated_file = forms.IntegerField(
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 6e71343e8..6e6bfa53c 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -1122,7 +1122,7 @@ class Operation(
ALT_NAMES = {
"year": SearchAltName(pgettext_lazy("key for text search", "year"), "year"),
"operation_code": SearchAltName(
- pgettext_lazy("key for text search", "operation-code"), "operation_code"
+ pgettext_lazy("key for text search", "yearly-index"), "operation_code"
),
"old_code": SearchAltName(
pgettext_lazy("key for text search", "operation-old-code"),
@@ -1360,7 +1360,7 @@ class Operation(
related_name="operation_collaborator",
)
year = models.IntegerField(_("Year"), null=True, blank=True)
- operation_code = models.IntegerField(_("Numeric reference"), null=True, blank=True)
+ operation_code = models.IntegerField(_("Yearly index"), null=True, blank=True)
associated_file = models.ForeignKey(
"archaeological_files.File",
related_name="operations",
@@ -1944,7 +1944,7 @@ class Operation(
]
return (max_val + 1) if max_val else 1
- year_index_lbl = _("Operation code")
+ year_index_lbl = _("Yearly index")
@property
def year_index(self):
@@ -1977,7 +1977,7 @@ class Operation(
objs = objs.exclude(pk=self.pk)
if objs.count():
raise ValidationError(
- _("This operation code already exists for " "this year")
+ _("This index already exists for this year")
)
@property