Skip to content

Commit 15a369a

Browse files
authored
Rename meta terms to tags (#4341)
Fixes #3885
1 parent 1a4dd47 commit 15a369a

File tree

11 files changed

+37
-21
lines changed

11 files changed

+37
-21
lines changed

docs/references/wagtail-admin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The WagTail Admin is your "back office" for setting up form applications and pub
2222
- Category Questions: Application questions with multiple options for users to select.
2323
- Screening Statuses: For metadata related to the initial screening stage.
2424
- Reviewer Roles: Adding reviewer roles.
25-
- Meta Terms: For metadata, such as tags, thumbnail image and ... “and” - The results must match all terms (default for database search).
25+
- Tags: For metadata, such as tags, thumbnail image and ... “and” - The results must match all terms (default for database search).
2626
- Manage
2727

2828
### Wagtail default settings

docs/setup/administrators/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Should staff admins be able to export submissions.
213213

214214
Columns to exclude from the submission tables.
215215

216-
Possible values are: fund, round, status, lead, reviewers, screening_statuses, category_options, meta_terms, organization_name
216+
Possible values are: fund, round, status, lead, reviewers, screening_statuses, category_options, tags, organization_name
217217

218218
SUBMISSIONS_TABLE_EXCLUDED_FIELDS = env.list('SUBMISSIONS_TABLE_EXCLUDED_FIELDS', [])
219219

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by Django 4.2.18 on 2025-01-31 07:38
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("categories", "0006_use_category_options_as_submission_filter"),
9+
]
10+
11+
operations = [
12+
migrations.AlterModelOptions(
13+
name="metaterm",
14+
options={"verbose_name": "Tag", "verbose_name_plural": "Tags"},
15+
),
16+
]

hypha/apply/categories/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def __str__(self):
136136
return self.name
137137

138138
class Meta:
139-
verbose_name = _("Meta Term")
140-
verbose_name_plural = _("Meta Terms")
139+
verbose_name = _("Tag")
140+
verbose_name_plural = _("Tags")
141141

142142

143143
class MetaTermChoiceField(forms.ModelChoiceField):

hypha/apply/funds/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,10 @@ class UpdateMetaTermsForm(ApplicationSubmissionModelForm):
401401
widget=MetaTermWidget(
402402
attrs={"data-placeholder": "Select...", "data-js-choices": ""}
403403
),
404-
label=_("Meta terms"),
404+
label=_("Tags"),
405405
choices_groupby="get_parent",
406406
required=False,
407-
help_text=_("Meta terms are hierarchical in nature."),
407+
help_text=_("Tags are hierarchical in nature."),
408408
)
409409

410410
class Meta:

hypha/apply/funds/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class SubmissionFilter(filters.FilterSet):
349349
category_options = MultipleChoiceFilter(
350350
choices=[], label=_("Category"), method="filter_category_options"
351351
)
352-
meta_terms = ModelMultipleChoiceFilter(queryset=get_meta_terms, label=_("Terms"))
352+
meta_terms = ModelMultipleChoiceFilter(queryset=get_meta_terms, label=_("Tags"))
353353

354354
class Meta:
355355
model = ApplicationSubmission

hypha/apply/funds/templates/funds/includes/admin_primary_actions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h5>{% trans "Actions to take" %}</h5>
9595
class="button button--white button--full-width button--bottom-space"
9696
hx-get="{% url 'funds:submissions:metaterms_update' pk=object.pk %}"
9797
hx-target="#htmx-modal"
98-
>{% trans "Meta Terms" %}</button>
98+
>{% trans "Tags" %}</button>
9999

100100
<button
101101
class="button button--white button--full-width button--bottom-space"

hypha/apply/funds/templates/funds/includes/submission-list-row.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
class="{{ s.phase.bg_color }} hover:opacity-70 transition-opacity rounded-full whitespace-nowrap inline-block ms-1 px-2 pt-0.5 pb-1 text-xs font-medium text-gray-800"
5353
>{{ s.phase.display_name }}</a>
5454

