Fixes for use gettext in paramecio, deprecating old language system
This commit is contained in:
parent
fc15bd74bb
commit
2ba2ac6d37
11 changed files with 66 additions and 34 deletions
|
|
@ -63,7 +63,7 @@ ${load_js()|n}
|
|||
|
||||
<nav id="menu" class="nav-collapse">
|
||||
<ul>
|
||||
<li class="menu_title"><%block name="applications"><i class="fa fa-gear" aria-hidden="true"></i>${lang('admin', 'applications', 'Applications')}</li></%block>
|
||||
<li class="menu_title"><%block name="applications"><i class="fa fa-gear" aria-hidden="true"></i>${_('Applications')}</li></%block>
|
||||
<%block name="menu_list">
|
||||
<%
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<%inherit file="dashboard.phtml"/>
|
||||
<%block name="content">
|
||||
<div class="title">
|
||||
Welcome to Paramecio Admin
|
||||
${_('Welcome to Paramecio Admin')}
|
||||
</div>
|
||||
<div class="cont">
|
||||
From here you can admin your site
|
||||
${_('From here you can admin your site')}
|
||||
</div>
|
||||
</%block>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<%inherit file="home.html"/>
|
||||
<%block name="content">
|
||||
<div class="title">
|
||||
${lang('admin', 'welcome_to_admin_dashboard', 'Welcome to Admin dashboard')}
|
||||
${_('Welcome to Admin dashboard')}
|
||||
</div>
|
||||
<div class="cont">
|
||||
${lang('admin', 'from_here_you_can_configure_your_site', 'From here you can configure your site')}.
|
||||
${_('From here you can configure your site')}.
|
||||
</div>
|
||||
</%block>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%block name="title">${lang('admin', 'login', 'Paramecio Login')}</%block></title>
|
||||
<title><%block name="title">${_('Paramecio Login')}</%block></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
||||
<link href="${make_media_url('css/login.css', 'admin')}" rel='stylesheet' type='text/css'>
|
||||
|
|
@ -58,25 +58,25 @@
|
|||
|
||||
if(data.hasOwnProperty('disable')) {
|
||||
|
||||
$('#username_error').html("${lang('common', 'error_disabled', 'Error, your user is disabled, you need support of web administration')}");
|
||||
$('#username_error').html("${_('Error, your user is disabled, you need support of web administration')}");
|
||||
|
||||
} if(data.hasOwnProperty('you_cannot_login')) {
|
||||
|
||||
if(data.you_cannot_login) {
|
||||
|
||||
$('#username_error').html("${lang('common', 'error_tries_disabled', 'Error, excessive tries, wait some minutes for login again')}");
|
||||
$('#username_error').html("${_('Error, excessive tries, wait some minutes for login again')}");
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$('#username_error').html("${lang('common', 'error_login', 'Error, wrong username or password')}");
|
||||
$('#username_error').html("${_('Error, wrong username or password')}");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$('#username_error').html("${lang('common', 'error_login', 'Error, wrong username or password')}");
|
||||
$('#username_error').html("${_('Error, wrong username or password')}");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -96,20 +96,20 @@
|
|||
<%block name="content">
|
||||
<form id="login">
|
||||
<div id="title">
|
||||
${lang('admin', 'login', 'Paramecio Login')}
|
||||
${_('Paramecio Login')}
|
||||
</div>
|
||||
${forms|n}
|
||||
<div class="form">
|
||||
${lang('admin', 'remember_login', 'Remember login?')} <input type="checkbox" id="remember_login" name="remember_login" value="1">
|
||||
${_('Remember login?')} <input type="checkbox" id="remember_login" name="remember_login" value="1">
|
||||
</div>
|
||||
<div id="submit_block">
|
||||
<input type="submit" value="${lang('common', 'login', 'Login')}" class="submit" id="login_submit"/>
|
||||
<input type="submit" value="${_('Login')}" class="submit" id="login_submit"/>
|
||||
<span id="loading"> </span>
|
||||
</div>
|
||||
% if yes_recovery_login:
|
||||
<div class="form"><a href="${url_for('.recovery_password')}">${lang('admin', 'recovery_password', 'Recovery password?')}</a></div>
|
||||
<div class="form"><a href="${url_for('.recovery_password')}">${_('Recovery password?')}</a></div>
|
||||
% endif
|
||||
<div class="form">${lang('admin', 'remember_tries', 'Remember that only have 3 attempts')}</div>
|
||||
<div class="form">${_('Remember that only have 3 attempts')}</div>
|
||||
</form>
|
||||
</%block>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<%inherit file="login.phtml"/>
|
||||
<%block name="title">${lang('admin', 'login', 'Paramecio Login')}</%block>
|
||||
<%block name="title">${_('Paramecio Login')}</%block>
|
||||
<%block name="content">
|
||||
<form id="login">
|
||||
<div id="title">
|
||||
${lang('admin', 'login', 'Paramecio Login')}
|
||||
${_('Paramecio Login')}
|
||||
</div>
|
||||
<div class="form">
|
||||
<p align="center">${lang('admin', 'check_your_email', 'Check your email for get instructions for complete login with double auth or')} <a href="${url_for('.logout')}">logout</a> and login again with other user</p>
|
||||
<p><label>${lang('admin', 'code', 'Code')} *</label><input type="text" class="" name="code" id="code_form" value="" /> <span class="error" id="code_error"></span></p>
|
||||
<p align="center">${_('Check your email for get instructions for complete login with double auth or')} <a href="${url_for('.logout')}">logout</a> and login again with other user</p>
|
||||
<p><label>${_('Code')} *</label><input type="text" class="" name="code" id="code_form" value="" /> <span class="error" id="code_error"></span></p>
|
||||
${csrf_token()|n}
|
||||
</div>
|
||||
<div id="submit_block">
|
||||
<input type="submit" value="${lang('common', 'send_code', 'Send code')}" class="submit" id="code_submit"/>
|
||||
<input type="submit" value="${_('Send code')}" class="submit" id="code_submit"/>
|
||||
<span id="loading"> </span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -60,17 +60,17 @@
|
|||
|
||||
if(data.hasOwnProperty('disable')) {
|
||||
|
||||
$('#code_error').html("${lang('common', 'error_disabled', 'Error, your user is disabled, you need support of web administration')}");
|
||||
$('#code_error').html("${_('Error, your user is disabled, you need support of web administration')}");
|
||||
|
||||
} else {
|
||||
|
||||
$('#code_error').html("${lang('common', 'error_wrong_code', 'Error, wrong code')}");
|
||||
$('#code_error').html("${_('Error, wrong code')}");
|
||||
|
||||
}
|
||||
|
||||
if(data.you_cannot_login) {
|
||||
|
||||
$('#code_error').html("${lang('common', 'error_tries_disabled', 'Error, excessive tries, wait some minutes for login again')}");
|
||||
$('#code_error').html("${_('Error, excessive tries, wait some minutes for login again')}");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,16 +48,16 @@
|
|||
});
|
||||
</script>
|
||||
</%block>
|
||||
<%block name="title">${lang('admin', 'sign_up', 'Paramecio Sign up')}</%block>
|
||||
<%block name="title">${_('Paramecio Sign up')}</%block>
|
||||
<%block name="content">
|
||||
<form id="login">
|
||||
<div id="title">
|
||||
${lang('admin', 'sign_up', 'Paramecio Sign up')}
|
||||
${_('Paramecio Sign up')}
|
||||
</div>
|
||||
${forms|n}
|
||||
<div id="result_register"></div>
|
||||
<div id="submit_block">
|
||||
<input type="submit" value="${lang('common', 'sign_up', 'Sign up')}" class="submit" id="register_submit"/>
|
||||
<input type="submit" value="${_('Sign up')}" class="submit" id="register_submit"/>
|
||||
<span id="loading"> </span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<%inherit file="dashboard.phtml"/>
|
||||
<%block name="content">
|
||||
<div class="title">
|
||||
Welcome to Paramecio Admin
|
||||
${_('Welcome to Paramecio Admin')}
|
||||
</div>
|
||||
<div class="cont">
|
||||
From here you can admin your site
|
||||
${_('From here you can admin your site')}
|
||||
</div>
|
||||
</%block>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue