Date: prev next · Thread: first prev next last
2022 Archives by date, by thread · List index


Hello Ilmari,
thank you very much for the implementation of this functionality!

Marco Marega


Il 21/10/22 16:37, Ilmari Lauhakangas ha scritto:
Hello,

during LibreOffice conference 2022 I had a conversation with an Italian translator. He said it would be nice to import Calc function name translations into the translation memory of the wiki to speed things up. I started thinking that it would be even better to automatically get the correct translated name using a template or a widget. I quickly understood a template would not be practical. A widget would require modifying the page content with Javascript, which is always a bit awkward and also slows down the page load.

While researching the topic, I ran into an extension that enables the use of Lua programming language to have essentially a much nicer template syntax: https://www.mediawiki.org/wiki/Extension:Scribunto

I set up a local MediaWiki instance to develop the Calc function name module and now Guilhem kindly enabled the extension in TDF wiki.

The module is called in wiki content like so:

{{#invoke:Calc_fn_name|get|IF|{{#translation:}}}}

It calls the module, a function inside it and passes arguments for the Calc function name and the language code. Conveniently the {{#translation:}} magic word allows us to automatically pass the correct language code.

The module code can be examined here:
https://wiki.documentfoundation.org/Module:Calc_fn_name

I will gradually put the module to use in the coming weeks. I have a Firefox Greasemonkey script to automate replacing the names in content when editing an article.

Using the module will allow removing many repeating strings from translation. These function strings which occur on their own are usually in the beginning and end of the Calc function articles as well as within tables showing examples.

When a function name occurs inside a paragraph, any existing translations will be marked as outdated. It is not necessary to copy & paste the module invocation syntax to the existing translations in this case. It is enough to just confirm the already translated paragraph.

Steve is working on updating articles, but he does not need to worry about the module syntax. I will take care of everything when I eventually mark the new articles for translation.

As the first tries, I changed these pages:
https://wiki.documentfoundation.org/Documentation/Calc_Functions/List_of_Functions
https://wiki.documentfoundation.org/Documentation/Calc_Functions/ABS

As mentioned, when you see outdated translations in your language for the ABS article, just confirm them, no need to copy the module syntax.

I will wait for a bit before continuing, so let me know if there are any issues. I will also reach out to individual translators, who already worked on the articles.

Ilmari


--
To unsubscribe e-mail to: l10n+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/l10n/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.