Skip to content

fix(i18n): support both string and object forms of i18n.sourceLocale #859

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

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

eintim
Copy link
Contributor

@eintim eintim commented Jun 4, 2025

The original implementation assumed sourceLocale was always a string. However, Angular allows it to be either(see schema):

  • A simple string (e.g., "en-US")
  • An object with properties like code, subPath, and baseHref

When an object was used, the resulting output path included [object Object], causing incorrect output paths or build failures.

This fix ensures compatibility with the full range of valid sourceLocale definitions

@CappuccinoDiAigner
Copy link

Thank you for the fix @eintim! This is also a problem for us. Would be great if this could be reviewed. :)

@manfredsteyer manfredsteyer merged commit 95528c6 into angular-architects:main Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants