languages updates

This commit is contained in:
Diego Najar 2018-08-08 00:16:35 +02:00
parent 942f3c04cb
commit 551614e7cc
15 changed files with 63 additions and 38 deletions

View File

@ -1,8 +1,11 @@
<!-- Check if the user is logged -->
<script>
<!-- DEBUG: Each request increase the count of simple stats -->
<!-- <script>
setInterval(
function() {
var ajax = new bluditAjax();
ajax.userLogged(showAlert);
}, 15000);
</script>
</script> -->

View File

@ -3,7 +3,7 @@
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
echo Bootstrap::link(array(
'title'=>'Add a new category',
'title'=>$L->g('Add a new category'),
'href'=>HTML_PATH_ADMIN_ROOT.'new-category',
'icon'=>'plus'
));
@ -12,8 +12,8 @@ echo '
<table class="table table-striped mt-3">
<thead>
<tr>
<th class="border-bottom-0" scope="col">Name</th>
<th class="border-bottom-0" scope="col">URL</th>
<th class="border-bottom-0" scope="col">'.$L->g('Name').'</th>
<th class="border-bottom-0" scope="col">'.$L->g('URL').'</th>
</tr>
</thead>
<tbody>

View File

@ -4,24 +4,24 @@
<!-- Quick Links -->
<div class="container border-bottom pb-4">
<h4 class="pb-3">Quick links</h4>
<h4 class="pb-3"><?php $L->p('Quick links') ?></h4>
<div class="row">
<div class="col">
<a class="quick-links text-center" style="color: #4586d4" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
<div class="oi oi-justify-left quick-links-icons"></div>
<div>New content</div>
<div><?php $L->p('New content') ?></div>
</a>
</div>
<div class="col border-left border-right">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
<div class="oi oi-tags quick-links-icons"></div>
<div>Categories</div>
<div><?php $L->p('Categories') ?></div>
</a>
</div>
<div class="col">
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>">
<div class="oi oi-people quick-links-icons"></div>
<div>Users</div>
<div><?php $L->p('Users') ?></div>
</a>
</div>
</div>
@ -31,19 +31,19 @@
<div class="col">
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
<div class="oi oi-compass quick-links-icons"></div>
<div>Documentation</div>
<div><?php $L->p('Documentation') ?></div>
</a>
</div>
<div class="col border-left border-right">
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
<div class="oi oi-loop-square quick-links-icons"></div>
<div>Forum support</div>
<div><?php $L->p('Forum support') ?></div>
</a>
</div>
<div class="col">
<a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support">
<div class="oi oi-chat quick-links-icons"></div>
<div>Chat support</div>
<div><?php $L->p('Chat support') ?></div>
</a>
</div>
</div>
@ -55,7 +55,7 @@
<!-- Notifications -->
<ul class="list-group list-group-striped b-0">
<li class="list-group-item pt-0"><h4>Notifications</h4></li>
<li class="list-group-item pt-0"><h4><?php $L->p('Notifications') ?></h4></li>
<?php
$logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT);
foreach ($logs as $log) {
@ -67,7 +67,7 @@
}
echo '<br><span class="notification-date"><small>';
echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT);
echo ' - by '.$log['username'];
echo ' [ '.$log['username'] .' ]';
echo '</small></span>';
echo '</li>';
}

View File

@ -11,7 +11,7 @@ echo Bootstrap::formOpen(array());
echo Bootstrap::formInputTextBlock(array(
'name'=>'category',
'label'=>$L->g('Category name'),
'label'=>$L->g('Name'),
'value'=>isset($_POST['category'])?$_POST['category']:'',
'class'=>'',
'placeholder'=>'',
@ -20,8 +20,8 @@ echo Bootstrap::formOpen(array());
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2">Save</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">Cancel</a>
<button type="submit" class="btn btn-primary mr-2">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a>
</div>
';

View File

@ -176,7 +176,7 @@
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
));
echo Bootstrap::formTitle(array('title'=>'SEO'));
echo Bootstrap::formTitle(array('title'=>$L->g('SEO')));
// Tags
echo Bootstrap::formInputText(array(
@ -191,7 +191,7 @@
'name'=>'slug',
'tip'=>$L->g('URL associated with the content'),
'label'=>$L->g('Friendly URL'),
'placeholder'=>'Leave empty for autocomplete by Bludit.'
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.')
));
echo Bootstrap::formCheckbox(array(

View File

@ -7,19 +7,19 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
<!-- TABS -->
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="general" aria-selected="true">General</a>
<a class="nav-link active" id="general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="general" aria-selected="true"><?php $L->p('General') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="advanced" aria-selected="false">Advanced</a>
<a class="nav-link " id="advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="advanced" aria-selected="false"><?php $L->p('Advanced') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="seo" aria-selected="false">SEO</a>
<a class="nav-link " id="seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="seo" aria-selected="false"><?php $L->p('SEO') ?></a>
</li>
<li class="nav-item">
<a class="nav-link " id="social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="social" aria-selected="false">Social Networks</a>
<a class="nav-link " id="social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
</li>
<li class="nav-item">
<a class="nav-link" id="language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="language" aria-selected="false">Language</a>
<a class="nav-link" id="language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="language" aria-selected="false"><?php $L->p('Language') ?></a>
</li>
</ul>
<?php

View File

@ -82,8 +82,8 @@ class Language extends dbJSON {
return $this->db[$key];
}
$line = '"'.$key.'": "'.$string.'",';
file_put_contents(DEBUG_FILE, $line.PHP_EOL, FILE_APPEND);
//$line = '"'.$key.'": "'.$string.'",';
//file_put_contents(DEBUG_FILE, $line.PHP_EOL, FILE_APPEND);
return $string;
}

View File

@ -342,5 +342,12 @@
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Allow Unicode characters in the URL and some part of the system.",
"variables-allowed": "Variables allowed",
"tag": "Tag",
"drag-and-drop-to-sort-the-plugins": "Drag and Drop to sort the plugins."
"drag-and-drop-to-sort-the-plugins": "Drag and Drop to sort the plugins.",
"seo": "SEO",
"documentation": "Documentation",
"forum-support": "Forum support",
"chat-support": "Chat support",
"quick-links": "Quick links",
"leave-empty-for-autocomplete-by-bludit": "Leave empty for autocomplete by Bludit.",
"choose-a-password-for-the-user-admin": "Choose a password for the user <code>admin</code>"
}

