Fix make-pot

773pages on
this wiki
Add New Page
Add New Page Talk0
Browse all patches

Author Edit

Christopher Bratusek

Synopsis Edit

Due to a wrong command the make-pot script is unable to update the pot file.

The updated version of this patch depends on this patch: Add

Following patch fixes the issue.

ChangeLog Edit

v0: Initial release

v1: Add two options:

- ./make-pot update (update the pot file using intltool)
- ./make-pot generate (re-generate the pot file using intltool and sawfish-xgettext)

Patch Edit

Index: make-pot
--- sawfish/po/make-pot	(Revision 4225)
+++ sawfish/po/make-pot	(Arbeitskopie)
@@ -20,29 +20,37 @@
 # along with sawfish; see the file COPYING.  If not, write to
 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- ../themer/\
- ../themes/*/theme.jl"
+case $1 in
+	*update)
+		intltool-update --pot
+		mv -f untitled.pot sawfish.pot
+	;;
-REP_SRCS="$REP_SRCS `find ../lisp -name '*.jl' -print`"
+	*generate)
+		REP_SRCS="../scripts/*.jl\
+		 ../themer/\
+		 ../themes/*/theme.jl"
+		REP_SRCS="$REP_SRCS `find ../lisp -name '*.jl' -print`"
-rm -f sawfish.pot
+		GLADE_SRCS="../themer/"
-if [ ! -r ../DOC ]; then
-  echo "error: Need a DOC file!"
-  exit 1
+		rm -f sawfish.pot
+		if [ ! -r ../DOC ]; then
+  			echo "error: Need a DOC file!"
+  			exit 1
+		fi
-./sawfish-xgettext --doc-file=../DOC --c $REP_SRCS >$lisp_c
-libglade-xgettext --c $GLADE_SRCS >$glade_c
+		lisp_c=.$$.lisp.c
+		glade_c=.$$.glade.c
-xgettext --add-comments -a --no-location $lisp_c $glade_c
-mv -f messages.po sawfish.pot
+		./sawfish-xgettext --doc-file=../DOC --c $REP_SRCS >$lisp_c
+		intltool-extract --type=gettext/glade $GLADE_SRCS >$glade_c
-rm -f $lisp_c $glade_c
+		xgettext --add-comments -a --no-location $lisp_c $glade_c
+		mv -f messages.po sawfish.pot
+		rm -f $lisp_c $glade_c
+	;;

Community's reasons for inclusion or rejection Edit

Patch submitters, please vote also! Yes, obviosuly your vote will be positive, but it's the place to give your explanation why this patch is good for all Sawfish users, and why it is correct - good reasons for inclusion.

When voting anonymously please write your name, so that it can be associated with your posts on the mailing list. If you are logged in you can sign yourself by typing four tilda characters: ~~~~.

  • Yes vote: yes., No vote: no. or Wtf vote: pondering.

Yes vote: yes. Author's comment: Yep. In order to be able to update the pot file, this patch should be commited. Flashrider [Christopher Bratusek] 08:10, 25 May 2008 (UTC)

Also on Fandom

Random Wiki