Skip to content

Commit

Permalink
Going ahead with i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolassatragno committed Dec 16, 2012
1 parent 95a4fd0 commit 1bf1fb5
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 50 deletions.
8 changes: 4 additions & 4 deletions app/controllers/stats_controller.rb
Expand Up @@ -80,24 +80,24 @@ def gemfile_tool
rpm = FedoraRpm.find_by_name("rubygem-" + dep[:name])
if !rpm
dep_fully_satisfied = false
@result << {:name => dep[:name], :success => false, :message => "#{dep[:name]} not found in Fedora"}
@result << {:name => dep[:name], :success => false, :message => _('%{dep_name} not found in Fedora') % { :dep_name => dep[:name]}}

elsif !dep[:version].nil?
rpm.rpm_versions.each { |rv|
unless rv.rpm_version.nil?
if Versionomy.parse(rv.rpm_version) < dep[:version]
dep_fully_satisfied = false
@result << {:name => dep[:name], :success => false, :message => "#{dep[:name]} (#{dep[:version]}) is too old in #{rv.fedora_version} (which has #{rv.rpm_version})"}
@result << {:name => dep[:name], :success => false, :message => _('%{dep_name} (%{dep_version}) is too old in %{rv_fedora_version} (which has %{rv_rpm_version})') % { :dep_name => dep[:name], :dep_version => dep[:version], :rv_fedora_version => rv.fedora_version, :rv_rpm_version => rv.rpm_version}}

else # TODO comment: (?)
@result << {:name => dep[:name], :success => true, :message => "#{dep[:name]} (#{dep[:version]}) is sufficient in #{rv.fedora_version}!"}
@result << {:name => dep[:name], :success => true, :message => _('%{dep_name} (%{dep_version}) is sufficient in %{rv_fedora_version}') % { :dep_name => dep[:name], :dep_version => dep[:version], :rv_fedora_version => rv.fedora_version}}
end
end
}
end

if dep_fully_satisfied
@result << {:name => dep[:name], :success => true, :message => "#{dep[:name]} is in Fedora!"}
@result << {:name => dep[:name], :success => true, :message => _('%{dep_name} is in Fedora!') % { :dep_name => dep[:name]}}
end
end
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/fedorarpms/show.html.haml
Expand Up @@ -48,7 +48,7 @@
%td
= b.name
%td
= b.is_review
= b.is_review ? _('Yes') : _('No')

%label= _('Builds:')
%table.table.table-striped.table-condensed.dependency
Expand Down
10 changes: 5 additions & 5 deletions app/views/rpmcomments/_comments.html.haml
@@ -1,12 +1,12 @@
%div.comments
%h3 Comments
%h3= _('Comments')
- @rpm.rpm_comments.each do |comment|
%div.well
%label Name: #{comment.name}
%label Email: #{comment.email}
%label= _('Name: %{comment_name}') % { :comment_name => comment.name}
%label= _('Email: %{comment_email}') % { :comment_email => comment.email}
- if comment.works_for_me
%div.alert.alert-success= comment.description
- else
%div.alert.alert-error= comment.description
%label Comment:
%div.comments.text #{comment.text}
%label= _('Comment:')
%div.comments.text #{comment.text}
14 changes: 7 additions & 7 deletions app/views/rpmcomments/_new_comment.html.haml
@@ -1,26 +1,26 @@
%div.new.comment

%h3 Add new comment
%h3= _('Add new comment')

- unless flash[:error].nil?
%div.alert.alert-error= flash[:error]

= form_for :rpm_comment, :html => {:class => 'well'} do |f|
= f.label :name, 'Name'
= f.label :name, _('Name')
= f.text_field :name
= f.label :email, 'Email'
= f.label :email, _('Email')
= f.text_field :email

= f.label :works_for_me do
= f.check_box :works_for_me
It works for me!
= _('It works for me!')
= f.label :receive_update do
= f.check_box :receive_update
Keep me updated!
= _('Keep me updated!')

= f.label :text, 'Comment'
= f.label :text, _('Comment')
= f.text_area :text

= recaptcha_tags :display => {:theme => 'white'}

