From 7006c6aa2c77927ed693e1443c458b29bb197683 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 12 Sep 2013 00:03:46 +0300 Subject: [PATCH] Some work on gettext. --- meson.py | 4 +++- test cases/frameworks/6 gettext/meson.build | 5 +++++ test cases/frameworks/6 gettext/po/POTFILES | 1 + test cases/frameworks/6 gettext/po/meson.build | 5 +++++ test cases/frameworks/6 gettext/src/intlmain.c | 2 -- 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 test cases/frameworks/6 gettext/meson.build create mode 100644 test cases/frameworks/6 gettext/po/POTFILES diff --git a/meson.py b/meson.py index 460dc1dc2..21ee7c75a 100755 --- a/meson.py +++ b/meson.py @@ -47,7 +47,9 @@ parser.add_option('--includedir', default='include', dest='includedir', parser.add_option('--datadir', default='share', dest='datadir', help='relative path to the top of data file subdirectory (default: %default)') parser.add_option('--mandir' , default='share/man', dest='mandir', - help='relatie path of man files (default: %default)') + help='relative path of man files (default: %default)') +parser.add_option('--localedir', default='share/locale', dest='localedir', + help='relative path of locale data (default: %default)') parser.add_option('--backend', default='ninja', dest='backend', help='the backend to use (default: %default)') parser.add_option('--buildtype', default='debug', type='choice', choices=build_types, dest='buildtype', diff --git a/test cases/frameworks/6 gettext/meson.build b/test cases/frameworks/6 gettext/meson.build new file mode 100644 index 000000000..249a52d82 --- /dev/null +++ b/test cases/frameworks/6 gettext/meson.build @@ -0,0 +1,5 @@ +#Internationale Gruß. +project('gettext example', 'c') + +subdir('po') +subdir('src') diff --git a/test cases/frameworks/6 gettext/po/POTFILES b/test cases/frameworks/6 gettext/po/POTFILES new file mode 100644 index 000000000..5fd4b84d0 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/POTFILES @@ -0,0 +1 @@ +src/intlmain.c diff --git a/test cases/frameworks/6 gettext/po/meson.build b/test cases/frameworks/6 gettext/po/meson.build index e69de29bb..9d70811b4 100644 --- a/test cases/frameworks/6 gettext/po/meson.build +++ b/test cases/frameworks/6 gettext/po/meson.build @@ -0,0 +1,5 @@ +langs = ['fi', 'de'] + +gettext('intltest', +languages : langs, +dirs : '../src') diff --git a/test cases/frameworks/6 gettext/src/intlmain.c b/test cases/frameworks/6 gettext/src/intlmain.c index ba5011b35..bd7af6f14 100644 --- a/test cases/frameworks/6 gettext/src/intlmain.c +++ b/test cases/frameworks/6 gettext/src/intlmain.c @@ -3,8 +3,6 @@ #include #define _(String) gettext (String) -#define gettext_noop(String) String -#define N_(String) gettext_noop (String) #define PACKAGE "intltest" // WRONG, but enough for this test.