Languages support

This commit is contained in:
Diego Najar 2015-07-03 19:36:37 -03:00
parent 8801ed0637
commit 970a41c61e
15 changed files with 139 additions and 110 deletions

View File

@ -35,4 +35,4 @@
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Add') ?>" name="add-user"> <input type="submit" class="btn btn-blue" value="<?php $Language->p('Add') ?>" name="add-user">
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a> <a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
</form> </form>

View File

@ -26,14 +26,14 @@
<?php if($_newPosts || $_newPages) { ?> <?php if($_newPosts || $_newPages) { ?>
<div class="dashboardBox"> <div class="dashboardBox">
<div class="content contentGreen"> <div class="content contentGreen">
<div class="bigContent">Database regenerated</div> <div class="bigContent"><?php $Language->p('database-regenerated') ?></div>
<div class="littleContent">New posts and pages synchronized.</div> <div class="littleContent"><?php $Language->p('new-posts-and-pages-synchronized') ?></div>
<i class="iconContent fa fa-pie-chart"></i> <i class="iconContent fa fa-pie-chart"></i>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<div class="dashboardBox"> <div class="dashboardBox">
<h2>Notifications</h2> <h2><?php $Language->p('notifications') ?></h2>
<div class="content"> <div class="content">
<nav class="nav"> <nav class="nav">
<ul> <ul>
@ -52,4 +52,4 @@
</div> </div>
</div> </div>

View File

@ -123,4 +123,4 @@ $(document).ready(function()
}); });
</script> </script>

View File

@ -20,7 +20,7 @@
} }
else else
{ {
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>'; echo '<p class="advOptions">'.$Language->p('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->p('settings-advanced-writting-settings').'</a></p>';
echo '<div id="jsadvancedOptions" style="display:none">'; echo '<div id="jsadvancedOptions" style="display:none">';
} }
?> ?>
@ -75,4 +75,4 @@ $(document).ready(function()
}); });
</script> </script>

View File

@ -1,10 +1,10 @@
<h2 class="title"><i class="fa fa-user"></i> Edit User</h2> <h2 class="title"><i class="fa fa-user"></i> <?php $Language->p('Edit user') ?></h2>
<nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#profile"> <nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#profile">
<ul> <ul>
<li><a href="#profile">Profile</a></li> <li><a href="#profile"><?php $Language->p('Profile') ?></a></li>
<li><a href="#email">Email</a></li> <li><a href="#email"><?php $Language->p('Email') ?></a></li>
<li><a href="#password">Password</a></li> <li><a href="#password"><?php $Language->p('Password') ?></a></li>
</ul> </ul>
</nav> </nav>
@ -17,12 +17,12 @@
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>"> <input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
<label> <label>
First name <?php $Language->p('First name') ?>
<input type="text" name="firstName" class="width-50" value="<?php echo $_user['firstName'] ?>"> <input type="text" name="firstName" class="width-50" value="<?php echo $_user['firstName'] ?>">
</label> </label>
<label> <label>
Last name <?php $Language->p('Last name') ?>
<input type="text" name="lastName" class="width-50" value="<?php echo $_user['lastName'] ?>"> <input type="text" name="lastName" class="width-50" value="<?php echo $_user['lastName'] ?>">
</label> </label>
@ -31,22 +31,22 @@
{ {
?> ?>
<label for="role"> <label for="role">
Role <?php $Language->p('Role') ?>
<select name="role" class="width-50"> <select name="role" class="width-50">
<?php <?php
$htmlOptions = array('admin'=>'Administrator', 'editor'=>'Editor'); $htmlOptions = array('admin'=>$Language->get('Administrator'), 'editor'=>$Language->get('Editor'));
foreach($htmlOptions as $value=>$text) { foreach($htmlOptions as $value=>$text) {
echo '<option value="'.$value.'"'.( ($_user['role']===$value)?' selected="selected"':'').'>'.$text.'</option>'; echo '<option value="'.$value.'"'.( ($_user['role']===$value)?' selected="selected"':'').'>'.$text.'</option>';
} }
?> ?>
</select> </select>
<div class="forms-desc">You can choose the user's privilege. The editor role only can write pages and posts.</div> <div class="forms-desc"><?php $Language->p('you-can-choose-the-users-privilege') ?></div>
</label> </label>
<?php <?php
} }
?> ?>
<input type="submit" class="btn btn-blue" value="Save" name="user-profile"> <input type="submit" class="btn btn-blue" value="Save" name="user-profile">
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn">Cancel</a> <a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
</form> </form>
</div> </div>
@ -59,13 +59,13 @@
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>"> <input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
<label> <label>
Email <?php $Language->p('Email') ?>
<input type="text" name="email" class="width-50" value="<?php echo $_user['email'] ?>"> <input type="text" name="email" class="width-50" value="<?php echo $_user['email'] ?>">
<div class="forms-desc">Email will not be publicly displayed. Recommended for recovery password and notifications.</div> <div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
</label> </label>
<input type="submit" class="btn btn-blue" value="Save" name="user-email"> <input type="submit" class="btn btn-blue" value="Save" name="user-email">
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn">Cancel</a> <a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
</form> </form>
</div> </div>
@ -78,16 +78,16 @@
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>"> <input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
<label> <label>
New Password <?php $Language->p('New password') ?>
<input type="password" name="password" class="width-50"> <input type="password" name="password" class="width-50">
</label> </label>
<label> <label>
Confirm the new Password <?php $Language->p('Confirm password') ?>
<input type="password" name="confirm-password" class="width-50"> <input type="password" name="confirm-password" class="width-50">
</label> </label>
<input type="submit" class="btn btn-blue" value="Save" name="user-password"> <input type="submit" class="btn btn-blue" value="Save" name="user-password">
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn">Cancel</a> <a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
</form> </form>
</div> </div>

