Skip to content

Commit

Permalink
Merge pull request #73 from Samda/add_khmer_translation
Browse files Browse the repository at this point in the history
Added Khmer language translation
  • Loading branch information
Joost Hietbrink committed Jan 9, 2015
2 parents 3f85f56 + 0388061 commit f68364e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/phony_rails/locales/kh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kh:
errors:
messages:
improbable_phone: "គឺជាលេខមិនត្រឹមត្រូវ"
8 changes: 8 additions & 0 deletions spec/lib/validators/phony_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ class BigHelpfulHome < ActiveRecord::Base
@home.errors.messages.should include(:phone_number => ["は正し電話番号ではありません"])
end
end

it "should translate the error message in Khmer" do
I18n.with_locale(:kh) do
@home.phone_number = INVALID_NUMBER
@home.valid?
@home.errors.messages.should include(:phone_number => ["គឺជាលេខមិនត្រឹមត្រូវ"])
end
end
end
end

Expand Down

0 comments on commit f68364e

Please sign in to comment.