diff --git a/app/models/doc_item.rb b/app/models/doc_item.rb index 43d3dc7..8c2124d 100644 --- a/app/models/doc_item.rb +++ b/app/models/doc_item.rb @@ -1,6 +1,6 @@ class DocItem class NotFound < Exception; end - attr_accessor :id, :title, :text, :language + attr_accessor :id, :title, :text, :language, :order def initialize(attrs = {}) attrs.each do |name,value| self.send("#{name}=", value) diff --git a/app/models/doc_topic.rb b/app/models/doc_topic.rb index ae4a3e8..c6c887b 100644 --- a/app/models/doc_topic.rb +++ b/app/models/doc_topic.rb @@ -4,15 +4,26 @@ class DocTopic < DocItem raise DocItem::NotFound end lines = File.readlines(file) - title = _find_title(lines) + title_line = _find_title(lines) File.basename(file) =~ /(.*)\.([^\.]+)\.xhtml$/ id = $1 language = $2 - new(:id => id, :title => title, :text => lines.join, :language => language) + new(:id => id, :title => title(title_line), :text => lines.join, :language => language, :order => order(title_line)) end def self._find_title(lines) - lines.find {|line| line =~ /^
#: doc/noosfero/cms/posting-on-blog.en.xhtml:3 @@ -205,7 +205,7 @@ msgid "" "instructions on Creating a blog ." msgstr "" "Se você ainda não tem um blog, você pode criar um seguindo as orientações em " -"Criando um blog." +"Criar um blog." # type: Content of:
#: doc/noosfero/cms/adding-images-to-gallery.en.xhtml:3
@@ -522,9 +522,9 @@ msgid ""
"gallery” in “Folder type”."
msgstr ""
"Se você ainda não tem uma galeria de imagens, você pode criar uma seguindo "
-"as orientações em Gerenciando "
-"conteúdo até o item 1 da descrição. Ao criar a pasta, escolha “"
-"Galeria de imagens” em “Tipo de Pasta”."
+"as orientações em Gerenciar conteúdo"
+"a> até o item 1 da descrição. Ao criar a pasta, escolha “Galeria de "
+"imagens” em “Tipo de Pasta”."
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:3
@@ -590,17 +589,17 @@ msgstr ""
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:18
@@ -690,7 +689,7 @@ msgstr "Link criado num artigo"
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:40
@@ -798,7 +797,7 @@ msgstr "Lista de arquivos na edição de artigo"
# type: Content of:
#: doc/noosfero/cms/managing-content.en.xhtml:3
@@ -1037,7 +1036,7 @@ msgstr "Remover: Apaga o artigo."
# type: Content of:
#: doc/noosfero/cms/creating-blog.en.xhtml:3
@@ -1122,14 +1121,14 @@ msgid "Fill in with the blog’s tags."
msgstr "Preencha com as tags do blog."
# type: Content of:
#: doc/noosfero/cms/writing-article.en.xhtml:3
@@ -1662,7 +1661,7 @@ msgstr ""
msgid ""
"Writing advanced articles"
msgstr ""
-"Escrevendo um artigo avançado "
+"Escrever um artigo avançado "
"(inserindo links e imagens)"
# type: Content of:
#: doc/noosfero/community/editing-appearance.en.xhtml:3
@@ -1997,7 +1996,7 @@ msgstr "Editar aparência"
# type: Content of:
#: doc/noosfero/community/creating-community.en.xhtml:3
@@ -2117,7 +2116,7 @@ msgstr ""
#: doc/noosfero/community/invite-contacts.en.xhtml:1
#: doc/noosfero/user/invite-contacts.en.xhtml:1
msgid "Inviting contacts from e-mail"
-msgstr "Convidando contatos por e-mail"
+msgstr "Convidar contatos por e-mail"
# type: Content of:
#: doc/noosfero/community/invite-contacts.en.xhtml:3
@@ -2293,31 +2292,30 @@ msgstr "Convite de importação para comunidade. Passo 2"
#: doc/noosfero/community/invite-contacts.en.xhtml:45
#: doc/noosfero/community/moderating-articles.en.xhtml:41
#: doc/noosfero/community/accepting-members.en.xhtml:32
-#: doc/noosfero/community/toc.en.xhtml:5
+#: doc/noosfero/community/toc.en.xhtml:4
msgid "Creating a community"
-msgstr ""
-"Criando uma comunidade"
+msgstr "Criar uma comunidade"
# type: Content of:
#: doc/noosfero/community/editing-sideboxes.en.xhtml:3
@@ -2735,14 +2733,14 @@ msgstr ""
# type: Content of:
#: doc/noosfero/community/joining-community.en.xhtml:3
@@ -2893,7 +2891,7 @@ msgid ""
"navigation/searching-communities\">Finding communities
."
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:1
msgid "Writing an advanced article (inserting images, links, videos and audio)"
-msgstr ""
-"Escrevendo um artigo avançado (inserindo imagens, links, vídeos e áudio)"
+msgstr "Escrever um artigo avançado (inserindo imagens, links, vídeos e áudio)"
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:38
msgid "Inserting images"
-msgstr "Inserindo imagens"
+msgstr "Inserir imagens"
# type: Content of:
#: doc/noosfero/cms/writing-advanced-article.en.xhtml:64
msgid "Inserting videos and audio"
-msgstr "Inserindo vídeos e áudio"
+msgstr "Inserir vídeos e áudio"
# type: Content of:
#: doc/noosfero/cms/managing-content.en.xhtml:1
msgid "Managing your content"
-msgstr "Gerenciando seu conteúdo"
+msgstr "Gerenciar seu conteúdo"
# type: Content of:
#: doc/noosfero/cms/creating-blog.en.xhtml:1
msgid "Creating a blog"
-msgstr "Criando um blog"
+msgstr "Criar um blog"
# type: Content of:
#: doc/noosfero/cms/writing-article.en.xhtml:1
msgid "Writing an article"
-msgstr "Escrevendo um artigo básico"
+msgstr "Escrever um artigo básico"
# type: Content of:
@@ -1895,9 +1894,9 @@ msgstr ""
#: doc/noosfero/enterprise/editing-header-footer.en.xhtml:62
#: doc/noosfero/enterprise/editing-appearance.en.xhtml:37
#: doc/noosfero/enterprise/editing-enterprise-info.en.xhtml:45
-#: doc/noosfero/user/toc.en.xhtml:17
+#: doc/noosfero/user/toc.en.xhtml:4
msgid "Login into the system"
-msgstr "Entrando no sistema"
+msgstr "Entrar no sistema"
# type: Content of:
#: doc/noosfero/community/editing-appearance.en.xhtml:1
#: doc/noosfero/user/editing-appearance.en.xhtml:1
#: doc/noosfero/enterprise/editing-appearance.en.xhtml:1
msgid "Editing appearance"
-msgstr "Editando aparência"
+msgstr "Editar aparência"
# type: Content of:
#: doc/noosfero/community/creating-community.en.xhtml:1
msgid "Creating a community"
-msgstr "Criando uma comunidade"
+msgstr "Criar uma comunidade"
# type: Content of:
."
msgstr ""
"Para aprender a encontrar comunidades no sistema, acesse: Encontrando comunidades."
+"navigation/searching-communities\">Encontrar comunidades
#: doc/noosfero/community/editing-sideboxes.en.xhtml:1
#: doc/noosfero/user/editing-sideboxes.en.xhtml:1
#: doc/noosfero/enterprise/editing-sideboxes.en.xhtml:1
msgid "Editing sideboxes"
-msgstr "Editando blocos laterais"
+msgstr "Editar blocos laterais"
# type: Content of:
#: doc/noosfero/community/moderating-articles.en.xhtml:1
msgid "Moderating articles"
-msgstr "Moderando artigos"
+msgstr "Moderar artigos"
# type: Content of:
#: doc/noosfero/community/joining-community.en.xhtml:1
msgid "Joining a community"
-msgstr "Entrando em uma comunidade"
+msgstr "Entrar em uma comunidade"
# type: Content of:
#: doc/noosfero/user/logout.en.xhtml:3 @@ -3038,7 +3036,7 @@ msgstr "" # type: Content of:
#: doc/noosfero/user/removing-friends.en.xhtml:3 @@ -3106,9 +3104,9 @@ msgstr "" #: doc/noosfero/user/sending-messages.en.xhtml:30 #: doc/noosfero/user/accepting-friends.en.xhtml:30 #: doc/noosfero/user/registering-new-user.en.xhtml:33 -#: doc/noosfero/user/toc.en.xhtml:15 +#: doc/noosfero/user/toc.en.xhtml:8 msgid "Adding friends" -msgstr "Adicionando amigos" +msgstr "Adicionar amigos" # type: Content of:
#: doc/noosfero/user/sending-messages.en.xhtml:3 @@ -3192,7 +3190,7 @@ msgstr "Enviar mensagem" #: doc/noosfero/navigation/searching-communities.en.xhtml:32 #: doc/noosfero/navigation/toc.en.xhtml:4 msgid "Finding people" -msgstr "Encontrando pessoas" +msgstr "Encontrar pessoas" # type: Content of:
#: doc/noosfero/user/editing-header-footer.en.xhtml:3 @@ -3264,8 +3262,7 @@ msgstr "Confirmação de remover comentário" #: doc/noosfero/user/removing-comments.en.xhtml:26 msgid "" "Commenting articles, pictures and events" -msgstr "" -"Comentando artigos, fotos e eventos" +msgstr "Comentar artigos, fotos e eventos" # type: Content of:
#: doc/noosfero/user/editing-appearance.en.xhtml:3 @@ -3275,11 +3272,11 @@ msgstr "Você pode personalizar sua página, alterando o modelo dela." # type: Content of:
#: doc/noosfero/user/accepting-friends.en.xhtml:3 @@ -3348,9 +3345,9 @@ msgstr "Tópicos Relacionados" #: doc/noosfero/user/invite-contacts.en.xhtml:44 #: doc/noosfero/user/adding-friends.en.xhtml:25 #: doc/noosfero/user/registering-new-user.en.xhtml:34 -#: doc/noosfero/user/toc.en.xhtml:5 +#: doc/noosfero/user/toc.en.xhtml:15 msgid "Removing friends" -msgstr "Removendo amigos" +msgstr "Remover amigos" # type: Content of:
#: doc/noosfero/user/invite-contacts.en.xhtml:3 @@ -3571,14 +3568,14 @@ msgstr "Bloco de empreendimentos" # type: Content of:
#: doc/noosfero/user/editing-person-info.en.xhtml:3 @@ -3680,7 +3677,7 @@ msgstr "" # type: Content of:
#: doc/noosfero/user/commenting.en.xhtml:3 @@ -3760,7 +3757,7 @@ msgstr "Comentário de uma pessoa logada" # type: Content of:
#: doc/noosfero/user/adding-friends.en.xhtml:3 @@ -3812,7 +3809,7 @@ msgstr "Confirmação quando está adicionando um amigo" # type: Content of:
#: doc/noosfero/user/registering-new-user.en.xhtml:3 @@ -3888,7 +3885,7 @@ msgstr "Formulário de registro" # type: Content of:
#: doc/noosfero/user/login.en.xhtml:3 @@ -3925,12 +3922,12 @@ msgstr "" # type: Content of:
#: doc/noosfero/enterprise/disabling-enterprise.en.xhtml:3 @@ -3991,7 +3988,7 @@ msgstr "Confirmação da desabilitação do empreendimento" msgid "" "Activating enterprise" msgstr "" -"Ativando empreendimento" +"Ativar empreendimento" # type: Content of:
#: doc/noosfero/enterprise/editing-header-footer.en.xhtml:3 @@ -4019,13 +4016,13 @@ msgstr "" # type: Content of:
#: doc/noosfero/enterprise/activating-enterprise.en.xhtml:3 @@ -4309,25 +4306,25 @@ msgstr "Conclusão da ativação de empreendimento" # type: Content of:
#: doc/noosfero/enterprise/managing-enterprise-members.en.xhtml:3 @@ -4442,18 +4439,18 @@ msgstr "Adicionar membro em gerenciar membro" # type: Content of:
#: doc/noosfero/enterprise/editing-enterprise-info.en.xhtml:3 @@ -4582,7 +4579,7 @@ msgstr "" # type: Content of:
#: doc/noosfero/navigation/searching.en.xhtml:3
@@ -4649,12 +4646,12 @@ msgstr "Ver todos os resultados da busca com exemplo"
#: doc/noosfero/navigation/searching-products-services.en.xhtml:38
#: doc/noosfero/navigation/searching-communities.en.xhtml:33
#: doc/noosfero/navigation/advanced-search.en.xhtml:36
-#: doc/noosfero/navigation/toc.en.xhtml:6
+#: doc/noosfero/navigation/toc.en.xhtml:8
msgid ""
"Finding enterprises"
msgstr ""
-"Encontrando "
-"empreendimentos"
+"Encontrar empreendimentos"
+"a>"
# type: Content of:
#: doc/noosfero/navigation/searching-people.en.xhtml:3
@@ -4779,7 +4776,7 @@ msgstr ""
#: doc/noosfero/navigation/searching-communities.en.xhtml:31
#: doc/noosfero/navigation/advanced-search.en.xhtml:33
msgid "Searching"
-msgstr "Fazendo busca"
+msgstr "Busca"
# type: Content of:
#: doc/noosfero/navigation/searching-products-services.en.xhtml:3
@@ -4853,7 +4850,7 @@ msgstr ""
# type: Content of:
#: doc/noosfero/navigation/searching-enterprises.en.xhtml:3
@@ -4898,7 +4895,7 @@ msgstr ""
# type: Content of:
#: doc/noosfero/navigation/searching-communities.en.xhtml:3
@@ -5033,118 +5030,116 @@ msgstr "Resultado da busca avançada com exemplo"
# type: Content of:
#: doc/noosfero/navigation/searching-people.en.xhtml:1
msgid "Finding people"
-msgstr "Encontrando pessoas"
+msgstr "Encontrar pessoas"
# type: Content of:
#: doc/noosfero/navigation/index.en.xhtml:1
@@ -4789,7 +4786,7 @@ msgstr "Navegação"
# type: Content of:
#: doc/noosfero/navigation/searching-products-services.en.xhtml:1
msgid "Finding products and services"
-msgstr "Encontrando produtos e serviços"
+msgstr "Encontrar produtos e serviços"
# type: Content of:
#: doc/noosfero/navigation/searching-enterprises.en.xhtml:1
msgid "Finding enterprises"
-msgstr "Encontrando empreendimentos"
+msgstr "Encontrar empreendimentos"
# type: Content of:
#: doc/noosfero/navigation/searching-communities.en.xhtml:1
msgid "Finding communities"
-msgstr "Encontrando comunidades"
+msgstr "Encontrar comunidades"
# type: Content of:
#~ msgid "Administration"
#~ msgstr "Administração"
--
libgit2 0.21.2