Fix translation of "unauthorized.html" Web page

Make this page message translatable as other parts of IPA framework.

Fixes: https://pagure.io/freeipa/issue/7640
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Stanislav Levin 2018-07-12 22:05:39 +03:00 committed by Serhii Tsymbaliuk
parent 7da50cf461
commit 6f386f2e24
2 changed files with 56 additions and 0 deletions

View File

@ -5,11 +5,46 @@
<title>IPA: Identity Policy Audit</title>
<script type="text/javascript" src="../ui/js/libs/loader.js"></script>
<script type="text/javascript">
var dojoConfig = {
baseUrl: "../ui/js",
has: {
'dojo-firebug': false,
'dojo-debug-messages': true
},
parseOnLoad: false,
async: true,
packages: [
{
name:'dojo',
location:'dojo'
},
{
name: 'freeipa',
location: 'freeipa'
}
]
};
(function() {
var styles = [
'../ui/css/patternfly.css',
'../ui/css/ipa.css'
];
var scripts = [
'../ui/js/libs/jquery.js',
'../ui/js/dojo/dojo.js'
];
ipa_loader.scripts(scripts, function() {
require([
'dojo/dom',
'freeipa/text',
'dojo/domReady!'],
function(dom, text) {
if (msg = text.get('@i18n:unauthorized-page')) {
dom.byId('unauthorized-msg').innerHTML=msg;
}
});
});
ipa_loader.styles(styles);
})();
</script>
@ -26,6 +61,8 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div id="unauthorized-msg">
<noscript>
<h1>Unable to verify your Kerberos credentials</h1>
<p>
@ -39,6 +76,8 @@
If this is your first time, please <a href="ssbrowser.html">configure your browser</a>.
</p>
</div>
</noscript>
</div>
</div>
</div>
</div>

View File

@ -998,6 +998,23 @@ class i18n_messages(Command):
"trust": _("Trusts"),
},
"true": _("True"),
"unauthorized-page": _(
"<h1>Unable to verify your Kerberos credentials</h1>\n"
"<p>\n"
" Please make sure that you have valid Kerberos "
"tickets (obtainable via <strong>kinit</strong>), and that you"
" have configured your browser correctly.\n"
"</p>\n"
"\n"
"<h2>Browser configuration</h2>\n"
"\n"
"<div id=\"first-time\">\n"
"<p>\n"
" If this is your first time, please <a href="
"\"ssbrowser.html\">configure your browser</a>.\n"
"</p>\n"
"</div>\n"
),
"widget": {
"api_browser": _("API Browser"),
"first": _("First"),