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

Support translate empty string #86

Merged
merged 1 commit into from
Nov 19, 2016
Merged

Support translate empty string #86

merged 1 commit into from
Nov 19, 2016

Conversation

QingWei-Li
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 91.553% when pulling 6df0b2f on QingWei-Li:feat/translate-empty-string into 2bfe9fd on kazupon:dev.

Copy link
Owner

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thank you for your Pull Request.

However, I can't understand empty string translation in use-cases.

Can you tell us the your specific content please?

@QingWei-Li
Copy link
Contributor Author

Reason 1:
Due to linguistic differenes, one may need this feature when implementing i18n to a common component.

Let's say I'm building a Date Picker. For Chinese users I need to display:

2016 年 11 月

image

For English users, it should be

2016 November

image

So the config may look something like this:

// for Chinese
{
  year: '年',
  month11: '11 月'
}

// for English
{
  year: '',
  month11: 'November'
}

Reason 2:
If a user configs a void string, basically he just want to show a void content, but now vue-i18n displays a key path. I think it's not quite what the user actually anticipates.

@kazupon
Copy link
Owner

kazupon commented Nov 19, 2016

okay, it makes sense. :)

@kazupon kazupon merged commit 8e6d154 into kazupon:dev Nov 19, 2016
@QingWei-Li QingWei-Li deleted the feat/translate-empty-string branch November 19, 2016 09:51
@QingWei-Li
Copy link
Contributor Author

thx 😄

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.

3 participants