put gajim-remote.py in src/ so we cna use one 18n.py
This commit is contained in:
parent
73bd65013f
commit
9c0876ec38
16
Makefile
16
Makefile
|
@ -15,9 +15,7 @@ DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
|||
FIND_LIB = find . -name '*.so'
|
||||
FILES_LIB = `$(FIND_LIB)`
|
||||
|
||||
SCRIPTS = \
|
||||
scripts/gajim \
|
||||
scripts/gajim-remote
|
||||
SCRIPTS = scripts/gajim
|
||||
|
||||
all: translation trayicon gtkspell idle
|
||||
|
||||
|
@ -48,7 +46,7 @@ dist:
|
|||
for s in $(SCRIPTS) ; do \
|
||||
cp $$s gajim-$(VERSION)/scripts/; \
|
||||
done
|
||||
cp scripts/gajim-remote.py gajim-$(VERSION)/scripts/; \
|
||||
cp src/gajim-remote.py gajim-$(VERSION)/src/; \
|
||||
find gajim-$(VERSION) -name '.svn' -type d | xargs rm -rf
|
||||
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
||||
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
||||
|
@ -116,9 +114,9 @@ help:
|
|||
uninstall:
|
||||
rm -rf "$(DESTDIR)$(PREFIX)/share/gajim" # the main files are here
|
||||
rm -rf "$(DESTDIR)$(PREFIX)/lib/gajim" # the .so files are here
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim" # the bash script
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
|
||||
rm -f "$(MANDIR)/man1/gajim.1.gz" # the man page
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/gajim.png" # the icon
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim" # the bash script
|
||||
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
|
||||
rm -f "$(MANDIR)/man1/gajim.1.gz" # the man page
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/gajim.png" # the icon
|
||||
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
|
||||
@echo done uninstalling
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
## Gajim Team:
|
||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||
## - Vincent Hanquez <tab@snarc.org>
|
||||
## - Nikos Kouremenos <kourem@gmail.com>
|
||||
## - Dimitur Kirov <dkirov@gmail.com>
|
||||
## - Nikos Kouremenos <kourem@gmail.com>
|
||||
## - Dimitur Kirov <dkirov@gmail.com>
|
||||
##
|
||||
## Copyright (C) 2003-2005 Gajim Team
|
||||
##
|
||||
|
@ -22,6 +22,6 @@ if [ `id -u` -eq 0 ]; then
|
|||
echo "You must not launch gajim-remote as root, it is INSECURE"
|
||||
fi
|
||||
|
||||
cd PREFIX/share/gajim/scripts
|
||||
cd PREFIX/share/gajim/src
|
||||
export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim"
|
||||
python gajim-remote.py $@
|
||||
|
|
|
@ -32,7 +32,7 @@ import signal
|
|||
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
|
||||
|
||||
import i18n
|
||||
from common import i18n
|
||||
|
||||
_ = i18n._
|
||||
i18n.init()
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
## common/i18n.py
|
||||
##
|
||||
## Gajim Team:
|
||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||
## - Vincent Hanquez <tab@snarc.org>
|
||||
## - Nikos Kouremenos <kourem@gmail.com>
|
||||
## - Dimitur Kirov <dkirov@gmail.com>
|
||||
##
|
||||
## Copyright (C) 2003-2005 Gajim Team
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published
|
||||
## by the Free Software Foundation; version 2 only.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
APP='gajim'
|
||||
DIR='../po'
|
||||
|
||||
import locale
|
||||
import gettext
|
||||
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
_translation = None
|
||||
|
||||
def init():
|
||||
global _translation
|
||||
try:
|
||||
_translation = gettext.translation(APP, DIR)
|
||||
except IOError:
|
||||
_translation = gettext.NullTranslations()
|
||||
|
||||
def _(s):
|
||||
if s == '':
|
||||
return s
|
||||
assert s
|
||||
return _translation.gettext(s)
|
Loading…
Reference in New Issue