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

Relative translation scopes #1335

Merged
merged 5 commits into from
Apr 20, 2022
Merged

Conversation

elia
Copy link
Contributor

@elia elia commented Apr 20, 2022

Summary

Add support for relative scopes, i.e. scopes starting with a . that will be prefixed to the translation key and then chained to the component base scope.

Fixes #1334

Other Information

@elia elia requested a review from a team as a code owner April 20, 2022 17:12
@elia elia self-assigned this Apr 20, 2022
Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

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

Looking good! 🎉 Could you add a test for the array case? Thanks!

@@ -9,6 +9,10 @@ title: Changelog

## main

* Add support for relative I18n scopes to translations
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Add support for relative I18n scopes to translations
* Add support for relative I18n scopes to translations.

@elia elia force-pushed the elia/relative-translation-scopes branch from 753b710 to 69b17d5 Compare April 20, 2022 18:45
@elia elia requested a review from camertron April 20, 2022 18:46
@elia elia force-pushed the elia/relative-translation-scopes branch from 69b17d5 to 592bae1 Compare April 20, 2022 18:47
@joelhawksley joelhawksley merged commit e99fe1c into main Apr 20, 2022
@joelhawksley joelhawksley deleted the elia/relative-translation-scopes branch April 20, 2022 19:26
claudiob pushed a commit to claudiob/view_component that referenced this pull request Dec 22, 2023
* Remove unnecessary require

* Add support for relative I18n scopes

* Update test/view_component/translatable_test.rb

* Update lib/view_component/translatable.rb

Co-authored-by: Joel Hawksley <joel@hawksley.org>
claudiob pushed a commit to claudiob/view_component that referenced this pull request Jan 3, 2024
* Remove unnecessary require

* Add support for relative I18n scopes

* Update test/view_component/translatable_test.rb

* Update lib/view_component/translatable.rb

Co-authored-by: Joel Hawksley <joel@hawksley.org>
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.

i18n does not support scope attribute
3 participants