Skip to content
New issue

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

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

Already on GitHub? # to your account

Pass options object to nullPlaceholder and missingPlaceholder #380

Merged
merged 3 commits into from
Dec 22, 2015
Merged

Pass options object to nullPlaceholder and missingPlaceholder #380

merged 3 commits into from
Dec 22, 2015

Conversation

TrevorBurnham
Copy link

I18n.missingPlaceholder exists so that it can be overridden for debugging purposes (#169). That's why it's passed message, even though the default implementation doesn't use it. This PR goes a small step further by also passing options to that function. This allows you to pass arbitrary debugging information through I18n.translate to I18n.missingPlaceholder, e.g. information about which part of the app failed to provide the placeholder.

Related: #285

@PikachuEXE
Copy link

Thanks!
I think there should be some additional test cases for this change.
CHAGNELOG entry also :)

Trevor Burnham added 3 commits December 22, 2015 00:07
This allows arbitrary debugging data provided to I18n.translate to be
used in an overridden I18n.missingPlaceholder method.
@TrevorBurnham
Copy link
Author

Sure thing. I've added a spec and CHANGELOG entry on this branch.

@PikachuEXE
Copy link

Thanks!
Merging

PikachuEXE added a commit that referenced this pull request Dec 22, 2015
…r-functions

Pass options object to nullPlaceholder and missingPlaceholder
@PikachuEXE PikachuEXE merged commit 3b5f982 into fnando:master Dec 22, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants