Permalink
Browse files

Merge remote branch 'official/master'

* official/master:
  add link to questions and tags at bottom of welcome
  added Spanish as default language
  make use of the new MongoMapper way to connect to a DB
  Update some proper noun usage.
  • Loading branch information...
2 parents 579186d + 529cffc commit 9d21e0983666f15bf5278250a32f07fc7231863e @obvio171 obvio171 committed Jul 15, 2010
View
2 app/views/welcome/index.html.haml
@@ -66,6 +66,8 @@
#additional_info
#help_us
+ = t(".browse_all_or_by_tags", :full_list_of_questions => link_to(t('.full_list_of_questions'), questions_path), :browse_by_tags => link_to(t('.browse_by_tags'), tags_questions_path))
+ %br
= t("questions.index.help_to_answer")
= link_to t("questions.index.unanswered_questions"), unanswered_questions_path
View
2 config/initializers/01_locales.rb
@@ -35,7 +35,7 @@
AVAILABLE_LANGUAGES = I18n.backend.available_locales.map { |l| l.to_s.split("-").first}.uniq
## this is only for the user settings, not related to translatewiki
-DEFAULT_USER_LANGUAGES = ['en', 'es-419', 'fr', 'pl', 'pt-BR', 'pt-PT', 'ja', 'el', 'de', 'ko', 'nl', 'ru', 'tl', 'it']
+DEFAULT_USER_LANGUAGES = ['en', 'es', 'es-419', 'fr', 'pl', 'pt-BR', 'pt-PT', 'ja', 'el', 'de', 'ko', 'nl', 'ru', 'tl', 'it']
RAILS_DEFAULT_LOGGER.debug "* Loaded locales: #{AVAILABLE_LOCALES.inspect}"
View
22 config/initializers/mongo.rb
@@ -1,25 +1,7 @@
require 'mm-paginate'
-db_file = File.join(Rails.root, "/config/database.yml")
-ok = false
-if File.exist?(db_file)
- puts ">> Loading db config from #{db_file} in #{Rails.env} environment..."
- db_config = YAML.load_file(db_file)
-
- if db_config.include?(Rails.env) && (mongo_config = db_config[Rails.env])
- MongoMapper.connection = Mongo::Connection.new(mongo_config['host'],
- mongo_config['port'] || 27017,
- :logger => Rails.logger)
- MongoMapper.database = mongo_config['database']
- ok = true
- end
-end
-
-if !ok
- MongoMapper.connection = Mongo::Connection.new(nil, nil, :auto_reconnect => true, :logger => Rails.logger)
- MongoMapper.database = "shapado-#{Rails.env}"
-end
-
+MongoMapper.setup(YAML.load_file(Rails.root.join('config', 'database.yml')),
+ Rails.env, { :logger => Rails.logger, :passenger => false })
MongoMapperExt.init
View
4 config/locales/ads/en.yml
@@ -6,7 +6,7 @@ en:
position: "Position:"
index:
title: Ads
- add_adsense: Add a new google adsense ad
- add_adbard: Add a new adbard ad
+ add_adsense: Add a new Google AdSense ad
+ add_adbard: Add a new Ad Bard ad
create:
success: "Ad was successfully created."
View
4 config/locales/welcome/en.yml
@@ -45,7 +45,9 @@ en:
recent_questions: Recent questions
quick_question: Ask a question, we will find someone to answer
create_own_site: "Create your own Q&A site in 8 seconds for free"
-
+ browse_all_or_by_tags: "See the %{full_list_of_questions} or %{browse_by_tags}"
+ full_list_of_questions: full list of questions
+ browse_by_tags: browse by tags
confirm_age:
warning: "WARNING: This page may contain explicit adult material."
notice: You may only enter this page if you are at least 18 years of age, or at least the age of majority in the jurisdiction where you reside or from which you access this page.

0 comments on commit 9d21e09

Please sign in to comment.