Permalink
Browse files

Change with start of translation in internationalization, this time w…

…ith pt_br.
  • Loading branch information...
1 parent d761eab commit 09682e9e7328b1c1466ae87af08f1785a0b5d7e3 @rrmartins rrmartins committed Oct 17, 2012
Showing with 36,397 additions and 3 deletions.
  1. +1 −1 guides/rails_guides/generator.rb
  2. +1 −1 guides/rails_guides/helpers.rb
  3. +10 −1 guides/rails_guides/markdown.rb
  4. +435 −0 guides/source/en/2_2_release_notes.md
  5. +621 −0 guides/source/en/2_3_release_notes.md
  6. +614 −0 guides/source/en/3_0_release_notes.md
  7. +552 −0 guides/source/en/3_1_release_notes.md
  8. +565 −0 guides/source/en/3_2_release_notes.md
  9. +886 −0 guides/source/en/4_0_release_notes.md
  10. +2 −0 guides/source/en/_license.html.erb
  11. +19 −0 guides/source/en/_welcome.html.erb
  12. +845 −0 guides/source/en/action_controller_overview.md
  13. +566 −0 guides/source/en/action_mailer_basics.md
  14. +1,606 −0 guides/source/en/action_view_overview.md
  15. +206 −0 guides/source/en/active_model_basics.md
  16. +228 −0 guides/source/en/active_record_basics.md
  17. +1,632 −0 guides/source/en/active_record_querying.md
  18. +1,368 −0 guides/source/en/active_record_validations_callbacks.md
  19. +3,809 −0 guides/source/en/active_support_core_extensions.md
  20. +485 −0 guides/source/en/active_support_instrumentation.md
  21. +316 −0 guides/source/en/ajax_on_rails.md
  22. +201 −0 guides/source/en/api_documentation_guidelines.md
  23. +760 −0 guides/source/en/asset_pipeline.md
  24. +1,997 −0 guides/source/en/association_basics.md
  25. +495 −0 guides/source/en/caching_with_rails.md
  26. +612 −0 guides/source/en/command_line.md
  27. +780 −0 guides/source/en/configuring.md
  28. +412 −0 guides/source/en/contributing_to_ruby_on_rails.md
  29. +76 −0 guides/source/en/credits.html.erb
  30. +673 −0 guides/source/en/debugging_rails_applications.md
  31. +174 −0 guides/source/en/development_dependencies_install.md
  32. +171 −0 guides/source/en/documents.yaml
  33. +950 −0 guides/source/en/engines.md
  34. +955 −0 guides/source/en/form_helpers.md
  35. +636 −0 guides/source/en/generators.md
  36. +1,787 −0 guides/source/en/getting_started.md
  37. +981 −0 guides/source/en/i18n.md
  38. +30 −0 guides/source/en/index.html.erb
  39. +670 −0 guides/source/en/initialization.md
  40. +26 −0 guides/source/en/kindle/KINDLE.md
  41. +1 −0 guides/source/en/kindle/copyright.html.erb
  42. +27 −0 guides/source/en/kindle/layout.html.erb
  43. +52 −0 guides/source/en/kindle/rails_guides.opf.erb
  44. +24 −0 guides/source/en/kindle/toc.html.erb
  45. +64 −0 guides/source/en/kindle/toc.ncx.erb
  46. +5 −0 guides/source/en/kindle/welcome.html.erb
  47. +148 −0 guides/source/en/layout.html.erb
  48. +1,243 −0 guides/source/en/layouts_and_rendering.md
  49. +992 −0 guides/source/en/migrations.md
  50. +225 −0 guides/source/en/nested_model_forms.md
  51. +684 −0 guides/source/en/performance_testing.md
  52. +438 −0 guides/source/en/plugins.md
  53. +218 −0 guides/source/en/rails_application_templates.md
  54. +346 −0 guides/source/en/rails_on_rack.md
  55. +979 −0 guides/source/en/routing.md
  56. +121 −0 guides/source/en/ruby_on_rails_guides_guidelines.md
  57. +1,104 −0 guides/source/en/security.md
  58. +981 −0 guides/source/en/testing.md
  59. +271 −0 guides/source/en/upgrading_ruby_on_rails.md
  60. +883 −0 guides/source/pt_br/4_0_release_notes.md
  61. +2 −0 guides/source/pt_br/_license.html.erb
  62. +19 −0 guides/source/pt_br/_welcome.html.erb
  63. +76 −0 guides/source/pt_br/credits.html.erb
  64. +163 −0 guides/source/pt_br/documents.yaml
  65. +30 −0 guides/source/pt_br/index.html.erb
  66. +148 −0 guides/source/pt_br/layout.html.erb
@@ -85,7 +85,7 @@ def set_flags_from_environment
@all = ENV['ALL'] == '1'
@kindle = ENV['KINDLE'] == '1'
@version = ENV['RAILS_VERSION'] || `git rev-parse --short HEAD`.chomp
- @lang = ENV['GUIDES_LANGUAGE']
+ @lang = $GUIDES_LANGUAGE = ENV['GUIDES_LANGUAGE'] || 'en'
end
def register_kindle_mime_types
@@ -13,7 +13,7 @@ def guide(name, url, options = {}, &block)
end
def documents_by_section
- @documents_by_section ||= YAML.load_file(File.expand_path('../../source/documents.yaml', __FILE__))
+ @documents_by_section ||= YAML.load_file(File.expand_path("../../source/#{$GUIDES_LANGUAGE}/documents.yaml", __FILE__))
end
def documents_flat
@@ -120,7 +120,7 @@ def generate_index
@index = <<-INDEX.html_safe
<div id="subCol">
- <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
+ <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />#{language_chapter}</h3>
#{@index}
</div>
INDEX
@@ -134,6 +134,15 @@ def generate_title
@title = "Ruby on Rails Guides"
end
end
+
+ def language_chapter
+ case $GUIDES_LANGUAGE
+ when 'pt_br'
+ 'Capitulos'
+ else
+ 'Chapters'
+ end
+ end
def node_index(hierarchy)
case hierarchy.size
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 09682e9

Please sign in to comment.