[Xfce-i18n] poedit splits lines

Harald Servat redcrash at gmail.com
Tue Mar 17 14:36:00 CET 2009


Hello,

2009/3/10 Carles Muñoz Gorriz <carlesmu at internautas.org>

> Hi Harald;
>
> En/na Harald Servat ha escrit:
> > Hello,
> >
> >   I've noticed that my installation of poedit (v1.4.2) splits some lines
> > that were joined previously by the previous translator in the resulting
> > translated file.
> >
> >   For example, this is a segment of the result of a svn diff
> >
> > -#: ../src/preferencesdialog.c:371 ../src/preferencesdialog.c:379
> > +#: ../src/preferencesdialog.c:371
> > +#: ../src/preferencesdialog.c:379
> >
> >   I understand that both formats are accepted, but does anyone user of
> > poedit know how to switch that behavior? It could be great to save some
> > space (not only on mails/svn) but for facilitating the comparison of
> > diffs by comparing the real different lines.
>
> I use[1] to normalize the po file and update the translations from the
> pot file, I think the 'msgmerge' restore the same way of marking source
> lines that has the pot file.
>
> [1]
> $ cp ca.po ca.po.back && msgmerge ca.po.back *pot > ca2.po && mv ca2.po
> ca.po
>

  I've built an script with the same functionality

  For those interested, here it is:

*****
#!/bin/bash

if test $# -ne 2 ; then
    echo "Usage ${0} potfile langcode"
    exit 0
fi

if test -s $2.po -a -s $1 ; then
    TMPFILE1=`mktemp -p /tmp/`
    TMPFILE2=`mktemp -p /tmp/`
    cp $2.po ${TMPFILE1}
    msgmerge ${TMPFILE1} $1 > ${TMPFILE2}
    mv ${TMPFILE2} $2.po
    rm -fr ${TMPFILE1} ${TMPFILE2}
else
    if ! test -s $2.po ; then
        echo "$2.po does not exist, or it's empty"
    fi
    if ! test -s $1 ; then
        echo "$1 does not exist, or it's empty"
    fi
fi
*****



>
>
> regards,
> --
> Carles
>
> _______________________________________________
> Xfce-i18n mailing list
> Xfce-i18n at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce-i18n
>



-- 
_________________________________________________________________
Empty your memory,
with a free()...
like a pointer!

If you cast a pointer to an integer,
it becomes an integer,
if you cast a pointer to a struct,
it becomes a struct.

The pointer can crash...,
and can overflow.

Be a pointer my friend...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce-i18n/attachments/20090317/6ec41c2a/attachment.html>


More information about the Xfce-i18n mailing list