aboutsummaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
Diffstat (limited to 'po')
-rw-r--r--po/CMakeLists.txt133
-rw-r--r--po/it.po32
2 files changed, 148 insertions, 17 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 00000000..cd930077
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,133 @@
+# Most of this copied from the repository of Stellarium
+# http://sourceforge.net/projects/stellarium/
+
+# Special targets for translations:
+#
+# translations
+# Converts all PO files to GMO files. Note that it does *not* update
+# the PO files or the PO templates -- in fact, these files are never
+# updated automatically.
+#
+# generate-pot
+# Re-creates all POT files unconditionally.
+#
+# update-po
+# Updates all PO files unconditionally. Note that it takes care of
+# updating the POT files.
+#
+# translations-<DOMAIN>
+# generate-pot-<DOMAIN>
+# update-po-<DOMAIN>
+# Same as above, but only affect the files in the corresponding
+# po/<DOMAIN> directory. (DOMAIN is actually the base name of the POT
+# file in the subdirectory, but that should match the directory name
+# anyway.)
+
+ADD_CUSTOM_TARGET(translations)
+ADD_CUSTOM_TARGET(generate-pot)
+ADD_CUSTOM_TARGET(update-po)
+
+# GETTEXT_CREATE_TRANSLATIONS(domain [DEFAULT_TARGET] lang1 ... langN)
+#
+# Creates custom build rules to create and install (G)MO files for the
+# specified languages. If the DEFAULT_TARGET option is used, the
+# translations will also be created when building the default target.
+#
+# "domain" is the translation domain, eg. "gawk". A POT file
+# with the name ${domain}.pot must exist in the directory of the
+# CMakeLists.txt file invoking the macro.
+#
+# This macro also creates the "translations-${domain}" and
+# "update-po-${domain}" targets (see above for an explanation).
+#
+MACRO(GETTEXT_CREATE_TRANSLATIONS _domain _firstLang)
+
+ SET(_gmoFiles)
+ GET_FILENAME_COMPONENT(_absPotFile ${_domain}.pot ABSOLUTE)
+
+ # Update these PO files when building the "update-po-<DOMAIN>" and
+ # "update-po" targets.
+ ADD_CUSTOM_TARGET(update-po-${_domain})
+ ADD_DEPENDENCIES(update-po update-po-${_domain})
+
+ # Make sure the POT file is updated before updating the PO files.
+ ADD_DEPENDENCIES(update-po-${_domain} generate-pot-${_domain})
+
+ SET(_addToAll)
+ IF(${_firstLang} STREQUAL "DEFAULT_TARGET")
+ SET(_addToAll "ALL")
+ SET(_firstLang)
+ ENDIF(${_firstLang} STREQUAL "DEFAULT_TARGET")
+
+ FOREACH (_lang ${ARGN})
+ GET_FILENAME_COMPONENT(_absFile ${_lang}.po ABSOLUTE)
+ FILE(RELATIVE_PATH _relFile ${PROJECT_SOURCE_DIR} ${_absFile})
+ SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
+
+ # Convert a PO file into a GMO file.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_gmoFile}
+ COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
+ DEPENDS ${_absFile}
+ )
+
+ # Update the PO file unconditionally when building the
+ # "update-po-<DOMAIN>" target. Note that to see the file being
+ # processed, we have to run "cmake -E echo", because the
+ # COMMENT is not displayed by cmake...
+ ADD_CUSTOM_COMMAND(
+ TARGET update-po-${_domain}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo "** Updating ${_relFile}"
+ COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE}
+ --quiet --update -m --backup=none -s
+ ${_absFile} ${_absPotFile}
+ VERBATIM
+ )
+
+ INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_domain}.mo)
+ SET(_gmoFiles ${_gmoFiles} ${_gmoFile})
+
+ ENDFOREACH (_lang)
+
+ # Create the GMO files when building the "translations-<DOMAIN>" and
+ # "translations" targets.
+ ADD_CUSTOM_TARGET(translations-${_domain} ${_addToAll} DEPENDS ${_gmoFiles})
+ ADD_DEPENDENCIES(translations translations-${_domain})
+
+ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
+
+SET(gawk_DOMAIN gawk)
+SET(gawk_POT ${gawk_DOMAIN}.pot)
+
+file(READ LINGUAS linguas)
+string(REGEX REPLACE "\n" ";" linguas ${linguas})
+GETTEXT_CREATE_TRANSLATIONS(${gawk_DOMAIN} DEFAULT_TARGET ${linguas})
+
+ADD_CUSTOM_TARGET(
+ generate-pot-${gawk_DOMAIN}
+ ${GETTEXT_XGETTEXT_EXECUTABLE}
+ -o ${CMAKE_CURRENT_SOURCE_DIR}/${gawk_POT}
+ -C
+ --keyword=_
+ --keyword=N_
+ --keyword=q_
+ --keyword=translate:2
+ --add-comments=TRANSLATORS:
+ --directory=${CMAKE_BINARY_DIR}
+ --directory=${CMAKE_SOURCE_DIR}
+ --output-dir=${CMAKE_BINARY_DIR}
+ --files-from=${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
+ --copyright-holder=FSF
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMENT "Generating ${gawk_POT}"
+ VERBATIM
+)
+# TODO: It would be nice to just depend on the exact files in POTFILES.in
+#file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${gawk_POT} UiHeaders)
+#ADD_DEPENDENCIES(generate-pot-${gawk_DOMAIN} UiHeaders)
+#ADD_DEPENDENCIES(generate-pot-${gawk_DOMAIN} gawk_UIS_H)
+# Make sure the UI headers are created first.
+ADD_DEPENDENCIES(generate-pot-${gawk_DOMAIN} StelGuiLib) # ??? FIXME
+# Generate this POT file when building the "generate-pot" target.
+ADD_DEPENDENCIES(generate-pot generate-pot-${gawk_DOMAIN})
diff --git a/po/it.po b/po/it.po
index 68f2d7f0..a5578723 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,5 +1,5 @@
# Italian messages for GNU Awk
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Antonio Colombo <azc100@gmail.com>.
#
msgid ""
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: GNU Awk 4.0.73, API: 0.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
"POT-Creation-Date: 2014-04-08 19:23+0300\n"
-"PO-Revision-Date: 2014-01-15 10:39+0100\n"
+"PO-Revision-Date: 2014-06-14 17:50+0100\n"
"Last-Translator: Antonio Colombo <azc100@gmail.com>\n"
"Language-Team: Italian <it@li.org>\n"
"Language: it\n"
@@ -211,7 +211,7 @@ msgstr "`getline' invalida all'interno della regola `%s'"
#: awkgram.y:1425
msgid "non-redirected `getline' undefined inside END action"
-msgstr "`getline' non re-diretta indefinita dentro `azione' END"
+msgstr "`getline' non ri-diretta indefinita dentro `azione' END"
#: awkgram.y:1444
msgid "old awk does not support multidimensional arrays"
@@ -1141,7 +1141,7 @@ msgstr ""
#: command.y:855
msgid "list [-|+|[filename:]lineno|function|range] - list specified line(s)."
msgstr ""
-"list [-|+|[nome-file:]num_linea|funzione|intervallo] - elenca riga/he "
+"list [-|+|[nome-file:]num_riga|funzione|intervallo] - elenca riga/he "
"richiesta/e."
#: command.y:857
@@ -1229,7 +1229,7 @@ msgid ""
"line or line N within current frame."
msgstr ""
"until [[nome-file:]N|funzione] - esegui finché il programma arriva una "
-"rigadifferente, o alla riga N nell'elemento di stack corrente."
+"riga differente, o alla riga N nell'elemento di stack corrente."
#: command.y:895
msgid "unwatch [N] - remove variable(s) from watch list."
@@ -2615,23 +2615,23 @@ msgstr "chiusura di fd %d (`%s') non riuscita (%s)"
#: io.c:716
msgid "redirection not allowed in sandbox mode"
-msgstr "re-direzione non consentita in modo `sandbox'"
+msgstr "ri-direzione non consentita in modo `sandbox'"
#: io.c:750
#, c-format
msgid "expression in `%s' redirection only has numeric value"
-msgstr "espressione nella re-direzione `%s' ha solo un valore numerico"
+msgstr "espressione nella ri-direzione `%s' ha solo un valore numerico"
#: io.c:756
#, c-format
msgid "expression for `%s' redirection has null string value"
-msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla"
+msgstr "espressione nella ri-direzione `%s' ha per valore la stringa nulla"
#: io.c:761
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
-"nome-file `%s' per la re-direzione `%s' può essere il risultato di una "
+"nome-file `%s' per la ri-direzione `%s' può essere il risultato di una "
"espressione logica"
#: io.c:809
@@ -2658,12 +2658,12 @@ msgstr ""
#: io.c:986
#, c-format
msgid "can't redirect from `%s' (%s)"
-msgstr "non riesco a re-dirigere da `%s' (%s)"
+msgstr "non riesco a ri-dirigere da `%s' (%s)"
#: io.c:989
#, c-format
msgid "can't redirect to `%s' (%s)"
-msgstr "non riesco a re-dirigere a `%s' (%s)"
+msgstr "non riesco a ri-dirigere a `%s' (%s)"
#: io.c:1040
msgid ""
@@ -2692,12 +2692,12 @@ msgstr "close: `%.*s' non è un file aperto, una `pipe' o un co-processo"
#: io.c:1108
msgid "close of redirection that was never opened"
-msgstr "chiusura di una re-direzione mai aperta"
+msgstr "chiusura di una ri-direzione mai aperta"
#: io.c:1205
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
-msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento"
+msgstr "close: ri-direzione `%s' non aperta con `|&', ignoro secondo argomento"
#: io.c:1222
#, c-format
@@ -3313,7 +3313,7 @@ msgstr "%s: argomento #%d con valore negativo %Zd, darà risultati strani"
#: msg.c:68
#, c-format
msgid "cmd. line:"
-msgstr "linea com.:"
+msgstr "riga com.:"
#: node.c:421
msgid "backslash at end of string"
@@ -3427,7 +3427,7 @@ msgstr ""
#: profile.c:1513
#, c-format
msgid "redir2str: unknown redirection type %d"
-msgstr "redir2str: tipo di re-direzione non noto %d"
+msgstr "redir2str: tipo di ri-direzione non noto %d"
#: re.c:607
#, c-format
@@ -3503,5 +3503,3 @@ msgstr "Nessuna espressione regolare precedente"
msgid "can not pop main context"
msgstr "non posso salire più in alto nello stack"
-#~ msgid "range of the form `[%c-%c]' is locale dependent"
-#~ msgstr "intervallo della forma `[%c-%c]' dipende da `locale'"