Add L10n to the plugin UI - refs #7279

1.9.x
Angel Fernando Quiroz Campos 11 years ago
parent 738b30936f
commit 61d6071423
  1. 9
      plugin/tour/index.php
  2. 12
      plugin/tour/lang/english.php
  3. 20
      plugin/tour/lang/spanish.php
  4. 6
      plugin/tour/views/script.tpl

@ -12,6 +12,8 @@ require_once dirname(__FILE__) . '/config.php';
$pluginPath = api_get_path(PLUGIN_PATH) . 'tour/';
$pluginWebPath = api_get_path(WEB_PLUGIN_PATH) . 'tour/';
$tourPlugin = Tour::create();
$jsonContent = file_get_contents($pluginPath . 'config/tour.json');
$json = json_decode($jsonContent, true);
@ -32,6 +34,9 @@ $_template['web_path'] = array(
);
$_template['text'] = array(
'start_button' => get_lang('StartTheTour'),
'start_tour' => get_lang('HelloChamiloLMS'),
'start_button' => $tourPlugin->get_lang('StartButtonText'),
'next' => $tourPlugin->get_lang('Next'),
'prev' => $tourPlugin->get_lang('Prev'),
'skip' => $tourPlugin->get_lang('Skip'),
'done' => $tourPlugin->get_lang('Done')
);

@ -10,9 +10,17 @@
$strings['plugin_title'] = 'Tour';
$strings['plugin_comment'] = 'This plugin shows people how to use your Chamilo LMS';
/* Strings for settings */
$strings['show_tour'] = 'Show the tour';
$showTourHelpLine01 = 'The necessary configuration to show the help blocks, in JSON format, is located in the %splugin/tour/config/tour.json%s file.';
$showTourHelpLine02 = '%sSee README file for more information.';
$showTourHelpLine02 = 'See README file for more information.';
$strings['show_tour_help'] = sprintf("$showTourHelpLine01 a $showTourHelpLine02", "<strong>", "</strong>", "<br>");
$strings['show_tour_help'] = sprintf("$showTourHelpLine01 %s $showTourHelpLine02", "<strong>", "</strong>", "<br>");
/* Strings for plugin UI */
$strings['Skip'] = 'Skip';
$strings['Next'] = 'Next';
$strings['Prev'] = 'Prev';
$strings['Done'] = 'Done';
$strings['StartButtonText'] = 'Start the tour';

@ -3,16 +3,24 @@
/* For licensing terms, see /license.txt */
/**
* Strings to english L10n
* Strings to spanish L10n
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.plugin.tour
*/
$strings['plugin_title'] = 'Tour';
$strings['plugin_comment'] = 'Este plugin muestra a la gente cómo usar tu Chamilo LMS';
$strings['plugin_comment'] = 'Este plugin muestra a la gente cómo usar tu LMS';
$strings['show_tour'] = 'Mostrar el recorrido';
/* Strings for settings */
$strings['show_tour'] = 'Mostrar el tour';
$showTourHelpLine01 = 'La configuración necesaria para mostrar los bloques de ayuda, en formato JSON, está localizada en el archivo %splugin/tour/config/tour.json%s.';
$showTourHelpLine02 = '%sMira el archivo README para más información.';
$showTourHelpLine01 = 'La configuración necesaria para mostrar los bloques de ayuda, en formato JSON, están localizadas en el archivo %splugin/tour/config/tour.json%s.';
$showTourHelpLine02 = 'Ver el archivo README para más información.';
$strings['show_tour_help'] = sprintf("$showTourHelpLine01 $showTourHelpLine02", "<strong>", "</strong>", "<br>");
$strings['show_tour_help'] = sprintf("$showTourHelpLine01 %s $showTourHelpLine02", "<strong>", "</strong>", "<br>");
/* Strings for plugin UI */
$strings['Skip'] = 'Saltar';
$strings['Next'] = 'Siguiente';
$strings['Prev'] = 'Anterior';
$strings['Done'] = 'Hecho';
$strings['StartButtonText'] = 'Empezar el recorrido';

@ -26,7 +26,11 @@
'page_class': pageClassName
}, function(response) {
intro.setOptions({
steps: response
steps: response,
nextLabel: '{{ tour.text.next }}',
prevLabel: '{{ tour.text.prev }}',
skipLabel: '{{ tour.text.skip }}',
doneLabel: '{{ tour.text.done }}'
});
});
}

Loading…
Cancel
Save