From d9eb394116c6c909219592280551c92fda196107 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 21 Jan 2021 19:03:37 -0300 Subject: [PATCH] Building translation file. --- .gitignore | 1 + Makefile.in | 19 ++++++++++++++++--- configure.ac | 9 +++++++++ locale/Makefile.in | 6 +++--- locale/libhllapi.pot | 46 ---------------------------------------------- locale/pt_BR.po | 30 ++++++++++++++++-------------- 6 files changed, 45 insertions(+), 66 deletions(-) delete mode 100644 locale/libhllapi.pot diff --git a/.gitignore b/.gitignore index d967a26..4897c74 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ doxygen/rtf *.exp *.lib metainfo.xml +*.pot diff --git a/Makefile.in b/Makefile.in index b45204c..dc1b467 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,6 +29,7 @@ LIBNAME=libhllapi SONAME=@SONAME@ PRODUCT_NAME=@PRODUCT_NAME@ +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ SOURCES= \ $(wildcard src/core/*.cc) \ @@ -38,7 +39,7 @@ SOURCES= \ TEST_SOURCES= \ $(wildcard src/testprogram/*.cc) -INSTALL_PACKAGES=@INSTALL_PACKAGES@ +INSTALL_PACKAGES=@INSTALL_PACKAGES@ locale #---[ Tools ]---------------------------------------------------------------------------- @@ -203,11 +204,11 @@ $(POTDIR)/$(LIBNAME).pot: \ @$(MSGCAT) --sort-output $^ > $@ locale: \ - locale/$(LIBNAME).pot + locale/$(GETTEXT_PACKAGE).pot @$(MAKE) -C locale all -locale/$(LIBNAME).pot: \ +locale/$(GETTEXT_PACKAGE).pot: \ $(POTDIR)/$(LIBNAME).pot @rm -f $@ @@ -282,6 +283,18 @@ install-windows-lib: \ $(BINRLS)/$(LIBNAME).def \ $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def +install-locale: \ + locale/$(GETTEXT_PACKAGE).pot + + @$(MAKE) -C locale DESTDIR=$(DESTDIR) install + + @$(MKDIR) \ + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/pot + + @$(INSTALL_DATA) \ + locale/$(GETTEXT_PACKAGE).pot \ + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/pot/$(LIBNAME).pot + doc: @$(DOXYGEN) ./doxygen/doxyfile diff --git a/configure.ac b/configure.ac index 54b00c4..8078c4c 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,15 @@ if test "$app_cv_pic" == "yes"; then fi dnl --------------------------------------------------------------------------- +dnl Set translation domain. +dnl --------------------------------------------------------------------------- + +app_cv_gettext_package="libhllapi-$app_vrs_major.$app_vrs_minor" + +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$app_cv_gettext_package") +AC_SUBST(GETTEXT_PACKAGE,"$app_cv_gettext_package") + +dnl --------------------------------------------------------------------------- dnl Configure which files to generate. dnl --------------------------------------------------------------------------- diff --git a/locale/Makefile.in b/locale/Makefile.in index 9fffcd6..3685a5c 100644 --- a/locale/Makefile.in +++ b/locale/Makefile.in @@ -33,7 +33,7 @@ datarootdir=@datarootdir@ localedir=${datarootdir}/locale PACKAGE_NAME=@PACKAGE_NAME@ -GETTEXT_PACKAGE=@PACKAGE_NAME@ +GETTEXT_PACKAGE=@GETTEXT_PACKAGE@ PACKAGE_VERSION=@PACKAGE_VERSION@ PACKAGE_TARNAME=@PACKAGE_TARNAME@ @@ -65,7 +65,7 @@ $(BINDIR)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ @$(MKDIR) `dirname $@` @$(MSGFMT) -c -v -o $@ $^ -$(DESTDIR)/$(localedir)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ +$(DESTDIR)$(localedir)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo: \ $(BINDIR)/%/LC_MESSAGES/$(GETTEXT_PACKAGE).mo @echo $< ... @@ -78,7 +78,7 @@ all: \ $(foreach SRC, $(basename $(wildcard *.po)), $(BINDIR)/$(SRC)/LC_MESSAGES/$(GETTEXT_PACKAGE).mo) install: \ - $(foreach SRC, $(basename $(wildcard *.po)), $(DESTDIR)/$(localedir)/$(SRC)/LC_MESSAGES/$(GETTEXT_PACKAGE).mo) + $(foreach SRC, $(basename $(wildcard *.po)), $(DESTDIR)$(localedir)/$(SRC)/LC_MESSAGES/$(GETTEXT_PACKAGE).mo) diff --git a/locale/libhllapi.pot b/locale/libhllapi.pot deleted file mode 100644 index 815406e..0000000 --- a/locale/libhllapi.pot +++ /dev/null @@ -1,46 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-05 15:52-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/core/hllapi.cc:191 src/core/hllapi.cc:312 src/core/cursor.cc:41 -#: src/core/calls.cc:98 -msgid "Disconnected from host" -msgstr "" - -#: src/core/set.cc:93 src/core/set.cc:110 src/core/set.cc:128 -#: src/core/get.cc:66 src/core/get.cc:84 src/core/get.cc:89 src/core/get.cc:108 -#: src/core/get.cc:113 -msgid "Invalid parameter" -msgstr "" - -#: src/core/controller.cc:110 -msgid "Not initialized" -msgstr "" - -#: src/core/set.cc:81 src/core/keyboard.cc:56 src/core/get.cc:54 -#: src/core/cursor.cc:55 src/core/calls.cc:65 src/core/actions.cc:58 -msgid "Unexpected error" -msgstr "" - -#: src/core/calls.cc:125 -msgid "Unexpected message id" -msgstr "" - -#: src/core/calls.cc:107 -msgid "keyboard is locked" -msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 55ebce5..e8e2cf2 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-05 15:52-0300\n" +"POT-Creation-Date: 2021-01-21 18:55-0300\n" "PO-Revision-Date: 2020-02-05 15:53-0300\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" @@ -19,31 +19,36 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Gtranslator 2.91.7\n" -#: src/core/hllapi.cc:191 src/core/hllapi.cc:312 src/core/cursor.cc:41 -#: src/core/calls.cc:98 +#: src/core/hllapi.cc:201 src/core/hllapi.cc:322 src/core/calls.cc:114 msgid "Disconnected from host" msgstr "Desconectado do servidor" -#: src/core/set.cc:93 src/core/set.cc:110 src/core/set.cc:128 -#: src/core/get.cc:66 src/core/get.cc:84 src/core/get.cc:89 src/core/get.cc:108 -#: src/core/get.cc:113 +#: src/core/set.cc:70 src/core/set.cc:87 src/core/set.cc:105 src/core/get.cc:69 +#: src/core/get.cc:87 src/core/get.cc:92 src/core/get.cc:109 +#: src/core/get.cc:114 msgid "Invalid parameter" msgstr "Parâmetro inválido" -#: src/core/controller.cc:110 +#: src/core/set.cc:124 +#, fuzzy +msgid "Invalid property name" +msgstr "Sintaxe de proxy inválida" + +#: src/core/controller.cc:118 msgid "Not initialized" msgstr "Não inicializado" -#: src/core/set.cc:81 src/core/keyboard.cc:56 src/core/get.cc:54 -#: src/core/cursor.cc:55 src/core/calls.cc:65 src/core/actions.cc:58 +#: src/core/set.cc:59 src/core/keyboard.cc:53 src/core/hllapi.cc:493 +#: src/core/get.cc:57 src/core/cursor.cc:52 src/core/calls.cc:75 +#: src/core/actions.cc:53 msgid "Unexpected error" msgstr "Erro inesperado" -#: src/core/calls.cc:125 +#: src/core/calls.cc:145 msgid "Unexpected message id" msgstr "Identificador de mensagem inesperado" -#: src/core/calls.cc:107 +#: src/core/calls.cc:123 msgid "keyboard is locked" msgstr "Teclado está bloqueado" @@ -1375,9 +1380,6 @@ msgstr "Teclado está bloqueado" #~ msgid "Invalid proxy hostname syntax" #~ msgstr "Erro de sintaxe no nome do proxy" -#~ msgid "Invalid proxy syntax" -#~ msgstr "Sintaxe de proxy inválida" - #~ msgid "Invalid proxy type '%.*s'" #~ msgstr "Tipo de proxy invalido '%.*s'" -- libgit2 0.21.2