Download it now!
Bug 56648 - Improper quote escaping causes Estonian Mac OS X language pack installer to not run.
Summary: Improper quote escaping causes Estonian Mac OS X language pack installer to n...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
3.6.3.2 release
Hardware: All Mac OS X (All)
: medium major
Assignee: Andras Timar
URL:
Whiteboard: BSA target:3.7.0 target:3.6.4
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 22:02 UTC by Indrek Ardel
Modified: 2013-01-13 14:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Indrek Ardel 2012-11-01 22:02:35 UTC
Problem description: Estonian Language Pack installer in Mac OS X won't run due to incorrect syntax in installer's applescript.

Steps to reproduce:
1. Download Estonian Language Pack
2. Try to run it in Mac OS X
3. ???
4. Profit

Current behavior: Application won't open

Expected behavior: Application should open

Platform (if different from the browser): Mac OS X (Any version)
              
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.1 Safari/537.17

The problem is either in how the applescript is generated or how translation is escaped.

How it looks in osx_install.applescript:27 right now:

set startInstall to "Paigaldamise alustamiseks klõsa "Paigalda"

Paigaldamine võib natuke aega võtta..."

note that there is no escape character for the quotes. Removing the quotes or escaping them will make the application work again.

how it looks in translation ( http://cgit.freedesktop.org/libreoffice/translations/tree/source/et/setup_native/source/mac.po ):

#: macinstall.ulf#StartInstallText1.LngText.text
msgid "Click Install to start the installation"
msgstr "Paigaldamise alustamiseks klõsa \"Paigalda\""

While someone is at it. Please change "klõsa" to "klõpsa", a small typo.
Comment 1 Roman Eisele 2012-11-02 14:34:50 UTC
Thank you very much for your bug report and for your analysis of the problem!

REPRODUCIBLE on Mac OS X 10.6.8 (Intel) with LibreOffice 3.6.3.2 (Build ID: 58f22d5) and the 3.6.3.1 Esthonian langpack installer from
   http://download.documentfoundation.org/libreoffice/stable/3.6.3/mac/x86/LibO_3.6.3_MacOS_x86_langpack_et.dmg

The installer does not work (it just quits).

If I make a copy of the “LibreOffice Language Pack.app” application, open it, and edit the file
   LibreOffice Language Pack.app/Contents/osx_install.applescript
with Apple’s “AppleScript Editor” application, changing the lines:

   set startInstall to "Paigaldamise alustamiseks klõsa "Paigalda"
   
   Paigaldamine võib natuke aega võtta..."

(NB the multi-line string!) as suggested to

   set startInstall to "Paigaldamise alustamiseks klõsa \"Paigalda\"
   
   Paigaldamine võib natuke aega võtta..."

the installer works. (As you will notice, the character encoding is obviously wrong, but it seems that this does not make any problems.)
Comment 2 Roman Eisele 2012-11-02 14:43:36 UTC
@ Andras Timar (and Alex Thurgood):

This is yet another bug report about problems with the langpack installer, but this time, it is easy to reproduce it, and even the fix is simple... wow!

There are three things we need to check 
1) Can we fix this problem with the Estonian langpack installer soon?
   I hope it should be easy to do this.
2) Can we find out *why* there are non-escaped quotes inside of the string --
   I mean, is this just a typo made by some translator, or is there a
   systematic problem in the software which handles the translations?
3) Could this give us a clue about (some of) the other reports about problems
   with langpack installers? This would be just too nice to be true,
   but we should the possibiliy ...

Thank you for looking into this issue!

-----

Correction to my comment #1:
> REPRODUCIBLE on Mac OS X 10.6.8 (Intel) with LibreOffice 3.6.3.2 (Build ID:
> 58f22d5) and the 3.6.3.1 Esthonian langpack installer ...

“3.6.3.1” is a typo here. I just mean the official 3.6.3(.2) langpack installer.
      -^-
Comment 3 Andras Timar 2012-11-02 22:34:47 UTC
cc-ing Mihkel Tõnnov regarding the typo fix "klõsa" to "klõpsa".
Comment 4 Not Assigned 2012-11-02 23:51:59 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c1b4077d1ffa57d325bf1149ac198d91cf981e3b

 escape quotes, unescape double escaped quotes fdo#56648



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Mihkel Tõnnov 2012-11-04 11:10:03 UTC
Fixed the typo, thanks for noticing and notifying.
Comment 6 Andras Timar 2012-11-04 11:54:46 UTC
OK, then this bug is RESOLVED FIXED. Review of my patch is pending for libreoffice-3-6 branch, I hope I got it right. :) Quote marks should be escaped, but it is better to escape them during merge, than to teach translators to escape them for this very file type.
Comment 7 Not Assigned 2012-11-04 12:24:06 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f28d71c29b83a0899922c8f32da0fa05458882e2&g=libreoffice-3-6

 escape quotes, unescape double escaped quotes fdo#56648


It will be available in LibreOffice 3.6.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Roman Eisele 2012-11-04 12:43:04 UTC
(In reply to comment #6)
> Quote marks should be escaped, but it is better to escape them during merge,
> than to teach translators to escape them for this very file type.

Yes, this solution is much better than to rely on the care of the translators.
So hopefully we will not have any similar errors in the future.
Thank you very much, Andras!
Comment 9 Not Assigned 2012-11-05 08:59:17 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ca4e0db1ce0d379df8c3eab2d1aac1919acb9de&g=libreoffice-3-6

 escape quotes, unescape double escaped quotes fdo#56648


It will be available in LibreOffice 3.6.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Mihkel Tõnnov 2013-01-10 08:50:39 UTC
Hi Andras, *

is it possible that fixing this bug caused the Windows installer to render quotes as \" in the dialogs? If not, I'll open a new bug for that.
Comment 11 Andras Timar 2013-01-10 10:49:26 UTC
Please open a new bug. Thanks.
Comment 12 Mihkel Tõnnov 2013-01-13 14:39:09 UTC
(In reply to comment #11)
> Please open a new bug. Thanks.

Filed as bug 59321.