View File

@ -1,13 +1,13 @@
<h2 class="title">Login</h2> <h2 class="title"><?php $Language->p('Login') ?></h2>
<form method="post" action="<?php echo HTML_PATH_ADMIN_ROOT.'login' ?>" class="forms" autocomplete="off"> <form method="post" action="<?php echo HTML_PATH_ADMIN_ROOT.'login' ?>" class="forms" autocomplete="off">
<label> <label>
<input type="text" name="username" placeholder="Username" class="width-100" autocomplete="off"> <input type="text" name="username" placeholder="<?php $Language->p('Username') ?>" class="width-100" autocomplete="off">
</label> </label>
<label> <label>
<input type="password" name="password" placeholder="Password" class="width-100" autocomplete="off"> <input type="password" name="password" placeholder="<?php $Language->p('Password') ?>" class="width-100" autocomplete="off">
</label> </label>
<p> <p>
<button class="btn btn-blue width-100">Log in</button> <button class="btn btn-blue width-100"><?php $Language->p('Login') ?></button>
</p> </p>
</form> </form>

View File

@ -1,12 +1,12 @@
<h2 class="title"><i class="fa fa-file-text-o"></i> Manage Pages</h2> <h2 class="title"><i class="fa fa-file-text-o"></i> <?php $Language->p('Manage pages') ?></h2>
<?php makeNavbar('manage'); ?> <?php makeNavbar('manage'); ?>
<table class="table-bordered table-stripped"> <table class="table-bordered table-stripped">
<thead> <thead>
<tr> <tr>
<th>Title</th> <th><?php $Language->p('Title') ?></th>
<th>Parent</th> <th><?php $Language->p('Parent') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -24,7 +24,7 @@
} }
echo '<tr>'; echo '<tr>';
echo '<td>'.($Page->parentKey()?NO_PARENT_CHAR:'').'<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'[DRAFT] ').($Page->title()?$Page->title():'[Empty title] ').'</a></td>'; echo '<td>'.($Page->parentKey()?NO_PARENT_CHAR:'').'<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'['.$Language->g('Draft').'] ').($Page->title()?$Page->title():'['.$Language->g('Empty title').'] ').'</a></td>';
echo '<td>'.$parentTitle.'</td>'; echo '<td>'.$parentTitle.'</td>';
echo '</tr>'; echo '</tr>';
} }
@ -32,4 +32,4 @@
?> ?>
</tbody> </tbody>
</table> </table>

View File

