Skip to content

Commit

Permalink
Merge branch 'master' into rails3
Browse files Browse the repository at this point in the history
Conflicts:
	app/models/tolk/translation.rb
	test/locales/formats/en.yml
  • Loading branch information
lifo committed Jan 7, 2011
2 parents 863399b + 39a6b45 commit 24f32ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions app/models/tolk/locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class Locale < ActiveRecord::Base
'tr' => 'Turkish',
'uk' => 'Ukrainian',
'vi' => 'Vietnamese',
'zh' => 'Chinese'
'zh-CN' => 'Chinese (Simplified)',
'zh-TW' => 'Chinese (Traditional)'
}

has_many :phrases, :through => :translations, :class_name => 'Tolk::Phrase'
Expand Down Expand Up @@ -103,7 +104,7 @@ def special_key_or_prefix?(prefix, key)
self.special_prefixes.include?(prefix) || self.special_keys.include?(key)
end

PLURALIZATION_KEYS = ['zero', 'one', 'two', 'few', 'many', 'other']
PLURALIZATION_KEYS = ['none', 'one', 'two', 'few', 'many', 'other']
def pluralization_data?(data)
keys = data.keys.map(&:to_s)
keys.all? {|k| PLURALIZATION_KEYS.include?(k) }
Expand Down
2 changes: 1 addition & 1 deletion app/models/tolk/translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def check_matching_variables
if primary_translation.variables.empty?
self.errors.add(:text, "The original does not contain variables, so they should not be included.")
else
self.errors.add(:text, "The translation should contain the variables #{variables.to_a.to_sentence}.")
self.errors.add(:text, "The translation should contain the variables #{primary_translation.to_a.to_sentence}.")
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions public/tolk/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ ul.locales {
}

ul.locales li {
/*width: 230px;*/
width: 150px;
width: 300px;
display: block;
float: left;
margin: 0 10px 10px 0;
Expand Down
2 changes: 1 addition & 1 deletion test/locales/formats/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ en:
string: I am just a stupid string :(
variables: "String with variables {{hello}} and %{world}"
variables_in_struct:
zero: "Without variable"
none: "Without variable"
one: "With {{variables}}"
other: "With even %{more} {{variables}}"
number_array: [1, 2, 3]
Expand Down

0 comments on commit 24f32ed

Please sign in to comment.