Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix conflicts on th-TH.rb locale

  • Loading branch information...
commit 1454376cea4333ce538e2255b2297543ac02cb8e 2 parents ec5d928 + 36c01b4
@sikachu sikachu authored
Showing with 5,505 additions and 3,939 deletions.
  1. +3 −6 app/controllers/application.rb
  2. +4 −4 config/boot.rb
  3. +23 −21 config/locales/de-AT.rb
  4. +139 −137 config/locales/en-AU.rb
  5. +142 −140 config/locales/en-US.rb
  6. +147 −145 config/locales/gibberish.rb
  7. +140 −138 config/locales/ja-JP.rb
  8. +92 −92 config/locales/no-BM.rb
  9. +135 −133 config/locales/pt-BR.rb
  10. +142 −140 config/locales/th-TH.rb
  11. +150 −154 public/javascripts/prototype.js
  12. +5 −3 vendor/plugins/localized_dates/init.rb
  13. +23 −21 vendor/plugins/localized_dates/lib/templates/locales/de-AT.rb
  14. +33 −31 vendor/plugins/localized_dates/lib/templates/locales/en-US.rb
  15. +1 −0  vendor/rails/.gitignore
  16. +6 −6 vendor/rails/actionmailer/lib/action_mailer.rb
  17. +3 −2 vendor/rails/actionmailer/lib/action_mailer/base.rb
  18. 0  vendor/rails/actionmailer/test/fixtures/test_mailer/{signed_up.erb → signed_up.html.erb}
  19. +3 −9 vendor/rails/actionmailer/test/mail_render_test.rb
  20. +16 −2 vendor/rails/actionpack/CHANGELOG
  21. +6 −9 vendor/rails/actionpack/lib/action_controller.rb
  22. +13 −33 vendor/rails/actionpack/lib/action_controller/base.rb
  23. +3 −42 vendor/rails/actionpack/lib/action_controller/cgi_process.rb
  24. +3 −3 vendor/rails/actionpack/lib/action_controller/dispatcher.rb
  25. +16 −3 vendor/rails/actionpack/lib/action_controller/filters.rb
  26. +16 −14 vendor/rails/actionpack/lib/action_controller/headers.rb
  27. +33 −45 vendor/rails/actionpack/lib/action_controller/integration.rb
  28. +2 −0  vendor/rails/actionpack/lib/action_controller/mime_type.rb
  29. +11 −5 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb
  30. +69 −81 vendor/rails/actionpack/lib/action_controller/rack_process.rb
  31. +121 −46 vendor/rails/actionpack/lib/action_controller/request.rb
  32. +1 −1  vendor/rails/actionpack/lib/action_controller/rescue.rb
  33. +70 −35 vendor/rails/actionpack/lib/action_controller/response.rb
  34. +2 −2 vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb
  35. +2 −2 vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb
  36. +43 −37 vendor/rails/actionpack/lib/action_controller/test_process.rb
  37. +13 −7 vendor/rails/actionpack/lib/action_view.rb
  38. +33 −71 vendor/rails/actionpack/lib/action_view/base.rb
  39. +39 −0 vendor/rails/actionpack/lib/action_view/helpers.rb
  40. +4 −4 vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb
  41. +10 −1 vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
  42. +13 −11 vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb
  43. +1 −3 vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
  44. +64 −32 vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb
  45. +50 −4 vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb
  46. +2 −0  vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb
  47. +0 −53 vendor/rails/actionpack/lib/action_view/locale/en-US.rb
  48. +91 −0 vendor/rails/actionpack/lib/action_view/locale/en-US.yml
  49. +91 −46 vendor/rails/actionpack/lib/action_view/partials.rb
  50. +26 −2 vendor/rails/actionpack/lib/action_view/paths.rb
  51. +11 −4 vendor/rails/actionpack/lib/action_view/renderable.rb
  52. +5 −1 vendor/rails/actionpack/lib/action_view/renderable_partial.rb
  53. +2 −0  vendor/rails/actionpack/lib/action_view/template.rb
  54. +1 −1  vendor/rails/actionpack/lib/action_view/template_error.rb
  55. +1 −3 vendor/rails/actionpack/lib/action_view/test_case.rb
  56. +10 −0 vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
  57. +1 −1  vendor/rails/actionpack/test/controller/caching_test.rb
  58. +1 −1  vendor/rails/actionpack/test/controller/cgi_test.rb
  59. +24 −4 vendor/rails/actionpack/test/controller/content_type_test.rb
  60. +84 −6 vendor/rails/actionpack/test/controller/integration_test.rb
  61. +9 −10 vendor/rails/actionpack/test/controller/layout_test.rb
  62. +31 −31 vendor/rails/actionpack/test/controller/mime_responds_test.rb
  63. +9 −0 vendor/rails/actionpack/test/controller/new_render_test.rb
  64. +20 −2 vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb
  65. +38 −24 vendor/rails/actionpack/test/controller/rack_test.rb
  66. +22 −17 vendor/rails/actionpack/test/controller/render_test.rb
  67. +64 −58 vendor/rails/actionpack/test/controller/request_test.rb
  68. +5 −0 vendor/rails/actionpack/test/controller/test_test.rb
  69. +1 −0  vendor/rails/actionpack/test/fixtures/_top_level_partial.html.erb
  70. +1 −0  vendor/rails/actionpack/test/fixtures/_top_level_partial_only.erb
  71. +3 −0  vendor/rails/actionpack/test/fixtures/test/_layout_for_block_with_args.html.erb
  72. +1 −0  vendor/rails/actionpack/test/fixtures/test/using_layout_around_block_with_args.html.erb
  73. +14 −14 vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb
  74. +2 −1  vendor/rails/actionpack/test/template/asset_tag_helper_test.rb
  75. +32 −5 vendor/rails/actionpack/test/template/atom_feed_helper_test.rb
  76. +22 −0 vendor/rails/actionpack/test/template/date_helper_i18n_test.rb
  77. +30 −0 vendor/rails/actionpack/test/template/render_test.rb
  78. +3 −3 vendor/rails/actionpack/test/template/sanitize_helper_test.rb
  79. +34 −0 vendor/rails/actionpack/test/template/text_helper_test.rb
  80. +1 −0  vendor/rails/actionpack/test/template/url_helper_test.rb
  81. +4 −0 vendor/rails/activerecord/CHANGELOG
  82. +8 −14 vendor/rails/activerecord/lib/active_record.rb
  83. +2 −6 vendor/rails/activerecord/lib/active_record/association_preload.rb
  84. +10 −12 vendor/rails/activerecord/lib/active_record/associations.rb
  85. +3 −7 vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb
  86. +1 −3 vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  87. +15 −3 vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  88. +1 −1  vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  89. +2 −2 vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
  90. +4 −0 vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb
  91. +116 −87 vendor/rails/activerecord/lib/active_record/base.rb
  92. +17 −4 vendor/rails/activerecord/lib/active_record/calculations.rb
  93. +12 −0 vendor/rails/activerecord/lib/active_record/callbacks.rb
  94. +9 −4 vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
  95. +2 −6 vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  96. +7 −0 vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
  97. +12 −7 vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  98. +7 −2 vendor/rails/activerecord/lib/active_record/dirty.rb
  99. +40 −0 vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb
  100. +0 −25 vendor/rails/activerecord/lib/active_record/locale/en-US.rb
  101. +33 −0 vendor/rails/activerecord/lib/active_record/locale/en-US.yml
  102. +36 −11 vendor/rails/activerecord/lib/active_record/migration.rb
  103. +5 −1 vendor/rails/activerecord/lib/active_record/named_scope.rb
  104. +1 −1  vendor/rails/activerecord/lib/active_record/reflection.rb
  105. +1 −1  vendor/rails/activerecord/lib/active_record/test_case.rb
  106. +14 −2 vendor/rails/activerecord/lib/active_record/transactions.rb
  107. +71 −60 vendor/rails/activerecord/lib/active_record/validations.rb
  108. +12 −0 vendor/rails/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
  109. +30 −12 vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb
  110. +16 −3 vendor/rails/activerecord/test/cases/associations/eager_test.rb
  111. +9 −4 vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
  112. +18 −0 vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb
  113. +4 −0 vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb
  114. +10 −0 vendor/rails/activerecord/test/cases/associations/has_one_associations_test.rb
  115. +44 −5 vendor/rails/activerecord/test/cases/associations/has_one_through_associations_test.rb
  116. +7 −0 vendor/rails/activerecord/test/cases/associations/join_model_test.rb
  117. +2 −2 vendor/rails/activerecord/test/cases/associations_test.rb
  118. +16 −2 vendor/rails/activerecord/test/cases/base_test.rb
  119. +4 −4 vendor/rails/activerecord/test/cases/column_definition_test.rb
  120. +1 −1  vendor/rails/activerecord/test/cases/defaults_test.rb
  121. +48 −0 vendor/rails/activerecord/test/cases/dirty_test.rb
  122. +56 −0 vendor/rails/activerecord/test/cases/finder_test.rb
  123. +1 −0  vendor/rails/activerecord/test/cases/helper.rb
  124. +41 −0 vendor/rails/activerecord/test/cases/i18n_test.rb
  125. +51 −6 vendor/rails/activerecord/test/cases/migration_test.rb
  126. +20 −0 vendor/rails/activerecord/test/cases/named_scope_test.rb
  127. +3 −2 vendor/rails/activerecord/test/cases/query_cache_test.rb
  128. +4 −0 vendor/rails/activerecord/test/cases/reflection_test.rb
  129. +60 −2 vendor/rails/activerecord/test/cases/transactions_test.rb
  130. +384 −149 vendor/rails/activerecord/test/cases/validations_i18n_test.rb
  131. +4 −4 vendor/rails/activerecord/test/cases/validations_test.rb
  132. +1 −3 vendor/rails/activerecord/test/connections/native_mysql/connection.rb
  133. +10 −0 vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb
  134. +3 −0  vendor/rails/activerecord/test/models/author.rb
  135. +2 −0  vendor/rails/activerecord/test/models/developer.rb
  136. +1 −1  vendor/rails/activerecord/test/models/project.rb
  137. +2 −2 vendor/rails/activerecord/test/schema/mysql_specific_schema.rb
  138. +1 −1  vendor/rails/activerecord/test/schema/schema.rb
  139. +4 −0 vendor/rails/activeresource/CHANGELOG
  140. +7 −10 vendor/rails/activeresource/lib/active_resource.rb
  141. +74 −66 vendor/rails/activeresource/lib/active_resource/base.rb
  142. +9 −9 vendor/rails/activeresource/lib/active_resource/connection.rb
  143. +61 −46 vendor/rails/activeresource/test/base_test.rb
  144. +2 −0  vendor/rails/activesupport/CHANGELOG
  145. +3 −7 vendor/rails/activesupport/lib/active_support.rb
  146. +12 −7 vendor/rails/activesupport/lib/active_support/buffered_logger.rb
  147. +4 −4 vendor/rails/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb
  148. +4 −4 vendor/rails/activesupport/lib/active_support/cache/file_store.rb
  149. +24 −12 vendor/rails/activesupport/lib/active_support/cache/memory_store.rb
  150. +13 −8 vendor/rails/activesupport/lib/active_support/callbacks.rb
  151. +0 −127 vendor/rails/activesupport/lib/active_support/clean_logger.rb
  152. +16 −0 vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb
  153. +6 −0 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
  154. +4 −4 vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb
  155. +128 −1 vendor/rails/activesupport/lib/active_support/core_ext/logger.rb
  156. +22 −1 vendor/rails/activesupport/lib/active_support/core_ext/time.rb
  157. +7 −3 vendor/rails/activesupport/lib/active_support/dependencies.rb
  158. +4 −0 vendor/rails/activesupport/lib/active_support/deprecation.rb
  159. +46 −25 vendor/rails/activesupport/lib/active_support/inflector.rb
  160. +0 −28 vendor/rails/activesupport/lib/active_support/locale/en-US.rb
  161. +31 −0 vendor/rails/activesupport/lib/active_support/locale/en-US.yml
  162. +33 −18 vendor/rails/activesupport/lib/active_support/memoizable.rb
  163. +197 −0 vendor/rails/activesupport/lib/active_support/secure_random.rb
  164. +68 −13 vendor/rails/activesupport/lib/active_support/testing/performance.rb
  165. +0 −31 vendor/rails/activesupport/lib/active_support/typed_array.rb
  166. +1 −1  vendor/rails/activesupport/lib/active_support/vendor.rb
  167. +0 −20 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/MIT-LICENSE
  168. +0 −18 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/README.textile
  169. +0 −24 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.gemspec
  170. +10 −12 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/{lib → }/i18n.rb
  171. +189 −0 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb
  172. +8 −0 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/{lib → }/i18n/exceptions.rb
  173. +0 −154 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb
  174. +0 −4 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/test/all.rb
  175. +0 −100 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/test/i18n_exceptions_test.rb
  176. +0 −141 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/test/i18n_test.rb
  177. +0 −376 vendor/rails/activesupport/lib/active_support/vendor/i18n-0.0.1/test/simple_backend_test.rb
  178. +25 −4 vendor/rails/activesupport/test/buffered_logger_test.rb
  179. +57 −0 vendor/rails/activesupport/test/caching_test.rb
  180. +4 −4 vendor/rails/activesupport/test/callbacks_test.rb
  181. +12 −4 vendor/rails/activesupport/test/core_ext/date_ext_test.rb
  182. +1 −1  vendor/rails/activesupport/test/core_ext/duplicable_test.rb
  183. +4 −4 vendor/rails/activesupport/test/core_ext/file_test.rb
  184. +4 −0 vendor/rails/activesupport/test/core_ext/string_ext_test.rb
  185. +34 −0 vendor/rails/activesupport/test/core_ext/time_ext_test.rb
  186. +11 −0 vendor/rails/activesupport/test/inflector_test.rb
  187. +20 −0 vendor/rails/activesupport/test/memoizable_test.rb
  188. +15 −0 vendor/rails/activesupport/test/secure_random_test.rb
  189. +0 −51 vendor/rails/activesupport/test/typed_array_test.rb
  190. +116 −0 vendor/rails/ci/ci_build.rb
  191. +120 −0 vendor/rails/ci/ci_setup_notes.txt
  192. +5 −0 vendor/rails/ci/cruise_config.rb
  193. +17 −0 vendor/rails/ci/geminstaller.yml
  194. +13 −0 vendor/rails/ci/site.css
  195. +72 −0 vendor/rails/ci/site_config.rb
  196. +4 −1 vendor/rails/railties/html/500.html
  197. +1 −1  vendor/rails/railties/lib/commands/dbconsole.rb
  198. +1 −3 vendor/rails/railties/lib/fcgi_handler.rb
  199. +12 −6 vendor/rails/railties/lib/initializer.rb
  200. +1 −0  vendor/rails/railties/lib/rails/rack.rb
  201. +28 −0 vendor/rails/railties/lib/rails/rack/logger.rb
  202. +4 −0 vendor/rails/railties/lib/rails_generator/generated_attribute.rb
  203. +1 −3 vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
  204. +3 −0  vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb
  205. +5 −147 vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
  206. +1 −0  vendor/rails/railties/lib/tasks/documentation.rake
  207. +5 −0 vendor/rails/railties/lib/tasks/framework.rake
  208. +3 −4 vendor/rails/railties/lib/tasks/misc.rake
  209. +43 −0 vendor/rails/railties/test/error_page_test.rb
  210. +3 −0  vendor/rails/railties/test/fixtures/eager/zoo.rb
  211. +2 −0  vendor/rails/railties/test/fixtures/eager/zoo/reptile_house.rb
  212. +16 −0 vendor/rails/railties/test/generators/rails_model_generator_test.rb
  213. +18 −0 vendor/rails/railties/test/initializer_test.rb
  214. +2 −8 vendor/rails/railties/test/secret_key_generation_test.rb
