-
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
Add custom placeholders for po4a componentes in Weblate #510
Comments
Hello, I have no idea of how to do that. Is there a possibility that I grant you the right to do that for the rest of us? Does weblate allow me to give you the needed privileges over the projects? Thanks, |
I mentioned above in Settings > translation flags above (with link). But if you prefer have me set it, just go to https://hosted.weblate.org/projects/po4a/, Manage menu item, Users submenu item and add rafaelff as admin |
You're an admin, welcome on board! |
I set the custom placeholder expressions and it seems to work. I've spotted some false positives and I've worked around them. Looks good as a starting setting. |
Excellent, thanks. Maybe you can close this bug once everything works as you'd expect? Thanks again |
Both 'po4a' and 'po4a-doc' componentes in Weblate have a lot of formatting syntax, references to options and other texts that could easily be mistranslated and cause the resulting software/documentation to be malformatted or broken. Setting placeholder for such occurrences increases the chances of translation consistency for texts that should not be translated (i.e. should be kept as is in the translation).
If the translator do translate the text that was supposed to be kept as the original in English, a translation check error will be displayed. While it can be dismissed, it will bring to the attention of the translation the fact of a wrong translation of these texts.
I was working on matching potencial targets of a custom placeholder expression, and I came up with the following regexp:
For po4a (Settings > Translation flags):
For po4a-doc (Settings > Translation flags):
Example of occurrences for each regexp for 'po4a':
\w+(::\w+)+
Pod::Man
Locale::Po4a::Man
\w+_\w+
groff_code
no_wrap
po4a_paths
\w+=\w+
debug=onsgmls
mode=after
mode=eof
\-\w \w+
-o exclude_include
-o doctype
\-?-\w+(\-\w+)?
(note the one white-space in the beginning!)--master-charset
--localized-charset
\w+\(\d\)
man(7)
po4a(7)
mdoc(7)
B<\-?\-\w+(\-\w+)?>
B<--blank>
B<--capitalize>
Example of occurrences for each regexp for 'po4a-doc':
(L|B)<[\-_\w\(\)\d\$\[\]\<\>=:;\|\.]*>
Cases:
po4a-doc might probably have more stuff to match, but this already matches a lot of cases in the docs.
Note: C<> and I<> could have their contents translated, so it would be advised to be make them placeholders.
The text was updated successfully, but these errors were encountered: