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

Allow empty strings for translations #49

Closed
gcko opened this issue Oct 17, 2012 · 1 comment
Closed

Allow empty strings for translations #49

gcko opened this issue Oct 17, 2012 · 1 comment

Comments

@gcko
Copy link
Contributor

gcko commented Oct 17, 2012

Currently if I was to define the following:

{
  key: ''
}

and called it:

i18n.t('key')

I would be returned 'key'

I find it useful to allow empty strings as proper values in the case where I recieve a list of status messages from the backend that are more verbose than what I want on the client.

For instance if the server provides three states for a notification: ['new','seen','done'], i may want the translation to look like this:

{
  notifications: {
    new: 'New'
    seen: ''
    done: ''
  }
}

so a call to i18n.t('notifications.seen') would return ""

@gcko
Copy link
Contributor Author

gcko commented Oct 23, 2012

Closing as the merge looks fine

@gcko gcko closed this as completed Oct 23, 2012
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

1 participant