From 1bf1fb5141fa89d66c2ac2cac3f7edbfc7d7d45f Mon Sep 17 00:00:00 2001 From: nicolassatragno Date: Sun, 16 Dec 2012 02:58:55 -0300 Subject: [PATCH] Going ahead with i18n --- app/controllers/stats_controller.rb | 8 +- app/views/fedorarpms/show.html.haml | 2 +- app/views/rpmcomments/_comments.html.haml | 10 +- app/views/rpmcomments/_new_comment.html.haml | 14 +-- app/views/static_pages/about.html.haml | 30 ++--- app/views/static_pages/contribute.html.haml | 4 +- app/views/static_pages/successes.html.haml | 4 +- locale/app.pot | 48 +++++++- locale/es/app.po | 114 ++++++++++++++++++- 9 files changed, 184 insertions(+), 50 deletions(-) diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index ed09c5d..5331685 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -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 } diff --git a/app/views/fedorarpms/show.html.haml b/app/views/fedorarpms/show.html.haml index 0876ee8..3856ace 100644 --- a/app/views/fedorarpms/show.html.haml +++ b/app/views/fedorarpms/show.html.haml @@ -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 diff --git a/app/views/rpmcomments/_comments.html.haml b/app/views/rpmcomments/_comments.html.haml index 7da6868..17bbb9e 100644 --- a/app/views/rpmcomments/_comments.html.haml +++ b/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} \ No newline at end of file + %label= _('Comment:') + %div.comments.text #{comment.text} diff --git a/app/views/rpmcomments/_new_comment.html.haml b/app/views/rpmcomments/_new_comment.html.haml index 93500a9..cdaf0ef 100644 --- a/app/views/rpmcomments/_new_comment.html.haml +++ b/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' \ No newline at end of file + = f.submit _('Submit'), :class => 'btn btn-primary' diff --git a/app/views/static_pages/about.html.haml b/app/views/static_pages/about.html.haml index ea4d3b1..0f8b370 100644 --- a/app/views/static_pages/about.html.haml +++ b/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. \ No newline at end of file +%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 Google Summer Of Code project 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 code or visit the Ruby SIG wiki page.').html_safe diff --git a/app/views/static_pages/contribute.html.haml b/app/views/static_pages/contribute.html.haml index ca150c7..792ccfb 100644 --- a/app/views/static_pages/contribute.html.haml +++ b/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. \ No newline at end of file +%h1= _('Contribute to make it better!') +%p= _('Find how to contribute to the Feodra/Ruby community.') diff --git a/app/views/static_pages/successes.html.haml b/app/views/static_pages/successes.html.haml index bce9610..379f42c 100644 --- a/app/views/static_pages/successes.html.haml +++ b/app/views/static_pages/successes.html.haml @@ -1,2 +1,2 @@ -%h1 Success Stories -%p Find some of the best-known success stories here! \ No newline at end of file +%h1= _('Success Stories') +%p= _('Find some of the best-known success stories here!') diff --git a/locale/app.pot b/locale/app.pot index b948ee3..02f1b02 100644 --- a/locale/app.pot +++ b/locale/app.pot @@ -89,6 +89,9 @@ msgstr "" msgid "Success Stories" msgstr "" +msgid "Find some of the best-known success stories here!" +msgstr "" + msgid "Contribute" msgstr "" @@ -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 Google Summer Of Code project 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 code or visit the Ruby SIG 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 "" @@ -305,4 +344,3 @@ msgstr "" msgid "" msgstr "" -v diff --git a/locale/es/app.po b/locale/es/app.po index a7f3b55..660ef79 100644 --- a/locale/es/app.po +++ b/locale/es/app.po @@ -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 \n" "Language-Team: Español; Castellano \n" "Language: \n" @@ -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" @@ -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" @@ -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 Google Summer Of Code " +"project by Zuhao, and it is growing to include Ruby Special Interest " +"Group." +msgstr "" +"El proyecto comenzó en 2012 como un proyecto de Google Summer " +"of Code 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 code or visit the Ruby SIG wiki page." +msgstr "" +"Para más información, consulte el código o visite la página de la wiki del SIG de Ruby." + +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"