[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: New cvs2dist
From:       Andras Mantia <amantia () virtualartisans ! com>
Date:       2003-01-11 10:42:48
[Download RAW message or body]

On 2003. January 11., Saturday 06:53, Jason Katz-Brown wrote:
> Hi all!
>
> Dominique Devriese added the much-requested new on-the-fly checkout of i18n
> translations to cvs2dist, which as always is at:
>
> http://www.katzbrown.com/shiritsu/programming/cvs2dist/
>
> Testing and comments about inclusion into kdesdk would be very welcome.

Hi,

 I would like to see the following patch applied to it. It adds a new option 
in case when the translation messages are under a different name than the 
module itself. Eg. for quanta the CVS module name is quanta, but the 
translations are in kde-i18n/LANGUAGE/messages/kdesdk/quanta.po.

Andras
["cvs2dist.diff" (text/x-diff)]

--- cvs2dist	Sat Jan 11 11:51:52 2003
+++ cvs2dist_new	Sat Jan 11 12:39:03 2003
@@ -23,7 +23,7 @@
 # --log has optional argument
 TEMP=`getopt \
 -o v:n:r:e:a:dhmbgol \
---long log::,version:,name:,required-header:,required-header-error-message:,make-unpackaged,hel \
p,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,no-i18n,cvs-root:,debug \ \
+--long log::,version:,name:,i18n_messages:,required-header:,required-header-error-message:,make \
-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden,admin-dir:,no-i18n,cvs-root:,debug \
                \
 -n cvs2dist -- $extraoptions "$@"`
 
 if [ $? != 0 ]; then
@@ -38,6 +38,7 @@
 doi18n="yes"
 cvsroot=""
 debug=""
+message_module=""
 
 while true; do
 	case "$1" in
@@ -52,6 +53,7 @@
 		--cvs-root) cvsroot="$2"; shift 2 ;;
 		-r|--required-header) requiredheader=$2; shift 2 ;;
 		--no-i18n) doi18n="no"; shift 1 ;;
+		--i18n_messages) message_modulename=$2; shift 2;;
 		-e|--required-header-error-message) requiredmsg=$2; shift 2 ;;
 		-m|--make-unpackaged) leavedir="non-empty"; shift 1 ;;
 		-h|--help) showhelp="non-empty"; shift 1 ;;
@@ -112,6 +114,11 @@
 	echo "                    environment variable..."
 	echo "  --admin-dir <dir> admin/ location (default is module/admin)"
 	echo "                    (symbolic links are OK.)"
+	echo "  --i18n_messages <modulename> the module name where the translation"
+	echo "                    messages for this application are. If not given,"
+	echo "                    it defaults to the given module. Needed when the"
+	echo "                    module is called foo, but the translations are under"
+	echo "                    eg. kdesdk."
 	echo "  --no-i18n  don't try to automatically checkout the translations from cvs.."
 	echo "  --log=<logfile> If logfile unspecified, default file is used."
 	echo "                  (The '=' is essential and may not be ommited"
@@ -282,6 +289,10 @@
 # get the last part
 modulename=`echo $modulename | sed -e 's#^.*/##'`
 
+if [ $message_modulename = ""]; then
+  $message_modulename = $modulename
+fi
+
 remove="$remove $modulename.lsm"
 
 # kdeextra gear I think needs this, it drops trailing numbers with hyphens
@@ -341,7 +352,7 @@
 
 	pushd $temp_dir/
 	for lang in $i18nlangs; do
-		pofilename="kde-i18n/$lang/messages/$modulename/$name.po";
+		pofilename="kde-i18n/$lang/messages/$message_modulename/$name.po";
 		echo "cvs co $pofilename" >> $log
 		cvs -z4 -q -d "$cvsroot" co -P "$pofilename" > /dev/null 2>&1
 		if [ ! -f "$pofilename" ]; then



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic