[opensuse-translation-commit] r96643 - trunk/packages/50-tools
Author: minton Date: 2016-08-31 23:25:22 +0200 (Wed, 31 Aug 2016) New Revision: 96643 Modified: trunk/packages/50-tools/prepare_split_tw_leap2.sh Log: Latest bugfix before Github/Weblate migration Modified: trunk/packages/50-tools/prepare_split_tw_leap2.sh =================================================================== --- trunk/packages/50-tools/prepare_split_tw_leap2.sh 2016-08-31 21:21:19 UTC (rev 96642) +++ trunk/packages/50-tools/prepare_split_tw_leap2.sh 2016-08-31 21:25:22 UTC (rev 96643) @@ -4,7 +4,7 @@ rm -rf 50-lists mkdir 50-lists cd 50-lists -#rm -f *.pot +rm -f *.pot for distro in tumbleweed leap; do ## set URLs @@ -15,9 +15,9 @@ esac ## get package descriptions - curl -s http://download.opensuse.org/$URL/repo/oss/suse/setup/descr/packages.en.gz | gzip -c -d > $distro-packages.en - curl -s http://download.opensuse.org/$URL/repo/oss/suse/setup/descr/packages.gz | gzip -c -d > $distro-packages - +# curl -s http://downloadcontent.opensuse.org/$URL/repo/oss/suse/setup/descr/packages.... | gzip -c -d > $distro-packages.en +# curl -s http://downloadcontent.opensuse.org/$URL/repo/oss/suse/setup/descr/packages.... | gzip -c -d > $distro-packages + echo "Generating lists..." list=$distro; { IFS=$'\n' @@ -39,26 +39,29 @@ echo "Converting $distro: " perl ../50-tools/translate_packages.pl pkg_$list.list $distro-packages $distro-packages.en $distro > $distro-packages._pot - msguniq -o $distro-packages._pot $distro-packages._pot + #msguniq -o $distro-packages._pot $distro-packages._pot done ## Merge distros -PKGS_ALL="$(echo "$(cat tumbleweed-packages._pot) $(tail -n +8 leap-packages._pot)" | msguniq | grep -v "#-#-#-#")" rm -f *.pot +echo "$(echo "$(cat tumbleweed-packages._pot) $(tail -n +8 leap-packages._pot)" | msguniq | grep -v "#-#-#-#")" > _packages.pot +cat _packages.pot | msggrep -X -i -e "^tumbleweed/patterns\|^leap/patterns" -o patterns.pot +msgcat --unique -o __packages.pot patterns.pot _packages.pot && mv __packages.pot _packages.pot echo "Splitting started: $(date)" -for i in patterns {a..z}; do +for i in {a..z}; do + I=${i^^} echo -n "$i " - echo "$PKGS_ALL" | msggrep -X -i -e "^tumbleweed/$i\|^leap/$i" -o $i.pot --no-wrap - PKGS_ALL="$(echo "$PKGS_ALL" | msggrep -X -v -i -e "^tumbleweed/$i\|^leap/$i" --no-wrap)" + cat _packages.pot | msggrep -X -e "^tumbleweed/$i\|^leap/$i\|^tumbleweed/$I\|^leap/$I" -o $i.pot + msgcat --unique -o __packages.pot $i.pot _packages.pot && mv __packages.pot _packages.pot done -echo "$PKGS_ALL" > 0.pot && tail -n +8 a.pot >> 0.pot && mv 0.pot a.pot +tail -n +8 a.pot >> _packages.pot && mv _packages.pot a.pot -for ii in aspell ghc gnome google gstreamer gtk kde leechcraft libreoffice libqt lib mate myspell perl php python rubygem tesseract texlive-specs texlive wx xfce4 yast2; do +for ii in aspell ghc gnome golang google gstreamer gtk kde leechcraft libreoffice libqt lib mate myspell perl php python rubygem tesseract texlive-specs texlive wx xfce4 yast2; do + firstChar=${ii:0:1} echo -n "$ii " - firstChar=${ii:0:1} - msggrep -X -i -e "^tumbleweed/$ii\|^leap/$ii" "$firstChar.pot" -o $ii.pot --no-wrap - msggrep -X -v -i -e "^tumbleweed/$ii\|^leap/$ii" "$firstChar.pot" -o $firstChar.pot --no-wrap + msggrep -X -e "^tumbleweed/$ii\|^leap/$ii" "$firstChar.pot" -o $ii.pot --no-wrap + msgcat --unique -o _$firstChar.pot $ii.pot $firstChar.pot && mv _$firstChar.pot $firstChar.pot done echo "" echo "Splitting finished: $(date)"
participants (1)
-
minton@svn2.opensuse.org