From 5d8fde0ac1a43c8f3dbc53b44d69f3663a8b36fb Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Tue, 26 Jun 2018 14:13:53 +0300 Subject: [PATCH] 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 Reviewed-By: Christian Heimes Reviewed-By: Petr Vobornik --- install/ui/src/freeipa/widgets/LoginScreen.js | 6 ++++-- ipaserver/plugins/internal.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/install/ui/src/freeipa/widgets/LoginScreen.js b/install/ui/src/freeipa/widgets/LoginScreen.js index a83ab6b1a..745a71c18 100644 --- a/install/ui/src/freeipa/widgets/LoginScreen.js +++ b/install/ui/src/freeipa/widgets/LoginScreen.js @@ -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]; diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py index 13b110210..2ce7ea519 100644 --- a/ipaserver/plugins/internal.py +++ b/ipaserver/plugins/internal.py @@ -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"), },