Commit 6200e904a88ceb2bf5c97799b2c85f325b17215b

Authored by Victor Costa
1 parent d3f1801b
Exists in master

site_tour: support label translation

po/pt/site_tour.po 0 → 100644
... ... @@ -0,0 +1,119 @@
  1 +msgid ""
  2 +msgstr ""
  3 +"Project-Id-Version: 1.0\n"
  4 +"POT-Creation-Date: 2015-02-03 18:26-0300\n"
  5 +"PO-Revision-Date: 2015-02-03 17:27-0300\n"
  6 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7 +"Language-Team: LANGUAGE <LL@li.org>\n"
  8 +"Language: \n"
  9 +"MIME-Version: 1.0\n"
  10 +"Content-Type: text/plain; charset=UTF-8\n"
  11 +"Content-Transfer-Encoding: 8bit\n"
  12 +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
  13 +
  14 +#: plugins/site_tour/lib/site_tour_plugin.rb:8
  15 +msgid "A site tour to show users how to use the application."
  16 +msgstr "Um plugin para apresentar aos usuários um tour da aplicação"
  17 +
  18 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:3
  19 +msgid "Click to start tour!"
  20 +msgstr "Clique para iniciar o tour!"
  21 +
  22 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:15
  23 +msgid "Site Tour Block"
  24 +msgstr "Bloco para Site Tour"
  25 +
  26 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:19
  27 +msgid "Configure a step-by-step tour."
  28 +msgstr "Configure o passo a passo do tour."
  29 +
  30 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:1
  31 +msgid "Site Tour Settings"
  32 +msgstr "Configurações do Site Tour"
  33 +
  34 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:5
  35 +msgid "Tooltips (CSV format: language, group name, selector, description)"
  36 +msgstr "Tooltips (Formato CSV: idioma, nome do grupo, seletor, descrição)"
  37 +
  38 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:6
  39 +msgid ""
  40 +"Group Triggers (CSV format: group name, selector, event (e.g. mouseenter, "
  41 +"click))"
  42 +msgstr ""
  43 +"Gatilhos dos grupos (Formato CSV: nome do grupo, seletor, evento (e.g. "
  44 +"mouseenter, click))"
  45 +
  46 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:9
  47 +msgid "Save"
  48 +msgstr "Salvar"
  49 +
  50 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_group_item.html.erb:15
  51 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_item.html.erb:13
  52 +msgid "Delete"
  53 +msgstr "Apagar"
  54 +
  55 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:4
  56 +msgid "Display help button"
  57 +msgstr "Mostrar o botão de ajuda"
  58 +
  59 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:8
  60 +msgid "Tooltip Actions"
  61 +msgstr "Ações do Tooltip"
  62 +
  63 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:9
  64 +msgid ""
  65 +"Special fields for description: {profile.name}, {profile.identifier}, "
  66 +"{profile.url}."
  67 +msgstr ""
  68 +"Campos especiais para a descrição: {profile.name}, {profile.identifier}, "
  69 +"{profile.url}"
  70 +
  71 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:11
  72 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:29
  73 +msgid "Group Name"
  74 +msgstr "Nome do Grupo"
  75 +
  76 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:12
  77 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:30
  78 +msgid "Selector"
  79 +msgstr "Seletor"
  80 +
  81 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:13
  82 +msgid "Description"
  83 +msgstr "Descrição"
  84 +
  85 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:23
  86 +msgid "New Tooltip"
  87 +msgstr "Novo Tooltip"
  88 +
  89 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:27
  90 +msgid "Group Triggers"
  91 +msgstr "Gatilhos dos Grupos"
  92 +
  93 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:31
  94 +msgid "Event"
  95 +msgstr "Evento"
  96 +
  97 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:41
  98 +msgid "New Group Trigger"
  99 +msgstr "Novo Gatilho de Grupo"
  100 +
  101 +#: plugins/site_tour/views/blocks/tour.html.erb:4
  102 +msgid "Help"
  103 +msgstr "Ajuda"
  104 +
  105 +#: plugins/site_tour/views/tour_actions.html.erb:18
  106 +msgid "Next"
  107 +msgstr "Próximo"
  108 +
  109 +#: plugins/site_tour/views/tour_actions.html.erb:19
  110 +msgid "Back"
  111 +msgstr "Anterior"
  112 +
  113 +#: plugins/site_tour/views/tour_actions.html.erb:20
  114 +msgid "Skip"
  115 +msgstr "Pular"
  116 +
  117 +#: plugins/site_tour/views/tour_actions.html.erb:21
  118 +msgid "Finish"
  119 +msgstr "Fim"