55-
{% if "meta_terms" not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %}
55+
{% if "tags" not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %}
5656
{% for meta_term in s.get_assigned_meta_terms %}
5757
<a
5858
href="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" meta_terms=meta_term.id %}"
5959
hx-get="{% url "apply:submissions:list" %}{% modify_query "only_query_string" "page" meta_terms=meta_term.id %}"
6060
hx-target="#main"
6161
hx-push-url="true"
6262
hx-swap="outerHTML"
63-
data-tippy-content="Meta Term: {{meta_term.name}}"
63+
data-tippy-content="Tags: {{meta_term.name}}"
6464
data-tippy-placement="top"
6565
class="inline-block px-2 pt-0.5 pb-1 text-xs font-medium whitespace-nowrap rounded-full transition-opacity hover:opacity-70 ms-1 text-slate-900 bg-slate-200"
6666
>{{meta_term.name}}</a>

hypha/apply/funds/templates/submissions/all.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@
259259
{% endfor %}
260260
{% for s in selected_meta_terms %}
261261
<span class="inline-flex items-center py-1 px-2 text-xs font-medium text-blue-800 bg-blue-100 rounded select-none me-2">
262-
{% trans "Meta Term:" %} {{ s|get_meta_term_from_id }}
262+
{% trans "Tag:" %} {{ s|get_meta_term_from_id }}
263263
<a href="{% remove_from_query meta_terms=s %}" role="button" class="inline-flex items-center p-0.5 text-xs text-blue-400 bg-transparent rounded-sm hover:text-blue-900 hover:bg-blue-200 ms-1 dark:hover:bg-blue-800 dark:hover:text-blue-300" aria-label="Remove">
264264
{% heroicon_mini "x-mark" aria_hidden="true" fill="currentColor" %}
265-
<span class="sr-only">{% trans "Remove meta term filter" %}</span>
265+
<span class="sr-only">{% trans "Remove tag filter" %}</span>
266266
</a>
267267
</span>
268268
{% endfor %}
@@ -451,8 +451,8 @@
451451
{% enddropdown_menu %}
452452
{% endif %}
453453

454-
{% if "meta_terms" not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %}
455-
{% dropdown_menu title="Terms" heading="Filter by Terms" enable_search=True position="right" %}
454+
{% if "tags" not in SUBMISSIONS_TABLE_EXCLUDED_FIELDS %}
455+
{% dropdown_menu title="Tags" heading="Filter by tags" enable_search=True position="right" %}
456456
{% slot "url" %}{% url "apply:submissions:submenu-meta-terms" %}{% remove_from_query "only_query_string" "page" %}{% endslot %}
457457
{% enddropdown_menu %}
458458
{% endif %}

hypha/apply/funds/templates/submissions/partials/meta-terms-card.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{% load i18n heroicons %}
22

33
<div class="flex gap-4 justify-between pb-4">
4-
<h5 class="m-0">{% trans "Meta Terms" %}</h5>
4+
<h5 class="m-0">{% trans "Tags" %}</h5>
55
<button
66
class="flex items-center py-1 px-2 font-bold rounded transition-colors hover:bg-gray-100 text-dark-blue -me-2"
77
hx-get="{% url 'funds:submissions:metaterms_update' pk=submission.pk %}"
88
hx-target="#htmx-modal"
99
role="button"
1010
{% if meta_terms %}
11-
aria-label="{% trans "Update Meta Terms" %}"
12-
title="{% trans "Update Meta Terms" %}"
11+
aria-label="{% trans "Update tags" %}"
12+
title="{% trans "Update tags" %}"
1313
{% else %}
14-
aria-label="{% trans "Add Meta Terms" %}"
14+
aria-label="{% trans "Add tags" %}"
1515
{% endif %}
1616
>
1717
{% if meta_terms %}

0 commit comments

Comments
 (0)