put gajim-remote.py in src/ so we cna use one 18n.py
This commit is contained in:
parent
73bd65013f
commit
9c0876ec38
4 changed files with 11 additions and 54 deletions
16
Makefile
16
Makefile
|
@ -15,9 +15,7 @@ DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
||||||
FIND_LIB = find . -name '*.so'
|
FIND_LIB = find . -name '*.so'
|
||||||
FILES_LIB = `$(FIND_LIB)`
|
FILES_LIB = `$(FIND_LIB)`
|
||||||
|
|
||||||
SCRIPTS = \
|
SCRIPTS = scripts/gajim
|
||||||
scripts/gajim \
|
|
||||||
scripts/gajim-remote
|
|
||||||
|
|
||||||
all: translation trayicon gtkspell idle
|
all: translation trayicon gtkspell idle
|
||||||
|
|
||||||
|
@ -48,7 +46,7 @@ dist:
|
||||||
for s in $(SCRIPTS) ; do \
|
for s in $(SCRIPTS) ; do \
|
||||||
cp $$s gajim-$(VERSION)/scripts/; \
|
cp $$s gajim-$(VERSION)/scripts/; \
|
||||||
done
|
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 '.svn' -type d | xargs rm -rf
|
||||||
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
||||||
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
||||||
|
@ -116,9 +114,9 @@ help:
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf "$(DESTDIR)$(PREFIX)/share/gajim" # the main files are here
|
rm -rf "$(DESTDIR)$(PREFIX)/share/gajim" # the main files are here
|
||||||
rm -rf "$(DESTDIR)$(PREFIX)/lib/gajim" # the .so 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" # the bash script
|
||||||
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
|
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
|
||||||
rm -f "$(MANDIR)/man1/gajim.1.gz" # the man page
|
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/pixmaps/gajim.png" # the icon
|
||||||
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
|
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
|
||||||
@echo done uninstalling
|
@echo done uninstalling
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
## Gajim Team:
|
## Gajim Team:
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Vincent Hanquez <tab@snarc.org>
|
## - Vincent Hanquez <tab@snarc.org>
|
||||||
## - Nikos Kouremenos <kourem@gmail.com>
|
## - Nikos Kouremenos <kourem@gmail.com>
|
||||||
## - Dimitur Kirov <dkirov@gmail.com>
|
## - Dimitur Kirov <dkirov@gmail.com>
|
||||||
##
|
##
|
||||||
## Copyright (C) 2003-2005 Gajim Team
|
## 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"
|
echo "You must not launch gajim-remote as root, it is INSECURE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd PREFIX/share/gajim/scripts
|
cd PREFIX/share/gajim/src
|
||||||
export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim"
|
export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim"
|
||||||
python gajim-remote.py $@
|
python gajim-remote.py $@
|
||||||
|
|
|
@ -32,7 +32,7 @@ import signal
|
||||||
|
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
|
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
|
||||||
|
|
||||||
import i18n
|
from common import i18n
|
||||||
|
|
||||||
_ = i18n._
|
_ = i18n._
|
||||||
i18n.init()
|
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…
Add table
Reference in a new issue