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

Ignore Arrays in Rails i18n yml files #1129

Merged

Conversation

vcarel
Copy link
Contributor

@vcarel vcarel commented Aug 10, 2018

Fixes #1126


This change is Reviewable

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @vcarel)


CHANGELOG.md, line 11 at r1 (raw file):

Changes since last non-beta release.

- Ignore Arrays in Rails i18n yml files

see formatting of other entries


lib/react_on_rails/locales_to_js.rb, line 110 at r1 (raw file):

        if v.is_a? Hash
          flatten(v).map { |hk, hv| h["#{k}.#{hk}".to_sym] = hv }
        elsif v.is_a? Array
elsif !v.is_a?(Array)
          # Arrays are not supported by react-intl
          h[k] = v.gsub("%{", "{")

@justin808
Copy link
Member

@vcarel any update?

@vcarel
Copy link
Contributor Author

vcarel commented Aug 16, 2018

@justin808 I'm on vacation for 2 weeks. I'll look into that when I'll be back in. Thx for your review.

@vcarel vcarel force-pushed the fix/ignore-arrays-in-rails-i18n-yml-files branch from 397cf44 to d093f21 Compare September 3, 2018 07:53
@vcarel
Copy link
Contributor Author

vcarel commented Sep 3, 2018

@justin808 I just did the update, sorry for the delay.

@justin808
Copy link
Member

@vcarel can you please rebase on top of master and ensure that CI passes.

@vcarel vcarel force-pushed the fix/ignore-arrays-in-rails-i18n-yml-files branch from d093f21 to 1994c24 Compare September 4, 2018 07:52
@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 1994c24 on vcarel:fix/ignore-arrays-in-rails-i18n-yml-files into c80f264 on shakacode:master.

@justin808 justin808 merged commit 89c2a7e into shakacode:master Sep 4, 2018
@justin808
Copy link
Member

Thanks @vcarel!

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

Successfully merging this pull request may close these issues.

3 participants