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 | 44 | docdir=@docdir@ |
45 | 45 | sysconfdir=@sysconfdir@ |
46 | 46 | POTDIR=$(BASEDIR)/.pot |
47 | +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ | |
47 | 48 | |
48 | 49 | BASEDIR=@BASEDIR@ |
49 | 50 | |
... | ... | @@ -66,7 +67,7 @@ MSGCAT=@MSGCAT@ |
66 | 67 | all: \ |
67 | 68 | $(BINRLS)/ipcserver@DLLEXT@ \ |
68 | 69 | $(BINRLS)/libipc3270@LIBEXT@ \ |
69 | - locale/$(LIBNAME).pot | |
70 | + locale/$(GETTEXT_PACKAGE).pot | |
70 | 71 | |
71 | 72 | plugin: \ |
72 | 73 | $(BINRLS)/ipcserver@DLLEXT@ |
... | ... | @@ -80,7 +81,7 @@ $(BINRLS)/ipcserver@DLLEXT@: |
80 | 81 | $(BINRLS)/libipc3270@LIBEXT@: |
81 | 82 | @$(MAKE) -C client $@ |
82 | 83 | |
83 | -locale/$(LIBNAME).pot: | |
84 | +locale/$(GETTEXT_PACKAGE).pot: | |
84 | 85 | |
85 | 86 | @rm -f $@ |
86 | 87 | @$(MKDIR) $(@D) | ... | ... |
client/src/core/linux/dynamic/init.cc
... | ... | @@ -49,16 +49,8 @@ |
49 | 49 | |
50 | 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 | 55 | return 0; |
64 | 56 | ... | ... |
client/src/include/ipc-client-internals.h
client/src/session/remote/wait.cc
... | ... | @@ -57,6 +57,8 @@ |
57 | 57 | |
58 | 58 | rc = worker(); |
59 | 59 | |
60 | + debug("rc=",rc); | |
61 | + | |
60 | 62 | if(rc == 0) |
61 | 63 | return; |
62 | 64 | else if(rc != ETIMEDOUT) |
... | ... | @@ -89,6 +91,8 @@ |
89 | 91 | |
90 | 92 | void IPC::Session::waitForReady(time_t timeout) const { |
91 | 93 | |
94 | + debug(__FUNCTION__,"(",timeout,")"); | |
95 | + | |
92 | 96 | wait(timeout, [this]() { |
93 | 97 | |
94 | 98 | int rc; | ... | ... |
common/src/include/config.h.in
configure.ac
... | ... | @@ -429,6 +429,14 @@ AS_VAR_POPDEF([CACHEVAR])dnl |
429 | 429 | |
430 | 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 | 441 | dnl --------------------------------------------------------------------------- |
434 | 442 | dnl Configure which files to generate. | ... | ... |
locale/Makefile.in
... | ... | @@ -33,7 +33,7 @@ datarootdir=@datarootdir@ |
33 | 33 | localedir=${datarootdir}/locale |
34 | 34 | |
35 | 35 | PACKAGE_NAME=@PACKAGE_NAME@ |
36 | -LIBNAME=libipc3270 | |
36 | +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ | |
37 | 37 | |
38 | 38 | PACKAGE_VERSION=@PACKAGE_VERSION@ |
39 | 39 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ |
... | ... | @@ -52,21 +52,21 @@ INSTALL_DATA=@INSTALL_DATA@ |
52 | 52 | #---[ Rules ]---------------------------------------------------------------------------- |
53 | 53 | |
54 | 54 | %.po: \ |
55 | - $(LIBNAME).pot | |
55 | + $(GETTEXT_PACKAGE).pot | |
56 | 56 | |
57 | 57 | @echo $(basename $@) ... |
58 | - @$(MSGMERGE) --update --sort-output $@ $(LIBNAME).pot | |
58 | + @$(MSGMERGE) --update --sort-output $@ $(GETTEXT_PACKAGE).pot | |
59 | 59 | @touch $@ |
60 | 60 | |
61 | -$(BINDIR)/%/LC_MESSAGES/$(LIBNAME).mo: \ | |
61 | +$(BINDIR)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ | |
62 | 62 | %.po |
63 | 63 | |
64 | 64 | @echo $< ... |
65 | 65 | @$(MKDIR) `dirname $@` |
66 | 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 | 71 | @echo $< ... |
72 | 72 | @$(MKDIR) `dirname $@` |
... | ... | @@ -75,10 +75,10 @@ $(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(LIBNAME).mo: \ |
75 | 75 | #---[ Targets ]-------------------------------------------------------------------------- |
76 | 76 | |
77 | 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 | 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
server/src/core/linux/gobject.c
... | ... | @@ -78,6 +78,9 @@ static void ipc3270_class_init(ipc3270Class *klass) { |
78 | 78 | object_class = G_OBJECT_CLASS (klass); |
79 | 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 | 86 | static void ipc3270_init(ipc3270 *object) { | ... | ... |