Composite string in Help

Hi,

Found a string in Help that is badly composited:
"<variable id="release">This function is available since %PRODUCTNAME
</variable>"
This will be followed by the version number, but this is not clear when
translating.
Additionally, why doesn't the translatable string include the version
number placeholder? It should!
The string appears to have been introduced in 6.3, still present in 6.4 and
master.

Best regards,
Mihkel
Estonian translator

HI Mihkel

I tried to be a smart guy and save work to myself (I'm a translator) but
my smartness isn't working... :slight_smile:

I separated the text from the version number, and apparently it is not a
solution.

To fix, I'll have to repeat "This function is available since
%PRODUCTNAME " for every release number (20 times), as shown in the
source file:

https://opengrok.libreoffice.org/xref/help/source/text/scalc/00/avail_release.xhp?r=c7e09719

to let translator place the version number where they want in the
sentence. Not a big deal, given translation memory.

Thanks for pointing it. Fix is coming next year.

Kind regards
Olivier

Olivier Hallot (<olivier.hallot@libreoffice.org>) kirjutas 31.12.2019 kell
18:46:

HI Mihkel

I tried to be a smart guy and save work to myself (I'm a translator) but
my smartness isn't working... :slight_smile:

These kinds of things tend to work for the "Standard Average European"
languages - but not some (many) others :slight_smile:
E.g. in my language, I can work around the issue, once I found out how the
end-result would look like, but it would sound a bit more natural if I
could put a little something behind the version number.
Also, looking at current translations, I'm not the only one who didn't
really understand this string - several teams have overlooked the space
between "%PRODUCTNAME" and "</variable>", and a few have placed
"%PRODUCTNAME" at an earlier position in the translation, giving (as far as
I can tell) a semi-nonsensical end result...

Bonus question: how is this specific composite string handled in case of
RTL languages? It seems the string isn't yet translated into e.g. Arabic or
Hebrew, so I couldn't check it myself.

I separated the text from the version number, and apparently it is not a

solution.

To fix, I'll have to repeat "This function is available since
%PRODUCTNAME " for every release number (20 times), as shown in the
source file:

https://opengrok.libreoffice.org/xref/help/source/text/scalc/00/avail_release.xhp?r=c7e09719

to let translator place the version number where they want in the
sentence. Not a big deal, given translation memory.

Not a big deal indeed - but I was wondering why the version couldn't come
from a placeholder? (%PRODUCTVERSION or somesuch?)
<https://www.documentfoundation.org/privacy>

Best,
Mihkel

Hi

Actually, I broke the rule of not splitting sentences into pieces, which
is a bad practice translation-wise. My bad.

%PRODUCTVERSION is a dynamic string that is updated each release, so it
doesn't serve to the purpose.

Hi Olivier,

Actually, I broke the rule of not splitting sentences into pieces, which
is a bad practice translation-wise. My bad.

%PRODUCTVERSION is a dynamic string that is updated each release, so it
doesn't serve to the purpose.

You could still have the strings translated with embedvar, couldn't you?

In worst case scenario you'll have as many strings as there are
versions (with only benefit that translators can not accidentally
change the version itself), but variable definitions can be nested, so
maybe it is possible to use variable id "productversion" in the
translatable string, and have something like <variable
id="productversion" localize="false"><variable
id="setmeaccordingtocontext" localize="false">actual
version</version></version>?

ciao
Chrisitan