@ -1,13 +1,13 @@
<h2 class="title"><i class="fa fa-file-text-o"></i> Manage Posts</h2> <h2 class="title"><i class="fa fa-file-text-o"></i> <?php $Language->p('Manage posts') ?></h2>
<?php makeNavbar('manage'); ?> <?php makeNavbar('manage'); ?>
<table class="table-bordered table-stripped"> <table class="table-bordered table-stripped">
<thead> <thead>
<tr> <tr>
<th>Title</th> <th><?php $Language->p('Title') ?></th>
<th>Published date</th> <th><?php $Language->p('Published date') ?></th>
<th>Modified date</th> <th><?php $Language->p('Modified date') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -16,7 +16,7 @@
foreach($posts as $Post) foreach($posts as $Post)
{ {
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->published()?'':'[DRAFT] ').($Post->title()?$Post->title():'[Empty title] ').'</a></td>'; echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->published()?'':'['.$Language->g('Draft').'] ').($Post->title()?$Post->title():'['.$Language->g('Empty title').'] ').'</a></td>';
echo '<td>'.$Post->dateCreated().'</td>'; echo '<td>'.$Post->dateCreated().'</td>';
echo '<td>'.$Post->timeago().'</td>'; echo '<td>'.$Post->timeago().'</td>';
echo '</tr>'; echo '</tr>';
@ -24,4 +24,4 @@
?> ?>
</tbody> </tbody>
</table> </table>

View File

@ -1,4 +1,4 @@
<h2 class="title"><i class="fa fa-pencil"></i> New page</h2> <h2 class="title"><i class="fa fa-pencil"></i> <?php $Language->p('New page') ?></h2>
<form method="post" action="" class="forms"> <form method="post" action="" class="forms">
@ -18,7 +18,7 @@
} }
else else
{ {
echo '<p class="advOptions">'.$Language->p('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->p('settings-advanced-writting-settings').'</a></p>'; echo '<p class="advOptions">'.$Language->g('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
echo '<div id="jsadvancedOptions" style="display:none">'; echo '<div id="jsadvancedOptions" style="display:none">';
} }
?> ?>
@ -29,7 +29,7 @@
<?php $Language->p('Parent') ?> <?php $Language->p('Parent') ?>
<select id="jsparent" name="parent" class="width-50"> <select id="jsparent" name="parent" class="width-50">
<?php <?php
$htmlOptions[NO_PARENT_CHAR] = '('.$Language->p('No parent').')'; $htmlOptions[NO_PARENT_CHAR] = '('.$Language->g('No parent').')';
$htmlOptions += $dbPages->parentKeyList(); $htmlOptions += $dbPages->parentKeyList();
foreach($htmlOptions as $value=>$text) { foreach($htmlOptions as $value=>$text) {
echo '<option value="'.$value.'">'.$text.'</option>'; echo '<option value="'.$value.'">'.$text.'</option>';

View File

@ -1,4 +1,4 @@
<h2 class="title"><i class="fa fa-pencil"></i> New post</h2> <h2 class="title"><i class="fa fa-pencil"></i> <?php $Language->p('New post') ?></h2>
<form method="post" action="" class="forms"> <form method="post" action="" class="forms">
@ -18,7 +18,7 @@
} }
else else
{ {
echo '<p class="advOptions">'.$Language->p('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->p('settings-advanced-writting-settings').'</a></p>'; echo '<p class="advOptions">'.$Language->g('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
echo '<div id="jsadvancedOptions" style="display:none">'; echo '<div id="jsadvancedOptions" style="display:none">';
} }
?> ?>

View File

@ -1,4 +1,4 @@
<h2 class="title"><i class="fa fa-rocket"></i> Plugins</h2> <h2 class="title"><i class="fa fa-rocket"></i> <?php $Language->p('Plugins') ?></h2>
<?php <?php
foreach($plugins['all'] as $Plugin) foreach($plugins['all'] as $Plugin)
@ -9,12 +9,12 @@
echo '<p>'.$Plugin->description().'</p>'; echo '<p>'.$Plugin->description().'</p>';
if($Plugin->installed()) { if($Plugin->installed()) {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-small">Uninstall plugin</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-small">'.$Language->g('Uninstall plugin').'</a>';
} }
else { else {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$Plugin->className().'" class="btn btn-blue btn-small">Install plugin</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$Plugin->className().'" class="btn btn-blue btn-small">'.$Language->g('Install plugin').'</a>';
} }
echo '</div>'; echo '</div>';
} }
?> ?>

