summaryrefslogtreecommitdiff
path: root/solenv/bin/desktop-translate.py
AgeCommit message (Collapse)Author
2020-04-24Properly escape desktop file string valuesStephan Bergmann
<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>
2020-04-22Fix desktop-translate.pyStephan Bergmann
...to not generate broken files relative to pre- d2c23609083d7b3e5267b1e4c923476cbc509d00 "tdf#130911: convert desktop-translate from Perl to Python", e.g. > --- workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop > +++ workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop > @@ -25,13 +25,13 @@ > Exec=${UNIXBASISROOTNAME} %U > MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis; > Name=${PRODUCTNAME} ${PRODUCTVERSION} > -GenericName=Office > -GenericName[de]=Office > +=Office > +GenericNameGenericName[de]=Office > GenericName[en]=Office > GenericName[fi]=Toimisto > GenericName[hu]=Iroda > -Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation. > -Comment[de]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument-Format (ODF). Unterstützt von The Document Foundation. > +=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation. > +CommentComment[de]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument-Format (ODF). Unterstützt von The Document Foundation. > Comment[en]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation. > Comment[fi]=Avoimen ODF-asiakirjastandardin kanssa yhteensopiva, The Document Foundationin tukema toimisto-ohjelmisto. > Comment[hu]=Az irodai programcsomag kompatibilis a nyílt és a szabványosított ODF dokumentumformátummal. A The Document Foundation támogatja. (as captured with a `--with-lang=de en-US fi hu` build). (The original solenv/bin/desktop-translate.pl had > $keyline =~ s/^$key/$outkey/; to replace key with outkey in keyline.) Change-Id: I006e2a9cba5f91d41d925bc93949a4a975891008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92669 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-15Handle desktop files with multiline entries.Jussi Pakkanen
This fixes a regression mentioned e.g. here: https://bugs.documentfoundation.org/show_bug.cgi?id=130911#c6 Change-Id: Ic1a826ba933b8387d39aa25245095f27b0237801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92050 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-04-02Always treat desktop-translate files as utf-8.Jussi Pakkanen
Fixes a regression from commit d2c23609083d7b3e5267b1e4c923476cbc509d00 ("tdf#130911: convert desktop-translate from Perl to Python."), which breaks gallery generation on some Windows machines. Python tries to decode the utf-8 files with cp1252 on some machines and that fails with a UnicodeDecodeError exception. Change-Id: Ic82e5e3b2c21fc4b4bc32944ae7112bff14ccba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91505 Tested-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-03-31tdf#130911: convert desktop-translate from Perl to Python.Jussi Pakkanen
Change-Id: Ic0a84f4e46f4bc3312d15a31ea16060851302d2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>