Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [ACI-909] make all user-info string translatable #151

Merged
merged 5 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions credentials/apps/badges/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def delete_model(self, request, obj):
"""
if obj.is_active:
messages.set_level(request, messages.ERROR)
messages.error(request, "Active badge template cannot be deleted.")
messages.error(request, _("Active badge template cannot be deleted."))
return
super().delete_model(request, obj)

Expand All @@ -204,7 +204,7 @@ def delete_queryset(self, request, queryset):
"""
if queryset.filter(is_active=True).exists():
messages.set_level(request, messages.ERROR)
messages.error(request, "Active badge templates cannot be deleted.")
messages.error(request, _("Active badge templates cannot be deleted."))
return
super().delete_queryset(request, queryset)

Expand All @@ -228,7 +228,7 @@ def save_related(self, request, form, formsets, change):
obj = form.instance
if obj.is_active and not obj.requirements.exists():
messages.set_level(request, messages.ERROR)
messages.error(request, "Badge Template must have at least 1 Requirement set.")
messages.error(request, _("Badge Template must have at least 1 Requirement set."))
return
super().save_related(request, form, formsets, change)

Expand Down
2 changes: 1 addition & 1 deletion credentials/apps/badges/admin_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def clean(self):
if requirements and not all(
[requirement.template.id == cleaned_data.get("template").id for requirement in requirements]
):
raise forms.ValidationError("All requirements must belong to the same template.")
raise forms.ValidationError(_("All requirements must belong to the same template."))
return cleaned_data


Expand Down
Binary file modified credentials/conf/locale/ar/LC_MESSAGES/django.mo
Binary file not shown.
Loading
Loading