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

Using "default" as base_value #55

Closed
SebastianHe opened this issue Apr 14, 2014 · 3 comments
Closed

Using "default" as base_value #55

SebastianHe opened this issue Apr 14, 2014 · 3 comments
Milestone

Comments

@SebastianHe
Copy link

Hello,

i want to use the "default" value as base_value.

Example:
in my code:

<%= t '.invite_header', default: 'Leitstellenspiel weiterempfehlen' %>

The german file should look like:
referrals:
index:
invite_header: Leitstellenspiel weiterempfehlen

How can i do this?

best regards,
Sebastian

@glebm
Copy link
Owner

glebm commented Apr 14, 2014

You would have to extend the parser to parse out the default. It's not easy, but can be done, similar to how scope argument is parsed: https://github.com/glebm/i18n-tasks/blob/master/lib/i18n/tasks/scanners/pattern_with_scope_scanner.rb

@glebm glebm mentioned this issue Aug 13, 2014
7 tasks
@lime
Copy link

lime commented Feb 27, 2015

In case someone wants to tackle this, I happened upon this gist that tries to do something similar: https://gist.github.com/zyphlar/5216623/

Maybe it can be useful as a starting point.

@glebm glebm added this to the v0.9.0 milestone Aug 8, 2015
glebm added a commit that referenced this issue Aug 8, 2015
@glebm
Copy link
Owner

glebm commented Aug 11, 2015

This is now available in v0.9.0.rc2 (only for .rb files), and will be available in the v0.9.0 release.

@glebm glebm closed this as completed Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants