Go on with translations

This commit is contained in:
Flavio Copes
2015-08-11 14:00:31 +02:00
parent 1efd0622a4
commit b4af153baa
3 changed files with 70 additions and 20 deletions

View File

@@ -118,7 +118,7 @@ class Popularity
$data = array(); $data = array();
foreach ($chart_data as $date => $count) { foreach ($chart_data as $date => $count) {
$labels[] = date('D', strtotime($date)); $labels[] = self::getGrav()['grav']['language']->translate(['PLUGIN_ADMIN_' . strtoupper(date('D', strtotime($date)))]);
$data[] = $count; $data[] = $count;
} }

View File

@@ -67,6 +67,31 @@ en:
PLUGIN_ADMIN_BACK_TO_THEMES: Back to Themes PLUGIN_ADMIN_BACK_TO_THEMES: Back to Themes
PLUGIN_ADMIN_CHECK_FOR_UPDATES: Check for Updates PLUGIN_ADMIN_CHECK_FOR_UPDATES: Check for Updates
PLUGIN_ADMIN_ADD: Add PLUGIN_ADMIN_ADD: Add
PLUGIN_ADMIN_CLEAR_CACHE: Clear Cache
PLUGIN_ADMIN_CLEAR_CACHE_ALL_CACHE: All Cache
PLUGIN_ADMIN_CLEAR_CACHE_ASSETS_ONLY: Assets Only
PLUGIN_ADMIN_CLEAR_CACHE_IMAGES_ONLY: Images Only
PLUGIN_ADMIN_CLEAR_CACHE_CACHE_ONLY: Cache Only
PLUGIN_ADMIN_CHECK_FOR_UPDATES: Check for Updates
PLUGIN_ADMIN_DASHBOARD: Dashboard
PLUGIN_ADMIN_UPDATES_AVAILABLE: Updates Available
PLUGIN_ADMIN_DAYS: Days
PLUGIN_ADMIN_UPDATE: Update
PLUGIN_ADMIN_BACKUP: Backup
PLUGIN_ADMIN_STATISTICS: Statistics
PLUGIN_ADMIN_TODAY: Today
PLUGIN_ADMIN_WEEK: Week
PLUGIN_ADMIN_MONTH: Month
PLUGIN_ADMIN_LATEST_PAGE_UPDATES: Latest Page Updates
PLUGIN_ADMIN_MAINTENANCE: Maintenance
PLUGIN_ADMIN_UPDATED: Updated
PLUGIN_ADMIN_MON: Mon
PLUGIN_ADMIN_TUE: Tue
PLUGIN_ADMIN_WED: Wed
PLUGIN_ADMIN_THU: Thu
PLUGIN_ADMIN_FRI: Fri
PLUGIN_ADMIN_SAT: Sat
PLUGIN_ADMIN_SUN: Sun
es: es:
ADMIN_BETA_MSG: ¡Está es una versión Beta! Utilízala bajo tu propio riesgo... ADMIN_BETA_MSG: ¡Está es una versión Beta! Utilízala bajo tu propio riesgo...
@@ -159,3 +184,28 @@ it:
PLUGIN_ADMIN_BACK_TO_THEMES: Torna ai temi PLUGIN_ADMIN_BACK_TO_THEMES: Torna ai temi
PLUGIN_ADMIN_CHECK_FOR_UPDATES: Controlla aggiornamenti PLUGIN_ADMIN_CHECK_FOR_UPDATES: Controlla aggiornamenti
PLUGIN_ADMIN_ADD: Aggiungi PLUGIN_ADMIN_ADD: Aggiungi
PLUGIN_ADMIN_CLEAR_CACHE: Pulisci cache
PLUGIN_ADMIN_CLEAR_CACHE_ALL_CACHE: Tutta la cache
PLUGIN_ADMIN_CLEAR_CACHE_ASSETS_ONLY: Solo asset
PLUGIN_ADMIN_CLEAR_CACHE_IMAGES_ONLY: Solo immagini
PLUGIN_ADMIN_CLEAR_CACHE_CACHE_ONLY: Solo cache
PLUGIN_ADMIN_CHECK_FOR_UPDATES: Controlla aggiornamenti
PLUGIN_ADMIN_DASHBOARD: Dashboard
PLUGIN_ADMIN_UPDATES_AVAILABLE: Aggiornamenti disponibili
PLUGIN_ADMIN_DAYS: Giorni
PLUGIN_ADMIN_UPDATE: Aggiorna
PLUGIN_ADMIN_BACKUP: Backup
PLUGIN_ADMIN_STATISTICS: Statistiche
PLUGIN_ADMIN_TODAY: Oggi
PLUGIN_ADMIN_WEEK: Settimana
PLUGIN_ADMIN_MONTH: Mese
PLUGIN_ADMIN_LATEST_PAGE_UPDATES: Ultimi aggiornamenti pagine
PLUGIN_ADMIN_MAINTENANCE: Manutenzione
PLUGIN_ADMIN_UPDATED: Aggiornato
PLUGIN_ADMIN_MON: Lun
PLUGIN_ADMIN_TUE: Mar
PLUGIN_ADMIN_WED: Mer
PLUGIN_ADMIN_THU: Gio
PLUGIN_ADMIN_FRI: Ven
PLUGIN_ADMIN_SAT: Sab
PLUGIN_ADMIN_SUN: Dom

