René's URL Explorer Experiment


Title: ivy i18n Wrong placeholders generated for components with dash · Issue #34151 · angular/angular · GitHub

Open Graph Title: ivy i18n Wrong placeholders generated for components with dash · Issue #34151 · angular/angular

X Title: ivy i18n Wrong placeholders generated for components with dash · Issue #34151 · angular/angular

Description: 🐞 bug report Affected Package The issue is caused by packages @angular/localize @angular/compiler Description Localized build is failed if you have a components in 18n section with more than one word in name (my-test-component) (see erro...

Open Graph Description: 🐞 bug report Affected Package The issue is caused by packages @angular/localize @angular/compiler Description Localized build is failed if you have a components in 18n section with more than one wo...

X Description: 🐞 bug report Affected Package The issue is caused by packages @angular/localize @angular/compiler Description Localized build is failed if you have a components in 18n section with more than one wo...

Opengraph URL: https://github.com/angular/angular/issues/34151

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ivy i18n Wrong placeholders generated for components with dash","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by packages\r\n**@angular/localize\r\n@angular/compiler**\r\n\r\n### Description\r\n\r\nLocalized build is failed if you have a components in 18n section with more than one word in name (my-test-component) (see error below)\r\n\r\n```html\r\n\u003cdiv i18n>\u003capp-my-component>\u003c/app-my-component> Welcome\u003c/div>\r\n```\r\nCaused because `@angular/compiler` generates xliff file with kebab-case in placeholders `START_TAG_APP-MY-COMPONENT` for components with kebab-cased name, but `ɵtranslate` from \r\n`@angular/localize` package expecting placeholders in underscore case format:\r\n\r\n```ts\r\n/// packages/localize/src/utils/src/translations.ts\r\nexport function translate(...): [TemplateStringsArray, readonly any[]] {\r\n  ....\r\n  return [\r\n    translation.messageParts, translation.placeholderNames.map(placeholder => {\r\n      if (message.substitutions.hasOwnProperty(placeholder)) {\r\n        return message.substitutions[placeholder];\r\n      } else {\r\n        throw new Error(\r\n            `No placeholder found with name ${placeholder} in message ${describeMessage(message)}.`);\r\n      }\r\n    })\r\n  ];\r\n}\r\n```\r\n![image](https://user-images.githubusercontent.com/1586852/69865215-e5f00080-12a0-11ea-9f54-d71e6bb47722.png)\r\n\r\nManual edit placeholder in translation file from Kebab-case to underscore_case helps:\r\n```diff\r\n+START_TAG_APP_MY_COMPONENT\r\n-START_TAG_APP-MY-COMPONENT\r\n```\r\n\r\n## 🔬 Minimal Reproduction\r\nMinimal reproduction repo is here:\r\n\r\nhttps://github.com/thekip/i18n-ivy-placeholder-issue\r\n\r\nSteps to reproduce: \r\n\r\nJust run `ng build` and see error or follow next steps to see more details:\r\n\r\n1. Generate messages using `ng xi18n` command\r\n2. Ensure that `START_TAG_APP-MY-COMPONENT` has kebab case in component name\r\n3. Create a translation file (there is one `ru` already created in repo) and add a translation\r\n4. Build project with any of AngularCli commands\r\n5. See error\r\n6. Change kebab case to unserscore case  in translation file\r\n7.  See succesful build\r\n\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>No placeholder found with name START_TAG_APP-MY-COMPONENT in message \"293cc2dd1c2eef5113079f323ba045dd817e422d\" (\"{$START_TAG_APP_MY_COMPONENT}{$CLOSE_TAG_APP_MY_COMPONENT} Welcome\").\r\n\u003c/code>\u003c/pre>\r\n\r\n## 🌍  Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.0.0-rc.4\r\nNode: 10.16.0\r\nOS: darwin x64\r\n\r\nAngular: 9.0.0-rc.4\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage                           Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect         0.900.0-rc.4\r\n@angular-devkit/build-angular     0.900.0-rc.4\r\n@angular-devkit/build-optimizer   0.900.0-rc.4\r\n@angular-devkit/build-webpack     0.900.0-rc.4\r\n@angular-devkit/core              9.0.0-rc.4\r\n@angular-devkit/schematics        9.0.0-rc.4\r\n@angular/localize                 9.0.0-rc.0\r\n@ngtools/webpack                  9.0.0-rc.4\r\n@schematics/angular               9.0.0-rc.4\r\n@schematics/update                0.900.0-rc.4\r\nrxjs                              6.5.3\r\ntypescript                        3.6.4\r\nwebpack                           4.41.2\r\n\u003c/code>\u003c/pre>\r\n\r\nFYI @ocombe \r\n","author":{"url":"https://github.com/timofei-iatsenko","@type":"Person","name":"timofei-iatsenko"},"datePublished":"2019-11-29T11:29:30Z","url":"https://github.com/angular/angular/issues/34151"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:818407c1-c5ad-29a9-8b15-ae9c5aac8c9c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9464:31B4CC:E322AE:12BF419:6B00FC61
html-safe-noncee5ededeeca56c2c0921c9aef4cabad4d2c8894c575b4100114d63370c96ad828
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDY0OjMxQjRDQzpFMzIyQUU6MTJCRjQxOTo2QjAwRkM2MSIsInZpc2l0b3JfaWQiOiIxODU5OTUyNTA3MjA0MjA1NjY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb9eec1254dd4768884f6adbbe326475424ba150e89b01cfd5421e78fc9c2b68c
hovercard-subject-tagissue:530298062
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/34151/issue_layout
twitter:imagehttps://opengraph.githubassets.com/48c98d6597b357127fb42d8f007645a1893c54050b00cc254e04f87f66ed3b46/angular/angular/issues/34151
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/48c98d6597b357127fb42d8f007645a1893c54050b00cc254e04f87f66ed3b46/angular/angular/issues/34151
og:image:alt🐞 bug report Affected Package The issue is caused by packages @angular/localize @angular/compiler Description Localized build is failed if you have a components in 18n section with more than one wo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimofei-iatsenko
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/34151#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F34151
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F34151
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/34151
Reloadhttps://github.com/angular/angular/issues/34151
Reloadhttps://github.com/angular/angular/issues/34151
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/34151
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/34151
ivy i18n Wrong placeholders generated for components with dashhttps://github.com/angular/angular/issues/34151#top
https://github.com/petebacondarwin
area: i18nIssues related to localization and internationalizationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20i18n%22
freq2: mediumhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
regressionIndicates than the issue relates to something that worked in a previous versionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22regression%22
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
workaround4: nonehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22workaround4%3A%20none%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/timofei-iatsenko
timofei-iatsenkohttps://github.com/timofei-iatsenko
on Nov 29, 2019https://github.com/angular/angular/issues/34151#issue-530298062
https://user-images.githubusercontent.com/1586852/69865215-e5f00080-12a0-11ea-9f54-d71e6bb47722.png
https://github.com/thekip/i18n-ivy-placeholder-issuehttps://github.com/thekip/i18n-ivy-placeholder-issue
@ocombehttps://github.com/ocombe
ocombehttps://github.com/ocombe
petebacondarwinhttps://github.com/petebacondarwin
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841741865
ocombehttps://github.com/ocombe
area: i18nIssues related to localization and internationalizationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20i18n%22
regressionIndicates than the issue relates to something that worked in a previous versionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22regression%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841744089
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841744135
ocombehttps://github.com/ocombe
workaround4: nonehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22workaround4%3A%20none%22
freq2: mediumhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841744411
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
Backloghttps://github.com/angular/angular/milestone/82
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841745183
petebacondarwinhttps://github.com/petebacondarwin
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
on Nov 29, 2019https://github.com/angular/angular/issues/34151#event-2841810635
https://github.com/petebacondarwin
petebacondarwinhttps://github.com/petebacondarwin
on Nov 29, 2019https://github.com/angular/angular/issues/34151#issuecomment-559851235
petebacondarwinhttps://github.com/petebacondarwin
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
on Nov 30, 2019https://github.com/angular/angular/issues/34151#event-2842710541
mheveryhttps://github.com/mhevery
on Dec 2, 2019https://github.com/angular/angular/issues/34151#event-2846952603
fix(ivy): i18n - correctly parse XLIFF placeholders (#34155)https://github.com/angular/angular/commit/d5a48b2cc0f77921b4e2e196a369b2ec9e451e41
#34155https://github.com/angular/angular/pull/34155
https://docs.github.com/articles/closing-issues-via-commit-messages
d5a48b2https://github.com/angular/angular/commit/d5a48b2cc0f77921b4e2e196a369b2ec9e451e41
mheveryhttps://github.com/mhevery
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
d529b55https://github.com/angular/angular/commit/d529b55651739219bbd80c2630defe9a55d149f5
on Dec 2, 2019https://github.com/angular/angular/issues/34151#event-2846952705
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Jan 2, 2020https://github.com/angular/angular/issues/34151#issuecomment-570253078
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Jan 2, 2020https://github.com/angular/angular/issues/34151#event-2918097534
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/34151
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/34151
petebacondarwinhttps://github.com/petebacondarwin
area: i18nIssues related to localization and internationalizationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20i18n%22
freq2: mediumhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
regressionIndicates than the issue relates to something that worked in a previous versionhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22regression%22
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
workaround4: nonehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22workaround4%3A%20none%22
BacklogNo due datehttps://github.com/angular/angular/milestone/82
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.