Title: XML translation drops numbers from translation · Issue #145 · DeepL/deepl-python · GitHub
Open Graph Title: XML translation drops numbers from translation · Issue #145 · DeepL/deepl-python
X Title: XML translation drops numbers from translation · Issue #145 · DeepL/deepl-python
Description: When translating XML documents, I have problems with numbers being dropped in the translated result, especially in tables. Input: Open Graph Description: When translating XML documents, I have problems with numbers being dropped in the translated result, especially in tables. Input: X Description: When translating XML documents, I have problems with numbers being dropped in the translated result, especially in tables. Input: <row> <entry> <para>22</para> </entry>...
Opengraph URL: https://github.com/DeepL/deepl-python/issues/145
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"XML translation drops numbers from translation","articleBody":"When translating XML documents, I have problems with numbers being dropped in the translated result, especially in tables.\n\nInput:\n\n\t\t\t\t\t\t\t\u003crow\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003e22\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003eVentilations- och defrostermunstycken SB styrhytt\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\u003c/row\u003e\n\t\t\t\t\t\t\t\u003crow\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003e23\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003eLuft från intagsaggregatet till ventilationsmunstycken i styrhytt\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\u003c/row\u003e\n\t\t\t\t\t\t\t\u003crow\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003e1100\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\t\t\t\u003cpara\u003eLuft från intagsaggregatet till ventilationsmunstycken i styrhytt\u003c/para\u003e\n\t\t\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\t\u003c/row\u003e\n\n In the table below, you can see how numbers are being dropped from the translated content. This is serious as it is not always easy to spot.\n\n \u003crow\u003e\n \u003centry\u003e\n \u003cpara\u003e22\u003c/para\u003e\n \u003c/entry\u003e\n \u003centry\u003e\n \u003cpara\u003eVentilation and defroster nozzles SB control cabin\u003c/para\u003e\n \u003c/entry\u003e\n \u003c/row\u003e\n \u003crow\u003e\n \u003centry\u003e\n \u003cpara\u003e2\u003c/para\u003e\n \u003c/entry\u003e\n \u003centry\u003e\n \u003cpara\u003eAir from intake unit to ventilation nozzles in control cabin\u003c/para\u003e\n \u003c/entry\u003e\n \u003c/row\u003e\n\t\t\t \u003crow\u003e\n \u003centry\u003e\n \u003cpara\u003e11\u003c/para\u003e\n \u003c/entry\u003e\n \u003centry\u003e\n \u003cpara\u003eAir from intake unit to ventilation nozzles in wheelhouse\u003c/para\u003e\n \u003c/entry\u003e\n \u003c/row\u003e\n\nThe code I am using:\n\n result = deepl_client.translate_text(\n text,\n tag_handling=\"xml\",\n source_lang=\"SV\",\n target_lang=\"EN-GB\",\n model_type=\"prefer_quality_optimized\",\n non_splitting_tags=\"div\",\n split_sentences=\"nonewlines\"\n )\n\nI have a cumbersome workaround for this particular issue, but it's not safe. Pre-processing the content input file as a string with regular expressions that add a 'fake' element around particular numbers and then use the 'ignore_tags' option on this fake element.\n\nThis will however not find all all instances of the problem.\n\nIs there anything else that can be done?\n","author":{"url":"https://github.com/matsbert","@type":"Person","name":"matsbert"},"datePublished":"2025-09-01T13:14:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/145/deepl-python/issues/145"}
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:5e91f722-27c7-6266-6172-32f24dc7a7ba current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id D4E8:1EDE:E90467:14F7208:6A4CE983 html-safe-nonce bd121b1f7a3dda6761ce497cb011836ff65a40a3a80f5d39e5bcfee076c9bf4e visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEU4OjFFREU6RTkwNDY3OjE0RjcyMDg6NkE0Q0U5ODMiLCJ2aXNpdG9yX2lkIjoiMTU5OTgzODE1OTQ4NjM4MDQxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac fe0ce0acfacff228a6584e6bcc3c9afc73c4449cc607b6efcfe19341090902f5 hovercard-subject-tag issue:3372657353 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/DeepL/deepl-python/145/issue_layout twitter:image https://opengraph.githubassets.com/67097802144f88be15a8acf1036b71defb35c6aa7482e6444fd421515c654388/DeepL/deepl-python/issues/145 twitter:card summary_large_image og:image https://opengraph.githubassets.com/67097802144f88be15a8acf1036b71defb35c6aa7482e6444fd421515c654388/DeepL/deepl-python/issues/145 og:image:alt When translating XML documents, I have problems with numbers being dropped in the translated result, especially in tables. Input: og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username matsbert hostname github.com expected-hostname github.com None 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 turbo-cache-control no-preview go-import github.com/DeepL/deepl-python git https://github.com/DeepL/deepl-python.git octolytics-dimension-user_id 83310993 octolytics-dimension-user_login DeepL octolytics-dimension-repository_id 387469387 octolytics-dimension-repository_nwo DeepL/deepl-python octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 387469387 octolytics-dimension-repository_network_root_nwo DeepL/deepl-python 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 c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.