5621: remove 'extract_messages stuff'

svn: r19063
This commit is contained in:
Jérôme Rapinat 2012-03-14 15:39:41 +00:00
parent 6645dee5dd
commit 1283d9e90e

143
setup.py
View File

@ -233,145 +233,7 @@ def os_files():
('share/doc/gramps', ['README']),
('share/doc/gramps', ['TODO'])
]
return files
def glade():
#POTFILES.in / POTFILES.skip
files = [
'src/plugins/docgen/gtkprint.glade',
'src/glade/editperson.glade',
'src/glade/grampletpane.glade',
'src/glade/baseselector.glade',
'src/glade/reorder.glade',
'src/glade/tipofday.glade',
'src/glade/displaystate.glade',
'src/glade/addmedia.glade',
'src/glade/questiondialog.glade',
'src/glade/configure.glade',
'src/glade/dateedit.glade',
'src/glade/editsource.glade',
'src/glade/styleeditor.glade',
'src/glade/dbman.glade',
'src/glade/editcitation.glade',
'src/glade/editurl.glade',
'src/glade/editrepository.glade',
'src/glade/editreporef.glade',
'src/glade/editpersonref.glade',
'src/glade/editlocation.glade',
'src/glade/editlink.glade',
'src/glade/editfamily.glade',
'src/glade/editchildref.glade',
'src/glade/editattribute.glade',
'src/glade/editaddress.glade',
'src/glade/editmedia.glade',
'src/glade/editmediaref.glade',
'src/glade/editeventref.glade',
'src/glade/editldsord.glade',
'src/glade/editnote.glade',
'src/glade/editplace.glade',
'src/glade/editsourceref.glade',
'src/glade/editname.glade',
'src/glade/editevent.glade',
'src/glade/mergecitation.glade',
'src/glade/mergedata.glade',
'src/glade/mergeevent.glade',
'src/glade/mergefamily.glade',
'src/glade/mergemedia.glade',
'src/glade/mergenote.glade',
'src/glade/mergeperson.glade',
'src/glade/mergeplace.glade',
'src/glade/mergerepository.glade',
'src/glade/mergesource.glade',
'src/glade/plugins.glade',
'src/glade/rule.glade',
'src/glade/scratchpad.glade',
'src/glade/papermenu.glade',
'src/glade/updateaddons.glade',
'src/plugins/tool/notrelated.glade',
'src/plugins/bookreport.glade',
'src/plugins/tool/changenames.glade',
'src/plugins/tool/changetypes.glade',
'src/plugins/tool/desbrowser.glade',
'src/plugins/tool/eval.glade',
'src/plugins/tool/eventcmp.glade',
'src/plugins/tool/leak.glade',
'src/plugins/tool/finddupes.glade',
'src/plugins/tool/mergecitations.glade',
'src/plugins/tool/ownereditor.glade',
'src/plugins/tool/patchnames.glade',
'src/plugins/tool/relcalc.glade',
'src/plugins/tool/soundgen.glade',
'src/plugins/tool/removeunused.glade',
'src/plugins/tool/verify.glade',
'src/plugins/import/importgedcom.glade'
]
return files
class ExtractMessages(Command):
'''
Command to extract messages for translations
'''
# message_extractors = po/POTFILES.in
description = "extraction for gramps"
user_options = [('fake', None, 'Override')]
def initialize_options(self):
for g in glade():
os.system('''intltool-extract --type=gettext/glade %s''' % g)
os.system('''intltool-extract --type=gettext/xml src/data/tips.xml.in''')
os.system('''intltool-extract --type=gettext/xml src/plugins/lib/holidays.xml.in''')
os.system('''intltool-extract --type=gettext/xml data/gramps.xml.in''')
os.system('''intltool-extract --type=gettext/ini data/gramps.desktop.in''')
os.system('''intltool-extract --type=gettext/keys data/gramps.keys.in''')
def run(self):
# gramps
for main in gramps()['gramps']:
os.system('''xgettext -j --language=Python --keyword=_ '''
'''--keyword=ngettext --keyword=sgettext '''
'''--from-code=UTF-8 -o "po/gramps.pot" '''
'''src/%s''' % main)
# gramps.cli
for cli in gramps()['gramps.cli']:
os.system('''xgettext -j --language=Python --keyword=_ '''
'''--keyword=ngettext --keyword=sgettext '''
'''--from-code=UTF-8 -o "po/gramps.pot" '''
'''src/cli/%s''' % cli)
# gramps.gen
for gen in gramps()['gramps.gen']:
os.system('''xgettext -j --language=Python --keyword=_ '''
'''--keyword=ngettext --keyword=sgettext '''
'''--from-code=UTF-8 -o "po/gramps.pot" '''
'''src/gen/%s''' % gen)
# gramps.gui
for gui in gramps()['gramps.gui']:
os.system('''xgettext -j --language=Python --keyword=_ '''
'''--keyword=ngettext --keyword=sgettext '''
'''--from-code=UTF-8 -o "po/gramps.pot" '''
'''src/gui/%s''' % gui)
# gramps.plugins
for plug in gramps()['gramps.plugins']:
os.system('''xgettext -j --language=Python --keyword=_ '''
'''--keyword=ngettext --keyword=sgettext '''
'''--from-code=UTF-8 -o "po/gramps.pot" '''
'''src/plugins/%s''' % plug)
# glade (gramps.glade + gramps.plugins - POTFILES.skip ???)
os.system('''xgettext -j --keyword=N_ --from-code=UTF-8'''
''' -o "po/gramps.pot" '''
'''src/*/*.glade.h src/*/*/*.glade '''
''' */*.in.h */*/*.in.h */*/*/*.in.h''')
def finalize_options (self):
# TODO: clean all files into /src which are ending with .h extension
pass
return files
def trans_files():
'''
@ -555,6 +417,5 @@ result = setup(
'build': BuildData,
'install': InstallData, # override Install!
#'install_data': InstallData, # python setup.py --help-commands
'uninstall': Uninstall,
'extract_messages': ExtractMessages}
'uninstall': Uninstall}
)