Sha256: 0f2105c20b3bb03bb1a19b31542f9c3ab6c0f49aac8ec4438536d37dcf3375fa
Contents?: true
Size: 841 Bytes
Versions: 3
Compression:
Stored size: 841 Bytes
Contents
require "spec_helper" require 'fast_gettext/po_file' de_file = File.join('spec','locale','de','test.po') de = FastGettext::PoFile.to_mo_file(de_file) describe FastGettext::PoFile do before :all do File.exist?(de_file).should == true end it "parses a file" do de['car'].should == 'Auto' end it "stores untranslated values as nil" do de['Car|Model'].should == "Modell" end it "finds pluralized values" do de.plural('Axis','Axis').should == ['Achse','Achsen'] end it "returns empty array when pluralisation could not be found" do de.plural('Axis','Axis','Axis').should == [] end it "can access plurals through []" do de['Axis'].should == 'Achse' #singular end it "unescapes '\\'" do de["You should escape '\\' as '\\\\'."].should == "Du solltest '\\' als '\\\\' escapen." end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fast_gettext-0.6.9 | spec/fast_gettext/po_file_spec.rb |
fast_gettext-0.6.8 | spec/fast_gettext/po_file_spec.rb |
fast_gettext-0.6.7 | spec/fast_gettext/po_file_spec.rb |