noosfero | 2 new commits pushed to repository

Antonio Terceiro terceiro at colivre.coop.br
Fri Jan 30 11:24:06 BRST 2015


On Fri, Jan 30, 2015 at 12:33:11PM +0000, Bráulio Bhavamitra wrote:
> =====================================
> app/views/layouts/application-ng.html.erb
> =====================================
> --- a/app/views/layouts/application-ng.html.erb
> +++ b/app/views/layouts/application-ng.html.erb
> @@ -12,24 +12,9 @@
>      <meta name="twitter:title" content="<%= h page_title %>">
>      <meta name="twitter:description" content="<%= meta_description_tag(@page) %>">
>  
> -    <!-- Open Graph -->
> -    <meta property="og:type" content="<%= @page ? 'article' : 'website' %>">
> -    <meta property="og:url" content="<%= @page ? url_for(@page.url) : top_url %>">
> -    <meta property="og:title" content="<%= h page_title %>">
> -    <meta property="og:site_name" content="<%= profile ? profile.name : @environment.name %>">
> -    <meta property="og:description" content="<%= meta_description_tag(@page) %>">
> -
>      <!-- site root -->
>      <meta property="noosfero:root" content="<%= Noosfero.root %>"/>
>  
> -    <% if @page %>
> -      <meta property="article:published_time" content="<%= show_date(@page.published_at) %>">
> -      <% @page.body_images_paths.each do |img| %>
> -        <meta name="twitter:image" content="<%= img.to_s %>">
> -        <meta property="og:image" content="<%= img.to_s %>">
> -      <% end %>
> -    <% end %>
> -
>      <link rel="shortcut icon" href="<%= image_path(theme_favicon) %>" type="image/x-icon" />
>      <%= noosfero_javascript %>
>      <%= noosfero_stylesheets %>

So you are moving a feature from the core to a plugin and enhancing it
several times, which is good, thanks for that.

However:

- when people upgrade they will instantly lose this metadata unless they
  activate the plugin; I wonder how they will even realize that this is
  needed.

- the plugin has 0 tests, and will run code on 100% of the requests if
  enabled

> =====================================
> plugins/metadata/lib/metadata_plugin.rb
> =====================================
> --- /dev/null
> +++ b/plugins/metadata/lib/metadata_plugin.rb
> @@ -0,0 +1,59 @@
> +
> +class MetadataPlugin < Noosfero::Plugin
> +
> +  def self.plugin_name
> +    I18n.t 'metadata_plugin.lib.plugin.name'
> +  end
> +
> +  def self.plugin_description
> +    I18n.t 'metadata_plugin.lib.plugin.description'
> +  end

You do realize that by not using .po files you will lose the ability of
having translations contributed through the nice weblate interface,
right?

-- 
Antonio Terceiro <terceiro at colivre.coop.br>
Colivre - Cooperativa de Tecnologias Livres
http://www.colivre.coop.br/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150130/6b758a69/attachment.pgp>


More information about the Noosfero-dev mailing list