Skip to content

docs: rename ng xi18n to ng extract-i18n - #39337

Closed
alan-agius4 wants to merge 3 commits into
angular:masterfrom
alan-agius4:docs-xi18n-rename
Closed

alan-agius4 wants to merge 3 commits into
angular:masterfrom
alan-agius4:docs-xi18n-rename

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Oct 20, 2020 •

Copy link
Copy Markdown
Contributor

In Angular CLI version 11, xi18n has been changed from ng xi18n to ng extract-i18n.

See: angular/angular-cli#19132

@alan-agius4
alan-agius4 requested a review from clydin October 20, 2020 07:44
@google-cla google-cla Bot added the cla: yes label Oct 20, 2020
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed cla: yes labels Oct 20, 2020
@google-cla google-cla Bot added the cla: yes label Oct 20, 2020
@angular angular deleted a comment from google-cla Bot Oct 20, 2020
@ngbot ngbot Bot added this to the needsTriage milestone Oct 20, 2020
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 20, 2020
@AndrewKushnir
AndrewKushnir requested review from AndrewKushnir and petebacondarwin and removed request for AndrewKushnir October 20, 2020 23:28

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread aio/content/guide/i18n.md Resolved

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread aio/content/guide/workspace-config.md Resolved

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need to change this one:

"test": "ng e2e --port 0 --prod && ng xi18n && yarn translate && ng e2e --port 0 --configuration fr && ng e2e --port 0 --configuration de",

@alan-agius4

Copy link
Copy Markdown
Contributor Author

@petebacondarwin the above command will need to be changed in the future, the current CLI on npm doesn't contain the new command name.

Comment thread integration/ivy-i18n/e2e/README.md Resolved

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of fixes worth doing in this PR. I think.
Thanks for updating the docs etc @alan-agius4

@alan-agius4

Copy link
Copy Markdown
Contributor Author

@petebacondarwin pushed

In Angular CLI version 11, xi18n has been changed from `ng xi18n` to `ng extract-i18n`.
Comment thread integration/ivy-i18n/e2e/README.md Resolved
@AndrewKushnir

Copy link
Copy Markdown
Contributor

@alan-agius4 @petebacondarwin I was wondering if there is a chance that we may need to add more i18n-related scripts to CLI? If I remember correctly Pete mentioned a migration tool/script to convert legacy message ids to new format (we don't have it, but may consider adding it in the future). If we plan to add more scripts, make be we can take that into account and format the command like this:

ng i18n:extract
ng i18n:<subcommand>

or

ng i18n-extract
ng i18n-<subcommand>

What do you think? May be we already have similar APIs in CLI?

Thank you.

@alan-agius4

Copy link
Copy Markdown
Contributor Author

@AndrewKushnir, initially we were going for ng i18n-extract but we realised that currently the builder and the key defined in the users project angular.json is already set to extract-i18n. In order to avoid users from being confused we decided the align everything and go for extract-i18n.

When it comes to migration tool, this to me sounds like it should fall under ng update and shouldn't add added as a separate command.

That being said, at the moment we do have a sub-command pattern in the CLI like:

ng generate component
ng generate app-shell

But then again the infra-structure currently only works for the ng generate.

In general if a command will not be used frequently on can opt to use ng run instead of ng command.

Example:

ng run my-application:server:production

The above is how a server bundle is build because there is no command to build a server application like (ng server).

That being said most ng commands can be configured and "mapped" by the users. Example, a user can choose that ng build will be mapped to building server application instead of the browser application, or to use a 3rd party builder which builds their application as an electron wrapped application.

This also means, that the users can change the mapping of ng extract-i18n (If there is a tool out there that can extract i18n from Angular templates) or maybe create a new builder that wraps the official one, and add functionality on top of that.

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for additional clarification @alan-agius4 👍

@mhevery mhevery left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: integration-tests

@mhevery mhevery left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: global-approvers

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker labels Oct 27, 2020
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 27, 2020
@alan-agius4

alan-agius4 commented Oct 27, 2020 •

Copy link
Copy Markdown
Contributor Author

Caretaker: I don't think this requires a g3 pre-submit. Feel free to run it if you think otherwise. Thanks.

josephperrott pushed a commit that referenced this pull request Oct 28, 2020
In Angular CLI version 11, xi18n has been changed from `ng xi18n` to `ng extract-i18n`.

PR Close #39337
@alan-agius4
alan-agius4 deleted the docs-xi18n-rename branch October 29, 2020 06:49
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Nov 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants