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

Permit integers as keys #8

Open
benlinton opened this issue May 8, 2015 · 1 comment
Open

Permit integers as keys #8

benlinton opened this issue May 8, 2015 · 1 comment

Comments

@benlinton
Copy link

Given:

en:
  steps:
    1: "First step"
    2: "Second step"

I'm able to successfully use rails built in translations = t("steps.1").

But text_helpers gem fails = text("steps.1") to find the translation; unless I change 1 to one (which makes it more difficult to iterate over).

@soulcutter
Copy link
Collaborator

soulcutter commented May 6, 2016

I poked at this a bit and am not sure how this works in rails, but not in text_helpers. A workaround is to use keys like this:

en:
  steps:
    "1": "First step"
    "2": "second step"

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

No branches or pull requests

2 participants