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

Fix translation lookup in partials #116

Merged
merged 4 commits into from Aug 24, 2018

Conversation

4 participants
@stevschmid
Contributor

stevschmid commented Aug 23, 2018

We noticed that the translation lookup in partials was broken. Using the helper t('.key') in partial bar within a component foo would lookup the key in the scope of bar_component instead of foo_component.

This PR addresses this issue. In the example above, the resulting key from the helper would be foo_component.bar.key

This PR is not compatible with the way komponent handles namespacing at the moment, please do not merge! Refer to #117

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Aug 23, 2018

Pull Request Test Coverage Report for Build 548

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 99.231%

Files with Coverage Reduction New Missed Lines %
lib/komponent/komponent_helper.rb 1 83.33%
Totals Coverage Status
Change from base Build 537: 0.04%
Covered Lines: 129
Relevant Lines: 130

💛 - Coveralls

coveralls commented Aug 23, 2018

Pull Request Test Coverage Report for Build 548

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 99.231%

Files with Coverage Reduction New Missed Lines %
lib/komponent/komponent_helper.rb 1 83.33%
Totals Coverage Status
Change from base Build 537: 0.04%
Covered Lines: 129
Relevant Lines: 130

💛 - Coveralls

@stevschmid stevschmid referenced this pull request Aug 23, 2018

Open

Namespacing issues #117

@Spone Spone requested review from florentferry and Spone Aug 23, 2018

@Spone Spone added the bug label Aug 23, 2018

@stevschmid

This comment has been minimized.

Show comment
Hide comment
@stevschmid

stevschmid Aug 23, 2018

Contributor

I just added compatibility in 6b72af9 for the current namespacing layout (see #117).
It seems code climate does not like my code → "Cognitive Complexity of 6". Alas, I don't have the mental strength right now to address this too.

Contributor

stevschmid commented Aug 23, 2018

I just added compatibility in 6b72af9 for the current namespacing layout (see #117).
It seems code climate does not like my code → "Cognitive Complexity of 6". Alas, I don't have the mental strength right now to address this too.

@Spone

This comment has been minimized.

Show comment
Hide comment
@Spone

Spone Aug 23, 2018

Collaborator

Thanks! I'll take care of refactoring to make Code Climate happy.

Collaborator

Spone commented Aug 23, 2018

Thanks! I'll take care of refactoring to make Code Climate happy.

@Spone

This comment has been minimized.

Show comment
Hide comment
@Spone

Spone Aug 23, 2018

Collaborator

Done. Would you mind adding an item in the Changelog, and maybe describe this behavior in the Readme?

Collaborator

Spone commented Aug 23, 2018

Done. Would you mind adding an item in the Changelog, and maybe describe this behavior in the Readme?

@stevschmid

This comment has been minimized.

Show comment
Hide comment
@stevschmid

stevschmid Aug 24, 2018

Contributor

Sure thing! I just added a line to the changelog. Do you think it's necessary to explain the behavior in the README? I personally think it's quite intuitive and consistent with the "Rails way".

Contributor

stevschmid commented Aug 24, 2018

Sure thing! I just added a line to the changelog. Do you think it's necessary to explain the behavior in the README? I personally think it's quite intuitive and consistent with the "Rails way".

@Spone Spone removed the need changelog label Aug 24, 2018

@Spone

Spone approved these changes Aug 24, 2018

@Spone

This comment has been minimized.

Show comment
Hide comment
@Spone

Spone Aug 24, 2018

Collaborator

You're right, let's merge :)

Collaborator

Spone commented Aug 24, 2018

You're right, let's merge :)

@Spone Spone merged commit 0685c5c into komposable:master Aug 24, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment