Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for XML #2

Closed
ontl opened this issue May 29, 2021 · 2 comments
Closed

Support for XML #2

ontl opened this issue May 29, 2021 · 2 comments

Comments

@ontl
Copy link
Contributor

ontl commented May 29, 2021

Do you have plans to add support for XML tag handling? Would you be open to a PR adding it?

@mgruner
Copy link
Owner

mgruner commented May 29, 2021

Hi @ontl. No plans yet, when I created this XML handling was not even really specified of course you can send a PR to improve the API. I would like it to be covered with tests though.

I think we should try not to make the translate() API too complex with so many new options. Perhaps we can encapsulate the XML related options somehow together in one new parameter containing the different fields, what do you think?

@ontl
Copy link
Contributor Author

ontl commented May 29, 2021

Ok cool. I have a working version with just the tag_handling=xml param, and have been poking away at some tests (on short strings, the normal translation mode sometimes produces the same results as tag_handling=xml, so still looking for the best test strings)

To add the other XML-related options, I like your idea of encapsulating them rather than adding more options to translate(). I'm a bit rusty in python, is the idea we'd add an xml_options parameter to translate() which expects a dict of options? What would the command line syntax look like for that, --xml_options={option1:value,option2:value}?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants