Commit 217a9ffb63f2b4da32f8e1a2d3fe0d323712547d
1 parent
a6cb2356
Exists in
master
and in
1 other branch
Adjusting translation.
Showing
10 changed files
with
31 additions
and
22 deletions
Show diff stats
Makefile.in
@@ -44,6 +44,7 @@ localedir=@localedir@ | @@ -44,6 +44,7 @@ localedir=@localedir@ | ||
44 | docdir=@docdir@ | 44 | docdir=@docdir@ |
45 | sysconfdir=@sysconfdir@ | 45 | sysconfdir=@sysconfdir@ |
46 | POTDIR=$(BASEDIR)/.pot | 46 | POTDIR=$(BASEDIR)/.pot |
47 | +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ | ||
47 | 48 | ||
48 | BASEDIR=@BASEDIR@ | 49 | BASEDIR=@BASEDIR@ |
49 | 50 | ||
@@ -66,7 +67,7 @@ MSGCAT=@MSGCAT@ | @@ -66,7 +67,7 @@ MSGCAT=@MSGCAT@ | ||
66 | all: \ | 67 | all: \ |
67 | $(BINRLS)/ipcserver@DLLEXT@ \ | 68 | $(BINRLS)/ipcserver@DLLEXT@ \ |
68 | $(BINRLS)/libipc3270@LIBEXT@ \ | 69 | $(BINRLS)/libipc3270@LIBEXT@ \ |
69 | - locale/$(LIBNAME).pot | 70 | + locale/$(GETTEXT_PACKAGE).pot |
70 | 71 | ||
71 | plugin: \ | 72 | plugin: \ |
72 | $(BINRLS)/ipcserver@DLLEXT@ | 73 | $(BINRLS)/ipcserver@DLLEXT@ |
@@ -80,7 +81,7 @@ $(BINRLS)/ipcserver@DLLEXT@: | @@ -80,7 +81,7 @@ $(BINRLS)/ipcserver@DLLEXT@: | ||
80 | $(BINRLS)/libipc3270@LIBEXT@: | 81 | $(BINRLS)/libipc3270@LIBEXT@: |
81 | @$(MAKE) -C client $@ | 82 | @$(MAKE) -C client $@ |
82 | 83 | ||
83 | -locale/$(LIBNAME).pot: | 84 | +locale/$(GETTEXT_PACKAGE).pot: |
84 | 85 | ||
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | @$(MKDIR) $(@D) | 87 | @$(MKDIR) $(@D) |
client/src/core/linux/dynamic/init.cc
@@ -49,16 +49,8 @@ | @@ -49,16 +49,8 @@ | ||
49 | 49 | ||
50 | int ipc3270_loaded(void) { | 50 | int ipc3270_loaded(void) { |
51 | 51 | ||
52 | -#ifdef HAVE_LIBINTL | ||
53 | - | ||
54 | - static bool initialized = false; | ||
55 | - | ||
56 | - if(!initialized) { | ||
57 | - initialized = true; | ||
58 | - bindtextdomain(PACKAGE_NAME, LIB3270_STRINGIZE_VALUE_OF(LOCALEDIR)); | ||
59 | - } | ||
60 | - | ||
61 | -#endif // HAVE_LIBINTL | 52 | + debug("LOCALEDIR=\"%s\"",LIB3270_STRINGIZE_VALUE_OF(LOCALEDIR)); |
53 | + bindtextdomain(GETTEXT_PACKAGE, LIB3270_STRINGIZE_VALUE_OF(LOCALEDIR)); | ||
62 | 54 | ||
63 | return 0; | 55 | return 0; |
64 | 56 |
client/src/include/ipc-client-internals.h
@@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
67 | 67 | ||
68 | #ifdef HAVE_LIBINTL | 68 | #ifdef HAVE_LIBINTL |
69 | #include <libintl.h> | 69 | #include <libintl.h> |
70 | - #define _( x ) dgettext(PACKAGE_NAME, x) | 70 | + #define _( x ) dgettext(GETTEXT_PACKAGE, x) |
71 | #define N_( x ) x | 71 | #define N_( x ) x |
72 | #else | 72 | #else |
73 | #define _( x ) x | 73 | #define _( x ) x |
client/src/session/remote/wait.cc
@@ -57,6 +57,8 @@ | @@ -57,6 +57,8 @@ | ||
57 | 57 | ||
58 | rc = worker(); | 58 | rc = worker(); |
59 | 59 | ||
60 | + debug("rc=",rc); | ||
61 | + | ||
60 | if(rc == 0) | 62 | if(rc == 0) |
61 | return; | 63 | return; |
62 | else if(rc != ETIMEDOUT) | 64 | else if(rc != ETIMEDOUT) |
@@ -89,6 +91,8 @@ | @@ -89,6 +91,8 @@ | ||
89 | 91 | ||
90 | void IPC::Session::waitForReady(time_t timeout) const { | 92 | void IPC::Session::waitForReady(time_t timeout) const { |
91 | 93 | ||
94 | + debug(__FUNCTION__,"(",timeout,")"); | ||
95 | + | ||
92 | wait(timeout, [this]() { | 96 | wait(timeout, [this]() { |
93 | 97 | ||
94 | int rc; | 98 | int rc; |
common/src/include/config.h.in
@@ -35,6 +35,7 @@ | @@ -35,6 +35,7 @@ | ||
35 | #undef PACKAGE_VERSION | 35 | #undef PACKAGE_VERSION |
36 | #undef PACKAGE_RELEASE | 36 | #undef PACKAGE_RELEASE |
37 | #undef PRODUCT_NAME | 37 | #undef PRODUCT_NAME |
38 | + #undef GETTEXT_PACKAGE | ||
38 | 39 | ||
39 | #undef HAVE_LIBINTL | 40 | #undef HAVE_LIBINTL |
40 | #undef HAVE_ICONV | 41 | #undef HAVE_ICONV |
configure.ac
@@ -429,6 +429,14 @@ AS_VAR_POPDEF([CACHEVAR])dnl | @@ -429,6 +429,14 @@ AS_VAR_POPDEF([CACHEVAR])dnl | ||
429 | 429 | ||
430 | AX_CHECK_COMPILE_FLAG([-std=gnu++11], [CXXFLAGS="$CXXFLAGS -std=gnu++11"]) | 430 | AX_CHECK_COMPILE_FLAG([-std=gnu++11], [CXXFLAGS="$CXXFLAGS -std=gnu++11"]) |
431 | 431 | ||
432 | +dnl --------------------------------------------------------------------------- | ||
433 | +dnl Set translation domain. | ||
434 | +dnl --------------------------------------------------------------------------- | ||
435 | + | ||
436 | +app_cv_gettext_package="libipc3270" | ||
437 | + | ||
438 | +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$app_cv_gettext_package") | ||
439 | +AC_SUBST(GETTEXT_PACKAGE,"$app_cv_gettext_package") | ||
432 | 440 | ||
433 | dnl --------------------------------------------------------------------------- | 441 | dnl --------------------------------------------------------------------------- |
434 | dnl Configure which files to generate. | 442 | dnl Configure which files to generate. |
locale/Makefile.in
@@ -33,7 +33,7 @@ datarootdir=@datarootdir@ | @@ -33,7 +33,7 @@ datarootdir=@datarootdir@ | ||
33 | localedir=${datarootdir}/locale | 33 | localedir=${datarootdir}/locale |
34 | 34 | ||
35 | PACKAGE_NAME=@PACKAGE_NAME@ | 35 | PACKAGE_NAME=@PACKAGE_NAME@ |
36 | -LIBNAME=libipc3270 | 36 | +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ |
37 | 37 | ||
38 | PACKAGE_VERSION=@PACKAGE_VERSION@ | 38 | PACKAGE_VERSION=@PACKAGE_VERSION@ |
39 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ | 39 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ |
@@ -52,21 +52,21 @@ INSTALL_DATA=@INSTALL_DATA@ | @@ -52,21 +52,21 @@ INSTALL_DATA=@INSTALL_DATA@ | ||
52 | #---[ Rules ]---------------------------------------------------------------------------- | 52 | #---[ Rules ]---------------------------------------------------------------------------- |
53 | 53 | ||
54 | %.po: \ | 54 | %.po: \ |
55 | - $(LIBNAME).pot | 55 | + $(GETTEXT_PACKAGE).pot |
56 | 56 | ||
57 | @echo $(basename $@) ... | 57 | @echo $(basename $@) ... |
58 | - @$(MSGMERGE) --update --sort-output $@ $(LIBNAME).pot | 58 | + @$(MSGMERGE) --update --sort-output $@ $(GETTEXT_PACKAGE).pot |
59 | @touch $@ | 59 | @touch $@ |
60 | 60 | ||
61 | -$(BINDIR)/%/LC_MESSAGES/$(LIBNAME).mo: \ | 61 | +$(BINDIR)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ |
62 | %.po | 62 | %.po |
63 | 63 | ||
64 | @echo $< ... | 64 | @echo $< ... |
65 | @$(MKDIR) `dirname $@` | 65 | @$(MKDIR) `dirname $@` |
66 | @$(MSGFMT) -c -v -o $@ $^ | 66 | @$(MSGFMT) -c -v -o $@ $^ |
67 | 67 | ||
68 | -$(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(LIBNAME).mo: \ | ||
69 | - $(BINDIR)/%/LC_MESSAGES/$(LIBNAME).mo | 68 | +$(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ |
69 | + $(BINDIR)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo | ||
70 | 70 | ||
71 | @echo $< ... | 71 | @echo $< ... |
72 | @$(MKDIR) `dirname $@` | 72 | @$(MKDIR) `dirname $@` |
@@ -75,10 +75,10 @@ $(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(LIBNAME).mo: \ | @@ -75,10 +75,10 @@ $(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(LIBNAME).mo: \ | ||
75 | #---[ Targets ]-------------------------------------------------------------------------- | 75 | #---[ Targets ]-------------------------------------------------------------------------- |
76 | 76 | ||
77 | all: \ | 77 | all: \ |
78 | - $(foreach SRC, $(basename $(wildcard *.po)), $(BINDIR)/$(SRC)/LC_MESSAGES/$(LIBNAME).mo) | 78 | + $(foreach SRC, $(basename $(wildcard *.po)), $(BINDIR)/$(SRC)/LC_MESSAGES/$(GETTEXT_PACKAGE).mo) |
79 | 79 | ||
80 | install: \ | 80 | install: \ |
81 | - $(foreach SRC, $(basename $(wildcard *.po)), $(DESTDIR)/$(localedir)/$(SRC)/LC_MESSAGES/$(LIBNAME).mo) | 81 | + $(foreach SRC, $(basename $(wildcard *.po)), $(DESTDIR)/$(localedir)/$(SRC)/LC_MESSAGES/$(GETTEXT_PACKAGE).mo) |
82 | 82 | ||
83 | 83 | ||
84 | 84 |
server/Makefile.in
@@ -102,6 +102,7 @@ CFLAGS= \ | @@ -102,6 +102,7 @@ CFLAGS= \ | ||
102 | -I$(BASEDIR)/server/src/include \ | 102 | -I$(BASEDIR)/server/src/include \ |
103 | -I$(BASEDIR)/common/src/include \ | 103 | -I$(BASEDIR)/common/src/include \ |
104 | -DBUILD_DATE=`date +%Y%m%d` \ | 104 | -DBUILD_DATE=`date +%Y%m%d` \ |
105 | + -DLOCALEDIR=$(localedir) \ | ||
105 | @V3270_CFLAGS@ \ | 106 | @V3270_CFLAGS@ \ |
106 | @GTK_CFLAGS@ \ | 107 | @GTK_CFLAGS@ \ |
107 | @GLIB_CFLAGS@ \ | 108 | @GLIB_CFLAGS@ \ |
server/src/core/linux/gobject.c
@@ -78,6 +78,9 @@ static void ipc3270_class_init(ipc3270Class *klass) { | @@ -78,6 +78,9 @@ static void ipc3270_class_init(ipc3270Class *klass) { | ||
78 | object_class = G_OBJECT_CLASS (klass); | 78 | object_class = G_OBJECT_CLASS (klass); |
79 | object_class->finalize = ipc3270_finalize; | 79 | object_class->finalize = ipc3270_finalize; |
80 | 80 | ||
81 | + debug("Localedir: \"%s\"",G_STRINGIFY(LOCALEDIR)); | ||
82 | + bindtextdomain(GETTEXT_PACKAGE, G_STRINGIFY(LOCALEDIR)); | ||
83 | + | ||
81 | } | 84 | } |
82 | 85 | ||
83 | static void ipc3270_init(ipc3270 *object) { | 86 | static void ipc3270_init(ipc3270 *object) { |
server/src/include/internals.h