diff --git a/plugins/elasticsearch/helpers/elasticsearch_helper.rb b/plugins/elasticsearch/helpers/elasticsearch_helper.rb index 41cca79..7f0f30c 100644 --- a/plugins/elasticsearch/helpers/elasticsearch_helper.rb +++ b/plugins/elasticsearch/helpers/elasticsearch_helper.rb @@ -2,7 +2,7 @@ module ElasticsearchHelper def searchable_types { - :all => _("All Results"), + :all => _("All results"), :text_article => _("Articles"), :uploaded_file => _("Files"), :community => _("Communities"), @@ -15,7 +15,7 @@ module ElasticsearchHelper sorts = { :relevance => _("Relevance"), :lexical => _("Alphabetical"), - :more_recent => _("More Recent") + :more_recent => _("More recent") } selected_type = (params[:selected_type] || nil) diff --git a/plugins/elasticsearch/lib/elasticsearch_plugin.rb b/plugins/elasticsearch/lib/elasticsearch_plugin.rb index 64d6773..01c3dd3 100644 --- a/plugins/elasticsearch/lib/elasticsearch_plugin.rb +++ b/plugins/elasticsearch/lib/elasticsearch_plugin.rb @@ -9,7 +9,7 @@ class ElasticsearchPlugin < Noosfero::Plugin end def self.plugin_description - _("This plugin is used to communicate a elasticsearch to privide a search.") + _("This plugin is used to communicate with elasticsearch engine.") end def stylesheet? diff --git a/plugins/elasticsearch/lib/ext/community.rb b/plugins/elasticsearch/lib/ext/community.rb index cf666c3..dfdced2 100644 --- a/plugins/elasticsearch/lib/ext/community.rb +++ b/plugins/elasticsearch/lib/ext/community.rb @@ -25,8 +25,8 @@ class Community def self.specific_sort { - :more_active => _("More Active"), - :more_popular => _("More Popular") + :more_active => _("More active"), + :more_popular => _("More popular") } end diff --git a/plugins/elasticsearch/lib/ext/person.rb b/plugins/elasticsearch/lib/ext/person.rb index 41e26c5..3e8a9bc 100644 --- a/plugins/elasticsearch/lib/ext/person.rb +++ b/plugins/elasticsearch/lib/ext/person.rb @@ -26,8 +26,8 @@ class Person def self.specific_sort { - :more_active => _("More Active"), - :more_popular => _("More Popular") + :more_active => _("More active"), + :more_popular => _("More popular") } end diff --git a/plugins/elasticsearch/lib/ext/text_article.rb b/plugins/elasticsearch/lib/ext/text_article.rb index 866a8dc..5cbf63b 100644 --- a/plugins/elasticsearch/lib/ext/text_article.rb +++ b/plugins/elasticsearch/lib/ext/text_article.rb @@ -36,8 +36,8 @@ class TextArticle def self.specific_sort { - :more_popular => _("More Viewed"), - :more_comments => _("Most Commented") + :more_popular => _("More viewed"), + :more_comments => _("Most commented") } end diff --git a/plugins/elasticsearch/po/elasticsearch.pot b/plugins/elasticsearch/po/elasticsearch.pot index da73cf5..d88f672 100644 --- a/plugins/elasticsearch/po/elasticsearch.pot +++ b/plugins/elasticsearch/po/elasticsearch.pot @@ -6,9 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 1.3~rc2-1-ga15645d\n" -"POT-Creation-Date: 2015-10-30 16:35-0300\n" -"PO-Revision-Date: 2015-08-06 17:21-0300\n" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-25 15:12+0000\n" +"PO-Revision-Date: 2016-07-25 15:12+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -17,6 +18,86 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: plugins/template/lib/template_plugin.rb:10 -msgid "A plugin that does this and that." +#: ../helpers/elasticsearch_helper.rb:5 +msgid "All results" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:6 +msgid "Articles" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:7 +msgid "Files" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:8 +msgid "Communities" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:9 +msgid "Events" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:10 +msgid "People" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:16 +msgid "Relevance" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:17 +msgid "Alphabetical" +msgstr "" + +#: ../helpers/elasticsearch_helper.rb:18 +msgid "More recent" +msgstr "" + +#: ../lib/elasticsearch_plugin.rb:12 +msgid "This plugin is used to communicate with elasticsearch engine." +msgstr "" + +#: ../lib/ext/community.rb:28 ../lib/ext/person.rb:29 +msgid "More active" +msgstr "" + +#: ../lib/ext/community.rb:29 ../lib/ext/person.rb:30 +msgid "More popular" +msgstr "" + +#: ../lib/ext/text_article.rb:39 +msgid "More viewed" +msgstr "" + +#: ../lib/ext/text_article.rb:40 +msgid "Most commented" +msgstr "" + +#: ../views/elasticsearch_plugin/_results_count.html.erb:4 +msgid " results for " +msgstr "" + +#: ../views/elasticsearch_plugin/_results_count.html.erb:6 +msgid " total results" +msgstr "" + +#: ../views/elasticsearch_plugin/_search_field.html.erb:11 +msgid "Send" +msgstr "" + +#: ../views/elasticsearch_plugin/_search_filter.html.erb:1 +msgid "Sort by" +msgstr "" + +#: ../views/elasticsearch_plugin/_text_article_display.html.erb:6 +msgid "Abstract" +msgstr "" + +#: ../views/elasticsearch_plugin/_uploaded_file_display.html.erb:6 +msgid "Type of file" +msgstr "" + +#: ../views/elasticsearch_plugin/search.html.erb:23 +msgid "Categories" msgstr "" diff --git a/plugins/elasticsearch/po/pt/elasticsearch.edit.po b/plugins/elasticsearch/po/pt/elasticsearch.edit.po new file mode 100644 index 0000000..616a8ff --- /dev/null +++ b/plugins/elasticsearch/po/pt/elasticsearch.edit.po @@ -0,0 +1,103 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-25 15:12+0000\n" +"PO-Revision-Date: 2016-07-25 15:12+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: ../helpers/elasticsearch_helper.rb:5 +msgid "All results" +msgstr "Todos os resultados" + +#: ../helpers/elasticsearch_helper.rb:6 +msgid "Articles" +msgstr "Artigos" + +#: ../helpers/elasticsearch_helper.rb:7 +msgid "Files" +msgstr "Arquivos" + +#: ../helpers/elasticsearch_helper.rb:8 +msgid "Communities" +msgstr "Comunidades" + +#: ../helpers/elasticsearch_helper.rb:9 +msgid "Events" +msgstr "Eventos" + +#: ../helpers/elasticsearch_helper.rb:10 +msgid "People" +msgstr "Pessoas" + +#: ../helpers/elasticsearch_helper.rb:16 +msgid "Relevance" +msgstr "Relevância" + +#: ../helpers/elasticsearch_helper.rb:17 +msgid "Alphabetical" +msgstr "Alfabético" + +#: ../helpers/elasticsearch_helper.rb:18 +msgid "More recent" +msgstr "Mais recentes" + +#: ../lib/elasticsearch_plugin.rb:12 +msgid "This plugin is used to communicate with elasticsearch engine." +msgstr "Este plugin é utilizado na comunicação com a engine elasticsearch." + +#: ../lib/ext/community.rb:28 ../lib/ext/person.rb:29 +msgid "More active" +msgstr "Mais ativos" + +#: ../lib/ext/community.rb:29 ../lib/ext/person.rb:30 +msgid "More popular" +msgstr "Mais populares" + +#: ../lib/ext/text_article.rb:39 +msgid "More viewed" +msgstr "Mais vistos" + +#: ../lib/ext/text_article.rb:40 +msgid "Most commented" +msgstr "Mais comentados" + +#: ../views/elasticsearch_plugin/_results_count.html.erb:4 +msgid " results for " +msgstr " resultados para " + +#: ../views/elasticsearch_plugin/_results_count.html.erb:6 +msgid " total results" +msgstr " resultados" + +#: ../views/elasticsearch_plugin/_search_field.html.erb:11 +msgid "Send" +msgstr "Enviar" + +#: ../views/elasticsearch_plugin/_search_filter.html.erb:1 +msgid "Sort by" +msgstr "Ordenar por" + +#: ../views/elasticsearch_plugin/_text_article_display.html.erb:6 +msgid "Abstract" +msgstr "Resumo" + +#: ../views/elasticsearch_plugin/_uploaded_file_display.html.erb:6 +msgid "Type of file" +msgstr "Tipo de arquivo" + +#: ../views/elasticsearch_plugin/search.html.erb:23 +msgid "Categories" +msgstr "Categorias" diff --git a/plugins/elasticsearch/po/pt/elasticsearch.po b/plugins/elasticsearch/po/pt/elasticsearch.po new file mode 100644 index 0000000..817a6bd --- /dev/null +++ b/plugins/elasticsearch/po/pt/elasticsearch.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2016-07-25 15:12+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +msgid "All results" +msgstr "Todos os resultados" + +msgid "Articles" +msgstr "Artigos" + +msgid "Files" +msgstr "Arquivos" + +msgid "Communities" +msgstr "Comunidades" + +msgid "Events" +msgstr "Eventos" + +msgid "People" +msgstr "Pessoas" + +msgid "Relevance" +msgstr "Relevância" + +msgid "Alphabetical" +msgstr "Alfabético" + +msgid "More recent" +msgstr "Mais recentes" + +msgid "This plugin is used to communicate with elasticsearch engine." +msgstr "Este plugin é utilizado na comunicação com a engine elasticsearch." + +msgid "More active" +msgstr "Mais ativos" + +msgid "More popular" +msgstr "Mais populares" + +msgid "More viewed" +msgstr "Mais vistos" + +msgid "Most commented" +msgstr "Mais comentados" + +msgid " results for " +msgstr " resultados para " + +msgid " total results" +msgstr " resultados" + +msgid "Send" +msgstr "Enviar" + +msgid "Sort by" +msgstr "Ordenar por" + +msgid "Abstract" +msgstr "Resumo" + +msgid "Type of file" +msgstr "Tipo de arquivo" + +msgid "Categories" +msgstr "Categorias" diff --git a/plugins/elasticsearch/po/pt/elasticsearch.po.time_stamp b/plugins/elasticsearch/po/pt/elasticsearch.po.time_stamp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/plugins/elasticsearch/po/pt/elasticsearch.po.time_stamp diff --git a/plugins/elasticsearch/public/javascripts/categories.js b/plugins/elasticsearch/public/javascripts/categories.js index 547fa35..594c50f 100644 --- a/plugins/elasticsearch/public/javascripts/categories.js +++ b/plugins/elasticsearch/public/javascripts/categories.js @@ -5,14 +5,10 @@ var main = function() { var categories = $("#jstree-categories").jstree("get_checked",null,true); var params; - url = url.replace(/.*\?/, ""); - params = url.split('&'); - params.map(function(param) { - var item = param.split('='); - dataParams[item[0]] = item[1]; - }); - - dataParams['categories'] = categories.join(",") + dataParams['selected_type'] = $('#selected_type').val(); + dataParams['filter'] = $('#filter').val(); + dataParams['query'] = $('#query').val(); + dataParams['categories'] = categories.join(","); $.ajax({ method: "GET", -- libgit2 0.21.2