Fix translations at LoginScreen widget

To be translatable title and label fields should be marked
with @i18n. Also these messages should be provided by
i18n_messages.

Fixes: https://pagure.io/freeipa/issue/7559
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Stanislav Levin 2018-06-26 14:13:53 +03:00 committed by Rob Crittenden
parent c0c6b21ba1
commit 5d8fde0ac1
2 changed files with 7 additions and 2 deletions

View File

@ -97,8 +97,10 @@ define(['dojo/_base/declare',
this.cert_btn_node = IPA.button({
name: 'cert_auth',
title:"Log in using personal certificate",
label: "Log In Using Certificate",
title: text.get('@i18n:login.login_certificate_desc',
'Log in using personal certificate'),
label: text.get('@i18n:login.login_certificate',
'Log In Using Certificate'),
button_class: 'btn btn-link',
click: this.login_with_cert.bind(this)
})[0];

View File

@ -353,9 +353,12 @@ class i18n_messages(Command):
"correctly, then click 'Log in'."),
"loading_md": _("Loading data"),
"login": _("Log in"),
"login_certificate": _("Log In Using Certificate"),
"login_certificate_desc": _("Log in using personal certificate"),
"logout": _("Log out"),
"logout_error": _("Log out error"),
"password": _("Password"),
"password_and_otp": _("Password or Password+One-Time-Password"),
"sync_otp_token": _("Sync OTP Token"),
"username": _("Username"),
},