Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Papiamento: Move pap-AW and pap-CW out of the iso-639-2 folder since they don't work. Also updated translations #794

Merged
merged 14 commits into from
Jun 10, 2020

Conversation

acesuares
Copy link
Contributor

No description provided.

Ace Suares added 3 commits August 12, 2018 17:00
…duro, Hellings and Ansano (move out of iso-639-2 folder)
…duro, Hellings and Ansano (move out of iso-639-2 folder)
@kuroda
Copy link
Collaborator

kuroda commented Aug 13, 2018

@acesuares

Could you explain how they don't work? You saw any error messages?

@kuroda
Copy link
Collaborator

kuroda commented Aug 13, 2018

Ah, you have submitted #793.

I will see this problem.

@kuroda kuroda self-assigned this Aug 13, 2018
@acesuares
Copy link
Contributor Author

Is there any progress?

@acesuares
Copy link
Contributor Author

I really don't know why the tests keep failing. I checked if my files used the same keys as the en.yml but still there's this error. Please help! @tigrish

Failures:
  1) a rails-i18n rails/locale/pap-AW.yml locale file should not have missing particular pluralization keys
     Failure/Error:
       keys = @locale_file.missing_pluralization_keys.reject do |key, value|
         key.match(/\.errors\.messages\.restrict_dependent_destroy$/)
       end
     
     NoMethodError:
       undefined method `plural_rule_names' for nil:NilClass
     # ./vendor/bundle/ruby/2.5.0/gems/i18n-spec-0.6.0/lib/i18n-spec/models/locale_file.rb:58:in `missing_pluralization_keys'
     # ./spec/unit/matchers/have_missing_particular_pluralization_keys_matcher.rb:4:in `block (2 levels) in <top (required)>'
     # ./spec/unit/translation_spec.rb:19:in `block (3 levels) in <top (required)>'
Finished in 0.88725 seconds (files took 0.32968 seconds to load)
1968 examples, 1 failure
Failed examples:
rspec ./spec/unit/translation_spec.rb[18:7] # a rails-i18n rails/locale/pap-AW.yml locale file should not have missing particular pluralization keys
/home/travis/.rvm/rubies/ruby-2.5.0/bin/ruby -I/home/travis/build/svenfuchs/rails-i18n/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.1/lib:/home/travis/build/svenfuchs/rails-i18n/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.1/lib /home/travis/build/svenfuchs/rails-i18n/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.1/exe/rspec spec/unit/pluralization_spec.rb spec/unit/translation_spec.rb spec/unit/transliteration_spec.rb failed

@digitalfrost digitalfrost changed the title Move pap-AW and pap-CW out of the iso-639-2 folder since they don't work. Also updated translations Papiamento: Move pap-AW and pap-CW out of the iso-639-2 folder since they don't work. Also updated translations Aug 21, 2019
@acesuares
Copy link
Contributor Author

Dear all, I think I have added the pluralization files, but still the test fails. Could anyone give a hint on what is wrong? This all works perfect in production, by the way.

@acesuares
Copy link
Contributor Author

I dont' see the difference in en.yml

        restrict_dependent_destroy:
          has_one: Cannot delete record because a dependent %{record} exists
          has_many: Cannot delete record because dependent %{record} exist

or in pap-CW.yml

        restrict_dependent_destroy:
          has_one: "No por kita e registro akí pasobra un otro %{record} ta dependé di dje"
          has_many: "No por kita e registro akí pasobra otro %{record} ta dependé di dje"

But still the error is

     Failure/Error:
       keys = @locale_file.missing_pluralization_keys.reject do |key, value|
         key.match(/\.errors\.messages\.restrict_dependent_destroy$/)
       end
     NoMethodError:
       undefined method `plural_rule_names' for nil:NilClass

@acesuares
Copy link
Contributor Author

Is this related to the ONLY other Google entry I could find: #570 ?
It says that the problem was the name of the file.

@kuroda
Copy link
Collaborator

kuroda commented Jun 10, 2020

@acesuares

I fixed a matcher causing your failure with 57dd748.

Please merge this commit.

@acesuares
Copy link
Contributor Author

So why do we not have a LocaleFile? Should we have one? Thanks for fixing!!!!!

@kuroda
Copy link
Collaborator

kuroda commented Jun 10, 2020

So why do we not have a LocaleFile? Should we have one?

You have a LocaleFile, but your LocaleFile is missing language information.

This information comes from iso gem.

This way you can see the situation:

$ gem install iso
$ irb
irb> require 'iso'
irb> ISO::Tag.new('pt-BR').language
=> #<ISO::Language:0x00005600d1e5dd50 @plural_rule_names=["one", "other"], @direction="ltr", @code="pt", @options={}>
irb> ISO::Tag.new('pap-AW').language
=> nil

You might have to make a PR to this gem.

@acesuares
Copy link
Contributor Author

acesuares commented Jun 10, 2020

Thanks again!
I've been trying to get pap in there as a language but it only takes two letter languages.
localeapp/iso#10
6 years ago :-(

@kuroda kuroda merged commit a88005d into svenfuchs:master Jun 10, 2020
@acesuares
Copy link
Contributor Author

Thanks! Finally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants