1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[locales] Update two factor auth strings

This commit is contained in:
zhengxie
2018-09-06 16:45:33 +08:00
parent fd4486310d
commit c8b5e5d717
4 changed files with 21 additions and 21 deletions

View File

@@ -25,7 +25,7 @@ def make(default=True, lang='en'):
# add strings in 'organization' # add strings in 'organization'
os.symlink('../../seahub-extra/seahub_extra/organizations', 'seahub/organizations') os.symlink('../../seahub-extra/seahub_extra/organizations', 'seahub/organizations')
local('django-admin.py makemessages -s -l %s -e py,html -i "thirdpart*" -i "docs*" -i "seahub/two_factor/gateways" -i "seahub/two_factor/templates/two_factor/core/otp_required.html" -i "seahub/two_factor/templates/two_factor/core/phone_register.html" -i "seahub/two_factor/templates/two_factor/profile/profile.html"' % lang) local('django-admin.py makemessages -s -l %s -e py,html -i "thirdpart*" -i "docs*" -i "seahub/two_factor/gateways" -i "seahub/two_factor/templates/two_factor/core/otp_required.html" -i "seahub/two_factor/templates/two_factor/core/phone_register.html" -i "seahub/two_factor/templates/two_factor/profile/profile.html" -i "seahub/two_factor/models/phone.py" -i "seahub/two_factor/models/base.py" -i "seahub/two_factor/templates/two_factor/core/setup_complete.html"' % lang)
# remove 'organization' symlink to make codebase clean # remove 'organization' symlink to make codebase clean
os.remove('seahub/organizations') os.remove('seahub/organizations')

View File

@@ -15,7 +15,7 @@ from .utils import totp_digits
class MethodForm(forms.Form): class MethodForm(forms.Form):
method = forms.ChoiceField(label=_("Method"), method = forms.ChoiceField(label="Method",
initial='generator', initial='generator',
widget=forms.RadioSelect) widget=forms.RadioSelect)
@@ -26,7 +26,7 @@ class MethodForm(forms.Form):
class PhoneNumberForm(ModelForm): class PhoneNumberForm(ModelForm):
# Cannot use PhoneNumberField, as it produces a PhoneNumber object, which cannot be serialized. # Cannot use PhoneNumberField, as it produces a PhoneNumber object, which cannot be serialized.
number = forms.CharField(label=_("Phone Number") number = forms.CharField(label="Phone Number"
#validators=[validate_international_phonenumber] #validators=[validate_international_phonenumber]
) )

View File

@@ -10,11 +10,11 @@
{% if wizard.steps.current == 'token' %} {% if wizard.steps.current == 'token' %}
{% if device.method == 'call' %} {% if device.method == 'call' %}
<p>{% blocktrans %}We are calling your phone right now, please enter the <p>We are calling your phone right now, please enter the
digits you hear.{% endblocktrans %}</p> digits you hear.</p>
{% elif device.method == 'sms' %} {% elif device.method == 'sms' %}
<p>{% blocktrans %}We sent you a text message, please enter the tokens we <p>We sent you a text message, please enter the tokens we
sent.{% endblocktrans %}</p> sent.</p>
{% else %} {% else %}
<p>{% trans "Open the two-factor authentication app on your device to view your authentication token and verify your identify." %}</p> <p>{% trans "Open the two-factor authentication app on your device to view your authentication token and verify your identify." %}</p>
{% endif %} {% endif %}

View File

@@ -6,12 +6,12 @@
<h2 class="hd">{% trans "Enable Two-Factor Authentication" %}</h2> <h2 class="hd">{% trans "Enable Two-Factor Authentication" %}</h2>
<div class="con"> <div class="con">
{% if wizard.steps.current == 'welcome' %} {% if wizard.steps.current == 'welcome' %}
<p>{% blocktrans %}You are about to take your account security to the <p>You are about to take your account security to the
next level. Follow the steps in this wizard to enable two-factor next level. Follow the steps in this wizard to enable two-factor
authentication.{% endblocktrans %}</p> authentication.</p>
{% elif wizard.steps.current == 'method' %} {% elif wizard.steps.current == 'method' %}
<p>{% blocktrans %}Please select which authentication method you would <p>Please select which authentication method you would
like to use.{% endblocktrans %}</p> like to use.</p>
{% elif wizard.steps.current == 'generator' %} {% elif wizard.steps.current == 'generator' %}
<p>{% blocktrans %}To start using a token generator, please use your <p>{% blocktrans %}To start using a token generator, please use your
smartphone to scan the QR code below. For example, use Google smartphone to scan the QR code below. For example, use Google
@@ -19,20 +19,20 @@
{% endblocktrans %}</p> {% endblocktrans %}</p>
<img src="{{ QR_URL }}" alt="QR Code" /> <img src="{{ QR_URL }}" alt="QR Code" />
{% elif wizard.steps.current == 'sms' %} {% elif wizard.steps.current == 'sms' %}
<p>{% blocktrans %}Please enter the phone number you wish to receive the <p>Please enter the phone number you wish to receive the
text messages on. This number will be validated in the next step. text messages on. This number will be validated in the next step.
{% endblocktrans %}</p> </p>
{% elif wizard.steps.current == 'call' %} {% elif wizard.steps.current == 'call' %}
<p>{% blocktrans %}Please enter the phone number you wish to be called on. <p>Please enter the phone number you wish to be called on.
This number will be validated in the next step. {% endblocktrans %}</p> This number will be validated in the next step. </p>
{% elif wizard.steps.current == 'validation' %} {% elif wizard.steps.current == 'validation' %}
{% if challenge_succeeded %} {% if challenge_succeeded %}
{% if device.method == 'call' %} {% if device.method == 'call' %}
<p>{% blocktrans %}We are calling your phone right now, please enter the <p>We are calling your phone right now, please enter the
digits you hear.{% endblocktrans %}</p> digits you hear.</p>
{% elif device.method == 'sms' %} {% elif device.method == 'sms' %}
<p>{% blocktrans %}We sent you a text message, please enter the tokens we <p>We sent you a text message, please enter the tokens we
sent.{% endblocktrans %}</p> sent.</p>
{% endif %} {% endif %}
{% else %} {% else %}
<p class="alert alert-warning" role="alert">We've <p class="alert alert-warning" role="alert">We've
@@ -42,9 +42,9 @@
persists, contact the site administrator.</p> persists, contact the site administrator.</p>
{% endif %} {% endif %}
{% elif wizard.steps.current == 'yubikey' %} {% elif wizard.steps.current == 'yubikey' %}
<p>{% blocktrans %}To identify and verify your YubiKey, please insert a <p>To identify and verify your YubiKey, please insert a
token in the field below. Your YubiKey will be linked to your token in the field below. Your YubiKey will be linked to your
account.{% endblocktrans %}</p> account.</p>
{% endif %} {% endif %}
<form action="" method="post">{% csrf_token %} <form action="" method="post">{% csrf_token %}