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 dot in localized keys #54

Closed
3 tasks done
rmariuzzo opened this issue Oct 23, 2017 · 0 comments
Closed
3 tasks done

Support dot in localized keys #54

rmariuzzo opened this issue Oct 23, 2017 · 0 comments

Comments

@rmariuzzo
Copy link
Owner

rmariuzzo commented Oct 23, 2017

This issue was originally reported at: rmariuzzo/Laravel-JS-Localization#115 by @ERPedersen.

The following test will not work:

it('should return the expected message if the key has a dot', function() {
  expect(lang.get('messages.dot.in.key')).toBe('Dot In Key');
})

By default, Lang.js interpret . as separators. Therefore, we would to detect if a key exist with the dot.

Steps to reproduce

  1. git clone https://github.com/rmariuzzo/Lang.js
  2. git checkout develop
  3. npm run test

Tasks

  • Support simple dot key.
  • Support nested dot key.
  • Support tricky dot key.
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

1 participant