From d0f75b9b35806b64e42158708c58808a7a42928b Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 17 Dec 2018 07:30:05 -0300 Subject: Initial commit --- t/01-basic.t | 18 ++++++++++++++++++ t/langs/es_ES/LC_MESSAGES/test.mo | Bin 0 -> 456 bytes 2 files changed, 18 insertions(+) create mode 100644 t/01-basic.t create mode 100644 t/langs/es_ES/LC_MESSAGES/test.mo (limited to 't') diff --git a/t/01-basic.t b/t/01-basic.t new file mode 100644 index 0000000..9fada2f --- /dev/null +++ b/t/01-basic.t @@ -0,0 +1,18 @@ +use v6.c; +use Test; +use Gettext; + +constant spanish = 'es_ES.utf8'; +constant english = 'en_US.utf8'; +constant text-domain = 'test'; + +ok bindtextdomain(text-domain, 't/langs/'); +ok textdomain(text-domain); + +setlocale(Gettext::LocaleCategory::LcAll, spanish); +is _('Hello, world!'), 'Hola, mundo!'; + +setlocale(Gettext::LocaleCategory::LcAll, english); +is _('Hello, world!'), 'Hello, world!'; + +done-testing; diff --git a/t/langs/es_ES/LC_MESSAGES/test.mo b/t/langs/es_ES/LC_MESSAGES/test.mo new file mode 100644 index 0000000..0f817fc Binary files /dev/null and b/t/langs/es_ES/LC_MESSAGES/test.mo differ -- cgit v1.2.3-70-g09d2