From 9c0876ec3835ee27c2faaab25e5f8691dad85a99 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sun, 4 Sep 2005 11:33:14 +0000 Subject: [PATCH] put gajim-remote.py in src/ so we cna use one 18n.py --- Makefile | 16 +++++++--------- scripts/gajim-remote | 6 +++--- scripts/gajim-remote.py | 2 +- scripts/i18n.py | 41 ----------------------------------------- 4 files changed, 11 insertions(+), 54 deletions(-) delete mode 100644 scripts/i18n.py diff --git a/Makefile b/Makefile index 2f3293f2e..94b215144 100644 --- a/Makefile +++ b/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 diff --git a/scripts/gajim-remote b/scripts/gajim-remote index 1bf972144..da3c163dd 100644 --- a/scripts/gajim-remote +++ b/scripts/gajim-remote @@ -4,8 +4,8 @@ ## Gajim Team: ## - Yann Le Boulanger ## - Vincent Hanquez -## - Nikos Kouremenos -## - Dimitur Kirov +## - Nikos Kouremenos +## - Dimitur Kirov ## ## 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 $@ diff --git a/scripts/gajim-remote.py b/scripts/gajim-remote.py index eaf4810c6..02b72b9e9 100755 --- a/scripts/gajim-remote.py +++ b/scripts/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() diff --git a/scripts/i18n.py b/scripts/i18n.py deleted file mode 100644 index a9387ae25..000000000 --- a/scripts/i18n.py +++ /dev/null @@ -1,41 +0,0 @@ -## common/i18n.py -## -## Gajim Team: -## - Yann Le Boulanger -## - Vincent Hanquez -## - Nikos Kouremenos -## - Dimitur Kirov -## -## 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)