-
Notifications
You must be signed in to change notification settings - Fork 62
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
AsciiDoc exclude cross-references and anchors ids from the *.po(t) translation file #400
Comments
Hello @benoitrolland, thanks for the feedback. Could you please provide me with an example file exemplifying what you want to exclude? I'm not expert in all the formats handled by po4a and often struggle to generate such test cases myself. Thanks, |
Refering to your points, first please understand that cross-references are in-line formattings and as such, they are not modified in the string to translate. Take for example the following text:
We want to keep the crosslink reference and how it is formatted. Po-format is not powerful enough (and has not been designed) to handle attributes in-line text. It is up to the translator to understand this formatting and make the translation follow the same pattern. In some languages the translation may completely modify the way the sentence is written and where the crosslink is. As for your points:
Hope this clarifies your issues. |
from an asciidoc file containing:
(...)
Using po4a version 0.69., the generated *.pot file content is:
Given the Locale::Po4a::AsciiDoc.3pm documentation available, I could declare in the source asciidoc my image macro for it not to be translated like this: //po4a: macro image[] The po4a generated *.pot file now contains:
But would you know how to make the *.po translation file:
Simply said, how to exclude cross-references and anchors ids as well as custom-ids from the po4a generated *.po(t) translation file. |
Thank you for reading my case. I understand but this seems to disqualify Po4a/asciidoc as a candidate for a fully automated translation ... |
Sorry to read that. One point I'd like mention though: you won't find any translation tool that can "exclude cross-references and anchors ids as well as custom-ids", because this information is needed by the translation tool to correctly guide the translator into converting the original anchors and cross-refs into the translated ones. |
Yes, but maybe a scenario where isolated text could first be translated and then reviewed would help asciidoc/po4a adapt to new challenges in automation, not to say that text references are often used for isolated text. |
This seems to be a bug, indeed. I'll look into it. |
Hello, I come a bit after the party here, but I wanted to mention that there is a notion of placeholder in the XML module of po4a, where a specific tag and all its content can be hidden by po4a, and replaced with Maybe something similar could be done here. For example,
Also, without the text around (ie for the content I did not dig into the code, but I think that all this could be possible. If it does not make the code too ugly, that'd probably be a good set of improvements, don't you think? But my main concern here is that @benoitrolland was speaking of fully automated translation process. If some robot changes Btw, if |
Replacing the markup of asciidoc by another markup that is not recognized by any translation tool is useless. The replacing markup must be natively handled by po. To this end, we can use placeholders which are related to the programming languages natively handled by gettext and that do not interfere with asciidoc's own markup. For instance:
I haven't had a look at how common translation applications and automatic translation tools handle these tags to select the most supported tag system. |
You are perfectly right. I tend to personally prefer that the |
As much as I know, placeholder syntax is configurable in TMSs. At least,
this is the case in Weblate, Crowdin and Transifex.
So, having a clear syntax for placeholders, easily matched by a pattern in
these tools would be an awesome improvement! 🤩
|
@silopolis do you have a link or two to describe what's existing in these TMS? Thx |
Le sam. 15 avr. 2023 à 22:16, @mquinson wrote :
do you have a link or two to describe what's existing in these TMS? Thx
Sure :)
For Crowdin:
* https://support.crowdin.com/supported-formats/?q=placeholder
* https://support.crowdin.com/enterprise/custom-placeholders/
For Transifex:
* https://www.transifex.com/blog/2018/introducing-multiple-custom-placeholders-and-some-editor-goodies-for-translators/
* https://help.transifex.com/en/articles/6241794-setting-translation-checks#h_317a8b70f5
For Weblate:
* https://docs.weblate.org/en/latest/user/checks.html#placeholders
* WeblateOrg/weblate#9113 (discussion opened by me as I couldn't find clear information)
Hope that helps
TY
J
|
First, thank you so much for the great job of including assciidoc into po4, allowing translation from asciidoc files.
Reading the Locale::Po4a::AsciiDoc documentation,
I do not see how to exclude anchors ids , cross reference ids and custom-ids from the generated *.po(t) translation file.
I believe it might prevent an effective automatic translation of asciidoc files using po4a.
Let find the details here
The text was updated successfully, but these errors were encountered: