From 48d94ae489e856e74385e3f5b1d7c9eb2da80faf Mon Sep 17 00:00:00 2001 From: dahanc Date: Sat, 19 Jan 2002 06:07:07 +0000 Subject: [PATCH] msgmerge will often split the RCS Id line; if it does, join them back together. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2172 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- po/mergepo | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/po/mergepo b/po/mergepo index 33c269d7..4672d4f1 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 @@ -42,4 +41,13 @@ mv $LOCALEDIR/LC_MESSAGES/squirrelmail.po \ $LOCALEDIR/LC_MESSAGES/squirrelmail.po.bak msgmerge $LOCALEDIR/LC_MESSAGES/squirrelmail.po.bak ../po/squirrelmail.po > \ $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" -- 2.25.1