[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libreoffice-l10n] Re: [Libreoffice-commits] core.git: Properly escape desktop file string values


Please note the below core commit. Of relevance to translators is especially the tail of the commit message, which identifies po file msgstr content that includes leading spaces or embedded \n markup that is presumably not as intended.

For convenience, I repeat here the five issues I identified:

(1) Presumably unintended leading space in msgstr at translations/source/ks/sysui/desktop/share.po:405
#: launcher_comment.ulf
msgctxt ""
"launcher_comment.ulf\n"
"impress\n"
"LngText.text"
msgid "Create and edit presentations for slideshows, meeting and Web pages by using Impress."
msgstr " ایمپریس کے ذریعہ سے پریزینٹیشنس کے لئےسلائیڈشوز،میٹینگ اورویب پیجیزکوتخلیق اورمرتب کرو۔"

(2) Presumably unintended leading space in msgstr at translations/source/sd/sysui/desktop/share.po:392
#: launcher_comment.ulf
msgctxt ""
"launcher_comment.ulf\n"
"impress\n"
"LngText.text"
msgid "Create and edit presentations for slideshows, meeting and Web pages by using Impress."
msgstr " ٺپي جو اِستعمال ڪندي سلائڊشوز، ميٽنگن ۽ ويب صفحن لاءِ پيشڪشون خلقيو ۽ سمپادت ڪريو "

(3) Presumably unintended leading space in msgstr at translations/source/kok/sysui/desktop/share.po:495
#: launcher_genericname.ulf
msgctxt ""
"launcher_genericname.ulf\n"
"startcenter\n"
"LngText.text"
msgid "Office"
msgstr " कार्यालय"

(4) Presumably unintended \n markup (with spaces both before and after) in msgstr at translations/source/kok/sysui/desktop/share.po:436
#: launcher_comment.ulf
msgctxt ""
"launcher_comment.ulf\n"
"startcenter\n"
"LngText.text"
msgid "The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation."
msgstr ""
"ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot \n"
" asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट \n"
" प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला."

(5) Presumably unintended leading space in msgstr at translations/source/or/sysui/desktop/share.po:420
#: launcher_comment.ulf
msgctxt ""
"launcher_comment.ulf\n"
"base\n"
"LngText.text"
msgid "Manage databases, create queries and reports to track and manage your information by using Base."
msgstr " ଆଧାର ଉପୟୋଗ କରି ତଥ୍ଯ ସଞ୍ଚଯଗୁଡିକ ପରିଚାଳନା ,ପ୍ରଶ୍ନଗୁଡିକୁ ସୃଷ୍ଟି ଏବଂ ରିପୋର୍ଟଗୁଡିକୁ ଚିହ୍ନଟ କର ଏବଂ ତୁମ ସୂଚନାକୁ ପରିଚାଳନା କର।"


On 24/04/2020 11:49, Stephan Bergmann (via logerrit) wrote:
solenv/bin/desktop-translate.py | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

New commits:
commit 3f38a57a4ed8515dd145aea46ed697f101409c2f
Author: Stephan Bergmann <sbergman@redhat.com>
AuthorDate: Thu Apr 23 17:18:01 2020 +0200
Commit: Stephan Bergmann <sbergman@redhat.com>
CommitDate: Fri Apr 24 11:48:58 2020 +0200