View File

@@ -3,20 +3,20 @@
{% block titlebar %} {% block titlebar %}
<div class="button-bar"> <div class="button-bar">
<div class="button-group"> <div class="button-group">
<button data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache" class="button"><i class="fa fa-trash"></i> Clear Cache</button> <button data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache" class="button"><i class="fa fa-trash"></i> {{ "PLUGIN_ADMIN_CLEAR_CACHE"|t }}</button>
<button type="button" class="button dropdown-toggle" data-toggle="dropdown"> <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-caret-down"></i> <i class="fa fa-caret-down"></i>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:all" href="#">All Cache</a></li> <li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:all" href="#">{{ "PLUGIN_ADMIN_CLEAR_CACHE_ALL_CACHE"|t }}</a></li>
<li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:assets-only" href="#">Assets Only</a></li> <li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:assets-only" href="#">{{ "PLUGIN_ADMIN_CLEAR_CACHE_ASSETS_ONLY"|t }}</a></li>
<li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:images-only" href="#">Images Only</a></li> <li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:images-only" href="#">{{ "PLUGIN_ADMIN_CLEAR_CACHE_IMAGES_ONLY"|t }}</a></li>
<li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:cache-only" href="#">Cache Only</a></li> <li><a data-clear-cache="{{ base_url_relative }}/cache.json/task{{ config.system.param_sep }}clearCache/cleartype:cache-only" href="#">{{ "PLUGIN_ADMIN_CLEAR_CACHE_CACHE_ONLY"|t }}</a></li>
</ul> </ul>
</div> </div>
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> Check for Updates</button> <button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN_CHECK_FOR_UPDATES"|t }}</button>
</div> </div>
<h1><i class="fa fa-fw fa-th"></i> Dashboard</h1> <h1><i class="fa fa-fw fa-th"></i> {{ "PLUGIN_ADMIN_DASHBOARD"|t }}</h1>
{% endblock %} {% endblock %}
{% block messages %}{% endblock %} {% block messages %}{% endblock %}
@@ -30,14 +30,14 @@
<div id="admin-dashboard"> <div id="admin-dashboard">
<div id="updates" class="dashboard-item dashboard-left"> <div id="updates" class="dashboard-item dashboard-left">
<div class="tertiary-accent default-box-shadow"> <div class="tertiary-accent default-box-shadow">
<h1>Maintenance</h1> <h1>{{ "PLUGIN_ADMIN_MAINTENANCE"|t }}</h1>
<div class="admin-update-charts"> <div class="admin-update-charts">
<div class="updates-chart"> <div class="updates-chart">
<div class="chart-wrapper"> <div class="chart-wrapper">
<div class="ct-chart"></div> <div class="ct-chart"></div>
<span class="numeric"><span>-</span><em>updated</em></span> <span class="numeric"><span>-</span><em>{{ "PLUGIN_ADMIN_UPDATED"|t|lower }}</em></span>
</div> </div>
<p>Updates Available</p> <p>{{ "PLUGIN_ADMIN_UPDATES_AVAILABLE"|t }}</p>
</div> </div>
<div class="backups-chart"> <div class="backups-chart">
<div class="chart-wrapper"> <div class="chart-wrapper">
@@ -56,20 +56,20 @@
}; };
Chartist.Pie('.backups-chart .ct-chart', data, options); Chartist.Pie('.backups-chart .ct-chart', data, options);
</script> </script>
<span class="numeric">{{ backup.days }}<em>days</em></span> <span class="numeric">{{ backup.days }}<em>{{ "PLUGIN_ADMIN_DAYS"|t|lower }}</em></span>
</div> </div>
<p>Last Backup</p> <p>Last Backup</p>
</div> </div>
</div> </div>
<div class="flush-bottom button-bar"> <div class="flush-bottom button-bar">
<button data-maintenance-update="{{ base_url_relative }}/update.json/task{{ config.system.param_sep }}update" class="button"><i class="fa fa-cloud-download"></i> Update</button> <button data-maintenance-update="{{ base_url_relative }}/update.json/task{{ config.system.param_sep }}update" class="button"><i class="fa fa-cloud-download"></i> {{ "PLUGIN_ADMIN_UPDATE"|t }}</button>
<button data-ajax="{{ base_url_relative }}/backup.json/task{{ config.system.param_sep }}backup" class="button"><i class="fa fa-database"></i> Backup</button> <button data-ajax="{{ base_url_relative }}/backup.json/task{{ config.system.param_sep }}backup" class="button"><i class="fa fa-database"></i> {{ "PLUGIN_ADMIN_BACKUP"|t }}</button>
</div> </div>
</div> </div>
</div> </div>
<div id="popularity" class="dashboard-item dashboard-right"> <div id="popularity" class="dashboard-item dashboard-right">
<div class="secondary-accent default-box-shadow"> <div class="secondary-accent default-box-shadow">
<h1>Statistics</h1> <h1>{{ "PLUGIN_ADMIN_STATISTICS"|t }}</h1>
<div class="ct-chart"></div> <div class="ct-chart"></div>
<script> <script>
var data = { var data = {
@@ -105,15 +105,15 @@
<div class="flush-bottom button-bar stats-bar"> <div class="flush-bottom button-bar stats-bar">
<span class="stat"> <span class="stat">
<b>{{ popularity.getDailyTotal }}</b> <b>{{ popularity.getDailyTotal }}</b>
<i>Today</i> <i>{{ "PLUGIN_ADMIN_TODAY"|t }}</i>
</span> </span>
<span class="stat"> <span class="stat">
<b>{{ popularity.getWeeklyTotal }}</b> <b>{{ popularity.getWeeklyTotal }}</b>
<i>Week</i> <i>{{ "PLUGIN_ADMIN_WEEK"|t }}</i>
</span> </span>
<span class="stat"> <span class="stat">
<b>{{ popularity.getMonthlyTotal }}</b> <b>{{ popularity.getMonthlyTotal }}</b>
<i>Month</i> <i>{{ "PLUGIN_ADMIN_MONTH"|t }}</i>
</span> </span>
</div> </div>
</div> </div>
@@ -129,9 +129,9 @@
{% endif %} {% endif %}
<div id="latest"> <div id="latest">
<div class="button-bar"> <div class="button-bar">
<a class="button" href="{{ uri.route(true) }}/pages"><i class="fa fa-fw fa-file-text-o"></i>Manage Pages</a> <a class="button" href="{{ uri.route(true) }}/pages"><i class="fa fa-fw fa-file-text-o"></i>{{ "PLUGIN_ADMIN_MANAGE_PAGES"|t }}</a>
</div> </div>
<h1>Latest Page Updates</h1> <h1>{{ "PLUGIN_ADMIN_LATEST_PAGE_UPDATES"|t }}</h1>
<table> <table>
{% for latest in admin.latestPages %} {% for latest in admin.latestPages %}
<tr><td class="double"><a href="{{ base_url }}/pages/{{ latest.route|trim('/') }}"><i class="fa fa-fw fa-file-o"></i> {{ latest.title }}</a></td><td class="double">{{ latest.route }}</td><td><b>{{ latest.modified|nicetime }}</b></td></tr> <tr><td class="double"><a href="{{ base_url }}/pages/{{ latest.route|trim('/') }}"><i class="fa fa-fw fa-file-o"></i> {{ latest.title }}</a></td><td class="double">{{ latest.route }}</td><td><b>{{ latest.modified|nicetime }}</b></td></tr>