View File

@ -307,7 +307,7 @@
"social-networks": "Redes sociales",
"interval": "Intervalo",
"number-in-minutes-for-every-execution-of-autosave": "Número en minutos para cada ejecución de Autoguardar.",
"extreme-friendly-url": "Extreme friendly URL",
"extreme-friendly-url": "URL amistosas",
"title-formats": "Formatos de los títulos",
"delete-content": "Eliminar contenido",
"are-you-sure-you-want-to-delete-this-page": "¿Confirma que desea eliminar esta página?",
@ -340,5 +340,11 @@
"allow-unicode-characters-in-the-url-and-some-part-of-the-system": "Permitir caracteres Unicode en la dirección URL y en alguna parte del sistema.",
"variables-allowed": "Variables permitidas",
"tag": "Etiqueta",
"drag-and-drop-to-sort-the-plugins": "Arrastrar y soltar para ordenar los plugins."
"drag-and-drop-to-sort-the-plugins": "Arrastrar y soltar para ordenar los plugins.",
"seo": "SEO",
"documentation": "Documentation",
"forum-support": "Forum support",
"chat-support": "Chat support",
"quick-links": "Enlaces rápidos",
"leave-empty-for-autocomplete-by-bludit": "Deje vacío para ser autocompletado por Bludit."
}

View File

@ -49,7 +49,7 @@ class pluginRSS extends Plugin {
$onlyPublished = true;
// Get the list of pages
$list = $pages->getList($pageNumber, $numberOfItems, $onlyPublished, true);
$list = $pages->getList($pageNumber, $numberOfItems, $onlyPublished);
$xml = '<?xml version="1.0" encoding="UTF-8" ?>';
$xml .= '<rss version="2.0">';

View File

@ -3,5 +3,8 @@
{
"name": "Simple Stats",
"description": "Show the number of visitors per day on your dashboard."
}
},
"visits": "Visits",
"visits-today": "Visits today",
"unique-visitors-today": "Unique visitors today"
}

View File

@ -3,5 +3,8 @@
{
"name": "Simple Stats",
"description": "Muestra el número de visitantes por día en tu panel."
}
},
"visits": "Visitas",
"visits-today": "Visitas de hoy",
"unique-visitors-today": "Visitantes únicos de hoy"
}

View File

@ -10,9 +10,11 @@ class pluginSimpleStats extends Plugin {
public function init()
{
global $L;
// Fields and default values for the database of this plugin
$this->dbFields = array(
'label'=>'Visits',
'label'=>$L->g('Visits'),
'numberOfDays'=>7,
'excludeAdmins'=>false
);
@ -63,6 +65,7 @@ class pluginSimpleStats extends Plugin {
public function dashboard()
{
global $L;
$label = $this->getValue('label');
$currentDate = Date::current('Y-m-d');
$visitsToday = $this->visits($currentDate);
@ -75,8 +78,8 @@ $html = <<<EOF
<div class="row">
<div class="col">
<div class="ct-chart ct-perfect-fourth"></div>
<p class="legends visits-today">Visits today: $visitsToday</p>
<p class="legends unique-today">Unique visitors today: $uniqueVisitors</p>
<p class="legends visits-today">{$L->g('Visits today')}: $visitsToday</p>
<p class="legends unique-today">{$L->g('Unique visitors today')}: $uniqueVisitors</p>
</div>
</div>
</div>

View File

@ -155,7 +155,7 @@ foreach ($languageFiles as $fname=>$native) {
}
}
$language = new Language($finalLanguage);
$L = $language = new Language($finalLanguage);
// Set locale
setlocale(LC_ALL, $localeFromHTTP);
@ -591,7 +591,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
elseif (isset($_GET['language']))
{
?>
<p><?php echo $L->get('Choose a password for the username admin') ?></p>
<p><?php echo $L->get('choose-a-password-for-the-user-admin') ?></p>
<form id="jsformInstaller" method="post" action="" autocomplete="off">
<input type="hidden" name="timezone" id="jstimezone" value="UTC">