= f.submit 'Submit', :class => 'btn btn-primary'
= f.submit _('Submit'), :class => 'btn btn-primary'
30 changes: 11 additions & 19 deletions app/views/static_pages/about.html.haml
@@ -1,20 +1,12 @@
%h1 About
%h1= _('About')
= image_tag('http://openclipart.org/people/gblas.ivan/rubi.svg', :size => '100x120')
%p IsItFedoraRuby is a web-application(a Rails application) for keeping track of the Fedora/Ruby intergration, especially gem->rpm conversion, documentation, and success stories.
%p
The project was started on 2012 as a

= link_to 'Google Summer Of Code project', 'https://fedoraproject.org/wiki/GSOC_2012/Student_Application_Zuhao/IsItFedoraRuby'
by Zuhao ,and it is growing to include Ruby Special Interest Group.
%h3 Ruby Special Interest Group
%p A SIG for people who are interested in improving the state of Ruby in Fedora. This includes packaging Ruby libraries and applications, setting and improving standards for packaging them as RPM's and maintaining Ruby packages for Fedora.
%p Packaging Ruby libraries and applications for Fedora is an ongoing process. We hope that this situation will improve dramatically over the next few months; that means that you, dear reader, can become a hero by packaging your favorite piece of Ruby code as an RPM and submitting it to Fedora .
%h3 Please Contribute!
%p As this project is still in its early stage, please feel free to contribute any code or ideas to make it better.

%p
For more info, please check out the
= link_to 'code', 'http://github.com/zuhao/isitfedoraruby'
, or visit
= link_to 'Ruby SIG', 'https://fedoraproject.org/wiki/Ruby_SIG'
wiki page.
%p= _('IsItFedoraRuby is a web-application (a Rails application) for keeping track of the Fedora/Ruby intergration, especially gem->rpm conversion, documentation, and success stories.')
%p= _('The project was started on 2012 as a <a href=https://fedoraproject.org/wiki/GSOC_2012/Student_Application_Zuhao/IsItFedoraRuby>Google Summer Of Code project</a> by Zuhao, and it is growing to include Ruby Special Interest Group.').html_safe

%h3= _('Ruby Special Interest Group')
%p= _('A SIG for people who are interested in improving the state of Ruby in Fedora. This includes packaging Ruby libraries and applications, setting and improving standards for packaging them as RPMs and maintaining Ruby packages for Fedora.')
%p= _('Packaging Ruby libraries and applications for Fedora is an ongoing process. We hope that this situation will improve dramatically over the next few months; that means that you, dear reader, can become a hero by packaging your favorite piece of Ruby code as an RPM and submitting it to Fedora.')

%h3= _('Please Contribute!')
%p= _('As this project is still in its early stage, please feel free to contribute any code or ideas to make it better.')
%p= _('For more info, please check out the <a href=http://github.com/zuhao/isitfedoraruby>code</a> or visit the <a href=https://fedoraproject.org/wiki/Ruby_SIG>Ruby SIG</a> wiki page.').html_safe
4 changes: 2 additions & 2 deletions app/views/static_pages/contribute.html.haml
@@ -1,2 +1,2 @@
%h1 Contribute to make it better!
%p Find how to contribute to the Feodra/Ruby community.
%h1= _('Contribute to make it better!')
%p= _('Find how to contribute to the Feodra/Ruby community.')
4 changes: 2 additions & 2 deletions app/views/static_pages/successes.html.haml
@@ -1,2 +1,2 @@
%h1 Success Stories
%p Find some of the best-known success stories here!
%h1= _('Success Stories')
%p= _('Find some of the best-known success stories here!')
48 changes: 43 additions & 5 deletions locale/app.pot
Expand Up @@ -89,6 +89,9 @@ msgstr ""
msgid "Success Stories"
msgstr ""

msgid "Find some of the best-known success stories here!"
msgstr ""

msgid "Contribute"
msgstr ""

Expand Down Expand Up @@ -281,16 +284,52 @@ msgstr ""
msgid "Select verison of gem %{gem_name} to import"
msgstr ""

msgid ""
msgid "IsItFedoraRuby is a web-application (a Rails application) for keeping track of the Fedora/Ruby intergration, especially gem->rpm conversion, documentation, and success stories."
msgstr ""

