Split very long translatable texts
Hi all, I was reviewing some translation related bugs reported recently and noticed this: https://github.com/yast/yast-storage-ng/blob/f3a910357fbec256415da98a51a8504... That's a huge translatable text! What's the problem? If we touch it and change a single character there (e.g. a possible typo) we will invalidate all translations for whole block. That will create extra load for the translators. The solution is to split that huge text into smaller parts. In this case it contains several paragraphs so we can naturally split this into something like: _("<p>....</p>") + _("<p>....</p>") + _("<p>....</p>") This will make the our changes easier to translate. Also another small advantage is that you can better see the <p></p> pairs so you can easily spot possible mismatching pairs. (For now keep the text as it is, just keep it on mind if you touch it in the future or write another long help text...) Thank you! -- Ladislav Slezák YaST Developer SUSE LINUX, s.r.o. Corso IIa Křižíkova 148/34 18600 Praha 8
On Thu, 8 Apr 2021 16:57:34 +0200 Ladislav Slezak <lslezak@suse.cz> wrote:
Hi all,
I was reviewing some translation related bugs reported recently and noticed this:
https://github.com/yast/yast-storage-ng/blob/f3a910357fbec256415da98a51a8504...
That's a huge translatable text!
What's the problem? If we touch it and change a single character there (e.g. a possible typo) we will invalidate all translations for whole block. That will create extra load for the translators.
The solution is to split that huge text into smaller parts. In this case it contains several paragraphs so we can naturally split this into something like:
_("<p>....</p>") + _("<p>....</p>") + _("<p>....</p>")
This will make the our changes easier to translate. Also another small advantage is that you can better see the <p></p> pairs so you can easily spot possible mismatching pairs.
I even would add tip to not include <p> there at all and simply have "<p>" + _("...") + "/p" to reduce chance to break text in translation. Josef
(For now keep the text as it is, just keep it on mind if you touch it in the future or write another long help text...)
Thank you!
Sorry, mixed up the sender, therefore replying from the correct address: чт, 8 апр. 2021 г. в 18:12, josef Reidinger <jreidinger@suse.cz>:
I even would add tip to not include <p> there at all and simply have "<p>" + _("...") + "/p" to reduce chance to break text in translation.
This might create a habit of not including the markup at all - and this is some really bad habit: it creates a bunch of unfinished phrases in case of any inline formatting and turns translator's life into a horror if his target language has different word order rules -- Regards, Minton.
Here goes the translator's point of view: чт, 8 апр. 2021 г. в 17:57, Ladislav Slezak <lslezak@suse.cz>:
Hi all,
I was reviewing some translation related bugs reported recently and noticed this:
https://github.com/yast/yast-storage-ng/blob/f3a910357fbec256415da98a51a8504...
That's a huge translatable text!
Which is absolutely fine in this particular case!
What's the problem? If we touch it and change a single character there (e.g. a possible typo) we will invalidate all translations for whole block. That will create extra load for the translators.
..or not depending on the text.
The solution is to split that huge text into smaller parts. In this case it contains several paragraphs so we can naturally split this into something like:
_("<p>....</p>") + _("<p>....</p>") + _("<p>....</p>")
And have a risk of some horrible translated/untranslated mess in case of a typo fix or some other minor change in one of the paragraphs.
This will make the our changes easier to translate. Also another small advantage is that you can better see the <p></p> pairs so you can easily spot possible mismatching pairs.
YaST is translated via Weblate, so pairing check is there anyway. I admit that longer texts have lower chances of being translated at all, but splitting a single text in several portions raises chances for quality issues. If you have a long text which describes several topics (for example, config options with small descriptions) then it makes perfect sense to split this into individual chunks to ease the burden on translators, but when there is a solid text of several paragraphs on a single topic - then please don't split, it doesn't help or even makes more troubles. -- Regards, Minton.
participants (3)
-
Alexander Melentev
-
josef Reidinger
-
Ladislav Slezak