... ...
po/site_tour.pot 0 → 100644
... ... @@ -0,0 +1,121 @@
  1 +# SOME DESCRIPTIVE TITLE.
  2 +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
  3 +# This file is distributed under the same license as the PACKAGE package.
  4 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5 +#
  6 +#, fuzzy
  7 +msgid ""
  8 +msgstr ""
  9 +"Project-Id-Version: 1.0\n"
  10 +"POT-Creation-Date: 2015-02-03 18:26-0300\n"
  11 +"PO-Revision-Date: 2015-02-03 17:27-0300\n"
  12 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13 +"Language-Team: LANGUAGE <LL@li.org>\n"
  14 +"Language: \n"
  15 +"MIME-Version: 1.0\n"
  16 +"Content-Type: text/plain; charset=UTF-8\n"
  17 +"Content-Transfer-Encoding: 8bit\n"
  18 +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
  19 +
  20 +#: plugins/site_tour/lib/site_tour_plugin.rb:8
  21 +msgid "A site tour to show users how to use the application."
  22 +msgstr ""
  23 +
  24 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:3
  25 +msgid "Click to start tour!"
  26 +msgstr ""
  27 +
  28 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:15
  29 +msgid "Site Tour Block"
  30 +msgstr ""
  31 +
  32 +#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:19
  33 +msgid "Configure a step-by-step tour."
  34 +msgstr ""
  35 +
  36 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:1
  37 +msgid "Site Tour Settings"
  38 +msgstr ""
  39 +
  40 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:5
  41 +msgid "Tooltips (CSV format: language, group name, selector, description)"
  42 +msgstr ""
  43 +
  44 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:6
  45 +msgid ""
  46 +"Group Triggers (CSV format: group name, selector, event (e.g. mouseenter, "
  47 +"click))"
  48 +msgstr ""
  49 +
  50 +#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:9
  51 +msgid "Save"
  52 +msgstr ""
  53 +
  54 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_group_item.html.erb:15
  55 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_item.html.erb:13
  56 +msgid "Delete"
  57 +msgstr ""
  58 +
  59 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:4
  60 +msgid "Display help button"
  61 +msgstr ""
  62 +
  63 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:8
  64 +msgid "Tooltip Actions"
  65 +msgstr ""
  66 +
  67 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:9
  68 +msgid ""
  69 +"Special fields for description: {profile.name}, {profile.identifier}, "
  70 +"{profile.url}."
  71 +msgstr ""
  72 +
  73 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:11
  74 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:29
  75 +msgid "Group Name"
  76 +msgstr ""
  77 +
  78 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:12
  79 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:30
  80 +msgid "Selector"
  81 +msgstr ""
  82 +
  83 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:13
  84 +msgid "Description"
  85 +msgstr ""
  86 +
  87 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:23
  88 +msgid "New Tooltip"
  89 +msgstr ""
  90 +
  91 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:27
  92 +msgid "Group Triggers"
  93 +msgstr ""
  94 +
  95 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:31
  96 +msgid "Event"
  97 +msgstr ""
  98 +
  99 +#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:41
  100 +msgid "New Group Trigger"
  101 +msgstr ""
  102 +
  103 +#: plugins/site_tour/views/blocks/tour.html.erb:4
  104 +msgid "Help"
  105 +msgstr ""
  106 +
  107 +#: plugins/site_tour/views/tour_actions.html.erb:18
  108 +msgid "Next"
  109 +msgstr ""
  110 +
  111 +#: plugins/site_tour/views/tour_actions.html.erb:19
  112 +msgid "Back"
  113 +msgstr ""
  114 +
  115 +#: plugins/site_tour/views/tour_actions.html.erb:20
  116 +msgid "Skip"
  117 +msgstr ""
  118 +
  119 +#: plugins/site_tour/views/tour_actions.html.erb:21
  120 +msgid "Finish"
  121 +msgstr ""
... ...
public/main.js
... ... @@ -4,6 +4,7 @@ var siteTourPlugin = (function() {
4 4 var groupTriggers = [];
5 5 var userData = {};
6 6 var intro;
  7 + var options = {};
7 8  
8 9 function hasMark(name) {
9 10 return jQuery.cookie("_noosfero_.sitetour." + name) ||
... ... @@ -54,6 +55,9 @@ var siteTourPlugin = (function() {
54 55 }
55 56  
56 57 return {
  58 + setOption: function(key, value) {
  59 + options[key] = value;
  60 + },
57 61 add: function (name, selector, text, step) {
58 62 actions.push({name: name, selector: selector, text: text, step: step});
59 63 },
... ... @@ -73,6 +77,7 @@ var siteTourPlugin = (function() {
73 77  
74 78 intro = introJs();
75 79 intro.setOption('tooltipPosition', 'auto');
  80 + intro.setOptions(options);
76 81 intro.onafterchange(function(targetElement) {
77 82 var name = jQuery(targetElement).attr('data-intro-name');
78 83 mark(name);
... ...
views/tour_actions.html.erb
... ... @@ -14,6 +14,11 @@
14 14 <% (group_triggers||[]).each_with_index do |group, index| %>
15 15 <%= "siteTourPlugin.addGroupTrigger('#{j group[:group_name]}', '#{j group[:selector]}', '#{j group[:event]}');" %>
16 16 <% end %>
  17 +
  18 + siteTourPlugin.setOption('nextLabel', '<%= _('Next') %>');
  19 + siteTourPlugin.setOption('prevLabel', '<%= _('Back') %>');
  20 + siteTourPlugin.setOption('skipLabel', '<%= _('Skip') %>');
  21 + siteTourPlugin.setOption('doneLabel', '<%= _('Finish') %>');
17 22 });
18 23 </script>
19 24 <% end %>
... ...