Commit cfbfcf97e49b94d5bce5089d2ebc65e0f7237fe4
1 parent
ac0518ae
Exists in
master
and in
1 other branch
Starting use o libv3270 own translations.
Showing
6 changed files
with
78 additions
and
21 deletions
Show diff stats
Makefile.in
src/dialogs/colorscheme.c
... | ... | @@ -27,19 +27,13 @@ |
27 | 27 | * |
28 | 28 | */ |
29 | 29 | |
30 | - #include <config.h> | |
31 | - #define ENABLE_NLS | |
32 | - | |
33 | - #ifndef GETTEXT_PACKAGE | |
34 | - #define GETTEXT_PACKAGE PACKAGE_NAME | |
35 | - #endif | |
30 | + #include <internals.h> | |
36 | 31 | |
37 | 32 | #include <libintl.h> |
38 | 33 | #include <glib/gi18n.h> |
39 | 34 | |
40 | 35 | #include <v3270.h> |
41 | 36 | #include <lib3270/log.h> |
42 | - #include <internals.h> | |
43 | 37 | #include <v3270/colorscheme.h> |
44 | 38 | #include "../terminal/marshal.h" |
45 | 39 | ... | ... |
src/dialogs/save/private.h
... | ... | @@ -0,0 +1,56 @@ |
1 | +/* | |
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | |
5 | + * | |
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | + * | |
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | + * Free Software Foundation. | |
11 | + * | |
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | + * obter mais detalhes. | |
16 | + * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | + * | |
21 | + * Este programa está nomeado como - e possui - linhas de código. | |
22 | + * | |
23 | + * Contatos: | |
24 | + * | |
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
27 | + * | |
28 | + */ | |
29 | + | |
30 | + #include <config.h> | |
31 | + #include <lib3270.h> | |
32 | + #include <locale.h> | |
33 | + #include <libintl.h> | |
34 | + #include <lib3270/log.h> | |
35 | + | |
36 | + int libv3270_loaded(void) __attribute__((constructor)); | |
37 | + int libv3270_unloaded(void) __attribute__((destructor)); | |
38 | + | |
39 | +/*---[ Implement ]-----------------------------------------------------------------------------------------*/ | |
40 | + | |
41 | + int libv3270_loaded(void) { | |
42 | + | |
43 | + debug("LocaleDIR(%s)=%s",PACKAGE_NAME,LIB3270_STRINGIZE_VALUE_OF(LOCALEDIR)); | |
44 | + | |
45 | + bindtextdomain(PACKAGE_NAME, LIB3270_STRINGIZE_VALUE_OF(LOCALEDIR)); | |
46 | + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); | |
47 | + | |
48 | + return 0; | |
49 | + | |
50 | + } | |
51 | + | |
52 | + int libv3270_unloaded(void) { | |
53 | + | |
54 | + return 0; | |
55 | + | |
56 | + } | ... | ... |
src/testprogram/testprogram.c
... | ... | @@ -43,6 +43,7 @@ |
43 | 43 | #include <v3270/actions.h> |
44 | 44 | #include <stdlib.h> |
45 | 45 | #include <gdk/gdkkeysyms-compat.h> |
46 | + #include <locale.h> | |
46 | 47 | |
47 | 48 | /*---[ Implement ]----------------------------------------------------------------------------------*/ |
48 | 49 | |
... | ... | @@ -188,19 +189,26 @@ |
188 | 189 | |
189 | 190 | int main (int argc, char **argv) { |
190 | 191 | |
191 | - GtkApplication *app; | |
192 | - int status; | |
192 | + GtkApplication *app; | |
193 | + int status; | |
193 | 194 | |
194 | - app = gtk_application_new ("br.com.bb.pw3270",G_APPLICATION_FLAGS_NONE); | |
195 | + // Setup locale | |
196 | +#ifdef LC_ALL | |
197 | + setlocale( LC_ALL, "" ); | |
198 | +#endif | |
195 | 199 | |
196 | - g_signal_connect (app, "activate", G_CALLBACK(activate), NULL); | |
200 | + textdomain("pw3270"); | |
197 | 201 | |
198 | - status = g_application_run (G_APPLICATION (app), argc, argv); | |
199 | - g_object_unref (app); | |
202 | + app = gtk_application_new ("br.com.bb.pw3270",G_APPLICATION_FLAGS_NONE); | |
200 | 203 | |
201 | - g_message("rc=%d",status); | |
204 | + g_signal_connect (app, "activate", G_CALLBACK(activate), NULL); | |
202 | 205 | |
203 | - return 0; | |
206 | + status = g_application_run (G_APPLICATION (app), argc, argv); | |
207 | + g_object_unref (app); | |
208 | + | |
209 | + g_message("rc=%d",status); | |
210 | + | |
211 | + return 0; | |
204 | 212 | |
205 | 213 | } |
206 | 214 | ... | ... |
v3270.cbp
... | ... | @@ -326,6 +326,9 @@ |
326 | 326 | <Unit filename="src/terminal/keyfile.c"> |
327 | 327 | <Option compilerVar="CC" /> |
328 | 328 | </Unit> |
329 | + <Unit filename="src/terminal/linux/init.c"> | |
330 | + <Option compilerVar="CC" /> | |
331 | + </Unit> | |
329 | 332 | <Unit filename="src/terminal/linux/iosource.c"> |
330 | 333 | <Option compilerVar="CC" /> |
331 | 334 | </Unit> | ... | ... |