-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(cli): add no-translate keywords #6298
Conversation
Signed-off-by: Diana Lau <[email protected]>
@@ -3,6 +3,7 @@ | |||
// This file is licensed under the MIT License. | |||
// License text available at https://opensource.org/licenses/MIT | |||
|
|||
// no translation: Observer |
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.
How is this comment going to affect the translation process?
On line 24/25, I see:
description: g.f('Name of the observer group for ordering'),
I think we need to change that message too? For example:
description: g.f('Name of the %s group for ordering', 'observer'),
@@ -3,6 +3,7 @@ | |||
// This file is licensed under the MIT License. | |||
// License text available at https://opensource.org/licenses/MIT | |||
|
|||
// no translation: Service |
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.
Same comment here. I see several g.f
calls below that contains words we may not want to translate (datasource
, service
, etc.).
Anyhow, I see you are just following an existing approach, so feel free to ignore my comments. |
@bajtos, @agnes512 is verifying with @candytangnb whether we've implemented as expected in #5658 (comment). |
@agnes512 @bajtos @dhmlau I see that Comments "// no translation: term1, term2,...termn" had not been added into https://github.com/strongloop/loopback-next/blob/master/packages/cli/intl/en/messages.json but other files, right? |
@candytangnb, thanks for clarifying. I'll submit a PR to fix it. Thanks. |
Pinged @candytangnb to get an example of how the comments can be added, because comments are not supported in json. I tried to add it and it complains about |
Converting to draft for now, as the proposed changes will not work. |
@candytangnb suggested to wrap the reserved word with
|
Closing this PR since it's not the right solution. |
Signed-off-by: Diana Lau [email protected]
Fixes #6287
Service
andObserver
should also be reserved words and not meant to be translated. Following what this commit had done, add theno translation: _reserved_words_
as a comment at the top of the class.Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