Re: [jokosher-devel] Moving icons



Hello Laszlo,

thanks for taking the time to reply and figure it out.

Am Dienstag, den 26.09.2006, 21:09 -0400 schrieb Laszlo Pandy:
> Mostly I just want to know why 
> we use need to use POTFILES.in and not just run the translations merge 
> on all *.py files?

I took a look at Michael's gnome-app-install and together with him
applied the changes to jokosher. Using POTFILES.in is the canonical way
of dealing with translations - you will find it in other projects as
well.

I CCed Michael, I'm sure he has some *clever* reply. :-)


> Also what happened to these two lines which grab translation template 
> strings from the glade file and the instrument files?:
> 
> python i18nReadInstr.py ../../Instruments/*.instr > i18n.instr.h
> xgettext -k_ -kN_ -o $@ ../../Jokosher.glade.h ../../*.py i18n.instr.h

I'm not sure - it's been a while since I looked at it - wouldn't it
suffice to add them to POTFILES.in?


> BTW, the setup.py file looks pretty good :).

I'm glad you like it.

Have a nice day,
 Daniel


PS: Leaving the rest of the patch attached for Michael.


> diff -ruN trunk/locale/src/Makefile jokosher/locale/src/Makefile
> --- trunk/locale/src/Makefile	2006-08-04 22:46:08.000000000 +0200
> +++ jokosher/locale/src/Makefile	2006-08-25 14:46:03.000000000 +0200
> @@ -1,34 +1,20 @@
> -#Generic rule for MO files
> -%.mo: DIR1 = ../$(basename $@)
> -%.mo: DIR2 = $(DIR1)/LC_MESSAGES
> -%.mo: %.po
> -	##############
> -	#GENERATING $@
> -	##############
> -	if [ ! -d $(DIR1) ]; then mkdir $(DIR1); fi
> -	if [ ! -d $(DIR2) ]; then mkdir $(DIR2); fi
> -	msgfmt $< -o $@
> -	cp $@ $(DIR2)/jokosher.mo
> -
> -#Generic rule for PO files
> -%.po: jokosher.pot
> -	##################
> -	#MERGING $@ AND $<
> -	##################
> -	msgmerge -UN $@ $<
> -
> -#Generic rule for POT files
> -%.pot: ../../Jokosher.glade ../../*.py ../../Instruments/*.instr
> -	############
> -	#CREATING $@
> -	############
> -	intltool-extract --type=gettext/glade ../../Jokosher.glade
> -	python i18nReadInstr.py ../../Instruments/*.instr > i18n.instr.h
> -	xgettext -k_ -kN_ -o $@ ../../Jokosher.glade.h ../../*.py i18n.instr.h
> 
> -update: $(shell ls *.po)
> +DOMAIN=jokosher
> +PO_FILES := $(wildcard *.po)
> 
> -all: $(subst .po,.mo,$(shell ls *.po))
> +all: update-po
> 
> -clean:
> -	rm *.mo i18n.instr.h ../../Jokosher.glade.h
> \ Kein Zeilenumbruch am Dateiende.
> +# update the pot
> +$(DOMAIN).pot:
> +	intltool-update -p -g $(DOMAIN)
> +
> +# merge the new stuff into the po files
> +merge-po: $(PO_FILES)
> +	intltool-update -r -g $(DOMAIN);
> +
> +# create mo from the pos
> +%.mo : %.po
> +	mkdir -p mo/$(subst .po,,$<)/LC_MESSAGES/
> +	msgfmt $< -o mo/$(subst .po,,$<)/LC_MESSAGES/$(DOMAIN).mo
> +
> +update-po: $(DOMAIN).pot merge-po $(patsubst %.po,%.mo,$(wildcard *.po))	
> diff -ruN trunk/locale/src/POTFILES.in jokosher/locale/src/POTFILES.in
> --- trunk/locale/src/POTFILES.in	1970-01-01 01:00:00.000000000 +0100
> +++ jokosher/locale/src/POTFILES.in	2006-08-25 14:55:12.000000000 +0200
> @@ -0,0 +1,12 @@
> +../Jokosher/AddInstrumentDialog.py
> +../Jokosher/CompactMixView.py
> +../Jokosher/EventLaneViewer.py
> +../Jokosher/EventViewer.py
> +../Jokosher/Extension.py
> +../Jokosher/InstrumentConnectionsDialog.py
> +../Jokosher/InstrumentViewer.py
> +../Jokosher/JokosherApp.py
> +../Jokosher/MasterMixerStrip.py
> +../Jokosher/MixerStrip.py
> +../Jokosher/NewProjectDialog.py
> +../Jokosher/VUWidget.py
> diff -ruN trunk/setup.py jokosher/setup.py
> --- trunk/setup.py	1970-01-01 01:00:00.000000000 +0100
> +++ jokosher/setup.py	2006-08-25 14:57:57.000000000 +0200
> @@ -0,0 +1,42 @@
> +#!/usr/bin/env python
> +
> +from distutils.core import setup
> +import os
> +import glob
> +
> +I18NFILES = []
> +for filepath in glob.glob("locale/src/mo/*/LC_MESSAGES/*.mo"):
> +    lang = filepath[len("locale/src/mo/"):]
> +    targetpath = os.path.dirname(os.path.join("share/locale",lang))
> +    I18NFILES.append((targetpath, [filepath]))
> +os.system("cd locale/src; make update-po")
> +
> +
> +setup(name='jokosher',
> +      version='0.2',
> +      scripts=['Jokosher/Jokosher'],
> +      packages=['Jokosher'],
> +      data_files=[('share/jokosher/',
> +                   glob.glob("*/*.glade")
> +                  ),
> +                  ('share/jokosher/Instruments',
> +                   glob.glob("Instruments/*.instr")
> +                  ),
> +                  ('share/jokosher/Instruments/images',
> +                   glob.glob('Instruments/images/*')
> +                  ),
> +                  ('share/applications',
> +                   glob.glob("*/jokosher.desktop")
> +                  ),
> +                  ('share/icons/hicolor/48x48/apps',
> +                   ['Jokosher/jokosher-logo.png']
> +                  ),
> +                  ('share/pixmaps',
> +                   glob.glob("images/*.png")
> +                  ),
> +		  ('share/applications',
> +		   ['jokosher.desktop'],
> +	          )
> +                 ]+I18NFILES
> +      )
> +

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]