Changeset 235 for trunk


Ignore:
Timestamp:
07/06/07 09:35:55 (5 years ago)
Author:
marc
Message:

Major changes to docs, makefiles, debian rules to support translations.

Location:
trunk
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/COPYRIGHT

    r229 r235  
    1 Marc E. <santusmarc@gmail.com> 
     1Marc E. <santusmarc@users.sourceforge.net> 
    22Kurt Erickson <psychogenicshk@users.sourceforge.net> (RPM packager) 
    33Tango Project (http://tango.freedesktop.org) 
  • trunk/ChangeLog

    r229 r235  
    1 trunk: 
     11.0: 
    22 * Added RPM packages 
     3 * Added interface translations. 
    34 
    450.2 (I've been watching you...): 
  • trunk/Makefile

    r233 r235  
    77FIND ?= find 
    88 
    9 # autodetect GNOME prefix, change this if you want it elsewhere 
    10 #PREFIX ?= `pkg-config libgnome-2.0 --variable=prefix || echo /usr` 
    119PREFIX = /usr 
    1210DESTDIR = $(PREFIX) 
     
    1614DATADIR = $(DESTDIR)/share/itaka 
    1715IMAGESDIR = $(DATADIR)/images 
    18 # For debian compatibility 
    19 REPLACEIMAGESDIR = $(PREFIX)/share/itaka/images 
     16LOCALEDIR = $(DESTDIR)/locale 
    2017APPLICATIONSDIR = $(DESTDIR)/share/applications 
    2118ICONDIR = $(DESTDIR)/share/pixmaps 
     
    2623install:  
    2724        mv config.py config.py.old 
    28         sed -e "s|/usr/share/itaka/images/|$(REPLACEIMAGESDIR)|g" config.py.old > config.py 
     25        sed -e "s|/usr/share/itaka/images/|$(IMAGESDIR)|g" config.py.old > config.py 
    2926        $(INSTALL) -m 755 -d $(BINDIR) $(DATADIR) $(LIBDIR) $(IMAGESDIR) $(APPLICATIONSDIR) $(ICONDIR) $(MANDIR) 
    3027        $(INSTALL) -m 755 *.py $(LIBDIR) 
     
    3936        chmod +x $(BINDIR)/itaka 
    4037        mv config.py.old config.py 
    41         rm share/itaka.1.gz 
    42         for lang in i18n/*; do for pofile in $lang/LC_MESSAGES/*.po; do msgfmt $pofile -o $lang/LC_MESSAGES/itaka.mo; done; done 
     38         
     39        for lang in locale/*; do  
     40            if [[ -e $lang/LC_MESSAGES/itaka.po ]]; then  
     41                for pofile in $lang/LC_MESSAGES/itaka.po; do 
     42                    msgfmt $pofile -o $lang/LC_MESSAGES/itaka.mo && $(INSTALL) -m 644 $pofile $(LOCALEDIR)/${lang#locale/}/LC_MESSAGES/itaka.mo;  
     43                done; 
     44            fi; 
     45        done 
     46 
    4347uninstall: 
    4448        rm -r $(BINDIR)/itaka $(DATADIR) $(LIBDIR) $(ICONDIR)/itaka.png $(APPLICATIONSDIR)/itaka.desktop $(MANDIR)/itaka.1.gz 
     49 
     50clean: 
     51        find . -name '*.pyc' -o -name '*.pyo' -exec rm {} \; 
     52        rm locale/*/LC_MESSAGES/*.mo 
     53        rm share/itaka.1.gz 
     54 
     55help: 
     56        @echo Usage: 
     57        @echo make clean                - delete built modules and object files 
     58        @echo make install              - install binaries into the official directories 
     59        @echo make uninstall            - uninstall binaries from the official directories 
     60        @echo make help                 - prints this help 
     61        @echo 
     62 
  • trunk/README

    r224 r235  
    11114. DOCUMENTATION 
    12125. HACKING 
    13 6. RELEASE NOTES 
    14 7. PROGRAM CREDITS 
     136. TRANSLATING 
     147. RELEASE NOTES 
     158. PROGRAM CREDITS 
    1516 
    16171. REQUIRED LIBRARIES: 
     
    5960If you intend to change Itaka source code, please read the HACKING file. 
    6061 
    61 6. RELEASE NOTES: 
     626. TRANSLATING: 
     63 
     64Translating Itaka to another language is quite easy, you first need GNU gettext installed.  
     65 
     66Each stable Itaka version will ship with a .pot template file located in 
     67locale/itaka.pot. This template includes all the up to date code strings, and 
     68is the base you should use to create your translation. 
     69 
     70If you've changed any strings, the itaka.pot file can be regenerated by doing: 
     71    $ xgettext -o locale/itaka.pot *.py 
     72    $ msguniq -o locale/itaka.pot locale/itaka.pot 
     73 
     74The last command cleans up duplicate entries, which saves you a lot of time and avoids errors. 
     75 
     76If you want to create a brand new translation, and have not modified code, do the following: 
     77 
     78    $ mkdir -p locale/de/LC_MESSAGES/ 
     79    $ LANG=de_DE msginit -o locale/de/LC_MESSAGES/itaka.po 
     80    $ msgmerge -U locale/de/LC_MESSAGES/itaka.po locale/itaka.pot 
     81 
     82Now edit the itaka.po file. When you are done translating the strings, submit 
     83the .po file to the bug tracker (see BUGS file) as an enhancement. If you want 
     84to start using the translation right away, you need to create a binary by doing 
     85the following: 
     86 
     87    $ msgfmt locale/de/LC_MESSAGES/de.po -o locale/de/LC_MESSAGES/de.mo 
     88    $ LANG=de_DE itaka 
     89 
     90If you want to update existings translations, follow the steps to regenerate 
     91the .pot template if code was changed, then do the following: 
     92 
     93    $ msgmerge -U language.po itaka.pot 
     94 
     95For more information, please see the GNU gettext manual at http://www.gnu.org/software/gettext/manual/gettext.html 
     96 
     977. RELEASE NOTES: 
    6298 
    6399See the ChangeLog for more detailed information. 
     
    75111See COPYING file for further license information. 
    76112 
    77 7. PROGRAM CREDITS: 
     1138. PROGRAM CREDITS: 
    78114 
    79115Special thanks to James Henstridge for the excellent Python-GTK bindings and  
  • trunk/debian/control

    r217 r235  
    33Priority: extra 
    44Maintainer: Marc E. <santusmarc@gmail.com> 
    5 Build-Depends: imagemagick, docbook-to-man, python, debhelper (>= 5.0.37.2) 
     5Build-Depends: imagemagick, docbook-to-man, python, intltool, gettext, debhelper (>= 5.0.37.2) 
    66Standards-Version: 3.7.2 
    77 
  • trunk/debian/itaka.dirs

    r124 r235  
    44usr/share/pixmaps 
    55usr/share/applications 
     6usr/share/locale 
  • trunk/debian/rules

    r217 r235  
    3636 
    3737        # Add here commands to clean up after the build process. 
    38         #-$(MAKE) clean 
     38        -$(MAKE) clean 
    3939 
    4040        -rm -f debian/files 
     
    4949 
    5050        # Add here commands to install the package into debian/itaka. 
    51         $(MAKE) -f Makefile.Debian DESTDIR=$(CURDIR)/debian/itaka install 
    52         #$(MAKE) install 
     51        $(MAKE) DESTDIR=$(CURDIR)/debian/itaka/usr install 
    5352 
    5453        # And other miscellaneous tasks 
  • trunk/itaka.spec

    r228 r235  
    11Summary: On-demand screenshooting server 
    22Name: itaka 
    3 Version: 0.2 
     3Version: 1.0 
    44Release: 1 
    55License: GPL 
     
    4343 
    4444%clean 
     45# Might want to add a make clean, since I've added it. 
    4546rm -rf $RPM_BUILD_ROOT 
    4647 
  • trunk/uigtk.py

    r233 r235  
    936936        self.aboutdialog.set_copyright(u'© 2003-2007 Marc E.') 
    937937        self.aboutdialog.set_comments('Screenshooting de mercado.') 
    938         self.aboutdialog.set_authors(['Marc E. <santusmarc@users.sourceforge.net>', 'Kurt Erickson <psychogenicshk@users.sourceforge.net> (Packaging)']) 
     938        self.aboutdialog.set_authors(['Marc E. <santusmarc@users.sourceforge.net>', _('Kurt Erickson <psychogenicshk@users.sourceforge.net> (Packaging)')]) 
    939939        self.aboutdialog.set_artists(['Marc E. <santusmarc@users.sourceforge.net>', 'Tango Project (http://tango.freedesktop.org)']) 
    940940        self.aboutdialog.set_license('''Itaka is free software; you can redistribute it and/or modify 
Note: See TracChangeset for help on using the changeset viewer.