2009-02-12 00:40:55 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# This program creates makes dumb guesses about relation of upstream
|
|
|
|
|
# projects and openSUSE packages and creates initial configuration file.
|
|
|
|
|
#
|
|
|
|
|
# It needs osc and net access.
|
|
|
|
|
#
|
2009-10-21 02:01:28 +02:00
|
|
|
|
# It tries to assign packages to GNOME GTP projects and adds other known packages.
|
2009-02-12 00:40:55 +01:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
|
|
2009-10-21 02:01:28 +02:00
|
|
|
|
source ${0%create-tlst-step2-create-gnome_gtp.sh}upstream-collect.conf
|
2009-02-12 00:40:55 +01:00
|
|
|
|
|
2010-06-04 12:49:48 +02:00
|
|
|
|
rm -f create-tlst-temp-osc-projects.lst
|
|
|
|
|
for REPOSITORY in ${OSC_REPOSITORIES[@]} ; do
|
|
|
|
|
osc ${OSC_APIURL:+--apiurl=$OSC_APIURL} list $REPOSITORY >create-tlst-temp-osc-projects.lst
|
|
|
|
|
done
|
2009-02-12 00:40:55 +01:00
|
|
|
|
|
|
|
|
|
# branches tried for all apps:
|
2011-02-14 15:21:26 +01:00
|
|
|
|
KNOWN_BRANCHES="gnome-2-32"
|
2009-02-12 00:40:55 +01:00
|
|
|
|
# branches tried apps with the same name base:
|
2010-06-04 12:49:48 +02:00
|
|
|
|
# Do not forget hardcoded strings in the code below!
|
2011-02-14 15:21:26 +01:00
|
|
|
|
APP_BRANCHES="|gimp-2-6"
|
2009-02-12 00:40:55 +01:00
|
|
|
|
# FIXME: support for libgda:release-3-0-branch gnome-background:gnome-2-22
|
|
|
|
|
|
2009-10-21 02:01:28 +02:00
|
|
|
|
echo "# This file was generated $(LANG=C LC_ALL=C date) by create-tlst-step2-create-gnome_gtp.sh." >upstream-gnome_gtp.tlst
|
|
|
|
|
echo "# package domain method repository dir branch" >>upstream-gnome_gtp.tlst
|
2009-02-12 00:40:55 +01:00
|
|
|
|
|
|
|
|
|
SPACES=' '
|
|
|
|
|
|
2009-10-21 02:01:28 +02:00
|
|
|
|
# listing of all GNOME GTP projects
|
|
|
|
|
curl http://l10n.gnome.org/POT/ | sed -n 's:^.*href="\([^"]*\)/".*$:\1:p' | sed '/^$/d' |
|
|
|
|
|
(
|
2009-02-12 00:40:55 +01:00
|
|
|
|
while read ; do
|
2009-10-21 02:01:28 +02:00
|
|
|
|
BRANCH=${REPLY##*.}
|
|
|
|
|
REPLY=${REPLY%.*}
|
2009-02-12 00:40:55 +01:00
|
|
|
|
grep -i ^$REPLY'\( \|\[0-9]\|-[0-9]\|-lang\)' create-tlst-temp-all-po-projects.lst |
|
|
|
|
|
while read PACKAGE DOMAIN ; do
|
|
|
|
|
if test "${PACKAGE%-lang}/$DOMAIN" = "NetworkManager/nm-applet" ; then
|
|
|
|
|
continue
|
|
|
|
|
fi
|
2009-10-21 02:01:28 +02:00
|
|
|
|
echo $REPLY ${PACKAGE%-lang} $DOMAIN $BRANCH
|
2009-02-12 00:40:55 +01:00
|
|
|
|
done
|
|
|
|
|
done
|
2009-10-21 02:01:28 +02:00
|
|
|
|
# Packages known to have special name in GTP:
|
2009-10-27 17:18:31 +01:00
|
|
|
|
for LBRANCH in $KNOWN_BRANCHES master ; do
|
|
|
|
|
echo gconf gconf2 GConf2 $LBRANCH
|
|
|
|
|
done
|
|
|
|
|
echo glib glib2 glib20 master
|
|
|
|
|
echo gtk+ gtk2 gtk20 master
|
|
|
|
|
echo gtk+ gtk2 gtk20-properties master
|
2010-06-04 12:49:48 +02:00
|
|
|
|
echo libgweather libgweather libgweather-locations master
|
2009-10-21 02:01:28 +02:00
|
|
|
|
echo gnome-phone-manager phonemgr gnome-phone-manager master
|
|
|
|
|
echo network-manager-applet NetworkManager-gnome nm-applet master
|
2009-02-12 00:40:55 +01:00
|
|
|
|
# For other versions than sles10:
|
|
|
|
|
# echo network-manager-applet NetworkManager nm-applet
|
|
|
|
|
) |
|
2009-10-21 02:01:28 +02:00
|
|
|
|
while read PROJECT PACKAGE DOMAIN BRANCH ; do
|
2009-02-12 00:40:55 +01:00
|
|
|
|
if test -z "$PACKAGE" ; then
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
# Test, whether package name is also the source name:
|
|
|
|
|
if ! grep -q "^$PACKAGE\$" create-tlst-temp-osc-projects.lst ; then
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Projects known to use special directories:
|
|
|
|
|
case $DOMAIN in
|
|
|
|
|
gimp20-libgimp )
|
|
|
|
|
PO_DIR=po-libgimp
|
|
|
|
|
;;
|
|
|
|
|
gimp20-script-fu )
|
|
|
|
|
PO_DIR=po-script-fu
|
|
|
|
|
;;
|
|
|
|
|
gimp20-python )
|
|
|
|
|
PO_DIR=po-python
|
|
|
|
|
;;
|
|
|
|
|
gimp20-std-plug-ins )
|
|
|
|
|
PO_DIR=po-plug-ins
|
|
|
|
|
;;
|
2009-10-21 02:01:28 +02:00
|
|
|
|
gimp20-tags )
|
|
|
|
|
PO_DIR=po-tags
|
|
|
|
|
;;
|
|
|
|
|
gimp20-tips )
|
|
|
|
|
PO_DIR=po-tips
|
|
|
|
|
;;
|
2009-10-27 17:18:31 +01:00
|
|
|
|
gtk20-properties )
|
|
|
|
|
PO_DIR=po-properties
|
|
|
|
|
;;
|
2009-10-21 02:01:28 +02:00
|
|
|
|
gnumeric-functions )
|
|
|
|
|
PO_DIR=po-functions
|
|
|
|
|
;;
|
2009-10-27 17:18:31 +01:00
|
|
|
|
# FIXME: Only some teams use GTP for gstreamer. Run 'find -name "*-fixes.po"' on processed downstream to find possible regressions.
|
|
|
|
|
gst-plugins-base-0.10 )
|
|
|
|
|
PROJECT=gst-plugins-base
|
|
|
|
|
;;
|
|
|
|
|
gst-plugins-good-0.10 )
|
|
|
|
|
PROJECT=gst-plugins-good
|
|
|
|
|
;;
|
|
|
|
|
gst-plugins-bad-0.10 )
|
|
|
|
|
PROJECT=gst-plugins-bad
|
|
|
|
|
;;
|
|
|
|
|
gst-plugins-ugly-0.10 )
|
|
|
|
|
PROJECT=gst-plugins-ugly
|
|
|
|
|
;;
|
2010-06-04 12:49:48 +02:00
|
|
|
|
libgweather-locations )
|
|
|
|
|
PO_DIR=po-locations
|
|
|
|
|
;;
|
2009-02-12 00:40:55 +01:00
|
|
|
|
* )
|
|
|
|
|
PO_DIR=po
|
|
|
|
|
;;
|
|
|
|
|
esac
|
2009-10-21 02:01:28 +02:00
|
|
|
|
USE_IT=false
|
|
|
|
|
eval "case \"\$BRANCH\" in
|
|
|
|
|
$KNOWN_BRANCHES$APP_BRANCHES|master)
|
|
|
|
|
USE_IT=true
|
|
|
|
|
;;
|
|
|
|
|
esac"
|
|
|
|
|
if $USE_IT ; then
|
|
|
|
|
BRANCH=${BRANCH/master/zzzz_master}
|
|
|
|
|
echo "$PACKAGE${SPACES:0:28-${#PACKAGE}}$DOMAIN${SPACES:0:27-${#DOMAIN}}gtp l10n.gnome.org/POT $PROJECT/$PO_DIR${SPACES:0:26-${#PROJECT}-${#PO_DIR}}$BRANCH"
|
|
|
|
|
fi
|
2009-02-12 00:40:55 +01:00
|
|
|
|
|
|
|
|
|
# Disabled for now. Final merge will happen in spec file.
|
2009-10-21 02:01:28 +02:00
|
|
|
|
# # We want to include LCN only for projects, which need merge with GNOME GTP.
|
2009-02-12 00:40:55 +01:00
|
|
|
|
# if test -d translation-update-lcn/$DOMAIN ; then
|
|
|
|
|
# echo "$PACKAGE${SPACES:0:28-${#PACKAGE}}$DOMAIN${SPACES:0:27-${#DOMAIN}}zzzz_lcn"
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
|
|
done |
|
2009-10-21 02:01:28 +02:00
|
|
|
|
tee upstream-gnome_gtp_raw.lst |
|
2009-02-12 00:40:55 +01:00
|
|
|
|
LC_COLLATE=C LC_ALL= sort |
|
|
|
|
|
sed '
|
2009-10-21 02:01:28 +02:00
|
|
|
|
s/ *zzzz_master//
|
2009-02-12 00:40:55 +01:00
|
|
|
|
s/zzzz_lcn/lcn/
|
2009-10-21 02:01:28 +02:00
|
|
|
|
' >>upstream-gnome_gtp.tlst
|
2009-02-12 00:40:55 +01:00
|
|
|
|
|
|
|
|
|
# Remove temporary progress file:
|
2009-10-21 02:01:28 +02:00
|
|
|
|
rm upstream-gnome_gtp_raw.lst
|
2009-02-12 00:40:55 +01:00
|
|
|
|
rm create-tlst-temp-*
|