29 May 2024 |
| _Guapisimo_ joined the room. | 01:35:29 |
| _Guapisimo_ left the room. | 01:48:39 |
emmapeel | ping linsui | 07:52:21 |
linsui | In reply to @_oftc_emmapeel:matrix.org marking strings as reviewed is important, you create a corpus of translations that have been agreed on by 2 people Anyone can approve their own translation. | 08:12:07 |
emmapeel | ey there! yes, in the Tor Project we like reviewed translations because we think they improve the translation and prevent defacings and malicious use. | 08:17:36 |
emmapeel | but i wanted to talk about something else, linsui, the Glossary | 08:17:54 |
emmapeel | i look at https://hosted.weblate.org/browse/f-droid/glossary-f-droid/en/?q=state:%3E=translated and i see a lot of commands. i did add commands to the glossary when we started using weblate, but then i realised it was not the best place to put them | 08:18:54 |
linsui | Those strings should be marked as do-not-translate. | 08:19:52 |
emmapeel | now, if a string is on weblate and i dont want translators to translate it, i add a placeholder flag to the string | 08:20:16 |
emmapeel | i have some placeholder flags that are added at the component level, but i also add them to special strings when i feel translators could get confused by what to translate | 08:21:04 |
linsui | Does weblate read those flags? | 08:21:30 |
emmapeel | and they also provide a cool shortcut, ctrl+number of placeholder | 08:21:31 |
emmapeel | and visual feedback | 08:21:39 |
emmapeel | and you can enforce them, so the translation can only be saved as needs-edit | 08:21:51 |
emmapeel | let me look for an example | 08:22:00 |
emmapeel | yes, weblate reads those flags! | 08:22:59 |
linsui | Can you show me the code? :) Which format should be used? | 08:23:50 |
emmapeel | see for example https://hosted.weblate.org/translate/tor/support-portal/ko/?checksum=f5a165e33790f15e - torrc is configured as a placeholder | 08:23:58 |
emmapeel | you can add them with the pencil, just do: placeholder:expression for a simple one. | 08:24:28 |
emmapeel | you can add the whoel sentence, or parts of it | 08:24:42 |
emmapeel | (many of the placeholders on that string are setup at the component level, but you can do it string per string | 08:25:08 |
emmapeel | ) | 08:25:10 |
linsui | Is placeholder replaced when the string is used? How can we do that for markdown? | 08:26:08 |
emmapeel | they are very customizable, and translators get immediate structured feedback that helps them to self-learn | 08:26:11 |
emmapeel | so, if you add a placeholder and it is on the source string, weblate will check that it is also on the translation. otherwise it will trigger a failure and give a message | 08:27:06 |
emmapeel | if you enforce checks in the component configuration, they will not be able to save the translation as ready for review, only needs-edit | 08:27:32 |
emmapeel | for markdown i have some regular expression checks as well: | 08:28:19 |
emmapeel | placeholders:r"^\* ":r"\]\([^h/].*?\)" | 08:28:22 |
emmapeel | ^ here there are 2 different checks, the first one makes sure that the bullets for the lists are added to the translation, and it only works when the first 2 chars in the string are '* ', then the translation needs to also start like that | 08:29:45 |
emmapeel | the second creates placeholders for the links, but only if the link does not start with 'h' (internal links) | 08:30:33 |