René's URL Explorer Experiment


Title: extract-i18n generating wrong source inside the xfl file when parsing empty elements · Issue #56824 · angular/angular · GitHub

Open Graph Title: extract-i18n generating wrong source inside the xfl file when parsing empty elements · Issue #56824 · angular/angular

X Title: extract-i18n generating wrong source inside the xfl file when parsing empty elements · Issue #56824 · angular/angular

Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description We recently upgraded to v16.2.14 from v14 (couldn't upd...

Open Graph Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description We recently upg...

X Description: Command extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description We recently upg...

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"extract-i18n generating wrong source inside the xfl file when parsing empty elements","articleBody":"### Command\r\n\r\nextract-i18n\r\n\r\n### Is this a regression?\r\n\r\n- [X] Yes, this behavior used to work in the previous version\r\n\r\n### The previous version in which this bug was not present was\r\n\r\n_No response_\r\n\r\n### Description\r\n\r\nWe recently upgraded to v16.2.14 from v14 (couldn't update further as we need to fix some dependencies which don't support \u003e v17) and now I discovered by chance that extract-i18n is producing an xlf which would break html once using a language different from the default one.\r\nDebugging a bit, I found out that the parse of empty html elements (like `\u003csvg\u003e\u003c/svg\u003e` or `\u003cspan\u003e\u003c/span\u003e`) is producing wrong closing tags picking up part of the text after the real closing tag. An example below:\r\nthis html\r\n```html\r\n\u003cdiv\u003e\r\n  \u003cbutton\r\n    i18n=\"add line button@myAddLineStringId\"\r\n  \u003e\r\n    Add line\r\n    \u003csvg cdsIcon=\"add\" size=\"20\" class=\"cds--btn__icon\"\u003e\u003c/svg\u003e\r\n  \u003c/button\u003e\r\n\u003c/div\u003e\r\n```\r\nis producing this entry in the xlf\r\n```xlf\r\n\u003csource\u003e Add line \u003cx id=\"START_TAG__SVG_SVG\" ctype=\"x-_svg_svg\" equiv-text=\"\u0026lt;svg cdsIcon=\u0026quot;add\u0026quot; size=\u0026quot;20\u0026quot; class=\u0026quot;cds--btn__icon\u0026quot;\u0026gt;\"/\u003e\u003cx id=\"CLOSE_TAG__SVG_SVG\" ctype=\"x-_svg_svg\" equiv-text=\"\u0026lt;/button\u0026gt;\r\n\u0026lt;/di\"/\u003e\u003c/source\u003e\r\n```\r\nas you can see, when the translated xlf will take over the default language version, it will produce an svg closing tag `\u003c/button\u003e\u003c/di` which would then break the above html\r\nA simple fix is to add a space inside the empty element, or move the closing tag in a new line, but this might collide with linter setup, so not a great temporary solution.\r\n\r\n### Minimal Reproduction\r\n\r\nhave in a template the following:\r\n```html\r\n\u003cdiv i18n=\"description@@stringId\"\u003e\r\n  A string\r\n  \u003cspan\u003e\u003c/span\u003e\r\n\u003c/div\u003e\r\n```\r\n\r\nand then run the normal extract-i18n\r\n\r\n### Exception or Error\r\n\r\n_No response_\r\n\r\n### Your Environment\r\n\r\n```text\r\n_                      _                 ____ _     ___\r\n    / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\r\n   / △ \\ | '_ \\ / _` | | | | |/ _` | '__|   | |   | |    | |\r\n  / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\r\n /_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\r\n                |___/\r\n    \r\n\r\nAngular CLI: 16.2.14\r\nNode: 18.20.1\r\nPackage Manager: yarn 1.22.19\r\nOS: darwin arm64\r\n\r\nAngular: 16.2.12\r\n... animations, common, compiler, compiler-cli, core, elements\r\n... forms, language-service, localize, platform-browser\r\n... platform-browser-dynamic, router, service-worker\r\n\r\nPackage                         Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect       0.1602.14\r\n@angular-devkit/build-angular   16.2.14\r\n@angular-devkit/core            16.2.14\r\n@angular-devkit/schematics      16.2.14\r\n@angular/cdk                    16.2.14\r\n@angular/cli                    16.2.14\r\n@angular/material               16.2.14\r\n@schematics/angular             16.2.14\r\nrxjs                            7.8.1\r\ntypescript                      4.9.5\r\nzone.js                         0.13.3\r\n```\r\n\r\n\r\n### Anything else relevant?\r\n\r\n_No response_","author":{"url":"https://github.com/Licen-it","@type":"Person","name":"Licen-it"},"datePublished":"2024-07-03T12:38:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/56824/angular/issues/56824"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d760ec49-b06f-611f-554d-e3051ed18747
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8EAC:1E0AAF:277AA83:36D06D9:6977A484
html-safe-nonce6d749fb4669e4d0e8bdcd4658ed323df95eb3845241a941aff39976a0393ba7b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUFDOjFFMEFBRjoyNzdBQTgzOjM2RDA2RDk6Njk3N0E0ODQiLCJ2aXNpdG9yX2lkIjoiMjY2MzU3NTAyMDM2NTEyODgzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6bdcb5dfb0a2d2419d1058525bd57b433f1d006c7cc6b7af9123cf5b04c2d211
hovercard-subject-tagissue:2388749626
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/56824/issue_layout
twitter:imagehttps://opengraph.githubassets.com/00155e588d4ff7300cd0c6d5c215505cce0dce09846a6cf21d25ae456168de93/angular/angular/issues/56824
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/00155e588d4ff7300cd0c6d5c215505cce0dce09846a6cf21d25ae456168de93/angular/angular/issues/56824
og:image:altCommand extract-i18n Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description We recently upg...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLicen-it
hostnamegithub.com
expected-hostnamegithub.com
Nonee8b91803a5fc7ac066710509c57c636dab6ed4620bd9213b470a4617c79989c9
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
release9b4562e3c5c60b38349a7d80ec8e160c11fe84b6
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/angular/angular/issues/56824#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F56824
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F56824
Sign up https://patch-diff.githubusercontent.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://patch-diff.githubusercontent.com/angular/angular/issues/56824
Reloadhttps://patch-diff.githubusercontent.com/angular/angular/issues/56824
Reloadhttps://patch-diff.githubusercontent.com/angular/angular/issues/56824
angular https://patch-diff.githubusercontent.com/angular
angularhttps://patch-diff.githubusercontent.com/angular/angular
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fangular%2Fangular
Fork 27k https://patch-diff.githubusercontent.com/login?return_to=%2Fangular%2Fangular
Star 99.7k https://patch-diff.githubusercontent.com/login?return_to=%2Fangular%2Fangular
Code https://patch-diff.githubusercontent.com/angular/angular
Issues 1k https://patch-diff.githubusercontent.com/angular/angular/issues
Pull requests 129 https://patch-diff.githubusercontent.com/angular/angular/pulls
Discussions https://patch-diff.githubusercontent.com/angular/angular/discussions
Actions https://patch-diff.githubusercontent.com/angular/angular/actions
Projects 2 https://patch-diff.githubusercontent.com/angular/angular/projects
Security 4 https://patch-diff.githubusercontent.com/angular/angular/security
Insights https://patch-diff.githubusercontent.com/angular/angular/pulse
Code https://patch-diff.githubusercontent.com/angular/angular
Issues https://patch-diff.githubusercontent.com/angular/angular/issues
Pull requests https://patch-diff.githubusercontent.com/angular/angular/pulls
Discussions https://patch-diff.githubusercontent.com/angular/angular/discussions
Actions https://patch-diff.githubusercontent.com/angular/angular/actions
Projects https://patch-diff.githubusercontent.com/angular/angular/projects
Security https://patch-diff.githubusercontent.com/angular/angular/security
Insights https://patch-diff.githubusercontent.com/angular/angular/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/angular/angular/issues/56824
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/angular/angular/issues/56824
extract-i18n generating wrong source inside the xfl file when parsing empty elementshttps://patch-diff.githubusercontent.com/angular/angular/issues/56824#top
area: i18nIssues related to localization and internationalizationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20i18n%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/Licen-it
https://github.com/Licen-it
Licen-ithttps://github.com/Licen-it
on Jul 3, 2024https://github.com/angular/angular/issues/56824#issue-2388749626
area: i18nIssues related to localization and internationalizationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20i18n%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
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.