davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/packagekit.git/commit/?id=ce300dd079e2069feda8f7c443d446694f640240

commit ce300dd079e2069feda8f7c443d446694f640240
Author: davemds <d...@gurumeditation.it>
Date:   Sun Nov 3 15:04:06 2013 +0100

    Make translations works
---
 .gitignore       | 50 ++++++++++++++++++++++++++++++++
 Makefile.am      | 10 +++----
 configure.ac     | 16 +++++------
 po/Makevars      | 41 ++++++++++++++++++++++++++
 po/it.po         | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/e_mod_main.c |  6 +++-
 6 files changed, 197 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..29251f8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,50 @@
+po/*.gmo
+po/Makefile
+po/Makefile.in
+po/Makefile.in.in
+po/Makevars.template
+po/POTFILES
+po/Rules-quot
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
+po/insert-header.sin
+po/*.pot
+po/quot.sed
+po/remove-potcdate.sed
+po/remove-potcdate.sin
+po/stamp-po
+m4/codeset.m4
+m4/gettext.m4
+m4/glibc21.m4
+m4/iconv.m4
+m4/intdiv0.m4
+m4/intmax.m4
+m4/inttypes-pri.m4
+m4/inttypes.m4
+m4/inttypes_h.m4
+m4/isc-posix.m4
+m4/lcmessage.m4
+m4/lib-ld.m4
+m4/lib-link.m4
+m4/lib-prefix.m4
+m4/libtool.m4
+m4/longdouble.m4
+m4/longlong.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
+m4/nls.m4
+m4/po.m4
+m4/printf-posix.m4
+m4/progtest.m4
+m4/signed.m4
+m4/size_max.m4
+m4/stdint_h.m4
+m4/uintmax_t.m4
+m4/ulonglong.m4
+m4/wchar_t.m4
+m4/wint_t.m4
+m4/xsize.m4
+
diff --git a/Makefile.am b/Makefile.am
index 4daa3a3..351b744 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,11 +6,11 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess 
config.h.in \
 
 SUBDIRS = src
 
-# if HAVE_PO
+if HAVE_PO
 
-# SUBDIRS += po
+SUBDIRS += po
 
-# endif
+endif
 
 EDJE_FLAGS = -v \
              -id $(top_srcdir)/images
@@ -19,14 +19,14 @@ filesdir = $(datadir)
 files_DATA = module.desktop e-module-packagekit.edj
 
 EXTRA_DIST = module.desktop.in \
-             e_modules-packagekit.spec \
+             e_modules-packagekit.spec.in \
              e-module-packagekit.edc
 
 %.edj:  %.edc
        $(EDJE_CC) $(EDJE_FLAGS) $< $@
 
 clean-local:
-        rm -rf e-module-packagekit.edj module.desktop e_modules-scale.spec *~
+        rm -rf e-module-packagekit.edj module.desktop 
e_modules-packagekit.spec *~
 
 uninstall:
         rm -rf $(DESTDIR)$(datadir)
diff --git a/configure.ac b/configure.ac
index aae67e0..3b156f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,8 +11,8 @@ AC_CANONICAL_HOST
 AC_ISC_POSIX
 
 AM_INIT_AUTOMAKE(1.8)
-AC_CONFIG_HEADERS(config.h)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_CONFIG_HEADERS(config.h)
 
 AC_PROG_CC
 AC_HEADER_STDC
@@ -27,13 +27,13 @@ m4_ifdef([AM_GNU_GETTEXT_VERSION], [
 AM_GNU_GETTEXT_VERSION([0.14])
 ])
 
-# m4_ifdef([AM_GNU_GETTEXT], [
-# AM_GNU_GETTEXT([external])
-# po_makefile_in=po/Makefile.in
-# AM_CONDITIONAL([HAVE_PO], [true])
-# ],[
-# AM_CONDITIONAL([HAVE_PO], [false])
-# ])
+m4_ifdef([AM_GNU_GETTEXT], [
+AM_GNU_GETTEXT([external])
+po_makefile_in=po/Makefile.in
+AM_CONDITIONAL([HAVE_PO], [true])
+],[
+AM_CONDITIONAL([HAVE_PO], [false])
+])
 AC_SUBST(LTLIBINTL)
 
 PKG_CHECK_MODULES(E, [enlightenment])
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..9275c25
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=N_ --keyword=D_ --from-code=UTF-8 --foreign-user
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Enlightenment development team
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = enlightenment-devel@lists.sourceforge.net
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..dcd3568
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,88 @@
+# Italian translations for packagekit package
+# Traduzioni italiane per il pacchetto packagekit..
+# Copyright (C) 2013 Enlightenment development team
+# This file is distributed under the same license as the packagekit package.
+# Dave <d...@gurumeditation.it>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: packagekit 0.0.1\n"
+"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2013-11-03 13:05+0100\n"
+"PO-Revision-Date: 2013-11-03 13:08+0100\n"
+"Last-Translator: Dave <d...@gurumeditation.it>\n"
+"Language-Team: Italian\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/e_mod_main.c:48
+msgid "Refresh Packages"
+msgstr "Aggiorna catalogo"
+
+#: src/e_mod_main.c:50
+msgid "Never"
+msgstr "Mai"
+
+#: src/e_mod_main.c:52
+msgid "Hourly"
+msgstr "Ogni ora"
+
+#: src/e_mod_main.c:54
+msgid "Daily"
+msgstr "Ogni giorno"
+
+#: src/e_mod_main.c:56
+msgid "Weekly"
+msgstr "Ogni settimana"
+
+#: src/e_mod_main.c:60
+msgid "Package Manager"
+msgstr "Gestore pacchetti"
+
+#: src/e_mod_main.c:113
+msgid "System Updates Settings"
+msgstr "Impostazione aggiornamenti"
+
+#: src/e_mod_main.c:147
+msgid "Settings"
+msgstr "Impostazioni"
+
+#: src/e_mod_main.c:213
+msgid "System Updates"
+msgstr "Aggiornamenti di sistema"
+
+#: src/e_mod_packagekit.c:35
+msgid "No package manager configured"
+msgstr "Gestore aggiornamenti non configurato"
+
+#: src/e_mod_packagekit.c:36
+msgid ""
+"You need to set your preferred package manager.<br>Please open the module "
+"configuration and set<br>the program to run.<br>"
+msgstr ""
+"Devi settare il tuo gestore di aggiornamenti.<br>Puoi configurare il tuo "
+"gestore preferito<br>dalla configurazione di questo modulo."
+
+#: src/e_mod_packagekit.c:86
+msgid "One update available"
+msgstr "Un aggiornamento disponibile"
+
+#: src/e_mod_packagekit.c:88
+#, c-format
+msgid "%d updates available"
+msgstr "%d aggiornamenti disponibili"
+
+#: src/e_mod_packagekit.c:90
+msgid "Your system is updated"
+msgstr "Il tuo sistema รจ aggiornato"
+
+#: src/e_mod_packagekit.c:118
+msgid "Update packages cache"
+msgstr "Aggiorna catalogo pacchetti"
+
+#: src/e_mod_packagekit.c:121
+msgid "Run the package manager"
+msgstr "Avvia il gestore di pacchetti"
diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index f1cd3ae..c2eed80 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -271,11 +271,15 @@ _timer_cb(void *data)
 EAPI void *
 e_modapi_init(E_Module *m)
 {
+   char buf[PATH_MAX];
    E_PackageKit_Module_Context *ctxt;
 
    ctxt = E_NEW(E_PackageKit_Module_Context, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ctxt, NULL);
-   
+
+   snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m));
+   bindtextdomain(PACKAGE, buf);
+   bind_textdomain_codeset(PACKAGE, "UTF-8");
 
    ctxt->conf_edd = E_CONFIG_DD_NEW("packagekit_config", PackageKit_Config);
    #undef T

-- 


Reply via email to