-
Notifications
You must be signed in to change notification settings - Fork 120
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
Make i18n work with node/browserify #98
Conversation
Have you already found time to consider this pull request? |
@@ -4251,7 +4261,7 @@ | |||
user_conf[key] = default_prettify_conf[key]; | |||
} | |||
|
|||
if (typeof user_conf['locale'] === 'string' && user_conf['locale'] !== 'en') { | |||
if (typeof moment !== 'undefined' && typeof user_conf['locale'] === 'string' && user_conf['locale'] !== 'en') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be more specific. E.g. use typeof moment === 'object'
.
Changed to |
Looks good. I just need to make the evaluation tool and the map work again. You updated the test output. The interesting thing is that when I checkout 72e5f09 I get the old version. I guess this is platform/version depended. What version of NodeJS are you using and what Distro? |
@@ -1,3 +1,9 @@ | |||
var i18n = i18n; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t quite get that. Is this needed for Nashorn/Java?
For the browser and NodeJS it works without it.
Well done. Thanks very much … |
… using Arch Linux and https://aur.archlinux.org/packages/iojs-bin/ But I get the same output with
using NodeJs from the official repository https://www.archlinux.org/packages/community/x86_64/nodejs/
|
The locale/language is taken from `optional_conf_parm`. No direct interaction with `i18next` module is required.
Thank you for your review. I simplified it to |
@simon04 is using a more recent version of NodeJS then my. Needs to be fixed later. Test crashes currently anyway so reverting for now. I am using: node --version v0.10.29 (latest in Debian jessie and testing) https://github.com/ypid/opening_hours.js/pull/98#issuecomment-132466586
Thanks again and I am looking forward to see the error/warning translation feature in JOSM 👍 😄 |
The locale/language is taken from
optional_conf_parm
. No directinteraction with
i18next
module is required.