--- En date de : Sam 20.11.10, Alexander Burger <a...@software-lab.de> a =E9=
crit :=0A=0A> I must confess I was not aware of GNU gettext. What=0A> advan=
tages would it have?=0A=0A=0A1) It's a widely used and trusted machinery.=
=0A2) Some tricky problems are dealt with, like plurals:=0A=0Ahttp://www.gn=
u.org/software/gettext/manual/gettext.html#Plural-forms=0A=0A3) There are m=
any softs that deal with editing translation files to ease=0Athe process fo=
r non techy people.=0A=0A=0A> As I see it, the '_' function in gettext is s=
yntactically=0A> equivalent to the Comma read macro in PicoLisp.=0A=0AChang=
ing "txt" to _("txt")  plays in fact two roles:=0A1) a marker to know which=
 strings should be translated at translation time,=0A2) transform the Engli=
sh string in the translated one at execution time.=0A=0ASome Lisp dialects =
use gettext with (_ "txt"), or even (_"txt") for EmacsLisp (if it's not a t=
ypo, one should confirm).=0Ahttp://www.gnu.org/software/automake/manual/get=
text/List-of-Programming-Languages.html=0AMaybe PicoLisp could use "_txt".=
=0AI don't know if transient symbols are sometimes prefixed with an undersc=
ore for another specific reason.=0AA nice trick would be to retrieve the tr=
anslations and load them into the transient symbols as usual, to avoid the =
(_ "txt") syntax.=0A=0A=0A> Maintaining the ".pot", ".po", ".mo"=0A> and wh=
atever files of gettext seems a more tedious to me.=0A=0AThis mess of files=
 is to me one of the biggest advantages. As I said earlier, there are many =
softs that deal specifically with this, for example for people not used to =
edit files directly.=0AAnd this system of template generation allows us to =
know what are the new strings to translate, the old ones to not translate..=
=0AAlso gettext is clever about strings that have been changed only slight=
ly, called FUZZY STRINGS.=0AFrom:=0Ahttp://www.gnu.org/software/gettext/man=
ual/gettext.html#Fuzzy-Entries=0A=0A"Those may be produced by applying the =
program msgmerge to update an older translated PO files according to a new =
PO template file, when this tool hypothesises that some new msgid has been =
modified only slightly out of an older one, and chooses to pair what it thi=
nks to be the old translation for the new modified entry. The slight altera=
tion in the original string (the msgid string) should often be reflected in=
 the translated string, and this requires the intervention of the translato=
r. For this reason, msgmerge might mark some entries as being fuzzy."=0A=0A=
In short, when you fix a typo in an original English string, gettext can st=
ill find the old translation and mark it something like: "Please update me"=
 It also keeps old translations to be reused if ever an old original strin=
gs comes back after a change.=0A=0AAm I alone to like gettext 8-O ?=0A=0A=
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to