Properly escape desktop file string values
<https://git.libreoffice.org/translations/+/
781673fea7346b0d148bf85984826c0556fdf1b9%5E!/> "update translations for
4.4.0.0alpha1" had introduced
> msgstr ""
> "ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot \n"
> " asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट \n"
> " प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला."
into translations/source/kok/sysui/desktop/share.po, which for one is a
concatenation of multiple strings spread over multiple lines, and for another
contains encoded newlines ("\n").
The resulting
> kok = "ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot
> asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट
> प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला."
in workdir/CustomTarget/sysui/share/launcher_comment.ulf combined the multiple
strings into a single one, while at the same time expanding the encoded newlines
("\n") into actual line breaks, resulting in a multi-line string.
Prior to d2c23609083d7b3e5267b1e4c923476cbc509d00 "tdf#130911: convert
desktop-translate from Perl to Python", solenv/bin/desktop-translate.pl
mis-translated that to a cut
> Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot
in instdir/share/xdg/startcenter.desktop, silently dropping all but the first
line of the multi-line string from the ulf file. But the resulting desktop file
was at least syntactially correct, so the broken content apparently went
unnoticed (or at least unfixed).
Then, d2c23609083d7b3e5267b1e4c923476cbc509d00 "tdf#130911: convert
desktop-translate from Perl to Python" caused solenv/bin/desktop-translate.py to
fail with an AssertionError upon multi-line strings in ulf files (see
<https://bugs.documentfoundation.org/show_bug.cgi?id=130911#c6> "Policy on
converting Perl scripts to Python"). f516f6753d87d963c06953c60e6ad56112c191be
"Handle desktop files with multiline entries" was meant to address that, but it
caused solenv/bin/desktop-translate.py to now mis-translate the given multi-line
ulf string to the broken lines
> Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot
> asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट
> प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.
in instdir/share/xdg/startcenter.desktop violating the desktop file syntax
(failing to escape the line breaks; see <https://specifications.freedesktop.org/
desktop-entry-spec/desktop-entry-spec-1.1.html>).
That broken desktop file apparently still went unnoticed for a while until I now
tried to build a flatpak, which failed with
[...]
> echo "custom cmd" && ( /run/build/libreoffice/solenv/bin/assemble-flatpak.sh )
> custom cmd
> Error on file "/app/share/applications/org.libreoffice.LibreOffice.desktop": Key file contains line “ asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट ” which is not a key-value pair, group, or comment
> make: *** [Makefile:228: cmd] Error 1
> Error: module libreoffice: Child process exited with code 2
While trying to make our code generate well-formed desktop files (see the newly
added comments in solenv/bin/desktop-translate.py), I also added code to escape
leading spaces as "\s" (with a line
> foo= bar
in a desktop file, any space around the "=" is ignored, so if the value shall
actually start with a space, it must be escaped as
> foo=\sbar
). For all the desktop files generated with solenv/bin/desktop-translate.py in
sysui/CustomTarget_share.mk, the difference of what is generated with this
commit is
> --- workdir/CustomTarget/sysui/share/libreofficedev/impress.desktop
> +++ workdir/CustomTarget/sysui/share/libreofficedev/impress.desktop
> @@ -201,7 +201,7 @@
> Comment[kn]=ಇಂಪ್ರೆಸ್ ಬಳಸಿ ಜಾರುಫಲಕ ಪ್ರದರ್ಶನಗಳಿಗಾಗಿ, ಸಭೆಗಳಲ್ಲಿ ಬಳಸಲು, ಮತ್ತು ಜಾಲ ಪುಟಗಳನ್ನು ಪ್ರಸ್ತುತಿಗಳನ್ನು ಸೃಷ್ಟಿಸಿ ಮತ್ತು ಸಂಪಾದಿಸಿ.
> Comment[ko]=임프레스를 사용하여 슬라이드 쇼, 회의 및 웹 페이지에 대한 프레젠테이션을 만들고 편집합니다.
> Comment[kok]=स्लायड शो, बसका आनिक वेब पानांखातीर इंप्रेस वापरून सादरीकरण तयार करात आनिक सम्पादन करात.
> -Comment[ks]= ایمپریس کے ذریعہ سے پریزینٹیشنس کے لئےسلائیڈشوز،میٹینگ اورویب پیجیزکوتخلیق اورمرتب کرو۔
> +Comment[ks]=\sایمپریس کے ذریعہ سے پریزینٹیشنس کے لئےسلائیڈشوز،میٹینگ اورویب پیجیزکوتخلیق اورمرتب کرو۔
> Comment[lb]=Create and edit presentations for slideshows, meeting and Web pages by using Impress.
> Comment[lo]=ສ້າງແລະແກ້ໄຂພາບເລື່ອນສຳລັບການບັນຍາຍ, ການປະຊຸມແລະໜ້າເວັບດ້ວຍການໃຊ້ອີມເຟສ.
> Comment[lt]=Pateikčių rengykle rengiamos pateiktys pranešimams, pateiktis galima įkelti į tinklalapį.
> @@ -231,7 +231,7 @@
> Comment[rw]=Kurema no guhindura amayerekana y'amagaragazabice, inama n'impapuro Rubuga ukoresheje Impress.
> Comment[sa_IN]=इम्प्रेस् उपयुज्य स्लैड्शोस्, सम्मेलनम् तथा जालपृष्ठानि इत्येषां कृते प्रस्तुतीः उत्पादय तथा सम्पदाय च।
> Comment[sat]=सालइड उदुक् ला़गित् तेयार आर उनुदुक् सासापड़ाव, दुपुडुप आर वेब साहटा दाराय ते पोरभाव रेयाक् बेभार .सालइड उदुक् लागित तेयार आर उनुदुक् सापड़ाव, दुपुडुप आर वेब साहटा दाराय ते पोरभाव रेयाक् बेभार .
> -Comment[sd]= ٺپي جو اِستعمال ڪندي سلائڊشوز، ميٽنگن ۽ ويب صفحن لاءِ پيشڪشون خلقيو ۽ سمپادت ڪريو
> +Comment[sd]=\sٺپي جو اِستعمال ڪندي سلائڊشوز، ميٽنگن ۽ ويب صفحن لاءِ پيشڪشون خلقيو ۽ سمپادت ڪريو
> Comment[si]=Impress භාවිතා කරමින් ඉදිරිපත් කිරීම් සඳහා තිරපෙන්නුම්, හමුවීම් සහ වියුණු පිටු සාදන්න සහ වෙනස් කරන්න.
> Comment[sid]=Xiiwatenni isilaadi-leellishote, xaadohonna Diru qoollara shiqishsha kalaqqe mucceessi.
> Comment[sk]=Vytvárajte a upravujte prezentácie pre porady s stretnutia s použitím Impress.
> --- workdir/CustomTarget/sysui/share/libreofficedev/startcenter.desktop
> +++ workdir/CustomTarget/sysui/share/libreofficedev/startcenter.desktop
> @@ -82,7 +82,7 @@
> GenericName[kmr_Latn]=Nivîsgeh
> GenericName[kn]=ಕಛೇರಿ
> GenericName[ko]=오피스
> -GenericName[kok]= कार्यालय
> +GenericName[kok]=\sकार्यालय
> GenericName[ks]=آفس
> GenericName[lb]=Office
> GenericName[lo]=ຫ້ອງການ
> @@ -201,7 +201,9 @@
> Comment[kmr_Latn]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> Comment[kn]=ಮುಕ್ತ ಹಾಗು ಶಿಷ್ಟ ಎಂದು ಪರಿಗಣಿಸಲಾದ ODF ದಸ್ತಾವೇಜು ವಿನ್ಯಾಸಕ್ಕೆ ಹೊಂದಿಕೆಯಾಗುವ ಒಂದು ಆಫೀಸ್ ಪ್ರೊಡಕ್ಟೀವ್ ಸೂಟ್ ಆಗಿದೆ. ಡಾಕ್ಯುಮೆಂಟ್ ಫೌಂಡೇಶನ್‌ನಿಂದ ಬೆಂಬಲಿಸಲಾಗುತ್ತದೆ.
> Comment[ko]=개방 및 표준화된 ODF 문서 형식에 적합한 오피스 생산성 제품군입니다. 문서재단(The Document Foundation)에서 지원합니다.
> -Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot
> - asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट
> - प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.
> +Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot \n asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट \n प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.
> Comment[ks]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> Comment[lb]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument Format (ODF). Unterstützt von The Document Foundation.
> Comment[lo]=ຊຸດໂປຣແກຣມຜະລິດຕະພັນສຳລັບສຳນັກງານທີ່ເຂົ້າກັນໄດ້ກັບຮູບແບບເອກະສານ ODF ທີ່ເປີດກ້ວາງ ແລະ ເປັນມາດຕະຖານ. ສະໜັບສະໜູນໂດຍ The Document Foundation.
> --- workdir/CustomTarget/sysui/share/libreofficedev/base.desktop
> +++ workdir/CustomTarget/sysui/share/libreofficedev/base.desktop
> @@ -221,7 +221,7 @@
> Comment[nso]=Laola didathapeisi, hlama dipotšišo le dipego bakeng sa go latedišiša le go laola tshedimošo ya gago o diriša Base.
> Comment[oc]=Base - Gestion de basas de donadas, creacion de requèstas e rapòrts.
> Comment[om]=Base fayyadamuun kuusaa deetaa taligi, gaafataa fi gabaasota odeeffannoo kee hordofuu fi taliguuf oolan uumi.
> -Comment[or]= ଆଧାର ଉପୟୋଗ କରି ତଥ୍ଯ ସଞ୍ଚଯଗୁଡିକ ପରିଚାଳନା ,ପ୍ରଶ୍ନଗୁଡିକୁ ସୃଷ୍ଟି ଏବଂ ରିପୋର୍ଟଗୁଡିକୁ ଚିହ୍ନଟ କର ଏବଂ ତୁମ ସୂଚନାକୁ ପରିଚାଳନା କର।
> +Comment[or]=\sଆଧାର ଉପୟୋଗ କରି ତଥ୍ଯ ସଞ୍ଚଯଗୁଡିକ ପରିଚାଳନା ,ପ୍ରଶ୍ନଗୁଡିକୁ ସୃଷ୍ଟି ଏବଂ ରିପୋର୍ଟଗୁଡିକୁ ଚିହ୍ନଟ କର ଏବଂ ତୁମ ସୂଚନାକୁ ପରିଚାଳନା କର।
> Comment[pa_IN]=ਬੇਸ (Base) ਨਾਲ ਆਪਣਾ ਡਾਟਾਬੇਸ ਸੰਭਾਲੋ, ਸਵਾਲ ਬਣਾਓ ਅਤੇ ਨਿੱਜੀ ਜਾਣਕਾਰੀ ਨੂੰ ਜਾਂਚਿਆ ਅਤੇ ਪ੍ਰਬੰਧ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।
> Comment[pl]=Administruj bazami danych, twórz kwerendy i raporty, aby efektywnie zarządzać informacją za pomocą programu Base.
> Comment[pt]=Gerir bases de dados, criar consultas e relatórios para monitorizar e editar as informações das bases de dados com o Base.
> --- workdir/CustomTarget/sysui/share/libreoffice/impress.desktop 2020-04-23 15:48:13.806086032 +0200
> +++ TMP/libreoffice/impress.desktop 2020-04-23 15:42:44.515404783 +0200
> @@ -201,7 +201,7 @@
> Comment[kn]=ಇಂಪ್ರೆಸ್ ಬಳಸಿ ಜಾರುಫಲಕ ಪ್ರದರ್ಶನಗಳಿಗಾಗಿ, ಸಭೆಗಳಲ್ಲಿ ಬಳಸಲು, ಮತ್ತು ಜಾಲ ಪುಟಗಳನ್ನು ಪ್ರಸ್ತುತಿಗಳನ್ನು ಸೃಷ್ಟಿಸಿ ಮತ್ತು ಸಂಪಾದಿಸಿ.
> Comment[ko]=임프레스를 사용하여 슬라이드 쇼, 회의 및 웹 페이지에 대한 프레젠테이션을 만들고 편집합니다.
> Comment[kok]=स्लायड शो, बसका आनिक वेब पानांखातीर इंप्रेस वापरून सादरीकरण तयार करात आनिक सम्पादन करात.
> -Comment[ks]= ایمپریس کے ذریعہ سے پریزینٹیشنس کے لئےسلائیڈشوز،میٹینگ اورویب پیجیزکوتخلیق اورمرتب کرو۔
> +Comment[ks]=\sایمپریس کے ذریعہ سے پریزینٹیشنس کے لئےسلائیڈشوز،میٹینگ اورویب پیجیزکوتخلیق اورمرتب کرو۔
> Comment[lb]=Create and edit presentations for slideshows, meeting and Web pages by using Impress.
> Comment[lo]=ສ້າງແລະແກ້ໄຂພາບເລື່ອນສຳລັບການບັນຍາຍ, ການປະຊຸມແລະໜ້າເວັບດ້ວຍການໃຊ້ອີມເຟສ.
> Comment[lt]=Pateikčių rengykle rengiamos pateiktys pranešimams, pateiktis galima įkelti į tinklalapį.
> @@ -231,7 +231,7 @@
> Comment[rw]=Kurema no guhindura amayerekana y'amagaragazabice, inama n'impapuro Rubuga ukoresheje Impress.
> Comment[sa_IN]=इम्प्रेस् उपयुज्य स्लैड्शोस्, सम्मेलनम् तथा जालपृष्ठानि इत्येषां कृते प्रस्तुतीः उत्पादय तथा सम्पदाय च।
> Comment[sat]=सालइड उदुक् ला़गित् तेयार आर उनुदुक् सासापड़ाव, दुपुडुप आर वेब साहटा दाराय ते पोरभाव रेयाक् बेभार .सालइड उदुक् लागित तेयार आर उनुदुक् सापड़ाव, दुपुडुप आर वेब साहटा दाराय ते पोरभाव रेयाक् बेभार .
> -Comment[sd]= ٺپي جو اِستعمال ڪندي سلائڊشوز، ميٽنگن ۽ ويب صفحن لاءِ پيشڪشون خلقيو ۽ سمپادت ڪريو
> +Comment[sd]=\sٺپي جو اِستعمال ڪندي سلائڊشوز، ميٽنگن ۽ ويب صفحن لاءِ پيشڪشون خلقيو ۽ سمپادت ڪريو
> Comment[si]=Impress භාවිතා කරමින් ඉදිරිපත් කිරීම් සඳහා තිරපෙන්නුම්, හමුවීම් සහ වියුණු පිටු සාදන්න සහ වෙනස් කරන්න.
> Comment[sid]=Xiiwatenni isilaadi-leellishote, xaadohonna Diru qoollara shiqishsha kalaqqe mucceessi.
> Comment[sk]=Vytvárajte a upravujte prezentácie pre porady s stretnutia s použitím Impress.
> --- workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop
> +++ workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop
> @@ -82,7 +82,7 @@
> GenericName[kmr_Latn]=Nivîsgeh
> GenericName[kn]=ಕಛೇರಿ
> GenericName[ko]=오피스
> -GenericName[kok]= कार्यालय
> +GenericName[kok]=\sकार्यालय
> GenericName[ks]=آفس
> GenericName[lb]=Office
> GenericName[lo]=ຫ້ອງການ
> @@ -201,7 +201,9 @@
> Comment[kmr_Latn]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> Comment[kn]=ಮುಕ್ತ ಹಾಗು ಶಿಷ್ಟ ಎಂದು ಪರಿಗಣಿಸಲಾದ ODF ದಸ್ತಾವೇಜು ವಿನ್ಯಾಸಕ್ಕೆ ಹೊಂದಿಕೆಯಾಗುವ ಒಂದು ಆಫೀಸ್ ಪ್ರೊಡಕ್ಟೀವ್ ಸೂಟ್ ಆಗಿದೆ. ಡಾಕ್ಯುಮೆಂಟ್ ಫೌಂಡೇಶನ್‌ನಿಂದ ಬೆಂಬಲಿಸಲಾಗುತ್ತದೆ.
> Comment[ko]=개방 및 표준화된 ODF 문서 형식에 적합한 오피스 생산성 제품군입니다. 문서재단(The Document Foundation)에서 지원합니다.
> -Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot
> - asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट
> - प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.
> +Comment[kok]=ओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.doftor utopodok suite ugtem ani promannit ODF dostavez pod'dotek susangot \n asa. Dostavez protixtana thavn pattimbo lablaओफीस प्रोडक्टिवीटी सुट उगडपाक अनुरुप जाला आनी ओडीएफ दस्तावेज फोरमेट \n प्रमाणभूत केला. डोक्युमेंट फाउंडेशनान आदारभूत केला.
> Comment[ks]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> Comment[lb]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument Format (ODF). Unterstützt von The Document Foundation.
> Comment[lo]=ຊຸດໂປຣແກຣມຜະລິດຕະພັນສຳລັບສຳນັກງານທີ່ເຂົ້າກັນໄດ້ກັບຮູບແບບເອກະສານ ODF ທີ່ເປີດກ້ວາງ ແລະ ເປັນມາດຕະຖານ. ສະໜັບສະໜູນໂດຍ The Document Foundation.
> --- workdir/CustomTarget/sysui/share/libreoffice/base.desktop 2020-04-23 15:48:13.870086197 +0200
> +++ TMP/libreoffice/base.desktop 2020-04-23 15:42:44.552404881 +0200
> @@ -221,7 +221,7 @@
> Comment[nso]=Laola didathapeisi, hlama dipotšišo le dipego bakeng sa go latedišiša le go laola tshedimošo ya gago o diriša Base.
> Comment[oc]=Base - Gestion de basas de donadas, creacion de requèstas e rapòrts.
> Comment[om]=Base fayyadamuun kuusaa deetaa taligi, gaafataa fi gabaasota odeeffannoo kee hordofuu fi taliguuf oolan uumi.
> -Comment[or]= ଆଧାର ଉପୟୋଗ କରି ତଥ୍ଯ ସଞ୍ଚଯଗୁଡିକ ପରିଚାଳନା ,ପ୍ରଶ୍ନଗୁଡିକୁ ସୃଷ୍ଟି ଏବଂ ରିପୋର୍ଟଗୁଡିକୁ ଚିହ୍ନଟ କର ଏବଂ ତୁମ ସୂଚନାକୁ ପରିଚାଳନା କର।
> +Comment[or]=\sଆଧାର ଉପୟୋଗ କରି ତଥ୍ଯ ସଞ୍ଚଯଗୁଡିକ ପରିଚାଳନା ,ପ୍ରଶ୍ନଗୁଡିକୁ ସୃଷ୍ଟି ଏବଂ ରିପୋର୍ଟଗୁଡିକୁ ଚିହ୍ନଟ କର ଏବଂ ତୁମ ସୂଚନାକୁ ପରିଚାଳନା କର।
> Comment[pa_IN]=ਬੇਸ (Base) ਨਾਲ ਆਪਣਾ ਡਾਟਾਬੇਸ ਸੰਭਾਲੋ, ਸਵਾਲ ਬਣਾਓ ਅਤੇ ਨਿੱਜੀ ਜਾਣਕਾਰੀ ਨੂੰ ਜਾਂਚਿਆ ਅਤੇ ਪ੍ਰਬੰਧ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।
> Comment[pl]=Administruj bazami danych, twórz kwerendy i raporty, aby efektywnie zarządzać informacją za pomocą programu Base.
> Comment[pt]=Gerir bases de dados, criar consultas e relatórios para monitorizar e editar as informações das bases de dados com o Base.
That is, besides the fix for that one multi-line Comment[kok], there are
various cases where the original translations/ *.po file contains a leading
space that is now properly preserved, instead of silently getting lost.
However, all those leading spaces, as well as the embedded "\n" newlines in that
multi-line translations/source/kok/sysui/desktop/share.po string, were probably
added by accident by the po file authors, rather than being meant to be
preserved in the resulting desktop files. Thus, translators should revist those
po file sources and make any relevant fixes there.
Change-Id: I0aee8d064cb1430558ec32984253652a0bd6db3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92838
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>

diff --git a/solenv/bin/desktop-translate.py b/solenv/bin/desktop-translate.py
index 38bf0a12942d..639fa89af48f 100644
--- a/solenv/bin/desktop-translate.py
+++ b/solenv/bin/desktop-translate.py
@@ -24,6 +24,29 @@
import os, sys, argparse, io
+def encodeDesktopString(s):
+ # <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#
+ # value-types> says "The escape sequences \s, \n, \t, \r, and \\ are supported for values of
+ # type string and localestring, meaning ASCII space, newline, tab, carriage return, and
+ # backslash, respectively." <https://specifications.freedesktop.org/desktop-entry-spec/
+ # desktop-entry-spec-1.1.html#basic-format> says "A file is interpreted as a series of lines
+ # that are separated by linefeed characters", so it is apparently necessary to escape at least
+ # linefeed and backslash characters. It is unclear why that spec talks about "linefeed" in
+ # one place and about "newline" ("\n") and "carriage return" ("\r") in another, and how they are
+ # supposed to relate, so just escape any U+000A LINE FEED as "\n" and any U+000D CARRIAGE RETURN
+ # as "\r"; it is unclear exactly which occurrences of U+0020 SPACE and U+0009 CHARACTER
+ # TABULATION would need to be escaped, so they are mostly left unescaped, for readability:
+ s = s.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r');
+ if s.startswith(' '):
+ # <https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#
+ # entries> says "Space before and after the equals sign should be ignored", so escape a
+ # leading U+0020 SPACE as "\s" (while it is not clear whether "space" there means just
+ # U+0020 SPACE or any kind of white space, in which case at least a leading U+0009 CHARACTER
+ # TABULATION should similarly be escaped as "\t"; also, it is unclear whether such
+ # characters should also be escaped at the end):
+ s = '\\s' + s[1:]
+ return s
+
parser = argparse.ArgumentParser()
parser.add_argument('-p', dest='productname', default='LibreOffice')
parser.add_argument('-d', dest='workdir', default='.')
@@ -127,6 +150,8 @@ for template in templates:
# print "value is $value\n";
if value:
if o.ext == "desktop" or o.ext == "str":
+ if o.ext == "desktop":
+ value = encodeDesktopString(value)
outfile.write(u"""{}[{}]={}\n""".format(outkey, locale, value))
else:
outfile.write(u"""\t[{}]{}={}\n""".format(locale, outkey, value))
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits



--
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

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.