Skip to content

Commit

Permalink
Add past translations Portuguese. Word "agora" is parsed as "now" as …
Browse files Browse the repository at this point in the history
…it should.
  • Loading branch information
Filipe Rocha committed Jan 5, 2012
1 parent 3d6d57d commit 8207b8d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end

# task :default => :spec

require 'rake/rdoctask'
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

Expand Down
67 changes: 28 additions & 39 deletions chronic18n.gemspec
Original file line number Diff line number Diff line change
@@ -1,60 +1,49 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{chronic18n}
s.name = "chronic18n"
s.version = "0.0.4"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Marcos Piccinini"]
s.date = %q{2010-06-21}
s.description = %q{One 'way' to i18n chronic}
s.email = %q{[email protected]}
s.date = "2012-01-05"
s.description = "One 'way' to i18n chronic"
s.email = "[email protected]"
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
"README.rdoc"
]
s.files = [
".document",
".gitignore",
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"chronic18n.gemspec",
"lib/chronic18n.rb",
"lib/chronic18n/dics/es.yml",
"lib/chronic18n/dics/es_regex.yml",
"lib/chronic18n/dics/it.yml",
"lib/chronic18n/dics/it_regex.yml",
"lib/chronic18n/dics/pt.yml",
"lib/chronic18n/dics/pt_regex.yml",
"lib/chronic18n/translator.rb",
"spec/chronic18n/en_spec.rb",
"spec/chronic18n/es_spec.rb",
"spec/chronic18n/it_spec.rb",
"spec/chronic18n/pt_spec.rb",
"spec/chronic18n_spec.rb",
"spec/spec_helper.rb"
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"chronic18n.gemspec",
"lib/chronic18n.rb",
"lib/chronic18n/dics/es.yml",
"lib/chronic18n/dics/es_regex.yml",
"lib/chronic18n/dics/it.yml",
"lib/chronic18n/dics/it_regex.yml",
"lib/chronic18n/dics/pt.yml",
"lib/chronic18n/dics/pt_regex.yml",
"lib/chronic18n/translator.rb",
"spec/chronic18n/en_spec.rb",
"spec/chronic18n/es_spec.rb",
"spec/chronic18n/it_spec.rb",
"spec/chronic18n/pt_spec.rb",
"spec/chronic18n_spec.rb",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/nofxx/chronic18n}
s.rdoc_options = ["--charset=UTF-8"]
s.homepage = "http://github.com/nofxx/chronic18n"
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{i18n chronic}
s.test_files = [
"spec/spec_helper.rb",
"spec/chronic18n/es_spec.rb",
"spec/chronic18n/en_spec.rb",
"spec/chronic18n/pt_spec.rb",
"spec/chronic18n/it_spec.rb",
"spec/chronic18n_spec.rb"
]
s.rubygems_version = "1.8.12"
s.summary = "i18n chronic"

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
Expand Down
3 changes: 3 additions & 0 deletions lib/chronic18n/dics/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ pt:
próxima: next
proxima: next
passado: last
passada: last
ultimo: last
último: last
ultima: last
última: last
: past
ha: past
segundo: second
segundos: seconds
minuto: minute
Expand Down
2 changes: 1 addition & 1 deletion spec/chronic18n/pt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_time(t)

it "should parse monday at 20:00 (8pm)" do
Chronic18n.parse("seg as 20:00", :pt).wday.should eql(1)
Chronic18n.parse("seg as 20", :pt).wday.should eql(1)
Chronic18n.parse("segunda as 20:00", :pt).wday.should eql(1)
end

it "should parse month" do
Expand Down

0 comments on commit 8207b8d

Please sign in to comment.