Permalink
Browse files

i18n: updated script to generate translation file to support .ui files

It seems it was already reading from the .ui files, but it is clearly
specified now.
It was also time for some small cleanup.
  • Loading branch information...
1 parent 63925c2 commit 60f8ff0f5e7c5560e5a5cb2207082f306d396d92 @multani committed Dec 10, 2012
Showing with 45 additions and 26 deletions.
  1. +2 −0 .gitignore
  2. +32 −0 po/POTFILES.in
  3. +11 −26 scripts/update-po
View
@@ -11,3 +11,5 @@ RECORD
*.egg-info/
build/
sonata/genversion.py
+po/messages.po
+po/untitled.pot
View
@@ -1,14 +1,46 @@
+setup.py
+sonata/__init__.py
sonata/about.py
+sonata/artwork.py
+sonata/audioscrobbler.py
+sonata/breadcrumbs.py
sonata/cli.py
sonata/config.py
+sonata/consts.py
sonata/current.py
sonata/dbus_plugin.py
sonata/formatting.py
+sonata/img.py
sonata/info.py
+sonata/launcher.py
sonata/library.py
+sonata/lyricwiki.py
sonata/main.py
+sonata/misc.py
+sonata/mpdhelper.py
sonata/playlists.py
+sonata/plugins/__init__.py
+sonata/plugins/gajim_tune.py
+sonata/plugins/localmpd.py
+sonata/plugins/test.py
+sonata/plugins/ui/localmpd.ui
sonata/pluginsystem.py
sonata/preferences.py
+sonata/rhapsodycovers.py
+sonata/scrobbler.py
+sonata/song.py
sonata/streams.py
sonata/tagedit.py
+sonata/tests/__init__.py
+sonata/tray.py
+sonata/ui.py
+sonata/ui/about.ui
+sonata/ui/current.ui
+sonata/ui/info.ui
+sonata/ui/library.ui
+sonata/ui/playlists.ui
+sonata/ui/preferences.ui
+sonata/ui/sonata.ui
+sonata/ui/streams.ui
+sonata/ui/tagedit.ui
+sonata/version.py
View
@@ -1,43 +1,28 @@
#!/bin/sh
-writelines() {
- for i in *.py
- do
- if [ ${i} != "__init__.py" ]
- then
- echo $2${i} >> $1
- fi
- done
-}
-
cd $(dirname "$0")
+cd ..
echo
echo Updating POTFILES.in...
+find setup.py sonata \( -name "*.py" -o -name "*.ui" \) > po/POTFILES.in
-rm ../po/POTFILES.in
-touch ../po/POTFILES.in
-cd ..
-writelines po/POTFILES.in ./
-cd sonata
-writelines ../po/POTFILES.in ./sonata/
-cd ../po
-
+cd po
echo Update messages.po...
echo
intltool-update -p
mv untitled.pot messages.po
-for i in *.po
- do
- if [ "$i" = "messages.po" ]
+for i in *.po
+do
+ if [ "$i" = "messages.po" ]
then
- continue
- fi
- echo Updating ${i}...
- intltool-update "${i%*.po}"
- echo
+ continue
+ fi
+ echo Updating ${i}...
+ intltool-update "${i%*.po}"
+ echo
done
echo Cleaning up...

0 comments on commit 60f8ff0

Please sign in to comment.