View File

@ -1,11 +1,11 @@
<h2 class="title"><i class="fa fa-cogs"></i> Settings</h2> <h2 class="title"><i class="fa fa-cogs"></i> <?php $Language->p('Settings') ?></h2>
<nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#general"> <nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#general">
<ul> <ul>
<li class="active"><a href="#general">General</a></li> <li class="active"><a href="#general"><?php $Language->p('General') ?></a></li>
<li><a href="#advanced">Advanced</a></li> <li><a href="#advanced"><?php $Language->p('Advanced') ?></a></li>
<li><a href="#regional">Regional</a></li> <li><a href="#regional"><?php $Language->p('Regional') ?></a></li>
<li><a href="#about">About</a></li> <li><a href="#about"><?php $Language->p('About') ?></a></li>
</ul> </ul>
</nav> </nav>
@ -16,30 +16,30 @@
<div id="general"> <div id="general">
<form method="post" action="" class="forms"> <form method="post" action="" class="forms">
<label> <label>
Site title <?php $Language->p('Site title') ?>
<input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>"> <input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>">
<div class="forms-desc">Use this field to name your site, it will appear at the top of every page of your site.</div> <div class="forms-desc"><?php $Language->p('use-this-field-to-name-your-site') ?></div>
</label> </label>
<label> <label>
Site slogan <?php $Language->p('Site slogan') ?>
<input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>"> <input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>">
<div class="forms-desc">Use this field to add a catchy prhase on your site.</div> <div class="forms-desc"><?php $Language->p('use-this-field-to-add-a-catchy-prhase') ?></div>
</label> </label>
<label> <label>
Site description <?php $Language->p('Site description') ?>
<input type="text" name="description" class="width-50" value="<?php echo $Site->description() ?>"> <input type="text" name="description" class="width-50" value="<?php echo $Site->description() ?>">
<div class="forms-desc">You can add a site description to provide a short bio or description of your site.</div> <div class="forms-desc"><?php $Language->p('you-can-add-a-site-description-to-provide') ?></div>
</label> </label>
<label> <label>
Footer text <?php $Language->p('Footer text') ?>
<input type="text" name="footer" class="width-50" value="<?php echo $Site->footer() ?>"> <input type="text" name="footer" class="width-50" value="<?php echo $Site->footer() ?>">
<div class="forms-desc">You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.</div> <div class="forms-desc"><?php $Language->p('you-can-add-a-small-text-on-the-bottom') ?></div>
</label> </label>
<input type="submit" class="btn" value="Save" name="form-general"> <input type="submit" class="btn" value="<?php $Language->p('Save') ?>" name="form-general">
</form> </form>
</div> </div>
@ -47,10 +47,11 @@
<!-- ===================================== --> <!-- ===================================== -->
<!-- Advanced Settings --> <!-- Advanced Settings -->
<!-- ===================================== --> <!-- ===================================== -->
<div id="advanced"> <div id="advanced">
<form method="post" action="" class="forms"> <form method="post" action="" class="forms">
<label for="postsperpage"> <label for="postsperpage">
Posts per page <?php $Language->p('Posts per page') ?>
<select name="postsperpage" class="width-50"> <select name="postsperpage" class="width-50">
<?php <?php
$htmlOptions = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8'); $htmlOptions = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8');
@ -59,46 +60,46 @@
} }
?> ?>
</select> </select>
<div class="forms-desc">Number of posts to show per page.</div> <div class="forms-desc"><?php $Language->p('number-of-posts-to-show-per-page') ?></div>
</label> </label>
<label> <label>
Site URL <?php $Language->p('Site URL') ?>
<input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>"> <input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>">
<div class="forms-desc">The URL of your site.</div> <div class="forms-desc"><?php $Language->p('the-url-of-your-site') ?></div>
</label> </label>
<h4>Writting Settings</h4> <h4><?php $Language->p('Writting settings') ?></h4>
<ul class="forms-list"> <ul class="forms-list">
<li> <li>
<input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>> <input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>>
<label for="advancedOptions">Advanced options</label> <label for="advancedOptions"><?php $Language->p('Advanced options') ?></label>
<div class="forms-desc">Add or edit description, tags or modify the friendly URL.</div> <div class="forms-desc"><?php $Language->p('add-or-edit-description-tags-or') ?></div>
</li> </li>
</ul> </ul>
<h4>URL Filters</h4> <h4><?php $Language->p('URL Filters') ?></h4>
<label> <label>
<div class="input-groups width-50"> <div class="input-groups width-50">
<span class="input-prepend">Post</span><input type="text" name="uriPost" value="<?php echo $Site->uriFilters('post') ?>"> <span class="input-prepend"><?php $Language->p('Posts') ?></span><input type="text" name="uriPost" value="<?php echo $Site->uriFilters('post') ?>">
</div> </div>
</label> </label>
<label> <label>
<div class="input-groups width-50"> <div class="input-groups width-50">
<span class="input-prepend">Page</span><input type="text" name="uriPage" value="<?php echo $Site->uriFilters('page') ?>"> <span class="input-prepend"><?php $Language->p('Pages') ?></span><input type="text" name="uriPage" value="<?php echo $Site->uriFilters('page') ?>">
</div> </div>
</label> </label>
<label> <label>
<div class="input-groups width-50"> <div class="input-groups width-50">
<span class="input-prepend">Tag</span><input type="text" name="uriTag" value="<?php echo $Site->uriFilters('tag') ?>"> <span class="input-prepend"><?php $Language->p('Tags') ?></span><input type="text" name="uriTag" value="<?php echo $Site->uriFilters('tag') ?>">
</div> </div>
</label> </label>
<input type="submit" class="btn" value="Save" name="form-advanced"> <input type="submit" class="btn" value="<?php $Language->p('Save') ?>" name="form-advanced">
</form> </form>
</div> </div>
@ -110,7 +111,7 @@
<div id="regional"> <div id="regional">
<form method="post" action="" class="forms" name="form-regional"> <form method="post" action="" class="forms" name="form-regional">
<label for="jslanguage"> <label for="jslanguage">
Language <?php $Language->p('Language') ?>
<select id="jslanguage" name="language" class="width-50"> <select id="jslanguage" name="language" class="width-50">
<?php <?php
$htmlOptions = $Language->getLanguageList(); $htmlOptions = $Language->getLanguageList();
@ -119,11 +120,11 @@
} }
?> ?>
</select> </select>
<div class="forms-desc">Select your site's language.</div> <div class="forms-desc"><?php $Language->p('select-your-sites-language') ?></div>
</label> </label>
<label for="jstimezone"> <label for="jstimezone">
Timezone <?php $Language->p('Timezone') ?>
<select id="jstimezone" name="timezone" class="width-50"> <select id="jstimezone" name="timezone" class="width-50">
<?php <?php
$htmlOptions = Date::timezoneList(); $htmlOptions = Date::timezoneList();
@ -132,16 +133,16 @@
} }
?> ?>
</select> </select>
<div class="forms-desc">Select a timezone for a correct date/time display on your site.</div> <div class="forms-desc"><?php $Language->p('select-a-timezone-for-a-correct') ?></div>
</label> </label>
<label> <label>
Locale <?php $Language->p('Locale') ?>
<input id="jslocale" type="text" name="locale" class="width-50" value="<?php echo $Site->locale() ?>"> <input id="jslocale" type="text" name="locale" class="width-50" value="<?php echo $Site->locale() ?>">
<div class="forms-desc">You can use this field to define a set of parameters related to the languege, country and special preferences.</div> <div class="forms-desc"><?php $Language->p('you-can-use-this-field-to-define-a-set-of') ?></div>
</label> </label>
<input type="submit" class="btn" value="Save" name="form-regional"> <input type="submit" class="btn" value="<?php $Language->p('Save') ?>" name="form-regional">
</form> </form>
</div> </div>
@ -164,4 +165,4 @@ $(document).ready(function() {
<div id="about"> <div id="about">
<p><i class="fa fa-pencil-square-o"></i> Bludit version <?php echo BLUDIT_VERSION.' ('.BLUDIT_RELEASE_DATE.')' ?></p> <p><i class="fa fa-pencil-square-o"></i> Bludit version <?php echo BLUDIT_VERSION.' ('.BLUDIT_RELEASE_DATE.')' ?></p>
</div> </div>

View File

@ -1,16 +1,16 @@
<h2 class="title"><i class="fa fa-users"></i> Users</h2> <h2 class="title"><i class="fa fa-users"></i> <?php $Language->p('Users') ?></h2>
<?php makeNavbar('users'); ?> <?php makeNavbar('users'); ?>
<table class="table-bordered table-stripped"> <table class="table-bordered table-stripped">
<thead> <thead>
<tr> <tr>
<th>Username</th> <th><?php $Language->p('Username') ?></th>
<th>First Name</th> <th><?php $Language->p('First name') ?></th>
<th>Last Name</th> <th><?php $Language->p('Last name') ?></th>
<th>Role</th> <th><?php $Language->p('Role') ?></th>
<th>Email</th> <th><?php $Language->p('Email') ?></th>
<th>Registered</th> <th><?php $Language->p('Registered') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -29,4 +29,4 @@
} }
?> ?>
</tbody> </tbody>
</table> </table>

