X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=po%2Fmergepo;h=0f73571b87600e0f2cae48df52133f9ad807633b;hp=33c269d7d472ad3dfacbcd8f35dae3081b3c13e8;hb=0262a52cfae6c0239596e11f36e0a2254d51faf3;hpb=505ce759fe6a3e9bc7da83e374b1e3a689a5260a diff --git a/po/mergepo b/po/mergepo index 33c269d7..0f73571b 100755 --- a/po/mergepo +++ b/po/mergepo @@ -2,12 +2,11 @@ # ** # ** This script merges global PO to locale PO files. -# ** It creates a squirrelmail.po.new that have to -# ** be renamed to squirrelmail.po once before to -# ** compile the file. +# ** It creates a backup of the old PO file as squirrelmail.po.bak +# ** and puts the merged version in squirrelmail.po # ** # ** Usage: mergepo -# ** Example: mergepo es +# ** Example: mergepo es_ES # ** # ** Philipe Mingo # ** Konstantin Riabitsev @@ -40,6 +39,15 @@ fi echo "Merging $LOCALEDIR/LC_MESSAGES/squirrelmail.po" mv $LOCALEDIR/LC_MESSAGES/squirrelmail.po \ $LOCALEDIR/LC_MESSAGES/squirrelmail.po.bak -msgmerge $LOCALEDIR/LC_MESSAGES/squirrelmail.po.bak ../po/squirrelmail.po > \ +msgmerge $LOCALEDIR/LC_MESSAGES/squirrelmail.po.bak ../po/squirrelmail.pot > \ $LOCALEDIR/LC_MESSAGES/squirrelmail.po -echo "Old po file renamed to squirrelmail.po.bak " + +# msgmerge will split long lines, such as the RCS Id line. If it did split +# it, join the pieces back together. +ed -s $LOCALEDIR/LC_MESSAGES/squirrelmail.po << END +/^"Project-Id-Version:/v/\\n"$/j\\ +s/""// +wq +END + +echo "Old po file renamed to squirrelmail.po.bak"