From d5c32b6a56a268a636ccc7a9be6dfc9b7f37bd8c Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Wed, 1 Dec 2010 22:29:27 -0800 Subject: [PATCH] Revert "Genderize#translate fixed and enhanced (now it accepts User objects to fix the gender)." This reverts commit eb2d186a12db3a1ad6e974eb7abb43f5b4c42c19. --- config/initializers/locale.rb | 8 ++++---- config/locales/diaspora/en.yml | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 61723ff8f..93a99e5d1 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -53,10 +53,10 @@ module I18n module Genderize def translate(locale, key, options = {}) - subkey = options.delete(:gender) - if not (subkey.nil? || key.is_a?(Enumerable)) - subkey = subkey.grammatical_gender if subkey.respond_to?(:grammatical_gender) - subkey = Genders.default unless Genders.has_key?(subkey.to_sym) + g = options.delete(:gender) + if not (g.nil? || key.is_a?(Enumerable)) + g = g.to_sym + subkey = Genders[g.to_sym] key = "#{key}.#{subkey}".to_sym end super(locale, key, options) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 84cbe64b0..121fe2e5c 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -165,10 +165,7 @@ en: helper: remove: "remove" aspect_not_empty: "Aspect not empty" - are_you_sure: - masculine: "Are you sure you want to delete this aspect?" - feminine: "Are you sure you want to delete this aspect?" - neuter: "Are you sure you want to delete this aspect?" + are_you_sure: "Are you sure you want to delete this aspect?" remove_from_aspect: success: "Successfully removed person from aspect" failure: "Failed to remove person from aspect"