-
Notifications
You must be signed in to change notification settings - Fork 82
Globalize loopback-sdk-angular #230
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,5 @@ karma-xunit.xml | |
| checkstyle.xml | ||
| .loopbackrc | ||
| loopback-sdk-angular-*.tgz | ||
| intl/* | ||
| !intl/en/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
|
|
||
| /* eslint quotes: ["error", "single"] */ | ||
| var fs = require('fs'); | ||
| var g = require('strong-globalize')(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be inside the This line is the root cause of strongloop-internal/apidocs.strongloop.com#56 :-(
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rmg thanks for catching this! |
||
| var path = require('path'); | ||
|
|
||
| var loopbackCoreJs = path.resolve(__dirname, 'loopback-core.js'); | ||
|
|
@@ -14,14 +15,14 @@ try { | |
| var loopback = require('loopback'); | ||
| } catch (err) { | ||
| if (err.code === 'MODULE_NOT_FOUND' && fs.existsSync(loopbackCoreJs)) { | ||
| console.log('Cannot load the generator, node_modules were not installed.'); | ||
| console.log('Ignoring the error since the output file is already there.'); | ||
| g.log('Cannot load the generator, {{node_modules}} were not installed.'); | ||
| g.log('Ignoring the error since the output file is already there.'); | ||
| process.exit(); | ||
| } | ||
| throw err; | ||
| } | ||
|
|
||
| console.log('Generating API docs for LoopBack built-in models.'); | ||
| g.log('Generating API docs for {{LoopBack}} built-in models.'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| var app = loopback(); | ||
|
|
||
|
|
@@ -47,10 +48,10 @@ modelNames.forEach(function(key) { | |
| var model = loopback[key]; | ||
| if (model.prototype instanceof loopback.PersistedModel) { | ||
| app.model(model, { dataSource: 'db' }); | ||
| console.log(' added persisted model %s', key); | ||
| g.log(' added persisted model %s', key); | ||
| } else if (model.prototype instanceof loopback.Model) { | ||
| app.model(model); | ||
| console.log(' added model %s', key); | ||
| g.log(' added model %s', key); | ||
| } | ||
| }); | ||
|
|
||
|
|
@@ -78,4 +79,4 @@ script = script | |
|
|
||
| fs.writeFileSync(loopbackCoreJs, script); | ||
|
|
||
| console.log('Done: %s', loopbackCoreJs); | ||
| g.log('Done: %s', loopbackCoreJs); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "0728b2dc3a43387122cef6a0f8e6ae88": "Done: {0}", | ||
| "49b1a42e7167e2916a647035e63fa38d": "Ignoring the error since the output file is already there.", | ||
| "55b88ce76ecf41ed740c06fe368d6927": " added persisted model {0}", | ||
| "8b3e8438920fd9cda69acce828e08c8c": " added model {0}", | ||
| "8f526d8f0c4d626df5716289394acf4b": "Cannot load the generator, {{node_modules}} were not installed.", | ||
| "e845a1cf62c0034ffc626e5b367e95bc": "Generating API docs for {{LoopBack}} built-in models.", | ||
| "0dad411c9eeeb7faf91fe1239f377053": "Skipping {0} as it is not a {{LoopBack}} model", | ||
| "e3754d2933e680229f6317b0db99b5df": "Warning: scope {0}.{1} is missing {{_targetClass}} property.\nThe {{Angular}} code for this scope won't be generated.\nPlease upgrade to the latest version of\n{{loopback-datasource-juggler}} to fix the problem.", | ||
| "fd8574ea2b57b9b8cf5164811a138fb4": "Warning: scope {0}.{1} targets class {2}, which is not exposed \nvia remoting. The {{Angular}} code for this scope won't be generated." | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
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.
!intl/, do you?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.
there is an empty line EOF, or else github gives you an icon