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

List:       kde-commits
Subject:    l10n-kf5/scripts
From:       Albert Astals Cid <null () kde ! org>
Date:       2018-08-14 10:15:41
Message-ID: E1fpWMX-0000QN-Qz () code ! kde ! org
[Download RAW message or body]

SVN commit 1522575 by aacid:

use the proper package name instead of PACKAGE in the xgettext output

Reviewed by Luigi


 M  +2 -0      extract-messages.sh  
 M  +38 -6     get_paths  
 M  +3 -2      update_translations  


--- trunk/l10n-kf5/scripts/extract-messages.sh #1522574:1522575
@@ -11,6 +11,7 @@
 EXTRACT_GRANTLEE_TEMPLATE_STRINGS=${EXTRACT_GRANTLEE_TEMPLATE_STRINGS:-grantlee_strings_extractor.py}
  EXTRACT_TR_STRINGS=${EXTRACT_TR_STRINGS:-$(readlink -f \
$l10nscripts/extract-tr-strings)}  MSGCAT=${MSGCAT:-msgcat}
+PACKAGE=${PACKAGE:-PACKAGE}
 PREPARETIPS=${PREPARETIPS:-preparetips}
 REPACKPOT=${REPACKPOT:-$(readlink -f $l10nscripts/repack-pot.pl)}
 export EXTRACTRC EXTRACTATTR MSGCAT PREPARETIPS REPACKPOT \
EXTRACT_GRANTLEE_TEMPLATE_STRINGS EXTRACT_TR_STRINGS @@ -34,6 +35,7 @@
 
    XGETTEXT_FLAGS="\
 --copyright-holder=This_file_is_part_of_KDE \
+--package-name="${PACKAGE}" \
 --msgid-bugs-address=http://bugs.kde.org \
 --from-code=UTF-8 \
 -C --kde \
--- trunk/l10n-kf5/scripts/get_paths #1522574:1522575
@@ -283,34 +283,66 @@
 	esac
 }
 
+function get_repo_name
+{
+	case "$1" in
+		kdelibs|kdeplasma-addons|kdepim-runtime|calligra|qt|kde-runtime|kde-workspace)
+			echo "$1"
+			;;
+		kdesupport-phonon_*)
+			repo=`echo $1 | sed -e "s/kdesupport-phonon_//"`
+			echo "$repo"
+			;;
+		extragear-*_*)
+			repo=`echo $1 | sed -e "s/extragear-.*_//"`
+			echo "$repo"
+			;;
+		playground-*_*)
+			repo=`echo $1 | sed -e "s/playground-.*_//"`
+			echo "$repo"
+			;;
+		kdelibs_*|applications_*|kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdemu \
ltimedia_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|kdewebdev_*|frameworks_*|workspace_*|pim_*|calligra_*)
 +			repo=`echo $1 | sed -e 's/[^_]*_//'`
+			echo "$repo"
+			;;
+		kdereview_*)
+			repo=`echo $1 | sed -e 's/[^_]*_//'`
+			echo "$repo"
+			;;
+		websites_*)
+			repo=`echo $1 | sed -e "s/websites_//"`
+			echo "$repo"
+			;;
+		*)
+			echo "ERROR: $1 is not a git repo"
+#			exit 1
+			;;
+	esac
+}
+
 function get_url
 {
+	get_url_repo=`get_repo_name $1`
 	case "$1" in
 		kdelibs|kdeplasma-addons|kdepim-runtime|calligra|qt|kde-runtime|kde-workspace)
 			echo "kde:$1.git"
 			;;
 		kdesupport-phonon_*)
-			get_url_repo=`echo $1 | sed -e "s/kdesupport-phonon_//"`
 			echo "kde:$get_url_repo.git"
 			;;
 		extragear-*_*)
-			get_url_repo=`echo $1 | sed -e "s/extragear-.*_//"`
 			echo "kde:$get_url_repo.git"
 			;;
 		playground-*_*)
-			get_url_repo=`echo $1 | sed -e "s/playground-.*_//"`
 			echo "kde:$get_url_repo.git"
 			;;
 		kdelibs_*|applications_*|kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdemu \
ltimedia_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|kdewebdev_*|frameworks_*|workspace_*|pim_*|calligra_*)
                
-			get_url_repo=`echo $1 | sed -e 's/[^_]*_//'`
 			echo "kde:$get_url_repo.git"
 			;;
 		kdereview_*)
-			get_url_repo=`echo $1 | sed -e 's/[^_]*_//'`
 			echo "kde:$get_url_repo.git"
 			;;
 		websites_*)
-			get_url_repo=`echo $1 | sed -e "s/websites_//"`
 			echo "kde:websites/$get_url_repo.git"
 			;;
 		*)
--- trunk/l10n-kf5/scripts/update_translations #1522574:1522575
@@ -168,6 +168,7 @@
         modpodir=$BASEDIR/$transmod/templates/messages/$templatename
         echo "$logmod $modpodir"
         mkdir po enpo
+        repo_name=`get_repo_name $mod`
 
         ( XGETTEXT=`which xgettext` \
           MSGCAT=`which msgcat` \
@@ -176,7 +177,7 @@
           EXTRACT_GRANTLEE_TEMPLATE_STRINGS="python $extractgrantlee" \
           PREPARETIPS="perl $preparetips" \
           REPACKPOT="perl $repackpot" \
-          PACKAGE=$mod \
+          PACKAGE=$repo_name \
           IGNORE=".$vcs" \
           bash $BASEDIR/$transmod/scripts/extract-messages.sh)
         rm -f messages.log
@@ -199,7 +200,7 @@
           EXTRACT_GRANTLEE_TEMPLATE_STRINGS="python $extractgrantlee" \
           PREPARETIPS="perl $preparetips" \
           REPACKPOT="perl $repackpot" \
-          PACKAGE=$mod \
+          PACKAGE=$repo_name \
           IGNORE=".$vcs" \
           BASEDIR=$BASEDIR \
           transmod=$transmod \


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

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