Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into rails3

Conflicts:
	app/models/tolk/translation.rb
	test/locales/formats/en.yml
  • Loading branch information...
commit 24f32ede9c55e53f539716fe8266c4a44a000749 2 parents 863399b + 39a6b45
@lifo lifo authored
View
5 app/models/tolk/locale.rb
@@ -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'
@@ -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) }
View
2  app/models/tolk/translation.rb
@@ -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
View
3  public/tolk/screen.css
@@ -130,8 +130,7 @@ ul.locales {
}
ul.locales li {
- /*width: 230px;*/
- width: 150px;
+ width: 300px;
display: block;
float: left;
margin: 0 10px 10px 0;
View
2  test/locales/formats/en.yml
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.