From ac887cf468d8d067ada725cb0344aa9f9e460431 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Tue, 6 Apr 2010 21:52:29 +0000 Subject: [PATCH] Add a damn header to the .pot file --- src/CMakeLists.txt | 6 ++++-- src/translations/header | 10 ++++++++++ src/translations/translations.pot | 10 ++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 src/translations/header diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11afe38da..7b0f10152 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -237,8 +237,9 @@ add_custom_target(pot ALL COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} ${XGETTEXT_OPTIONS} -C --omit-header --directory=${CMAKE_CURRENT_SOURCE_DIR} - --output=${CLEMENTINE-POT} + --output=${CMAKE_CURRENT_BINARY_DIR}/translations.pot ${FILES_TO_TRANSLATE_REL} + COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/translations/header ${CMAKE_CURRENT_BINARY_DIR}/translations.pot > ${CLEMENTINE-POT} DEPENDS ${FILES_TO_TRANSLATE}) # Merge the .pot into .po files @@ -246,7 +247,8 @@ foreach (_lang ${CLEMENTINE-LANGUAGES}) set(_po ${CMAKE_CURRENT_SOURCE_DIR}/translations/${_lang}.po) add_custom_target("po_${_lang}" ALL COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet -U ${_po} ${CLEMENTINE-POT} - DEPENDS ${_po} ${CLEMENTINE-POT}) + DEPENDS ${_po}) + add_dependencies("po_${_lang}" pot) endforeach (_lang) # Convert the .po files to .qm files diff --git a/src/translations/header b/src/translations/header new file mode 100644 index 000000000..1ffbe1f12 --- /dev/null +++ b/src/translations/header @@ -0,0 +1,10 @@ +# Clementine. +# Copyright (C) 2010 David Sansome +# This file is distributed under the same license as the Clementine package. +# David Sansome , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Content-Type: text/plain; charset=utf-8\n" + diff --git a/src/translations/translations.pot b/src/translations/translations.pot index 5b05c732e..48ba2c577 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -1,3 +1,13 @@ +# Clementine. +# Copyright (C) 2010 David Sansome +# This file is distributed under the same license as the Clementine package. +# David Sansome , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Content-Type: text/plain; charset=utf-8\n" + #: mainwindow.cpp:274 msgid "Configure library..." msgstr ""