Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Dec 2, 2019

All locale i18n options now support an object form which allows a base HREF to be defined for the locale. This allows each locale to optionally define a custom base HREF that will be combined with the base HREF defined for the build configuration.

By default if the shorthand form for the locale is used or the field is not present in the longhand form, the locale code will be used as the base HREF. To disable automatic augmentation, a base HREF value of an empty string ("") can be used. This will prevent anything from being added to the existing base HREF.

For common scenarios, the shorthand form will result in the preferred and recommended outcome of each built locale variant of the application having a defined base HREF containing the locale code.

Closes #16301

@clydin clydin added state: blocked target: patch This PR is targeted for the next patch release labels Dec 2, 2019
All locale i18n options now support an object form which allows a base HREF to be defined for the locale.  Each locale can now optionally define a custom base HREF that will be combined with the base HREF defined for the build configuration.  By default if the shorthand form for the locale is used or the field is not present in the longhand form, the locale code will be used as the base HREF.  To disable automatic augmentation a base HREF value of an empty string (`""`) can be used.  This will prevent anything from being added to the existing base HREF.

For common scenarios, the shorthand form will result in the preferred and recommended outcome of each built locale variant of the application containing a defined base HREF  containing the locale code.
@petebacondarwin
Copy link
Contributor

I wonder if the default base HREF could be in some way computed from the outputPath?

@clydin clydin requested a review from alan-agius4 December 2, 2019 22:19
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

@dgp1130 dgp1130 merged commit 97c0d57 into angular:master Dec 4, 2019
@dgp1130
Copy link
Collaborator

dgp1130 commented Dec 4, 2019

Merged all 3 commits to v9.0.x patch branch.

@angular-automatic-lock-bot
Copy link

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 Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set baseHref for each locale

5 participants