View File

@ -46,9 +46,9 @@ class dbLanguage extends dbJSON
} }
// Return the translation, if the translation does'n exist then return the English translation. // Return the translation, if the translation does'n exist then return the English translation.
public function get($text) public function get($string)
{ {
$key = Text::lowercase($text); $key = Text::lowercase($string);
$key = Text::replace(' ', '-', $key); $key = Text::replace(' ', '-', $key);
if(isset($this->db[$key])) if(isset($this->db[$key]))
@ -58,10 +58,20 @@ class dbLanguage extends dbJSON
return $this->en_US[$key]; return $this->en_US[$key];
} }
// Print the translation. public function g($string)
public function p($text)
{ {
echo $this->get($text); return $this->get($string);
}
public function print($string)
{
echo $this->get($string);
}
// Print the translation.
public function p($string)
{
$this->print($string);
} }
public function add($array) public function add($array)
@ -69,4 +79,4 @@ class dbLanguage extends dbJSON
$this->db[] = $array; $this->db[] = $array;
} }
} }

View File

@ -16,7 +16,7 @@
"dashboard": "Dashboard", "dashboard": "Dashboard",
"role": "Role", "role": "Role",
"posts": "Posts", "posts": "Posts",
"Users": "Users", "users": "Users",
"administrator": "Administrator", "administrator": "Administrator",
"add": "Add", "add": "Add",
"cancel": "Cancel", "cancel": "Cancel",
@ -25,10 +25,7 @@
"no-parent": "No parent", "no-parent": "No parent",
"edit-page": "Edit page", "edit-page": "Edit page",
"edit-post": "Edit post", "edit-post": "Edit post",
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
"email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.",
"add-a-new-user": "Add a new user", "add-a-new-user": "Add a new user",
"html-markdown-code-supported": "HTML and Markdown code supported.",
"parent": "Parent", "parent": "Parent",
"friendly-url": "Friendly URL", "friendly-url": "Friendly URL",
"description": "Description", "description": "Description",
@ -37,15 +34,36 @@
"save": "Save", "save": "Save",
"draft": "Draft", "draft": "Draft",
"delete": "Delete", "delete": "Delete",
"registered": "Registered",
"Notifications": "notifications",
"profile": "Profile",
"email": "Email",
"edit-user": "Edit user",
"publish-now": "Publish now",
"first-name": "First name",
"last-name": "Last name",
"manage-pages": "Manage pages",
"advanced-options": "Advanced options", "advanced-options": "Advanced options",
"database-regenerated": "Database regenerated",
"html-markdown-code-supported": "HTML and Markdown code supported.",
"enable-more-features-at": "Enable more features at", "enable-more-features-at": "Enable more features at",
"settings-advanced-writting-settings": "Settings->Advanced->Writting Settings", "settings-advanced-writting-settings": "Settings->Advanced->Writting Settings",
"publish-now": "Publish now", "new-posts-and-pages-synchronized": "New posts and pages synchronized.",
"delete": "Delete", "you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
"delete": "Delete", "email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.",
"delete": "Delete", "use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.",
"delete": "Delete", "use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.",
"delete": "Delete", "you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.",
"delete": "Delete" "you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.",
"the-url-of-your-site": "The URL of your site.",
"add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.",
"select-your-sites-language": "Select your site's language.",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.",
"email": "Email",
"email": "Email",
"email": "Email",
"email": "Email",
"email": "Email"
} }