msgid ""
msgid "The project was started on 2012 as a <a href=https://fedoraproject.org/wiki/GSOC_2012/Student_Application_Zuhao/IsItFedoraRuby>Google Summer Of Code project</a> by Zuhao, and it is growing to include Ruby Special Interest Group."
msgstr ""

msgid ""
msgid "Ruby Special Interest Group"
msgstr ""

msgid ""
msgid "A SIG for people who are interested in improving the state of Ruby in Fedora. This includes packaging Ruby libraries and applications, setting and improving standards for packaging them as RPMs and maintaining Ruby packages for Fedora."
msgstr ""

msgid "Packaging Ruby libraries and applications for Fedora is an ongoing process. We hope that this situation will improve dramatically over the next few months; that means that you, dear reader, can become a hero by packaging your favorite piece of Ruby code as an RPM and submitting it to Fedora."
msgstr ""

msgid "Please Contribute!"
msgstr ""

msgid "As this project is still in its early stage, please feel free to contribute any code or ideas to make it better."
msgstr ""

msgid "For more info, please check out the <a href=http://github.com/zuhao/isitfedoraruby>code</a> or visit the <a href=https://fedoraproject.org/wiki/Ruby_SIG>Ruby SIG</a> wiki page."
msgstr ""

msgid "Comment"
msgstr ""

msgid "It works for me!"
msgstr ""

msgid "Contribute to make it better!"
msgstr ""

msgid "Find how to contribute to the Feodra/Ruby community."
msgstr ""

msgid "%{dep_name} (%{dep_version}) is too old in %{rv_fedora_version} (which has %{rv_rpm_version})"
msgstr ""

msgid "%{dep_name} (%{dep_version}) is sufficient in %{rv_fedora_version}"
msgstr ""

msgid "%{dep_name} is in Fedora!"
msgstr ""

msgid "%{dep_name} not found in Fedora"
msgstr ""

msgid ""
Expand All @@ -305,4 +344,3 @@ msgstr ""
msgid ""
msgstr ""

v
114 changes: 109 additions & 5 deletions locale/es/app.po
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: version 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-13 12:14-0300\n"
"PO-Revision-Date: 2012-12-13 23:52-0300\n"
"PO-Revision-Date: 2012-12-16 02:52-0300\n"
"Last-Translator: Nicolás Satragno <nsatragno@gnome.org>\n"
"Language-Team: Español; Castellano <gnome-es-list@gnome.org>\n"
"Language: \n"
Expand Down Expand Up @@ -91,6 +91,9 @@ msgstr "Rpms de Fedora"
msgid "Success Stories"
msgstr "Historias de éxito"

msgid "Find some of the best-known success stories here!"
msgstr "¡Encuentre algunas de las historias de éxito más conocidas aquí!"

msgid "Contribute"
msgstr "Contribuir"

Expand Down Expand Up @@ -193,11 +196,19 @@ msgstr "Gema / Versión de Fedora"
msgid "Bubble Chart:"
msgstr "Gráfico de burbujas:"

msgid "This graph shows the packages, which are represented by circles, that the user %{user_name} owns."
msgstr "Este gráfico muestra los paquetes, que están representados por círculos, que le pertenecen al usuario %{user_name}"
msgid ""
"This graph shows the packages, which are represented by circles, that the "
"user %{user_name} owns."
msgstr ""
"Este gráfico muestra los paquetes, que están representados por círculos, que "
"le pertenecen al usuario %{user_name}"

msgid "The size of each circle is proportional to the number of commits for that package."
msgstr "El tamaño de cada círculo es proporcional al número de commits para ese paquete"
msgid ""
"The size of each circle is proportional to the number of commits for that "
"package."
msgstr ""
"El tamaño de cada círculo es proporcional al número de commits para ese "
"paquete"

msgid "Test your Gemfile or Gemfile.lock against Fedora"
msgstr "Pruebe su Gemfile o Gemfile.lock en Fedora"
Expand Down Expand Up @@ -282,3 +293,96 @@ msgstr "Nombre de la gema que importar:"

msgid "Select verison of gem %{gem_name} to import"
msgstr "Seleccione la versión de la gema %{gem_name} que importar"

