-
Notifications
You must be signed in to change notification settings - Fork 70
Add globalization #202
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
Add globalization #202
Conversation
9d5b588 to
7dad264
Compare
app/index.js
Outdated
| this.templates = list.map(function(t) { | ||
| return { | ||
| name: util.format('%s (%s)', t.name, t.description), | ||
| name: g.format('%s (%s)', t.name, t.description), |
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.
This is an interesting case. One can say, "No text involved, here, so no need to translate." Linguist might say, " ( ) in English is used to define supplemental information and the way to specify supplemental information differs from language to language, so, we should globalize and leave it to the translator."
That's a globalization architecture question. For API Connect, we take the former, light-weight approach.
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.
IMO, we need to ensure that at least t.description is localized. This probably means enhancing loopback-workspace with globalization support.
|
Line comments added inline. Three top level comments below.
|
cb1c234 to
7e57a3e
Compare
In app/index.js. |
|
Failing for node 0.10 windows because of this strongloop/strong-globalize#46 |
.gitignore
Outdated
| test/sandbox | ||
| test/.pkgcache/ | ||
| .pkgcache/ | ||
| intl/MSG.json |
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.
Instead of listing all different languages and files, can we afford to git-ignore everything in intl folder?
BTW, keep in mind that npm excludes git-ignored files from the package by default, so we need extra config to bring intl files back when publishing to npmjs.org.
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.
We only need the intl/en directory.
I will change it to
!intl/
intl/*
!intl/en/
6983067 to
6a29520
Compare
7aabc8d to
295f503
Compare
|
@jannyHou or @superkhau PTAL. Thanks. |
app/index.js
Outdated
|
|
||
| this.option('explorer', { | ||
| desc: 'Add Loopback Explorer to the project (true by default)', | ||
| desc: g.f('Add Loopback Explorer to the project (true by default)'), |
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 personally tend to wrap {{true}} here..
|
@0candy I don't have confidence whether some terminologies should be wrapped or not, so I comment under some words that IMO will cause users confused if they are accidentally translated to, for example, mandarin. |
11f9b5f to
25abbd9
Compare
|
@jannyHou Thanks for reviewing. Fixed. |
|
👍 LGTM |
strongloop/loopback#2422