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

Fix the Hindi locale file #666

Merged
merged 2 commits into from Oct 13, 2016
Merged

Fix the Hindi locale file #666

merged 2 commits into from Oct 13, 2016

Conversation

nexdrew
Copy link
Member

@nexdrew nexdrew commented Oct 12, 2016

Otherwise y18n will blow up when attempting to lookup the singular/plural version of the localized string:

require('yargs')
  .option('f', {
    alias: 'foo',
    desc: 'foo for thought',
    requiresArg: true
  })
  .option('b', {
    alias: 'bar',
    desc: 'a dog and a cat walk into a bar...',
    requiresArg: true
  })
  .argv

Before this fix:

$ LANG=hi_IN.UTF-8 node locales.js -f -b
विकल्प:
  -f, --foo  foo for thought
  -b, --bar  a dog and a cat walk into a bar...

Cannot read property 'indexOf' of undefined

After this fix:

$ LANG=hi_IN.UTF-8 node locales.js -f -b
विकल्प:
  -f, --foo  foo for thought
  -b, --bar  a dog and a cat walk into a bar...

कुछ तर्को के मूल्य गुम हैं: f, b

Also took the opportunity to make the id locale consistent with others in terms of where each localized string is defined in the json file.

@nexdrew nexdrew changed the title fix(locales): conform hi locale to y18n.__n expectations Fix the Hindi locale file Oct 13, 2016
@nexdrew nexdrew merged commit 22adb18 into master Oct 13, 2016
@nexdrew nexdrew deleted the fix-hi-locale branch October 13, 2016 13:30
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.

None yet

1 participant