Comments (5)
I think the problem with this XML example is that you are using a tag (fontcolor
) as an attribute, which is not allowed. The following is an invalid XML document (you can check with various online validators/the XML standard)
<?xml version = "1.0" encoding = "UTF-8"?>
<note>
That’s the <fontcolor="#007af2">timer</fontcolor>!
</note>
This is a valid XML document (I added an attribute col
with your color):
<?xml version = "1.0" encoding = "UTF-8"?>
<note>
That’s the <fontcolor col="#007af2">timer</fontcolor>!
</note>
from deepl-node.
You're right, in this case it will resolve the problem, I suspect that there will be other examples having the same issue, I'll make sure to add them here if I find them to help the team resolve the issue.
from deepl-node.
Seems like a standard XML must have a space between name and attribute, so I guess the source could be the problem.
from deepl-node.
@JanEbbing That is correct, however there is an issue when there is an ignoreTag
inside another XML tag (which from the XML standard point of view, should be valid).
This example could demonstrate the problem :
Welcome back to the <gs><ignore>[SCHOOL_NAME]</ignore>!</gs> We missed you! Are you ready for this path?
where ignore
is added to the ignoreTags
list. In this case the result in Slovenian is :
Dobrodošli nazaj na <gs><ignore>[SCHOOL_NAME]</ignore>! Pogrešali smo vas! Ste pripravljeni na to pot?</gs>
Whereas it should be:
Dobrodošli nazaj na <gs><ignore>[SCHOOL_NAME]</ignore>!</gs> Pogrešali smo vas! Ste pripravljeni na to pot?
Meaning that the <gs>
tag is not well-placed. Again, if we set tagHandling
to off
, the <gs>
tag will be in its place but the [SCHOOL_NAME]
is translated because the tagHandling would not work anymore.
Any ideas for this problem?
from deepl-node.
Putting the exclamation mark outside the gs
tag fixes this for me (I assume this is because we do sentence splitting, and the exclamation mark that ends this sentence is inside the XML tag), maybe that helps?
Welcome back to the <gs><ignore>[SCHOOL_NAME]</ignore></gs>! We missed you! Are you ready for this path?
=>
Dobrodošli nazaj v <gs><ignore>[SCHOOL_NAME]</ignore></gs>! Pogrešali smo te! Ste pripravljeni na to pot?
But I agree this is not a good response from our API, I will check internally with another team.
from deepl-node.
Related Issues (20)
- Feature Idea: Translate webpage from url HOT 1
- Wrong detection of source language HOT 2
- Ionic & Angular ReferenceError when initializing deepl.Translator HOT 2
- cause: Error: socket hang up when try to send many requests HOT 1
- Feature Request: Markdown Handling HOT 1
- The translation API returns an empty body in Cloudflare Workers. HOT 3
- downloadDocument() response is empty for PDFs HOT 1
- TypeError HOT 5
- Uncaught TypeError: os.type is not a function HOT 5
- [tests] Jest may incorrectly detect open handles when running the tests
- Deepl Limitations - Timeout Errors during concurrent calls HOT 8
- SSL error using node 17+ HOT 4
- feature: translate a text to multiple Languages HOT 2
- Docs: `createGlossaryFromCsv` should be `createGlossaryWithCsv` HOT 1
- Axios proxy as URL HOT 1
- Update axios to latest version HOT 2
- 'ar' missing from CommonLanguageCode type HOT 4
- Translating HTML with English text to French adds HTML Tags and full sentence that is not in the input text HOT 2
- Circular dependency index.js ➜ parsing.js ➜ index.js HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepl-node.