mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
i18n example has been failed in some SOs, then we decided to make it as an extra dist
This commit is contained in:
@@ -25,12 +25,13 @@ noinst_PROGRAMS = \
|
||||
minimal_example_comet \
|
||||
querystring_example \
|
||||
timeout \
|
||||
msgs_i18n \
|
||||
fileserver_example \
|
||||
fileserver_example_dirs \
|
||||
fileserver_example_external_select \
|
||||
refuse_post_example
|
||||
|
||||
EXTRA_DIST = msgs_i18n.c
|
||||
noinst_EXTRA_DIST = msgs_i18n.c
|
||||
|
||||
if ENABLE_HTTPS
|
||||
noinst_PROGRAMS += https_fileserver_example
|
||||
@@ -74,11 +75,6 @@ timeout_SOURCES = \
|
||||
timeout_LDADD = \
|
||||
$(top_builddir)/src/microhttpd/libmicrohttpd.la
|
||||
|
||||
msgs_i18n_SOURCEs = \
|
||||
msgs_i18n.c
|
||||
msgs_i18n_LDADD = \
|
||||
$(top_builddir)/src/microhttpd/libmicrohttpd.la
|
||||
|
||||
chunked_example_SOURCES = \
|
||||
chunked_example.c
|
||||
chunked_example_LDADD = \
|
||||
|
||||
@@ -23,27 +23,14 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* suposing you are in the libmicrohttp root directory and the LANG is `pt_BR`: *
|
||||
* suposing you are in Brazil:
|
||||
*
|
||||
* # generate the POT file
|
||||
* $ xgettext --keyword=_ --language=C --add-comments --sort-output -o libmicrohttpd.pot src/microhttpd/*.c
|
||||
*
|
||||
* # generate the PO file
|
||||
* $ msginit --input=libmicrohttpd.pot --locale=pt_BR --output=libmicrohttpd.po
|
||||
*
|
||||
* # open the generated .po in any program like Poedit and translate the MHD messages; once done, let's go to the test:
|
||||
* mkdir -p src/examples/locale/pt_BR/LC_MESSAGES
|
||||
* mv libmicrohttpd.mo libmicrohttpd.po src/examples/locale/pt_BR/LC_MESSAGES
|
||||
* cd src/examples/
|
||||
* gcc -o msgs_i18n msgs_i18n.c -lmicrohttpd
|
||||
* export LANGUAGE=pt_BR
|
||||
* ./msgs_i18n
|
||||
* # it may print: Opção inválida 4196490! (Você terminou a lista com MHD_OPTION_END?)
|
||||
*
|
||||
* # tip: if you get any problem in your i18n application, you can debug it using `strace` tool, e.g:
|
||||
* $ strace -e trace=open ./msgs_i18n
|
||||
*
|
||||
* That's all!
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -86,6 +73,6 @@ main() {
|
||||
NULL, NULL,
|
||||
&ahc_echo, NULL,
|
||||
MHD_OPTION_EXTERNAL_LOGGER, &error_handler, NULL
|
||||
/* MHD_OPTION_END - to raise the error "Invalid option ..." we are going to translate */);
|
||||
/* MHD_OPTION_END - to raise the error "Invalid option ..." we are going to translate */);
|
||||
return 1; /* purposely */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user