bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] Hardcoded escaping


From: Serj Lavrin
Subject: Re: [bug-gettext] Hardcoded escaping
Date: Fri, 30 Oct 2015 11:00:12 +0200

Hi Daiki
 
Thanks for reply
 
Hm, that's strange... we're using following command, and it extracts strings "as they are", with escaped single quotes:
 
```
find $LAYOUTSDIR -iname $LAYOUTSEXT | xargs xgettext --language=PHP --from-code=utf-8 -c --add-comments=$COMMENTLINE -o $MESSAGESPATH --no-wrap --sort-by-file --copyright-holder=$COPYRIGHTHOLDER --package-name=$PACKAGENAME --package-version=$PACKAGEVERSION --msgid-bugs-address=$BUGSEMAIL --keyword=pgettext:1c,2
```
 
Am I missing something?
 


---
Best wishes,
Serj



30.10.2015, 03:37, "Daiki Ueno" <address@hidden>:

Serj Lavrin <address@hidden> writes:

 ```
 gettext('My magic ain\'t working string')
 ```
 Not big deal — now that works.
 But then comes into play `xgettext`. During extraction `xgettext` will get string as it is — with
 escaped single quote.


For the record, this is not the case. xgettext recognizes character
escapes and canonicalize strings before writing. So the output
shouldn't contain escaped single quote:

$ cat a.js
gettext('My magic ain\'t working string')

$ xgettext -L _javascript_ --no-location --omit-header -o - a.js
msgid "My magic ain't working string"
msgstr ""

Regards,

--
Daiki Ueno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]