-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Two-factor strings #12448
base: main
Are you sure you want to change the base?
Two-factor strings #12448
Changes from all commits
166bf8c
5eaae86
156289b
a3c7a8c
3f177fd
429187d
6ea8a12
495523e
8f13f35
93a4568
b80be57
714d6e8
9545b6c
a4e9196
61d33d5
f14ddd3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -110,7 +110,9 @@ def clean(self, value): | |||||
existing = User.objects.filter(username=value) | ||||||
if existing.exists() and value != self.valid: | ||||||
raise forms.ValidationError( | ||||||
gettext("This username is already taken. Please choose another.") | ||||||
gettext( | ||||||
"This username is already taken. Please pick something else." | ||||||
) | ||||||
) | ||||||
|
||||||
return super().clean(value) | ||||||
|
@@ -190,7 +192,7 @@ class CommitForm(ProfileBaseForm): | |||||
label=gettext_lazy("Commit e-mail"), | ||||||
choices=[("", gettext_lazy("Use account e-mail address"))], | ||||||
help_text=gettext_lazy( | ||||||
"Used in version control commits. The address will stay in the repository forever once changes are committed by Weblate." | ||||||
"Used in version-control commits. The address stays in the repository forever once changes are committed by Weblate." | ||||||
), | ||||||
required=False, | ||||||
widget=forms.RadioSelect, | ||||||
|
@@ -223,7 +225,7 @@ class ProfileForm(ProfileBaseForm): | |||||
|
||||||
public_email = forms.ChoiceField( | ||||||
label=gettext_lazy("Public e-mail"), | ||||||
choices=[("", gettext_lazy("Do not publicly display e-mail address"))], | ||||||
choices=[("", gettext_lazy("Hide e-mail address from public view"))], | ||||||
required=False, | ||||||
) | ||||||
|
||||||
|
@@ -414,8 +416,8 @@ class ContactForm(forms.Form): | |||||
label=gettext_lazy("Message"), | ||||||
required=True, | ||||||
help_text=gettext_lazy( | ||||||
"Please contact us in English, otherwise we might " | ||||||
"be unable to process your request." | ||||||
"Please contact us in English. Otherwise, we might " | ||||||
"not process your request." | ||||||
), | ||||||
max_length=2000, | ||||||
widget=forms.Textarea, | ||||||
|
@@ -430,7 +432,7 @@ class EmailForm(UniqueEmailMixin): | |||||
|
||||||
email = EmailField( | ||||||
label=gettext_lazy("E-mail"), | ||||||
help_text=gettext_lazy("E-mail with a confirmation link will be sent here."), | ||||||
help_text=gettext_lazy("An e-mail with a confirmation link will be sent here."), | ||||||
) | ||||||
|
||||||
|
||||||
|
@@ -579,7 +581,7 @@ def __init__(self, request: AuthenticatedHttpRequest, *args, **kwargs) -> None: | |||||
class PasswordConfirmForm(EmptyConfirmForm): | ||||||
password = PasswordField( | ||||||
label=gettext_lazy("Current password"), | ||||||
help_text=gettext_lazy("Leave empty if you have not yet set a password."), | ||||||
help_text=gettext_lazy("Leave empty if you have not set a password yet."), | ||||||
required=False, | ||||||
) | ||||||
|
||||||
|
@@ -635,7 +637,7 @@ def clean(self): | |||||
ngettext( | ||||||
( | ||||||
"Too many authentication attempts from this location. " | ||||||
"Please try again in %d minute." | ||||||
"Please try again in one minute." | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
), | ||||||
( | ||||||
"Too many authentication attempts from this location. " | ||||||
|
@@ -909,7 +911,9 @@ def clean_sort_by(self): | |||||
sort_by = self.cleaned_data.get("sort_by") | ||||||
if sort_by: | ||||||
if sort_by not in self.sort_values: | ||||||
raise forms.ValidationError(gettext("Chosen sorting is not supported.")) | ||||||
raise forms.ValidationError( | ||||||
gettext("The chosen sorting is not supported.") | ||||||
) | ||||||
return sort_by | ||||||
return None | ||||||
|
||||||
|
@@ -968,7 +972,7 @@ class TOTPDeviceForm(forms.Form): | |||||
) | ||||||
|
||||||
error_messages = { | ||||||
"invalid_token": gettext_lazy("Entered token is not valid."), | ||||||
"invalid_token": gettext_lazy("The entered token is not valid."), | ||||||
} | ||||||
|
||||||
def __init__(self, key, user, metadata=None, **kwargs): | ||||||
|
@@ -1038,7 +1042,7 @@ class OTPTokenForm(DjangoOTPTokenForm): | |||||
otp_token = forms.CharField( | ||||||
label=gettext("Recovery token"), | ||||||
help_text=gettext( | ||||||
"Recovery token can be used just once, mark your token as used after using it." | ||||||
"Recovery codes can only be used once. Remember to mark used ones as expired." | ||||||
), | ||||||
) | ||||||
device_class: type[Device] = StaticDevice | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -356,14 +356,14 @@ <h4 class="panel-title"> | |||||
</div> | ||||||
<div class="panel-body"> | ||||||
{% if page_user.profile.has_2fa %} | ||||||
{% trans "User has two-factor authentication configured." %} | ||||||
{% trans "The user has two-factor authentication configured." %} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
adding "in Weblate" might help specify that it isn't for one of the other OAuths |
||||||
{% else %} | ||||||
{% trans "User doesn't have two-factor authentication configured." %} | ||||||
{% trans "The user doesn't have two-factor authentication configured." %} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
{% endif %} | ||||||
</div> | ||||||
{% if page_user.profile.has_2fa %} | ||||||
<div class="panel-footer"> | ||||||
<input type="submit" name="remove_2fa" value="{% trans "Disable two-factor authentication" %}" class="btn-danger red"> | ||||||
<input type="submit" name="remove_2fa" value="{% trans "Turn off two-factor authentication" %}" class="btn-danger red"> | ||||||
</div> | ||||||
{% endif %} | ||||||
</div> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...same here.