msgid ""
"IsItFedoraRuby is a web-application (a Rails application) for keeping track "
"of the Fedora/Ruby intergration, especially gem->rpm conversion, "
"documentation, and success stories."
msgstr ""
"IsItFedoraRuby es una aplicación web (una aplicación de Rails) para rastrear "
"la integración entre Fedora y Ruby, especialmente la conversión gem->rpm, "
"documentación e historias de éxito."

msgid ""
"The project was started on 2012 as a <a href=https://fedoraproject.org/wiki/"
"GSOC_2012/Student_Application_Zuhao/IsItFedoraRuby>Google Summer Of Code "
"project</a> by Zuhao, and it is growing to include Ruby Special Interest "
"Group."
msgstr ""
"El proyecto comenzó en 2012 como un <a href=https://fedoraproject.org/wiki/"
"GSOC_2012/Student_Application_Zuhao/IsItFedoraRuby>proyecto de Google Summer "
"of Code</a> de Zuhao, y está creciendo para incluir al Grupo de Interés "
"Especial de Ruby."

msgid "Ruby Special Interest Group"
msgstr "Grupo de interés especial de Ruby"

msgid ""
"A SIG for people who are interested in improving the state of Ruby in "
"Fedora. This includes packaging Ruby libraries and applications, setting and "
"improving standards for packaging them as RPMs and maintaining Ruby packages "
"for Fedora."
msgstr ""
"Un SIG para gente que está interesada en mejorar el estado de Ruby en "
"Fedora. Esto incluye empaquetar bibliotecas y aplicaciones de Ruby, "
"establecer y mejorar estándares de empaquetado a RPM y mantener paquetes de "
"Ruby para Fedora."

msgid ""
"Packaging Ruby libraries and applications for Fedora is an ongoing process. "
"We hope that this situation will improve dramatically over the next few "
"months; that means that you, dear reader, can become a hero by packaging "
"your favorite piece of Ruby code as an RPM and submitting it to Fedora."
msgstr ""
"Empaquetar bibliotecas y aplicaciones de Ruby para Fedora es un proceso en "
"progreso. Esperamos que esta situación mejore dramáticamente dentro de unos "
"pocos meses, eso significa que Ud, querido lector, puede convertirse en un "
"héroe empaquetando su código favorito de Ruby como en RPM y subiéndolo a "
"Fedora."

msgid "Please Contribute!"
msgstr "¡Por favor contribuya!"

msgid ""
"As this project is still in its early stage, please feel free to contribute "
"any code or ideas to make it better."
msgstr ""
"Como este proyecto todavía está en su infancia, siéntase libre de contribuir "
"con código o ideas para mejorarlo."

msgid ""
"For more info, please check out the <a href=http://github.com/zuhao/"
"isitfedoraruby>code</a> or visit the <a href=https://fedoraproject.org/wiki/"
"Ruby_SIG>Ruby SIG</a> wiki page."
msgstr ""
"Para más información, consulte el <a href=http://github.com/zuhao/"
"isitfedoraruby>código</a> o visite la página de la wiki del <a href=https://"
"fedoraproject.org/wiki/Ruby_SIG>SIG de Ruby</a>."

msgid "Comment"
msgstr "Comentar"

msgid "It works for me!"
msgstr "¡Me funciona!"

msgid "Contribute to make it better!"
msgstr "Contribuya para hacerlo mejor"

msgid "Find how to contribute to the Feodra/Ruby community."
msgstr "Descubra cómo contrubir con la comunidad Fedora/Ruby"

msgid ""
"%{dep_name} (%{dep_version}) is too old in %{rv_fedora_version} (which has "
"%{rv_rpm_version})"
msgstr ""
"%{dep_name} (%{dep_version}) es demasiado viejo en %{rv_fedora_version} (que "
"tiene %{rv_rpm_version})"

msgid "%{dep_name} (%{dep_version}) is sufficient in %{rv_fedora_version}"
msgstr "%{dep_name} (%{dep_version}) es suficiente en %{rv_fedora_version}"

msgid "%{dep_name} is in Fedora!"
msgstr "¡%{dep_name} está en Fedora!"

msgid "%{dep_name} not found in Fedora"
msgstr "%{dep_name} no se encontró en Fedora"

0 comments on commit 1bf1fb5

Please sign in to comment.