View
9 app/controllers/application.rb
@@ -21,12 +21,9 @@ def set_locale
session[:locale] = params[:locale] if params[:locale]
#set locale based on session or default
- locale = session[:locale] || I18n.default_locale
- I18n.locale = locale
+ I18n.locale = session[:locale] || I18n.default_locale
- #load local from settings
- I18n.populate do
- require "#{LOCALES_DIRECTORY}#{locale}.rb"
- end
+ #load locale from settings
+ I18n.load_translations "#{LOCALES_DIRECTORY}#{I18n.locale}.rb"
end
end
View
8 config/boot.rb
@@ -82,14 +82,14 @@ def gem_version
def load_rubygems
require 'rubygems'
-
- unless rubygems_version >= '0.9.4'
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
+ min_version = '1.1.1'
+ unless rubygems_version >= min_version
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
end
rescue LoadError
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
View
44 config/locales/de-AT.rb
@@ -1,24 +1,26 @@
-I18n.backend.store_translations :'de-AT', {
- :date => {
- :formats => {
- :default => "%d.%m.%Y",
- :short => lambda { |date| "#{date.day}. %b" },
- :long => lambda { |date| "#{date.day}. %B %Y" }
+{
+ :'de-AT' => {
+ :date => {
+ :formats => {
+ :default => "%d.%m.%Y",
+ :short => lambda { |date| "#{date.day}. %b" },
+ :long => lambda { |date| "#{date.day}. %B %Y" }
+ },
+ :day_names => %w(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag),
+ :abbr_day_names => %w(So Mo Di Mi Do Fr Sa),
+ :month_names => [nil] + %w(Januar Februar März April Mai Juni Juli August September Oktober November Dezember),
+ :abbr_month_names => [nil] + %w(Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez),
+ :order => [:day, :month, :year]
},
- :day_names => %w(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag),
- :abbr_day_names => %w(So Mo Di Mi Do Fr Sa),
- :month_names => [nil] + %w(Januar Februar März April Mai Juni Juli August September Oktober November Dezember),
- :abbr_month_names => [nil] + %w(Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez),
- :order => [:day, :month, :year]
- },
- :time => {
- :formats => {
- :default => lambda { |time| "%A, #{time.day}. %B %Y, %H:%M Uhr" },
- :time => "%H:%M Uhr",
- :short => lambda { |time| "#{time.day}.%m., %H:%M Uhr" },
- :long => lambda { |time| "%A, #{time.day}. %B %Y, %H:%M Uhr" }
- },
- :am => '',
- :pm => ''
+ :time => {
+ :formats => {
+ :default => lambda { |time| "%A, #{time.day}. %B %Y, %H:%M Uhr" },
+ :time => "%H:%M Uhr",
+ :short => lambda { |time| "#{time.day}.%m., %H:%M Uhr" },
+ :long => lambda { |time| "%A, #{time.day}. %B %Y, %H:%M Uhr" }
+ },
+ :am => '',
+ :pm => ''
+ }
}
}
View
276 config/locales/en-AU.rb
@@ -1,152 +1,154 @@
-I18n.backend.store_translations :'en-AU', {
- :date => {
- :formats => {
- :default => "%d/%m/%Y",
- :short => "%e %b",
- :long => "%e %B, %Y",
- :long_ordinal => lambda { |date| "#{date.day.ordinalize} %B, %Y" },
- :only_day => "%e"
- },
- :day_names => Date::DAYNAMES,
- :abbr_day_names => Date::ABBR_DAYNAMES,
- :month_names => Date::MONTHNAMES,
- :abbr_month_names => Date::ABBR_MONTHNAMES,
- :order => [:year, :month, :day]
- },
- :time => {
- :formats => {
- :default => "%a %b %d %H:%M:%S %Z %Y",
- :time => "%H:%M",
- :short => "%d %b %H:%M",
- :long => "%d %B, %Y %H:%M",
- :long_ordinal => lambda { |time| "#{time.day.ordinalize} %B, %Y %H:%M" },
- :only_second => "%S"
- },
- :datetime => {
+{
+ :'en-AU' => {
+ :date => {
:formats => {
- :default => "%Y-%m-%dT%H:%M:%S%Z"
- }
+ :default => "%d/%m/%Y",
+ :short => "%e %b",
+ :long => "%e %B, %Y",
+ :long_ordinal => lambda { |date| "#{date.day.ordinalize} %B, %Y" },
+ :only_day => "%e"
+ },
+ :day_names => Date::DAYNAMES,
+ :abbr_day_names => Date::ABBR_DAYNAMES,
+ :month_names => Date::MONTHNAMES,
+ :abbr_month_names => Date::ABBR_MONTHNAMES,
+ :order => [:year, :month, :day]
},
- :time_with_zone => {
+ :time => {
:formats => {
- :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
- }
+ :default => "%a %b %d %H:%M:%S %Z %Y",
+ :time => "%H:%M",
+ :short => "%d %b %H:%M",
+ :long => "%d %B, %Y %H:%M",
+ :long_ordinal => lambda { |time| "#{time.day.ordinalize} %B, %Y %H:%M" },
+ :only_second => "%S"
+ },
+ :datetime => {
+ :formats => {
+ :default => "%Y-%m-%dT%H:%M:%S%Z"
+ }
+ },
+ :time_with_zone => {
+ :formats => {
+ :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ }
+ },
+ :am => 'am',
+ :pm => 'pm'
},
- :am => 'am',
- :pm => 'pm'
- },
- :datetime => {
- :distance_in_words => {
- :half_a_minute => 'about a half-ish minute',
- :less_than_x_seconds => ['less than one second', '{{count}}ish seconds'],
- :x_seconds => ['one second', '{{count}}ish seconds'],
- :less_than_x_minutes => ['less than a minute', '{{count}}ish minutes'],
- :x_minutes => ['one minute', '{{count}}ish minutes'],
- :about_x_hours => ['about one hour', '{{count}}ish hours'],
- :x_days => ['one day', '{{count}}ish days'],
- :about_x_months => ['about one month', '{{count}}ish months'],
- :x_months => ['one month', '{{count}}ish months'],
- :about_x_years => ['about a year or so', '{{count}}ish year'],
- :over_x_years => ['probably over a year', '{{count}}ish years']
- }
- },
- :number => {
- :format => {
- :precision => 2,
- :separator => ',',
- :delimiter => '.'
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => 'about a half-ish minute',
+ :less_than_x_seconds => ['less than one second', '{{count}}ish seconds'],
+ :x_seconds => ['one second', '{{count}}ish seconds'],
+ :less_than_x_minutes => ['less than a minute', '{{count}}ish minutes'],
+ :x_minutes => ['one minute', '{{count}}ish minutes'],
+ :about_x_hours => ['about one hour', '{{count}}ish hours'],
+ :x_days => ['one day', '{{count}}ish days'],
+ :about_x_months => ['about one month', '{{count}}ish months'],
+ :x_months => ['one month', '{{count}}ish months'],
+ :about_x_years => ['about a year or so', '{{count}}ish year'],
+ :over_x_years => ['probably over a year', '{{count}}ish years']
+ }
},
- :currency => {
+ :number => {
:format => {
- :unit => 'AUD',
:precision => 2,
- :format => '%n %u'
+ :separator => ',',
+ :delimiter => '.'
+ },
+ :currency => {
+ :format => {
+ :unit => 'AUD',
+ :precision => 2,
+ :format => '%n %u'
+ }
}
- }
- },
-
- # Active Record
- :active_record => {
- :error => {
- :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
- :message => "Please check the following fields, dude:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "ain't included in the list",
- :exclusion => "ain't available",
- :invalid => "ain't valid",
- :confirmation => "don't match its confirmation",
- :accepted => "gotta be accepted",
- :empty => "gotta be given",
- :blank => "gotta be given",
- :too_long => "is too long-ish (no more than {{count}} characters)",
- :too_short => "is too short-ish (no less than {{count}} characters)",
- :wrong_length => "ain't got the right length (gotta be {{count}} characters)",
- :taken => "ain't available",
- :not_a_number => "ain't a number",
- :greater_than => "gotta be greater than {{count}}",
- :greater_than_or_equal_to => "gotta be greater than or equal to {{count}}",
- :equal_to => "gotta be equal to {{count}}",
- :less_than => "gotta be less than {{count}}",
- :less_than_or_equal_to => "gotta be less than or equal to {{count}}",
- :odd => "gotta be odd",
- :even => "gotta be even"
- }
- },
- :txt => {
- :main_title => "Localising Rails",
- :app_name => "Demo Application",
- :sub_title => "CRIKEY! - how to localise your awesome apps with Rails' new i18n features",
- :contents => "Contents",
- :menu => {
- :introduction => "Introduction",
- :about => "About",
- :setup => "Setup",
- :date_formats => "Date formats",
- :time_formats => "Time formats"
- },
- :about => {
- :title => "About this demo app",
- :author => "This demo app was written by {{mail_1}}.",
- :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
- :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
},
+
+ # Active Record
:active_record => {
- :too_lazy => "Bugger. No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
- :easy_to_understand => "It's quite easy to understand, though, champ."
- },
- :date_formats => {
- :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
- },
- :date_helper => {
- :date_time_title => "Date/Time distance",
- :forms_title => "Forms"
- },
- :index => {
- :others => "others",
- :introduction => "Strewth! Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
- :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
- },
- :number_helper => {
- :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
- :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ :error => {
+ :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
+ :message => "Please check the following fields, dude:"
+ }
},
- :setup => {
- :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
- :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
- :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
- :config_locale => "Configuring the locale",
- :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales, such as this en-AU locale. Ozzie Ozzie Ozzie!",
- :locale => "Here's the demo locale that was used for this demo application:",
- :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initialiser.",
- :locale_structure_title => "A word on the structure of locales",
- :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
- :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ :active_record => {
+ :error_messages => {
+ :inclusion => "ain't included in the list",
+ :exclusion => "ain't available",
+ :invalid => "ain't valid",
+ :confirmation => "don't match its confirmation",
+ :accepted => "gotta be accepted",
+ :empty => "gotta be given",
+ :blank => "gotta be given",
+ :too_long => "is too long-ish (no more than {{count}} characters)",
+ :too_short => "is too short-ish (no less than {{count}} characters)",
+ :wrong_length => "ain't got the right length (gotta be {{count}} characters)",
+ :taken => "ain't available",
+ :not_a_number => "ain't a number",
+ :greater_than => "gotta be greater than {{count}}",
+ :greater_than_or_equal_to => "gotta be greater than or equal to {{count}}",
+ :equal_to => "gotta be equal to {{count}}",
+ :less_than => "gotta be less than {{count}}",
+ :less_than_or_equal_to => "gotta be less than or equal to {{count}}",
+ :odd => "gotta be odd",
+ :even => "gotta be even"
+ }
},
- :time_formats => {
- :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ :txt => {
+ :main_title => "Localising Rails",
+ :app_name => "Demo Application",
+ :sub_title => "CRIKEY! - how to localise your awesome apps with Rails' new i18n features",
+ :contents => "Contents",
+ :menu => {
+ :introduction => "Introduction",
+ :about => "About",
+ :setup => "Setup",
+ :date_formats => "Date formats",
+ :time_formats => "Time formats"
+ },
+ :about => {
+ :title => "About this demo app",
+ :author => "This demo app was written by {{mail_1}}.",
+ :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
+ :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
+ },
+ :active_record => {
+ :too_lazy => "Bugger. No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
+ :easy_to_understand => "It's quite easy to understand, though, champ."
+ },
+ :date_formats => {
+ :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
+ },
+ :date_helper => {
+ :date_time_title => "Date/Time distance",
+ :forms_title => "Forms"
+ },
+ :index => {
+ :others => "others",
+ :introduction => "Strewth! Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
+ :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
+ },
+ :number_helper => {
+ :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
+ :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ },
+ :setup => {
+ :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
+ :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
+ :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
+ :config_locale => "Configuring the locale",
+ :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales, such as this en-AU locale. Ozzie Ozzie Ozzie!",
+ :locale => "Here's the demo locale that was used for this demo application:",
+ :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initialiser.",
+ :locale_structure_title => "A word on the structure of locales",
+ :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
+ :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ },
+ :time_formats => {
+ :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ }
}
}
}
View
282 config/locales/en-US.rb
@@ -1,155 +1,157 @@
-I18n.backend.store_translations :'en-US', {
- :date => {
- :formats => {
- :default => "%Y-%m-%d",
- :short => "%e %b",
- :long => "%B %e, %Y",
- :long_ordinal => lambda { |date| "%B #{date.day.ordinalize}, %Y" },
- :only_day => "%e"
- },
- :day_names => Date::DAYNAMES,
- :abbr_day_names => Date::ABBR_DAYNAMES,
- :month_names => Date::MONTHNAMES,
- :abbr_month_names => Date::ABBR_MONTHNAMES,
- :order => [:year, :month, :day]
- },
- :time => {
- :formats => {
- :default => "%a %b %d %H:%M:%S %Z %Y",
- :time => "%H:%M",
- :short => "%d %b %H:%M",
- :long => "%B %d, %Y %H:%M",
- :long_ordinal => lambda { |time| "%B #{time.day.ordinalize}, %Y %H:%M" },
- :only_second => "%S"
- },
- :datetime => {
+{
+ :'en-US' => {
+ :date => {
:formats => {
- :default => "%Y-%m-%dT%H:%M:%S%Z"
- }
+ :default => "%Y-%m-%d",
+ :short => "%e %b",
+ :long => "%B %e, %Y",
+ :long_ordinal => lambda { |date| "%B #{date.day.ordinalize}, %Y" },
+ :only_day => "%e"
+ },
+ :day_names => Date::DAYNAMES,
+ :abbr_day_names => Date::ABBR_DAYNAMES,
+ :month_names => Date::MONTHNAMES,
+ :abbr_month_names => Date::ABBR_MONTHNAMES,
+ :order => [:year, :month, :day]
},
- :time_with_zone => {
+ :time => {
:formats => {
- :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ :default => "%a %b %d %H:%M:%S %Z %Y",
+ :time => "%H:%M",
+ :short => "%d %b %H:%M",
+ :long => "%B %d, %Y %H:%M",
+ :long_ordinal => lambda { |time| "%B #{time.day.ordinalize}, %Y %H:%M" },
+ :only_second => "%S"
+ },
+ :datetime => {
+ :formats => {
+ :default => "%Y-%m-%dT%H:%M:%S%Z"
+ }
+ },
+ :time_with_zone => {
+ :formats => {
+ :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ }
+ },
+ :am => 'am',
+ :pm => 'pm'
+ },
+ # date helper distance in words
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => 'half a minute',
+ :less_than_x_seconds => ['less than 1 second', '{{count}} seconds'],
+ :x_seconds => ['1 second', '{{count}} seconds'],
+ :less_than_x_minutes => ['less than a minute', '{{count}} minutes'],
+ :x_minutes => ["1 minute", "{{count}} minutes"],
+ :about_x_hours => ['about 1 hour', '{{count}} hours'],
+ :x_days => ['1 day', '{{count}} days'],
+ :about_x_months => ['about 1 month', '{{count}} months'],
+ :x_months => ['1 month', '{{count}} months'],
+ :about_x_years => ['about 1 year', '{{count}} year'],
+ :over_x_years => ['over 1 year', '{{count}} years']
}
},
- :am => 'am',
- :pm => 'pm'
- },
- # date helper distance in words
- :datetime => {
- :distance_in_words => {
- :half_a_minute => 'half a minute',
- :less_than_x_seconds => ['less than 1 second', '{{count}} seconds'],
- :x_seconds => ['1 second', '{{count}} seconds'],
- :less_than_x_minutes => ['less than a minute', '{{count}} minutes'],
- :x_minutes => ['1 minute', '{{count}} minutes'],
- :about_x_hours => ['about 1 hour', '{{count}} hours'],
- :x_days => ['1 day', '{{count}} days'],
- :about_x_months => ['about 1 month', '{{count}} months'],
- :x_months => ['1 month', '{{count}} months'],
- :about_x_years => ['about 1 year', '{{count}} year'],
- :over_x_years => ['over 1 year', '{{count}} years']
- }
- },
- # numbers
- :number => {
- :format => {
- :precision => 3,
- :separator => ',',
- :delimiter => '.'
- },
- :currency => {
+ # numbers
+ :number => {
:format => {
- :unit => '$',
- :precision => 2,
- :format => '%n %u'
+ :precision => 3,
+ :separator => ',',
+ :delimiter => '.'
+ },
+ :currency => {
+ :format => {
+ :unit => '$',
+ :precision => 2,
+ :format => '%u %n'
+ }
}
- }
- },
-
- # Active Record
- :active_record => {
- :error => {
- :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
- :message => "Please check the following fields:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "is not included in the list",
- :exclusion => "is not available",
- :invalid => "is not valid",
- :confirmation => "does not match its confirmation",
- :accepted => "must be accepted",
- :empty => "must be given",
- :blank => "must be given",
- :too_long => "is too long (no more than {{count}} characters)",
- :too_short => "is too short (no less than {{count}} characters)",
- :wrong_length => "is not the right length (must be {{count}} characters)",
- :taken => "is not available",
- :not_a_number => "is not a number",
- :greater_than => "must be greater than {{count}}",
- :greater_than_or_equal_to => "must be greater than or equal to {{count}}",
- :equal_to => "must be equal to {{count}}",
- :less_than => "must be less than {{count}}",
- :less_than_or_equal_to => "must be less than or equal to {{count}}",
- :odd => "must be odd",
- :even => "must be even"
- }
- },
- :txt => {
- :main_title => "Localizing Rails",
- :app_name => "Demo Application",
- :sub_title => "how to localize your app with Rails' new i18n features",
- :contents => "Contents",
- :menu => {
- :introduction => "Introduction",
- :about => "About",
- :setup => "Setup",
- :date_formats => "Date formats",
- :time_formats => "Time formats"
- },
- :about => {
- :title => "About this demo app",
- :author => "This demo app was written by {{mail_1}}.",
- :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
- :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
},
+
+ # Active Record
:active_record => {
- :too_lazy => "No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
- :easy_to_understand => "It's quite easy to understand, though."
- },
- :date_formats => {
- :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
- },
- :date_helper => {
- :date_time_title => "Date/Time distance",
- :forms_title => "Forms"
- },
- :index => {
- :others => "others",
- :introduction => "Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
- :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
- },
- :number_helper => {
- :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
- :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ :error => {
+ :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
+ :message => "Please check the following fields:"
+ }
},
- :setup => {
- :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
- :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
- :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
- :config_locale => "Configuring the locale",
- :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales.",
- :locale => "Here's the demo locale that was used for this demo application:",
- :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initializer.",
- :locale_structure_title => "A word on the structure of locales",
- :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
- :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ :active_record => {
+ :error_messages => {
+ :inclusion => "is not included in the list",
+ :exclusion => "is not available",
+ :invalid => "is not valid",
+ :confirmation => "does not match its confirmation",
+ :accepted => "must be accepted",
+ :empty => "must be given",
+ :blank => "must be given",
+ :too_long => "is too long (no more than {{count}} characters)",
+ :too_short => "is too short (no less than {{count}} characters)",
+ :wrong_length => "is not the right length (must be {{count}} characters)",
+ :taken => "is not available",
+ :not_a_number => "is not a number",
+ :greater_than => "must be greater than {{count}}",
+ :greater_than_or_equal_to => "must be greater than or equal to {{count}}",
+ :equal_to => "must be equal to {{count}}",
+ :less_than => "must be less than {{count}}",
+ :less_than_or_equal_to => "must be less than or equal to {{count}}",
+ :odd => "must be odd",
+ :even => "must be even"
+ }
},
- :time_formats => {
- :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ :txt => {
+ :main_title => "Localizing Rails",
+ :app_name => "Demo Application",
+ :sub_title => "how to localize your app with Rails' new i18n features",
+ :contents => "Contents",
+ :menu => {
+ :introduction => "Introduction",
+ :about => "About",
+ :setup => "Setup",
+ :date_formats => "Date formats",
+ :time_formats => "Time formats"
+ },
+ :about => {
+ :title => "About this demo app",
+ :author => "This demo app was written by {{mail_1}}.",
+ :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
+ :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
+ },
+ :active_record => {
+ :too_lazy => "No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
+ :easy_to_understand => "It's quite easy to understand, though."
+ },
+ :date_formats => {
+ :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
+ },
+ :date_helper => {
+ :date_time_title => "Date/Time distance",
+ :forms_title => "Forms"
+ },
+ :index => {
+ :others => "others",
+ :introduction => "Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
+ :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
+ },
+ :number_helper => {
+ :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
+ :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ },
+ :setup => {
+ :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
+ :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
+ :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
+ :config_locale => "Configuring the locale",
+ :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales.",
+ :locale => "Here's the demo locale that was used for this demo application:",
+ :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initializer.",
+ :locale_structure_title => "A word on the structure of locales",
+ :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
+ :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ },
+ :time_formats => {
+ :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ }
}
}
}
View
292 config/locales/gibberish.rb
@@ -1,158 +1,160 @@
-I18n.backend.store_translations :'gibberish', {
- # date and time formats
- :date => {
- :formats => {
- :default => "%Y-%m-%d (ish)",
- :short => "%e %b (ish)",
- :long => "%B %e, %Y (ish)",
- :long_ordinal => lambda { |date| "%B #{date.day}ish, %Y" },
- :only_day => lambda { |date| "#{date.day}ish"}
- },
- :day_names => %w(Sunday-ish Monday-ish Tuesday-ish Wednesday-ish Thursday-ish Friday-ish Saturday-ish),
- :abbr_day_names => %w(Sun-i Mon-i Tue-i Wed-i Thu-i Fri-i Sat-i),
- :month_names => [nil] + %w(January-ish February-ish March-ish April-ish May-ish June-ish
- July-ish August-ish September-ish October-ish November-rish December-ish),
- :abbr_month_names => [nil] + %w(Jan-i Feb-i Mar-i Apr-i May-i Jun-i Jul-i Aug-i Sep-i Oct-i Nov-i Dec-i),
- :order => [:day, :month, :year]
- },
- :time => {
- :formats => {
- :default => "%a %b %d %H:%M:%S %Z %Y (ish)",
- :time => "%H:%M (ish)",
- :short => "%d %b %H:%M (ish)",
- :long => "%B %d, %Y %H:%M (ish)",
- :long_ordinal => lambda { |time| "%B #{time.day}ish, %Y %H:%M" },
- :only_second => "%S (ish)"
- },
- :datetime => {
- :formats => {
- :default => "%Y-%m-%dT%H:%M:%S%Z"
- }
+{
+ :'gibberish' => {
+ # date and time formats
+ :date => {
+ :formats => {
+ :default => "%Y-%m-%d (ish)",
+ :short => "%e %b (ish)",
+ :long => "%B %e, %Y (ish)",
+ :long_ordinal => lambda { |date| "%B #{date.day}ish, %Y" },
+ :only_day => lambda { |date| "#{date.day}ish"}
},
- :time_with_zone => {
- :formats => {
- :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
- }
+ :day_names => %w(Sunday-ish Monday-ish Tuesday-ish Wednesday-ish Thursday-ish Friday-ish Saturday-ish),
+ :abbr_day_names => %w(Sun-i Mon-i Tue-i Wed-i Thu-i Fri-i Sat-i),
+ :month_names => [nil] + %w(January-ish February-ish March-ish April-ish May-ish June-ish
+ July-ish August-ish September-ish October-ish November-rish December-ish),
+ :abbr_month_names => [nil] + %w(Jan-i Feb-i Mar-i Apr-i May-i Jun-i Jul-i Aug-i Sep-i Oct-i Nov-i Dec-i),
+ :order => [:day, :month, :year]
+ },
+ :time => {
+ :formats => {
+ :default => "%a %b %d %H:%M:%S %Z %Y (ish)",
+ :time => "%H:%M (ish)",
+ :short => "%d %b %H:%M (ish)",
+ :long => "%B %d, %Y %H:%M (ish)",
+ :long_ordinal => lambda { |time| "%B #{time.day}ish, %Y %H:%M" },
+ :only_second => "%S (ish)"
},
- :am => 'am-ish',
- :pm => 'pm-ish'
- },
-
- # date helper distance in words
- :datetime => {
- :distance_in_words => {
- :half_a_minute => 'a half-ish minute',
- :less_than_x_seconds => ['less than 1 second', '{{count}}ish seconds'],
- :x_seconds => ['1 second', '{{count}}ish seconds'],
- :less_than_x_minutes => ['less than a minute', '{{count}}ish minutes'],
- :x_minutes => ['1 minute', '{{count}}ish minutes'],
- :about_x_hours => ['about 1 hour', '{{count}}ish hours'],
- :x_days => ['1 day', '{{count}}ish days'],
- :about_x_months => ['about 1 month', '{{count}}ish months'],
- :x_months => ['1 month', '{{count}}ish months'],
- :about_x_years => ['about 1 year', '{{count}}ish year'],
- :over_x_years => ['over 1 year', '{{count}}ish years']
- }
- },
+ :datetime => {
+ :formats => {
+ :default => "%Y-%m-%dT%H:%M:%S%Z"
+ }
+ },
+ :time_with_zone => {
+ :formats => {
+ :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ }
+ },
+ :am => 'am-ish',
+ :pm => 'pm-ish'
+ },
- # numbers
- :number => {
- :format => {
- :precision => 3,
- :separator => ',',
- :delimiter => '.'
+ # date helper distance in words
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => 'a half-ish minute',
+ :less_than_x_seconds => ['less than 1 second', '{{count}}ish seconds'],
+ :x_seconds => ['1 second', '{{count}}ish seconds'],
+ :less_than_x_minutes => ['less than a minute', '{{count}}ish minutes'],
+ :x_minutes => ['1 minute', '{{count}}ish minutes'],
+ :about_x_hours => ['about 1 hour', '{{count}}ish hours'],
+ :x_days => ['1 day', '{{count}}ish days'],
+ :about_x_months => ['about 1 month', '{{count}}ish months'],
+ :x_months => ['1 month', '{{count}}ish months'],
+ :about_x_years => ['about 1 year', '{{count}}ish year'],
+ :over_x_years => ['over 1 year', '{{count}}ish years']
+ }
},
- :currency => {
+
+ # numbers
+ :number => {
:format => {
- :unit => 'Gib-$',
- :precision => 2,
- :format => '%n %u'
+ :precision => 3,
+ :separator => ',',
+ :delimiter => '.'
+ },
+ :currency => {
+ :format => {
+ :unit => 'Gib-$',
+ :precision => 2,
+ :format => '%n %u'
+ }
}
- }
- },
-
- # Active Record
- :active_record => {
- :error => {
- :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
- :message => "Please check the following fields, dude:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "ain't included in the list",
- :exclusion => "ain't available",
- :invalid => "ain't valid",
- :confirmation => "don't match its confirmation",
- :accepted => "gotta be accepted",
- :empty => "gotta be given",
- :blank => "gotta be given",
- :too_long => "is too long-ish (no more than {{count}} characters)",
- :too_short => "is too short-ish (no less than {{count}} characters)",
- :wrong_length => "ain't got the right length (gotta be {{count}} characters)",
- :taken => "ain't available",
- :not_a_number => "ain't a number",
- :greater_than => "gotta be greater than {{count}}",
- :greater_than_or_equal_to => "gotta be greater than or equal to {{count}}",
- :equal_to => "gotta be equal to {{count}}",
- :less_than => "gotta be less than {{count}}",
- :less_than_or_equal_to => "gotta be less than or equal to {{count}}",
- :odd => "gotta be odd",
- :even => "gotta be even"
- }
- },
- :txt => {
- :main_title => "Localizing Rails (ish)",
- :app_name => "Demo Applicationomnomnom",
- :sub_title => "how to localize your app with Rails' new i18n features",
- :contents => "Contents",
- :menu => {
- :introduction => "Introductionarinos",
- :about => "Abouteroo",
- :setup => "Setupupup",
- :date_formats => "Date formatsks",
- :time_formats => "Time formatsks"
- },
- :about => {
- :title => "About this demo app",
- :author => "This demo app was written by {{mail_1}}.",
- :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
- :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
},
+
+ # Active Record
:active_record => {
- :too_lazy => "No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
- :easy_to_understand => "It's quite easy to understand, though."
- },
- :date_formats => {
- :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
- },
- :date_helper => {
- :date_time_title => "Date/Time distance",
- :forms_title => "Forms"
- },
- :index => {
- :others => "others",
- :introduction => "Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
- :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
- },
- :number_helper => {
- :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
- :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ :error => {
+ :header_message => ["Couldn't save this {{object_name}}: 1 error", "Couldn't save this {{object_name}}: {{count}} errors."],
+ :message => "Please check the following fields, dude:"
+ }
},
- :setup => {
- :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
- :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
- :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
- :config_locale => "Configuring the locale",
- :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales.",
- :locale => "Here's the demo locale that was used for this demo application:",
- :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initializer.",
- :locale_structure_title => "A word on the structure of locales",
- :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
- :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ :active_record => {
+ :error_messages => {
+ :inclusion => "ain't included in the list",
+ :exclusion => "ain't available",
+ :invalid => "ain't valid",
+ :confirmation => "don't match its confirmation",
+ :accepted => "gotta be accepted",
+ :empty => "gotta be given",
+ :blank => "gotta be given",
+ :too_long => "is too long-ish (no more than {{count}} characters)",
+ :too_short => "is too short-ish (no less than {{count}} characters)",
+ :wrong_length => "ain't got the right length (gotta be {{count}} characters)",
+ :taken => "ain't available",
+ :not_a_number => "ain't a number",
+ :greater_than => "gotta be greater than {{count}}",
+ :greater_than_or_equal_to => "gotta be greater than or equal to {{count}}",
+ :equal_to => "gotta be equal to {{count}}",
+ :less_than => "gotta be less than {{count}}",
+ :less_than_or_equal_to => "gotta be less than or equal to {{count}}",
+ :odd => "gotta be odd",
+ :even => "gotta be even"
+ }
},
- :time_formats => {
- :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ :txt => {
+ :main_title => "Localizing Rails (ish)",
+ :app_name => "Demo Applicationomnomnom",
+ :sub_title => "how to localize your app with Rails' new i18n features",
+ :contents => "Contents",
+ :menu => {
+ :introduction => "Introductionarinos",
+ :about => "Abouteroo",
+ :setup => "Setupupup",
+ :date_formats => "Date formatsks",
+ :time_formats => "Time formatsks"
+ },
+ :about => {
+ :title => "About this demo app",
+ :author => "This demo app was written by {{mail_1}}.",
+ :feedback => "If you have any feedback, please feel free to drop me a line. Also visit {{blog_href}} where I regularly blog about Rails and other stuff.",
+ :licence => "This demo app and all its contents are licensed under the {{licence_href}}. If you want to use it in ways prohibited by this license, please contact me and ask my permission."
+ },
+ :active_record => {
+ :too_lazy => "No examples here since I'm too lazy to think of attributes to show <strong>all</strong> custom error messages. ;-)",
+ :easy_to_understand => "It's quite easy to understand, though."
+ },
+ :date_formats => {
+ :rails_standards_work => "Rails standard formats (Date::DATE_FORMATS) still work:"
+ },
+ :date_helper => {
+ :date_time_title => "Date/Time distance",
+ :forms_title => "Forms"
+ },
+ :index => {
+ :others => "others",
+ :introduction => "Lately, a lot of work has been done by {{sven_blog}} and {{sven_github}} to facilitate future internationalization and localization of Rails.",
+ :story_so_far => "This demo app tries to show you how you can use the features that have been implemented so far to localize big parts of your Rails application."
+ },
+ :number_helper => {
+ :note_one => "Note: <code>number_to_phone</code> hasn't been localized yet and probably never will be - at least not in core. Look out for new internationalization/localization plugins like a new version of {{globalize}} as they will probably support stuff like that.",
+ :note_two => "Another note: <code>number_to_currency</code>, <code>number_to_percentage</code> and <code>number_to_human_size</code> all use <code>number_with_precision</code> internally and <code>number_with_precision</code> uses <code>number_with_delimiter</code> internally."
+ },
+ :setup => {
+ :freezing_edge_and_adding => "Freezing Edge and installing the localized_dates plugin",
+ :you_need_to_be_on_edge => "You need to be on Edge Rails in order to use the Rails i18n features:",
+ :date_time_formats => "For date and time formats, you also need to install the {{localized_dates_link}}:",
+ :config_locale => "Configuring the locale",
+ :best_place => "The best place to put your locale configuration, in my opinion, is <code>config/locales</code>. The localized_dates plugin will copy two locales, en-US and de-AT, in this directory. You can extend or modify them and also create new locales.",
+ :locale => "Here's the demo locale that was used for this demo application:",
+ :defaults => "You also need to set up the default locale and/or locale in your <code>environment.rb</code> or an initializer.",
+ :locale_structure_title => "A word on the structure of locales",
+ :locale_structure_number => "You may have noticed that inside the <code>:number</code> part of the locale, we defined <code>:format</code> and <code>:currency</code>. In general, locales are structured hierarchically - i.e. a currencies are numbers, percentages are numbers, etc. <code>:currency</code> can either override the basic <code>:format</code> settings (in our case, we set <code>:precision</code> to 2 instead of 3) or extend them (we add two new options, <code>:unit</code> and <code>:format</code>).",
+ :locale_structure_date_time => "The same holds true for dates and times: If needed, <code>:datetime</code> and <code>:time_with_zone</code> can be used to specifically address formatting of their respective types instead of just relying on the settings for <code>:time</code>. Note, however, that usually you want to use the same formats as <code>:time</code>."
+ },
+ :time_formats => {
+ :rails_standards_work => "Rails standard formats (Time::DATE_FORMATS) still work:"
+ }
}
}
}
View
278 config/locales/ja-JP.rb
@@ -1,150 +1,152 @@
-I18n.backend.store_translations :'ja-JP', {
- # date and time formats
- :date => {
- :formats => {
- :default => "%Y-%m-%d",
- :short => "%e %b",
- :long => "%B %e, %Y",
- :long_ordinal => lambda { |date| "%B #{date.day}, %Y" },
- :only_day => "%e"
+{
+ :'ja-JP' => {
+ # date and time formats
+ :date => {
+ :formats => {
+ :default => "%Y-%m-%d",
+ :short => "%e %b",
+ :long => "%B %e, %Y",
+ :long_ordinal => lambda { |date| "%B #{date.day}, %Y" },
+ :only_day => "%e"
+ },
+ :day_names => %w(日曜日 月曜日 火曜日 水曜日 木曜日 金曜日 土曜日),
+ :abbr_day_names => %w(日 月 火 水 木 金 土),
+ :month_names => [nil] + %w(1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月),
+ :abbr_month_names => [nil] + %w(1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月),
+ :order => [:year, :month, :day]
},
- :day_names => %w(日曜日 月曜日 火曜日 水曜日 木曜日 金曜日 土曜日),
- :abbr_day_names => %w(日 月 火 水 木 金 土),
- :month_names => [nil] + %w(1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月),
- :abbr_month_names => [nil] + %w(1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月),
- :order => [:year, :month, :day]
- },
- :time => {
- :formats => {
- :default => "%a %b %d %H:%M:%S %Z %Y",
- :time => "%H:%M",
- :short => "%d %b %H:%M",
- :long => "%B %d, %Y %H:%M",
- :long_ordinal => lambda { |time| "%B #{time.day}, %Y %H:%M" },
- :only_second => "%S"
+ :time => {
+ :formats => {
+ :default => "%a %b %d %H:%M:%S %Z %Y",
+ :time => "%H:%M",
+ :short => "%d %b %H:%M",
+ :long => "%B %d, %Y %H:%M",
+ :long_ordinal => lambda { |time| "%B #{time.day}, %Y %H:%M" },
+ :only_second => "%S"
+ },
+ :am => '',
+ :pm => ''
},
- :am => '',
- :pm => ''
- },
- # date helper distance in words
- :datetime => {
- :distance_in_words => {
- :half_a_minute => '30分',
- :less_than_x_seconds => ['1 秒以下', '{{count}} 秒以下'],
- :x_seconds => ['1 秒', '{{count}} 秒'],
- :less_than_x_minutes => ['1 分以下', '{{count}} 分以下'],
- :x_minutes => ['1 分', '{{count}} 分'],
- :about_x_hours => ['約 1 時間', '約 {{count}} 時間'],
- :x_days => ['1 日', '{{count}} 日'],
- :about_x_months => ['約 1 ヶ月', '約 {{count}} ヶ月'],
- :x_months => ['1 ヶ月', '{{count}} ヶ月'],
- :about_x_years => ['約 1 年', '約 {{count}} 年'],
- :over_x_years => ['1 年以上', '{{count}} 年以上']
- }
- },
-
- # numbers
- :number => {
- :format => {
- :precision => 3,
- :separator => '.',
- :delimiter => ','
+ # date helper distance in words
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => '30分',
+ :less_than_x_seconds => ['1 秒以下', '{{count}} 秒以下'],
+ :x_seconds => ['1 秒', '{{count}} 秒'],
+ :less_than_x_minutes => ['1 分以下', '{{count}} 分以下'],
+ :x_minutes => ['1 分', '{{count}} 分'],
+ :about_x_hours => ['約 1 時間', '約 {{count}} 時間'],
+ :x_days => ['1 日', '{{count}} 日'],
+ :about_x_months => ['約 1 ヶ月', '約 {{count}} ヶ月'],
+ :x_months => ['1 ヶ月', '{{count}} ヶ月'],
+ :about_x_years => ['約 1 年', '約 {{count}} 年'],
+ :over_x_years => ['1 年以上', '{{count}} 年以上']
+ }
},
- :currency => {
+
+ # numbers
+ :number => {
:format => {
- :unit => '¥',
- :precision => 2,
- :format => '%u %n'
+ :precision => 3,
+ :separator => '.',
+ :delimiter => ','
+ },
+ :currency => {
+ :format => {
+ :unit => '¥',
+ :precision => 2,
+ :format => '%u%n'
+ }
}
- }
- },
-
- # Active Record
- :active_record => {
- :error => {
- :header_message => ["保存できませんでした {{object_name}}: 1 エラー", "保存できませんでした {{object_name}}: {{count}} エラー."],
- :message => "以下のメッセージを確認してください:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "は、リストに含まれていません",
- :exclusion => "は、有効な値ではありません",
- :invalid => "は、妥当な値ではありません",
- :confirmation => "は、確認できません",
- :accepted => "は、入力できません",
- :empty => "何も入力されていません",
- :blank => "空白です",
- :too_long => "長すぎます ({{count}}文字以下)",
- :too_short => "短すぎます ({{count}}文字以上)",
- :wrong_length => "桁数が合っていません({{count}}桁必要です)",
- :taken => "有効ではありません",
- :not_a_number => "数字ではありません",
- :greater_than => "{{count}}文字を超えて入力されています",
- :greater_than_or_equal_to => "{{count}}文字以上入力されています",
- :equal_to => "{{count}}と同値です",
- :less_than => "{{count}}文字未満です",
- :less_than_or_equal_to => "{{count}}文字以下で入力されています",
- :odd => "端数が入力されています",
- :even => "偶数が入力されています"
- }
- },
- :txt => {
- :main_title => "Railsをローカライズする",
- :app_name => "デモ アプリケーション",
- :sub_title => "新しいi18nの特徴を用いてアプリケーションをローカライズする方法",
- :contents => "コンテンツ",
- :menu => {
- :about => "デモアプリについて",
- :introduction => "導入",
- :setup => "設定",
- :date_formats => "日付フォーマット",
- :time_formats => "時間フォーマット"
- },
- :about => {
- :title => "デモアプリについて",
- :author => "このデモアプリは、{{mail_1}}と{{mail_2}}によって書かれています。",
- :feedback => "ご意見ご感想がありましたら、気軽にメールを頂ければ幸いです。また、Railsやその他のことについて、定期的に更新している私のブログも是非{{blog_href}}ご覧ください。",
- :licence => "このデモアプリとすべてのコンテンツライセンスは、{{licence_href}}にあります。もし、このライセンスによって禁止されている方法での使用をご検討の場合は、事前に私の許可を得るようにしてください。"
},
+
+ # Active Record
:active_record => {
- :too_lazy => "例はまだ載せていません。カスタムエラーメッセージの<strong>全て</strong>を表示するアトリビュートを考えるのがめんどくさくて・・・ ;-)",
- :easy_to_understand => "まぁ、理解するのは簡単だと思うんだけど・・・."
- },
- :date_formats => {
- :rails_standards_work => "Railsの標準フォーマット(Date::DATE_FORMATS)は有効です:"
- },
- :date_helper => {
- :date_time_title => "日付/時間 距離",
- :forms_title => "フォーム"
- },
- :index => {
- :others => "others",
- :introduction => "最近になり、{{sven_blog}} や {{sven_github}}によって、Railsにおけるインターナショナライゼーションやローカライゼーションを促進する多くの仕事がなされました。",
- :story_so_far => "このデモアプリは、あなたのアプリにおける大部分をローカライズするために、今まで実装されてきた特徴をどのように使用するかを示しています。"
- },
- :number_helper => {
- :note_one => "注意1: <code>number_to_phone</code> は、まだローカライズされていません。 そして、 おそらく今後もローカライズはされないのではと思います。- 少なくともコアには。 {{globalize}}の新しいバージョンのような新しいインターナショナライゼーションもしくは、ローカライゼーション・プラグインはこちらでお探しください。おそらく、彼らもプラグインをサポートすると思うので。",
- :note_two => "注意2: <code>number_to_currency</code>、<code>number_to_percentage</code>、 <code>number_to_human_size</code>は、すべて<code>number_with_precision</code>を内部的に使用しています。そして <code>number_with_precision</code>は、<code>number_with_delimiter</code>を内部的に使用しています。"
- },
- :setup => {
- :freezing_edge_and_adding => "Edgeを解凍し、localized_datesプラグインをインストールします。",
- :you_need_to_be_on_edge => "Rails i18nの特徴を使用するためには、Edge Rails上でアプリを動作させる必要があります:",
- :date_time_formats => "日付と時間のフォーマットには、{{localized_dates_link}}も併せてインストールする必要があります:",
- :config_locale => "ローカルの設定",
- :best_place => "自身のlocale設定ファイルを格納すべき、一番最適な場所は、私の意見では、<code>config/locales</code>が良いだろうと思います。localized_datesプラグインは、このディレクトリにen-USとde-AT、2つのlocaleファイルをコピーします。あなたは、それらを拡張もしくは、修正することもできますし、新しいローカルファイルを作る事もできます。",
- :locale => "こちらが、このデモアプリケーションで使用したデモ・localeファイルです。:",
- :defaults => "default locale かつ/もしくは、 localeをあなた自身の<code>environment.rb</code>かinitializerに設定します.",
- :locale_structure_title => "localeの構造について",
- :locale_structure_number => "お気づきの通り、localeの<code>:number</code>パート内部に、<code>:format</code>と<code>:currency</code>を定義しています。一般的に、ローカルファイルは階層構造になっています。 - つまり、通貨は数字ですし、パーセンテージも数字です、などなど。<code>:currency</code>は、 基本となる<code>:format</code>設定を上書きするか、(私たちのケースでは、<code>:precision</code>に3の代わりに2を設定しています。)それらを拡張して使用します(同じく、私たちのケースでは、2つの新しいオプション<code>:unit</code>と<code>:format</code>を追加しています。)。",
- :locale_structure_date_time => "同様のことが日付と時間にも言えます: 必要ならば、<code>:datetime</code>と<code>:time_with_zone</code>は、通常、依存している<code>:time</code>の設定の代わりに、それぞれの型を定義した明確なアドレスフォーマットを使用することもできます。しかしながら、たいていは、<code>:time</code>と同様のフォーマットになると思います。"
+ :error => {
+ :header_message => ["保存できませんでした {{object_name}}: 1 エラー", "保存できませんでした {{object_name}}: {{count}} エラー."],
+ :message => "以下のメッセージを確認してください:"
+ }
},
- :time_formats => {
- :rails_standards_work => "Railsの標準フォーマット(Time::DATE_FORMATS)は有効です:"
+ :active_record => {
+ :error_messages => {
+ :inclusion => "は、リストに含まれていません",
+ :exclusion => "は、有効な値ではありません",
+ :invalid => "は、妥当な値ではありません",
+ :confirmation => "は、確認できません",
+ :accepted => "は、入力できません",
+ :empty => "何も入力されていません",
+ :blank => "空白です",
+ :too_long => "長すぎます ({{count}}文字以下)",
+ :too_short => "短すぎます ({{count}}文字以上)",
+ :wrong_length => "桁数が合っていません({{count}}桁必要です)",
+ :taken => "有効ではありません",
+ :not_a_number => "数字ではありません",
+ :greater_than => "{{count}}文字を超えて入力されています",
+ :greater_than_or_equal_to => "{{count}}文字以上入力されています",
+ :equal_to => "{{count}}と同値です",
+ :less_than => "{{count}}文字未満です",
+ :less_than_or_equal_to => "{{count}}文字以下で入力されています",
+ :odd => "端数が入力されています",
+ :even => "偶数が入力されています"
+ }
},
- :ipe =>{
- :click => "クリック!"
+ :txt => {
+ :main_title => "Railsをローカライズする",
+ :app_name => "デモ アプリケーション",
+ :sub_title => "新しいi18nの特徴を用いてアプリケーションをローカライズする方法",
+ :contents => "コンテンツ",
+ :menu => {
+ :about => "デモアプリについて",
+ :introduction => "導入",
+ :setup => "設定",
+ :date_formats => "日付フォーマット",
+ :time_formats => "時間フォーマット"
+ },
+ :about => {
+ :title => "デモアプリについて",
+ :author => "このデモアプリは、{{mail_1}}と{{mail_2}}によって書かれています。",
+ :feedback => "ご意見ご感想がありましたら、気軽にメールを頂ければ幸いです。また、Railsやその他のことについて、定期的に更新している私のブログも是非{{blog_href}}ご覧ください。",
+ :licence => "このデモアプリとすべてのコンテンツライセンスは、{{licence_href}}にあります。もし、このライセンスによって禁止されている方法での使用をご検討の場合は、事前に私の許可を得るようにしてください。"
+ },
+ :active_record => {
+ :too_lazy => "例はまだ載せていません。カスタムエラーメッセージの<strong>全て</strong>を表示するアトリビュートを考えるのがめんどくさくて・・・ ;-)",
+ :easy_to_understand => "まぁ、理解するのは簡単だと思うんだけど・・・."
+ },
+ :date_formats => {
+ :rails_standards_work => "Railsの標準フォーマット(Date::DATE_FORMATS)は有効です:"
+ },
+ :date_helper => {
+ :date_time_title => "日付/時間 距離",
+ :forms_title => "フォーム"
+ },
+ :index => {
+ :others => "others",
+ :introduction => "最近になり、{{sven_blog}} や {{sven_github}}によって、Railsにおけるインターナショナライゼーションやローカライゼーションを促進する多くの仕事がなされました。",
+ :story_so_far => "このデモアプリは、あなたのアプリにおける大部分をローカライズするために、今まで実装されてきた特徴をどのように使用するかを示しています。"
+ },
+ :number_helper => {
+ :note_one => "注意1: <code>number_to_phone</code> は、まだローカライズされていません。 そして、 おそらく今後もローカライズはされないのではと思います。- 少なくともコアには。 {{globalize}}の新しいバージョンのような新しいインターナショナライゼーションもしくは、ローカライゼーション・プラグインはこちらでお探しください。おそらく、彼らもプラグインをサポートすると思うので。",
+ :note_two => "注意2: <code>number_to_currency</code>、<code>number_to_percentage</code>、 <code>number_to_human_size</code>は、すべて<code>number_with_precision</code>を内部的に使用しています。そして <code>number_with_precision</code>は、<code>number_with_delimiter</code>を内部的に使用しています。"
+ },
+ :setup => {
+ :freezing_edge_and_adding => "Edgeを解凍し、localized_datesプラグインをインストールします。",
+ :you_need_to_be_on_edge => "Rails i18nの特徴を使用するためには、Edge Rails上でアプリを動作させる必要があります:",
+ :date_time_formats => "日付と時間のフォーマットには、{{localized_dates_link}}も併せてインストールする必要があります:",
+ :config_locale => "ローカルの設定",
+ :best_place => "自身のlocale設定ファイルを格納すべき、一番最適な場所は、私の意見では、<code>config/locales</code>が良いだろうと思います。localized_datesプラグインは、このディレクトリにen-USとde-AT、2つのlocaleファイルをコピーします。あなたは、それらを拡張もしくは、修正することもできますし、新しいローカルファイルを作る事もできます。",
+ :locale => "こちらが、このデモアプリケーションで使用したデモ・localeファイルです。:",
+ :defaults => "default locale かつ/もしくは、 localeをあなた自身の<code>environment.rb</code>かinitializerに設定します.",
+ :locale_structure_title => "localeの構造について",
+ :locale_structure_number => "お気づきの通り、localeの<code>:number</code>パート内部に、<code>:format</code>と<code>:currency</code>を定義しています。一般的に、ローカルファイルは階層構造になっています。 - つまり、通貨は数字ですし、パーセンテージも数字です、などなど。<code>:currency</code>は、 基本となる<code>:format</code>設定を上書きするか、(私たちのケースでは、<code>:precision</code>に3の代わりに2を設定しています。)それらを拡張して使用します(同じく、私たちのケースでは、2つの新しいオプション<code>:unit</code>と<code>:format</code>を追加しています。)。",
+ :locale_structure_date_time => "同様のことが日付と時間にも言えます: 必要ならば、<code>:datetime</code>と<code>:time_with_zone</code>は、通常、依存している<code>:time</code>の設定の代わりに、それぞれの型を定義した明確なアドレスフォーマットを使用することもできます。しかしながら、たいていは、<code>:time</code>と同様のフォーマットになると思います。"
+ },
+ :time_formats => {
+ :rails_standards_work => "Railsの標準フォーマット(Time::DATE_FORMATS)は有効です:"
+ },
+ :ipe =>{
+ :click => "クリック!"
+ }
}
}
-}
+}
View
184 config/locales/no-BM.rb
@@ -1,106 +1,106 @@
-## no-BM.rb
-
-I18n.backend.store_translations :"no-BM", {
- :support => {
- :array => {
- :sentence_connector => "og"
- }
- },
- :date => {
- :formats => {
- :default => "%Y-%m-%d",
- :short => "%b %d",
- :long => "%B %d, %Y",
- :only_day => "%e"
+{
+ :"no-BM" => {
+ :support => {
+ :array => {
+ :sentence_connector => "og"
+ }
},
- :day_names => Date::DAYNAMES,
- :abbr_day_names => Date::ABBR_DAYNAMES,
- :month_names => Date::MONTHNAMES,
- :abbr_month_names => Date::ABBR_MONTHNAMES,
- :order => [:year, :month, :day]
- },
- :time => {
- :formats => {
- :default => "%a, %d %b %Y %H:%M:%S %z",
- :short => "%d %b %H:%M",
- :long => "%B %d, %Y %H:%M",
- :only_second => "%S"
+ :date => {
+ :formats => {
+ :default => "%Y-%m-%d",
+ :short => "%b %d",
+ :long => "%B %d, %Y",
+ :only_day => "%e"
+ },
+ :day_names => Date::DAYNAMES,
+ :abbr_day_names => Date::ABBR_DAYNAMES,
+ :month_names => Date::MONTHNAMES,
+ :abbr_month_names => Date::ABBR_MONTHNAMES,
+ :order => [:year, :month, :day]
},
- :am => "am",
- :pm => "pm"
- },
- :datetime => {
- :distance_in_words => {
- :half_a_minute => "et halvt minutt",
- :less_than_x_seconds => ["mindre enn 1 sekund", "mindre enn {{count}} sekunder"],
- :x_seconds => ["1 sekund", "{{count}} sekunder"],
- :less_than_x_minutes => ["mindre enn 1 minutt", "mindre enn {{count}} minutter"],
- :x_minutes => ["1 minutt", "{{count}} minutter"],
- :about_x_hours => ["ca. 1 time", "ca. {{count}} timer"],
- :x_days => ["1 dag", "{{count}} dager"],
- :about_x_months => ["ca. 1 måned", "ca. {{count}} måneder"],
- :x_months => ["1 måned", "{{count}} måneder"],
- :about_x_years => ["ca. 1 år", "ca. {{count}} år"],
- :over_x_years => ["over 1 år", "over {{count}} år"]
- }
- },
- :number => {
- :format => {
- :precision => 3,
- :separator => ".",
- :delimiter => ","
+ :time => {
+ :formats => {
+ :default => "%a, %d %b %Y %H:%M:%S %z",
+ :short => "%d %b %H:%M",
+ :long => "%B %d, %Y %H:%M",
+ :only_second => "%S"
+ },
+ :am => "am",
+ :pm => "pm"
},
- :currency => {
- :format => {
- :unit => "$",
- :precision => 2,
- :format => "%u%n"
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => "et halvt minutt",
+ :less_than_x_seconds => ["mindre enn 1 sekund", "mindre enn {{count}} sekunder"],
+ :x_seconds => ["1 sekund", "{{count}} sekunder"],
+ :less_than_x_minutes => ["mindre enn 1 minutt", "mindre enn {{count}} minutter"],
+ :x_minutes => ["1 minutt", "{{count}} minutter"],
+ :about_x_hours => ["ca. 1 time", "ca. {{count}} timer"],
+ :x_days => ["1 dag", "{{count}} dager"],
+ :about_x_months => ["ca. 1 måned", "ca. {{count}} måneder"],
+ :x_months => ["1 måned", "{{count}} måneder"],
+ :about_x_years => ["ca. 1 år", "ca. {{count}} år"],
+ :over_x_years => ["over 1 år", "over {{count}} år"]
}
},
- :human => {
+ :number => {
:format => {
- :precision => 1,
- :delimiter => ""
+ :precision => 3,
+ :separator => ".",
+ :delimiter => ","
+ },
+ :currency => {
+ :format => {
+ :unit => "$",
+ :precision => 2,
+ :format => "%u%n"
+ }
+ },
+ :human => {
+ :format => {
+ :precision => 1,
+ :delimiter => ""
+ }
+ },
+ :percentage => {
+ :format => {
+ :delimiter => ""
+ }
+ },
+ :precision => {
+ :format => {
+ :delimiter => ""
+ }
}
},
- :percentage => {
- :format => {
- :delimiter => ""
+ :active_record => {
+ :error => {
+ :header_message => ["1 feil forbød {{object_name}} fra å bli lagret", "{{count}} feil forbød {{object_name}} fra å bli lagret"],
+ :message => "det oppstod problemer i følgende felt:"
}
},
- :precision => {
- :format => {
- :delimiter => ""
+ :active_record => {
+ :error_messages => {
+ :inclusion => "er ikke inkludert i listen",
+ :exclusion => "er reservert",
+ :invalid => "er ugyldig",
+ :confirmation => "passer ikke bekreftelsen",
+ :accepted => "må være akseptert",
+ :empty => "kan ikke være tom",
+ :blank => "kan ikke være blank",
+ :too_long => "er for lang (maksimum {{count}} tegn)",
+ :too_short => "er for kort (minimum {{count}} tegn)",
+ :wrong_length => "er av feil lengde (maksimum {{count}} tegn)",
+ :taken => "er allerede tatt",
+ :not_a_number => "er ikke et nummer",
+ :greater_than => "må være større enn {{count}}",
+ :greater_than_or_equal_to => "må være større enn eller lik {{count}}",
+ :equal_to => "må være lik {{count}}",
+ :less_than => "må være mindre enn {{count}}",
+ :less_than_or_equal_to => "må være mindre enn eller lik {{count}}",
+ :odd => "må være oddetall",
+ :even => "må være partall"
}
}
- },
- :active_record => {
- :error => {
- :header_message => ["1 feil forbød {{object_name}} fra å bli lagret", "{{count}} feil forbød {{object_name}} fra å bli lagret"],
- :message => "det oppstod problemer i følgende felt:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "er ikke inkludert i listen",
- :exclusion => "er reservert",
- :invalid => "er ugyldig",
- :confirmation => "passer ikke bekreftelsen",
- :accepted => "må være akseptert",
- :empty => "kan ikke være tom",
- :blank => "kan ikke være blank",
- :too_long => "er for lang (maksimum {{count}} tegn)",
- :too_short => "er for kort (minimum {{count}} tegn)",
- :wrong_length => "er av feil lengde (maksimum {{count}} tegn)",
- :taken => "er allerede tatt",
- :not_a_number => "er ikke et nummer",
- :greater_than => "må være større enn {{count}}",
- :greater_than_or_equal_to => "må være større enn eller lik {{count}}",
- :equal_to => "må være lik {{count}}",
- :less_than => "må være mindre enn {{count}}",
- :less_than_or_equal_to => "må være mindre enn eller lik {{count}}",
- :odd => "må være oddetall",
- :even => "må være partall"
- }
}
}
View
268 config/locales/pt-BR.rb
@@ -1,145 +1,147 @@
-I18n.backend.store_translations :'pt-BR', {
- # formatos de data e hora
- :date => {
- :formats => {
- :default => "%d/%m/%Y",
- :short => lambda { |date| "#{date.day} %b" },
- :long => lambda { |date| "#{date.day} de %B de %Y" },
- :only_day => "%e"
+{
+ :'pt-BR' => {
+ # formatos de data e hora
+ :date => {
+ :formats => {
+ :default => "%d/%m/%Y",
+ :short => lambda { |date| "#{date.day} %b" },
+ :long => lambda { |date| "#{date.day} de %B de %Y" },
+ :only_day => "%e"
+ },
+ :day_names => %w(Domingo Segunda Terça Quarta Quinta Sexta Sábado),
+ :abbr_day_names => %w(Do Se Te Qa Qi Sx Sa),
+ :month_names => [nil] + %w(Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro),
+ :abbr_month_names => [nil] + %w(Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez),
+ :order => [:day, :month, :year]
},
- :day_names => %w(Domingo Segunda Terça Quarta Quinta Sexta Sábado),
- :abbr_day_names => %w(Do Se Te Qa Qi Sx Sa),
- :month_names => [nil] + %w(Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro),
- :abbr_month_names => [nil] + %w(Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez),
- :order => [:day, :month, :year]
- },
- :time => {
- :formats => {
- :default => lambda { |time| "%A, #{time.day} de %B de %Y, %H:%M hs" },
- :time => "%H:%M hs",
- :short => lambda { |time| "#{time.day}/%m, %H:%M hs" },
- :long => lambda { |time| "%A, #{time.day} de %B de %Y, %H:%M hs" },
- :only_second => "%S"
+ :time => {
+ :formats => {
+ :default => lambda { |time| "%A, #{time.day} de %B de %Y, %H:%M hs" },
+ :time => "%H:%M hs",
+ :short => lambda { |time| "#{time.day}/%m, %H:%M hs" },
+ :long => lambda { |time| "%A, #{time.day} de %B de %Y, %H:%M hs" },
+ :only_second => "%S"
+ },
+ :am => '',
+ :pm => ''
},
- :am => '',
- :pm => ''
- },
- # date helper distanci em palavras
- :datetime => {
- :distance_in_words => {
- :half_a_minute => 'meio minuto',
- :less_than_x_seconds => ['menos de 1 segundo', 'menos de {{count}} segundos'],
- :x_seconds => ['1 segundo', '{{count}} segundos'],
- :less_than_x_minutes => ['menos de um minuto', 'menos de {{count}} minutos'],
- :x_minutes => ['1 minuto', '{{count}} minutos'],
- :about_x_hours => ['aproximadamente 1 hora', 'aproximadamente {{count}} horas'],
- :x_days => ['1 dia', '{{count}} dias'],
- :about_x_months => ['aproximadamente 1 mês', '{{count}} meses'],
- :x_months => ['1 mês', '{{count}} meses'],
- :about_x_years => ['aproximadamente 1 ano', '{{count}} anos'],
- :over_x_years => ['mais de 1 ano', '{{count}} anos']
- }
- },
-
- # numeros
- :number => {
- :format => {
- :precision => 3,
- :separator => ',',
- :delimiter => '.'
+ # date helper distanci em palavras
+ :datetime => {
+ :distance_in_words => {
+ :half_a_minute => 'meio minuto',
+ :less_than_x_seconds => ['menos de 1 segundo', 'menos de {{count}} segundos'],
+ :x_seconds => ['1 segundo', '{{count}} segundos'],
+ :less_than_x_minutes => ['menos de um minuto', 'menos de {{count}} minutos'],
+ :x_minutes => ['1 minuto', '{{count}} minutos'],
+ :about_x_hours => ['aproximadamente 1 hora', 'aproximadamente {{count}} horas'],
+ :x_days => ['1 dia', '{{count}} dias'],
+ :about_x_months => ['aproximadamente 1 mês', '{{count}} meses'],
+ :x_months => ['1 mês', '{{count}} meses'],
+ :about_x_years => ['aproximadamente 1 ano', '{{count}} anos'],
+ :over_x_years => ['mais de 1 ano', '{{count}} anos']
+ }
},
- :currency => {
+
+ # numeros
+ :number => {
:format => {
- :unit => 'R$',
- :precision => 2,
- :format => '%u %n'
+ :precision => 3,
+ :separator => ',',
+ :delimiter => '.'
+ },
+ :currency => {
+ :format => {
+ :unit => 'R$',
+ :precision => 2,
+ :format => '%u %n'
+ }
}
- }
- },
-
- # Active Record
- :active_record => {
- :error => {
- :header_message => ["{{object_name}} não pôde ser salvo: 1 erro", "{{object_name}} não pôde ser salvo: {{count}} erros."],
- :message => "Por favor, cheque os seguintes campos:"
- }
- },
- :active_record => {
- :error_messages => {
- :inclusion => "não está incluso na lista",
- :exclusion => "não está disponível",
- :invalid => "não é válido",
- :confirmation => "não bate com a confirmação",
- :accepted => "precisa ser aceito",
- :empty => "não pode ser vazio",
- :blank => "não pode ser vazio",
- :too_long => "é muito longo (não mais do que {{count}} caracteres)",
- :too_short => "é muito curto (não menos do que {{count}} caracteres)",
- :wrong_length => "não é do tamanho correto (precisa ter {{count}} caracteres)",
- :taken => "não está disponível",
- :not_a_number => "não é um número",
- :greater_than => "precisa ser maior do que {{count}}",
- :greater_than_or_equal_to => "precisa ser maior ou igual a {{count}}",
- :equal_to => "precisa ser igual a {{count}}",
- :less_than => "precisa ser menor do que {{count}}",
- :less_than_or_equal_to => "precisa ser menor ou igual a {{count}}",
- :odd => "precisa ser ímpar",
- :even => "precisa ser par"
- }
- },
- :txt => {
- :main_title => "Localizando Rails",
- :app_name => "Aplicação de Demonstração",
- :sub_title => "como localizar sua aplicação com as novas funcionalidades de internacionalização do Rails",
- :contents => "Conteúdo",
- :menu => {
- :introduction => "Introdução",
- :about => "Sobre",
- :setup => "Configuração",
- :date_formats => "Formatos de Data",
- :time_formats => "Formatos de Hora"
- },
- :about => {
- :title => "Sobre esta aplicação de demonstração",
- :author => "Esta aplicação de demonstração foi escrita por {{mail_1}} e traduzida para português brasileiro por {{mail_2}}.",
- :feedback => "Se tiver qualquer feedback, por favor sinta-se à vontade para me escrever. Também visite {{blog_href}} onde eu blogo regularmente sobre Rails e outras coisas.",
- :licence => "Esta aplicação de demonstração e seu conteúdo estão licenciados sobre a {{licence_href}}. Se quiser utilizar isso de maneiras proibidas pela licença, por favor entre em contato comigo e peça minha permissão."
},
+
+ # Active Record
:active_record => {
- :too_lazy => "Nenhum exemplo aqui já que sou muito preguiçoso para pensar em atributos para mostrar <strong>todas</strong> as mensagens customizadas de erro. ;-)",
- :easy_to_understand => "Mas é bem fácil de entender.."
- },
- :date_formats => {
- :rails_standards_work => "Formatos padrão do Rails (Date::DATE_FORMATS) ainda funcionam:"
- },
- :date_helper => {
- :date_time_title => "Distância de Data/Hora",
- :forms_title => "Formulários"
- },
- :index => {
- :others => "outros",
- :introduction => "Recentemente, muito trabalho foi feito por {{sven_blog}} e {{sven_github}} para facilitar futuras internacionalizações e localizações no Rails.",
- :story_so_far => "Esta aplicação de demonstração tenta demonstrar como usar as funcionalidades que foram implementadas até agora para localizar grandes partes de sua aplicação Rails."
- },
- :number_helper => {
- :note_one => "Nota: <code>number_to_phone</code> não foi localizado e provavelmente nunca será - pelo menos não no core. Procurem por novos plugins de internacionalização/localização para uma nova versão do {{globalize}} já que eles provavelmente suportarão coisas como essa.",
- :note_two => "Outra nota: <code>number_to_currency</code>, <code>number_to_percentage</code> e <code>number_to_human_size</code> todos usam <code>number_with_precision</code> internamente e <code>number_with_precision</code> usa <code>number_with_delimiter</code> internamente."
+ :error => {
+ :header_message => ["{{object_name}} não pôde ser salvo: 1 erro", "{{object_name}} não pôde ser salvo: {{count}} erros."],
+ :message => "Por favor, cheque os seguintes campos:"
+ }
},
- :setup => {
- :freezing_edge_and_adding => "Congelando Edge e instalando o plugin localized_dates",
- :you_need_to_be_on_edge => "Você precisa estar no Edge Rails para usar as funcionalidades de i18n (internacionalização):",
- :date_time_formats => "Para formatos de data e hora, você também precisa instalar o {{localized_dates_link}}:",
- :config_locale => "Configurando o local",
- :best_place => "O melhor lugar para colocar sua configuração local, na minha opinião, é em <code>config/locales</code>. O plugin localized_dates copiará dois locais, en-US e de-AT, em seu diretório. Você pode extender ou modificá-los e também criar novos locais.",
- :locale => "Aqui está o local de demonstração que foi usado para esta aplicação de demonstração:",
- :defaults => "Você também precisa configurar o local padrão e/ou local em seu seu <code>environment.rb</code> ou um inicializador.",
- :locale_structure_title => "Uma palavra sobre a estrutura de locais",
- :locale_structure_number => "Você deve ter notado que dentro da parte <code>:number</code> do local, nós definimos <code>:format</code> e <code>:currency</code>. Em geral, locais são estruturas hierárquicas - isto é, moedas são números, porcentagens são números, etc. <code>:currency</code> pode tanto se sobrepor à configuração <code>:format</code> básica (em nosso caso, nós configuramos <code>:precision</code> para 2 em vez de 3) ou extendê-la (adicionamos duas novas opções, <code>:unit</code> e <code>:format</code>).",
- :locale_structure_date_time => "O mesmo é válido para datas e horas: se for necessário, <code>:datetime</code> e <code>:time_with_zone</code> podem ser usados para resolver especificamente formatação de seus respectivos tipos em vez de depender das configurações para <code>:time</code>. Note, entretanto, que normalmente você quer usar as mesmas formatações que <code>:time</code>."
+ :active_record => {
+ :error_messages => {
+ :inclusion => "não está incluso na lista",
+ :exclusion => "não está disponível",
+ :invalid => "não é válido",
+ :confirmation => "não bate com a confirmação",
+ :accepted => "precisa ser aceito",
+ :empty => "não pode ser vazio",
+ :blank => "não pode ser vazio",
+ :too_long => "é muito longo (não mais do que {{count}} caracteres)",
+ :too_short => "é muito curto (não menos do que {{count}} caracteres)",
+ :wrong_length => "não é do tamanho correto (precisa ter {{count}} caracteres)",
+ :taken => "não está disponível",
+ :not_a_number => "não é um número",
+ :greater_than => "precisa ser maior do que {{count}}",
+ :greater_than_or_equal_to => "precisa ser maior ou igual a {{count}}",
+ :equal_to => "precisa ser igual a {{count}}",
+ :less_than => "precisa ser menor do que {{count}}",
+ :less_than_or_equal_to => "precisa ser menor ou igual a {{count}}",
+ :odd => "precisa ser ímpar",
+ :even => "precisa ser par"
+ }
},
- :time_formats => {
- :rails_standards_work => "Formatos padrão Rails (Time::DATE_FORMATS) ainda funcionam:"
+ :txt => {
+ :main_title => "Localizando Rails",
+ :app_name => "Aplicação de Demonstração",
+ :sub_title => "como localizar sua aplicação com as novas funcionalidades de internacionalização do Rails",
+ :contents => "Conteúdo",
+ :menu => {
+ :introduction => "Introdução",
+ :about => "Sobre",
+ :setup => "Configuração",
+ :date_formats => "Formatos de Data",
+ :time_formats => "Formatos de Hora"
+ },
+ :about => {
+ :title => "Sobre esta aplicação de demonstração",
+ :author => "Esta aplicação de demonstração foi escrita por {{mail_1}} e traduzida para português brasileiro por {{mail_2}}.",
+ :feedback => "Se tiver qualquer feedback, por favor sinta-se à vontade para me escrever. Também visite {{blog_href}} onde eu blogo regularmente sobre Rails e outras coisas.",
+ :licence => "Esta aplicação de demonstração e seu conteúdo estão licenciados sobre a {{licence_href}}. Se quiser utilizar isso de maneiras proibidas pela licença, por favor entre em contato comigo e peça minha permissão."
+ },
+ :active_record => {
+ :too_lazy => "Nenhum exemplo aqui já que sou muito preguiçoso para pensar em atributos para mostrar <strong>todas</strong> as mensagens customizadas de erro. ;-)",
+ :easy_to_understand => "Mas é bem fácil de entender.."
+ },
+ :date_formats => {
+ :rails_standards_work => "Formatos padrão do Rails (Date::DATE_FORMATS) ainda funcionam:"
+ },
+ :date_helper => {
+ :date_time_title => "Distância de Data/Hora",
+ :forms_title => "Formulários"
+ },
+ :index => {
+ :others => "outros",
+ :introduction => "Recentemente, muito trabalho foi feito por {{sven_blog}} e {{sven_github}} para facilitar futuras internacionalizações e localizações no Rails.",
+ :story_so_far => "Esta aplicação de demonstração tenta demonstrar como usar as funcionalidades que foram implementadas até agora para localizar grandes partes de sua aplicação Rails."
+ },
+ :number_helper => {
+ :note_one => "Nota: <code>number_to_phone</code> não foi localizado e provavelmente nunca será - pelo menos não no core. Procurem por novos plugins de internacionalização/localização para uma nova versão do {{globalize}} já que eles provavelmente suportarão coisas como essa.",
+ :note_two => "Outra nota: <code>number_to_currency</code>, <code>number_to_percentage</code> e <code>number_to_human_size</code> todos usam <code>number_with_precision</code> internamente e <code>number_with_precision</code> usa <code>number_with_delimiter</code> internamente."
+ },
+ :setup => {
+ :freezing_edge_and_adding => "Congelando Edge e instalando o plugin localized_dates",
+ :you_need_to_be_on_edge => "Você precisa estar no Edge Rails para usar as funcionalidades de i18n (internacionalização):",
+ :date_time_formats => "Para formatos de data e hora, você também precisa instalar o {{localized_dates_link}}:",
+ :config_locale => "Configurando o local",
+ :best_place => "O melhor lugar para colocar sua configuração local, na minha opinião, é em <code>config/locales</code>. O plugin localized_dates copiará dois locais, en-US e de-AT, em seu diretório. Você pode extender ou modificá-los e também criar novos locais.",
+ :locale => "Aqui está o local de demonstração que foi usado para esta aplicação de demonstração:",
+ :defaults => "Você também precisa configurar o local padrão e/ou local em seu seu <code>environment.rb</code> ou um inicializador.",
+ :locale_structure_title => "Uma palavra sobre a estrutura de locais",
+ :locale_structure_number => "Você deve ter notado que dentro da parte <code>:number</code> do local, nós definimos <code>:format</code> e <code>:currency</code>. Em geral, locais são estruturas hierárquicas - isto é, moedas são números, porcentagens são números, etc. <code>:currency</code> pode tanto se sobrepor à configuração <code>:format</code> básica (em nosso caso, nós configuramos <code>:precision</code> para 2 em vez de 3) ou extendê-la (adicionamos duas novas opções, <code>:unit</code> e <code>:format</code>).",
+ :locale_structure_date_time => "O mesmo é válido para datas e horas: se for necessário, <code>:datetime</code> e <code>:time_with_zone</code> podem ser usados para resolver especificamente formatação de seus respectivos tipos em vez de depender das configurações para <code>:time</code>. Note, entretanto, que normalmente você quer usar as mesmas formatações que <code>:time</code>."
+ },
+ :time_formats => {
+ :rails_standards_work => "Formatos padrão Rails (Time::DATE_FORMATS) ainda funcionam:"
+ }
}
}
-}
+}
View
282 config/locales/th-TH.rb
@@ -1,154 +1,156 @@
-I18n.backend.store_translations :'th-TH', {
- :date => {
- :formats => {
- :default => lambda { |date| "%d-%m-#{date.year+543}" },
- :short => "%e %b",
- :long => lambda { |date| "%e %B #{date.year+543}" },
- :long_ordinal => lambda { |date| "%e %B #{date.year+543}" },
- :only_day => "%e"
+{
+ :'th-TH' => {
+ :date => {
+ :formats => {
+ :default => lambda { |date| "%d-%m-#{date.year+543}" },
+ :short => "%e %b",
+ :long => lambda { |date| "%e %B #{date.year+543}" },
+ :long_ordinal => lambda { |date| "%e %B #{date.year+543}" },
+ :only_day => "%e"
+ },
+ :day_names => %w(อาทิตย์ จันทร์ อังคาร พุธ พฤหัสบดี ศุกร์ เสาร์),
+ :abbr_day_names => %w(อา จ อ พ พฤ ศ ส),
+ :month_names => [nil] + %w(มกราคม กุมภาพันธ์ มีนาคม เมษายน พฤษภาคม มิถุนายน กรกฎาคม สิงหาคม กันยายน ตุลาคม พฤศจิกายน ธันวาคม),
+ :abbr_month_names => [nil] + %w(ม.ค. ก.พ. มี.ค. เม.ย. พ.ค. มิ.ย. ก.ค. ส.ค. ก.ย. ต.ค. พ.ย. ธ.ค.),
+ :order => [:day, :month, :year]
},
- :day_names => %w(อาทิตย์ จันทร์ อังคาร พุธ พฤหัสบดี ศุกร์ เสาร์),
- :abbr_day_names => %w(อา จ อ พ พฤ ศ ส),
- :month_names => [nil] + %w(มกราคม กุมภาพันธ์ มีนาคม เมษายน พฤษภาคม มิถุนายน กรกฎาคม สิงหาคม กันยายน ตุลาคม พฤศจิกายน ธันวาคม),
- :abbr_month_names => [nil] + %w(ม.ค. ก.พ. มี.ค. เม.ย. พ.ค. มิ.ย. ก.ค. ส.ค. ก.ย. ต.ค. พ.ย. ธ.ค.),
- :order => [:day, :month, :year]
- },
- :time => {
- :formats => {
- :default => lambda { |time| "%a %d %b #{time.year+543} %H:%M:%S %Z" },
- :time => "%H:%M น.",
- :short => "%d %b %H:%M น.",
- :long => lambda { |time| "%d %B #{time.year+543} %H:%M น." },
- :long_ordinal => lambda { |time| "%d %B #{time.year+543} %H:%M น." },
- :only_second => "%S"
+ :time => {
+ :formats => {
+ :default => lambda { |time| "%a %d %b #{time.year+543} %H:%M:%S %Z" },
+ :time => "%H:%M น.",
+ :short => "%d %b %H:%M น.",
+ :long => lambda { |time| "%d %B #{time.year+543} %H:%M น." },
+ :long_ordinal => lambda { |time| "%d %B #{time.year+543} %H:%M น." },
+ :only_second => "%S"
+ },
+ :time_with_zone => {
+ :formats => {
+ :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ }
+ },
+ :am => '',
+ :pm => ''
},
- :time_with_zone => {
+ :datetime => {
:formats => {
- :default => lambda { |time| "%Y-%m-%d %H:%M:%S #{time.formatted_offset(false, 'UTC')}" }
+ :default => "%Y-%m-%dT%H:%M:%S%Z"
+ },
+ :distance_in_words => {
+ :half_a_minute => 'ครึ่งนาทีที่ผ่านมา',
+ :less_than_x_seconds => 'น้อยกว่า {{count}} วินาที',
+ :x_seconds => '{{count}} วินาที',
+ :less_than_x_minutes => 'น้อยกว่า {{count}} วินาที',
+ :x_minutes => '{{count}} นาที',
+ :about_x_hours => 'ประมาณ {{count}} ชั่วโมง',
+ :x_hours => '{{count}} ชั่วโมง',
+ :about_x_days => 'ประมาณ {{count}} วัน',
+ :x_days => '{{count}} วัน',
+ :about_x_months => 'ประมาณ {{count}} เดือน',
+ :x_months => '{{count}} เดือน',
+ :about_x_years => 'ประมาณ {{count}} ปี',
+ :over_x_years => 'เกิน {{count}} ปี'
}
},
- :am => '',
- :pm => ''
- },
- :datetime => {
- :formats => {
- :default => "%Y-%m-%dT%H:%M:%S%Z"
- },
- :distance_in_words => {
- :half_a_minute => 'ครึ่งนาทีที่ผ่านมา',
- :less_than_x_seconds => 'น้อยกว่า {{count}} วินาที',
- :x_seconds => '{{count}} วินาที',
- :less_than_x_minutes => 'น้อยกว่า {{count}} วินาที',
- :x_minutes => '{{count}} นาที',
- :about_x_hours => 'ประมาณ {{count}} ชั่วโมง',
- :x_hours => '{{count}} ชั่วโมง',
- :about_x_days => 'ประมาณ {{count}} วัน',
- :x_days => '{{count}} วัน',
- :about_x_months => 'ประมาณ {{count}} เดือน',
- :x_months => '{{count}} เดือน',
- :about_x_years => 'ประมาณ {{count}} ปี',
- :over_x_years => 'เกิน {{count}} ปี'
- }
- },
- # numbers
- :number => {
- :format => {
- :precision => 3,
- :separator => '.',
- :delimiter => ','
- },
- :currency => {
+ # numbers
+ :number => {