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

Let locales in i18n export correctly #258

Closed
wants to merge 2 commits into from
Closed

Conversation

SBeator
Copy link

@SBeator SBeator commented Jul 28, 2016

I noticed that at line 67 in file i18n.js, the variable locales want to be exported:
i18n.locales = locales
But at line 74, locales is set to {}, so i18n.locales will never refer locales:
locales = {};

I am not sure why you want to export locales but not refer to the correct variable, so I send this pull request to fix this small issue.

@coveralls
Copy link

coveralls commented Jul 28, 2016

Coverage Status

Coverage increased (+0.004%) to 97.904% when pulling e493e4a on SBeator:master into a74afa5 on mashpie:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 97.904% when pulling e493e4a on SBeator:master into a74afa5 on mashpie:master.

@mashpie
Copy link
Owner

mashpie commented Jul 30, 2016

au contraire... but thanks for spotting. i18n.locales should not get exported by reference. Instead I might implement a getter for read-only access to the locale object

@mashpie mashpie closed this Jul 30, 2016
@SBeator
Copy link
Author

SBeator commented Jul 31, 2016

It is OK :)
But could you please add the getter method for the locale object? I want to get the locale object and put it into client side. So we can add some i18n logic in client side.

@mashpie
Copy link
Owner

mashpie commented Jul 31, 2016

Although not a getter i18n.getCatalog serves exactly that purpose, or not?

Am 31.07.2016 um 12:15 schrieb SBeator notifications@github.com:

It is OK :)
But could you please add the getter method for the locale object? I want to get the locale object and put it into client side. So we can add some i18n logic in client side.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

@SBeator
Copy link
Author

SBeator commented Jul 31, 2016

Ohhhh... I didn't noticed that method. :(

Yes, that method is what I want, many thanks.

Best wishes to you.

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

3 participants