Title: i18n ICU expressions don't work in attributes · Issue #63827 · angular/angular · GitHub
Open Graph Title: i18n ICU expressions don't work in attributes · Issue #63827 · angular/angular
X Title: i18n ICU expressions don't work in attributes · Issue #63827 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? localize, core Is this a regression? No Description Couldn't really find another issue, but using ICU expressions in HTML-attributes doesn't work or even breaks the parser when using...
Open Graph Description: Which @angular/* package(s) are the source of the bug? localize, core Is this a regression? No Description Couldn't really find another issue, but using ICU expressions in HTML-attributes doesn't w...
X Description: Which @angular/* package(s) are the source of the bug? localize, core Is this a regression? No Description Couldn't really find another issue, but using ICU expressions in HTML-attributes doesn...
Opengraph URL: https://github.com/angular/angular/issues/63827
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"i18n ICU expressions don't work in attributes","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nlocalize, core\n\n### Is this a regression?\n\nNo\n\n### Description\n\nCouldn't really find another issue, but using ICU expressions in HTML-attributes doesn't work or even breaks the parser when using variables in ICU expressions.\n\nCan't get StackBlitz to work with `@angular/localize`, so I can't provide a minimal reproduction.\n\n\n```html\n\n\u003c!-- This will just show the text as present in the title attribute -->\n\u003cp i18n-title=\"@@test\" title=\"Some Val: {someVal, select, 1 {ONE} 2 {TWO} other {OTHER}}\">Hello\u003c/p>\n\n\u003c!-- This will fail to parse, see error below -->\n\u003cp i18n-title=\"@@test\" title=\"Updated {someVal, plural, =0 {just now} =1 {one minute ago} other {{{ someVal }} minutes ago}}\">Hello\u003c/p>\n\n\u003c!-- This however, works fine -->\n\u003cp i18n-title=\"@@test\" title=\"Updated {{someVal}} minute(s) ago\">Hello\u003c/p>\n```\n\nGiven you can use variables in attributes and that they already correctly create placeholders when extracting i18n, I think attributes should also be able to use ICU expressions.\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n```true\nX [ERROR] NG5002: Parser Error: Missing expected } at the end of the expression [{ someVal ]\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 20.3.1\nNode: 22.13.1\nPackage Manager: npm 9.6.4\nOS: win32 x64\n\n\nAngular: 20.3.0\n... common, compiler, compiler-cli, core, forms\n... platform-browser, router\n\nPackage Version\n------------------------------------\n@angular-devkit/architect 0.2003.1\n@angular-devkit/core 20.3.1\n@angular-devkit/schematics 20.3.1\n@angular/build 20.3.1\n@angular/cdk 20.2.3\n@angular/cli 20.3.1\n@angular/material 20.2.3\n@schematics/angular 20.3.1\nrxjs 7.8.2\ntypescript 5.8.3\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/wartab","@type":"Person","name":"wartab"},"datePublished":"2025-09-16T10:56:22Z","url":"https://github.com/angular/angular/issues/63827"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e4642c93-029c-b2f0-4d40-dc8b35c27761 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA1C:FC5BE:DE16C0:127B4ED:6B010417 |
| html-safe-nonce | 898ab11fe995250994a9132ca9fbac2d49c8db382a672f524552fce5262329d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTFDOkZDNUJFOkRFMTZDMDoxMjdCNEVEOjZCMDEwNDE3IiwidmlzaXRvcl9pZCI6IjU3ODMyNDUwNDU3ODQxODM4MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5d82b102eaf9d305672366ad7c62e3b963990ef74af315aeaaedd004d19f51ac |
| hovercard-subject-tag | issue:3421702399 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/63827/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d30783f349856e8aa13713f36450a6b643de3229920fde038954a93ffb696f9b/angular/angular/issues/63827 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d30783f349856e8aa13713f36450a6b643de3229920fde038954a93ffb696f9b/angular/angular/issues/63827 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? localize, core Is this a regression? No Description Couldn't really find another issue, but using ICU expressions in HTML-attributes doesn't w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wartab |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width