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

Tag translation text with ID #366

Open
tomasr78 opened this issue Apr 5, 2018 · 4 comments
Open

Tag translation text with ID #366

tomasr78 opened this issue Apr 5, 2018 · 4 comments

Comments

@tomasr78
Copy link

tomasr78 commented Apr 5, 2018

I am not sure is Issues subject which I wrote reflect the idea of the problem which I get every time when I change translation text slightly.

I would like to explain the problem. The i18n use translation text surrounded with [[[]]] tags as translation index for other languages and the smallest change in text breaks that index and all translations are lost.

For example I have C# MVC web page with title [[[PDF to Word Converter]]] I get this translated to 22 languages. At next day I want slightly change English words positions in that title for A/B testing. Whenever I do this the all translations for other language gets lost because the English text which is also translation tag is changed.

Is it possible to prevent this and keep translations even if original text is changed? Any suggestions are welcome.

My suggestion would be to introduce optional translationTag and use it as translation match id.

[[[text to translate///ID=1]]]

@turquoiseowl
Copy link
Owner

Have you tried embedding some HTML/XML in the tag/msgstr that won't show,such as <-- ID1 -->? Haven't tried it myself.

@tomasr78
Copy link
Author

tomasr78 commented Apr 6, 2018

Sorry but I don't understand your suggestion, could you please explain more detailed.

@turquoiseowl
Copy link
Owner

Something like this:

[[[Hello world<!--ID1-->]]]

@tomasr78
Copy link
Author

I have tried to add [[[Hello world]]] but then the whole string "Hello world" goes to msgstr when parsing. The id is not extracted from text.

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

No branches or pull requests

2 participants