Skip to content

Commit

Permalink
Now use Qt translation system instead of Gettext.
Browse files Browse the repository at this point in the history
This allowed to get rid of the gettext runtime dependency, although gettext tools are still used to generate .pot/.po files along with lauchpad translation feature.
Got also rid of the dirent library dependency (was used to list available translations).
  • Loading branch information
xalioth committed Aug 30, 2013
1 parent d2ff1d4 commit 62a7655
Show file tree
Hide file tree
Showing 48 changed files with 243 additions and 418 deletions.
26 changes: 5 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ SET(GCC_VERSION "${GCC_MAJOR}.${GCC_MINOR}")
IF(UNIX AND NOT WIN32)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter") # additional C compile flags
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter") # additional CPP compile flags
ELSEIF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexceptions -fident -mthreads")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wsign-promo -fexceptions -fident -mthreads")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wsign-promo -fexceptions -fident -mthreads -mwindows") # --large-address-aware --enable-runtime-pseudo-reloc --verbose
ELSEIF ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fexceptions -fident -mthreads")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wsign-promo -fexceptions -fident -mthreads")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wsign-promo -fexceptions -fident -mthreads -mwindows") # --enable-runtime-pseudo-reloc --verbose
Expand Down Expand Up @@ -145,7 +145,7 @@ IF(HAVE_POW10)
ENDIF()

########### Others ###########
# Activate translation with gettext
# Activate translation
SET(ENABLE_NLS 1 CACHE BOOL "Define whether program translation should be supported.")
IF(ENABLE_NLS)
ADD_DEFINITIONS(-DENABLE_NLS)
Expand Down Expand Up @@ -245,15 +245,15 @@ ADD_CUSTOM_TARGET(AllStaticPlugins ALL)
FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
#FIND_PACKAGE(Qt5OpenGL REQUIRED)
FIND_PACKAGE(Qt5OpenGL REQUIRED)
FIND_PACKAGE(Qt5Network REQUIRED)
FIND_PACKAGE(Qt5Script REQUIRED)
FIND_PACKAGE(Qt5Declarative REQUIRED)

INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
#INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Script_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Declarative_INCLUDE_DIRS})
Expand All @@ -280,22 +280,6 @@ STRING(REPLACE "-lGLU " "" QT_LIBRARIES "${QT_LIBRARIES}")

FIND_PACKAGE(ZLIB)

IF(ENABLE_NLS)
FIND_PACKAGE(Iconv REQUIRED)
FIND_PATH(INTL_INCLUDE_DIR libintl.h
PATHS
/usr/include
/sw/include
/usr/local/include)
FIND_LIBRARY(INTL_LIBRARIES intl c
PATHS
/usr/lib/
/sw/lib
/usr/local/lib) # NO_DEFAULT_PATH
FIND_PACKAGE(Gettext REQUIRED)
FIND_PACKAGE(XGettext REQUIRED)
ENDIF()

########### Set some global variables ###########
IF(UNIX AND NOT WIN32)
IF(APPLE)
Expand Down
1 change: 1 addition & 0 deletions plugins/AngleMeasure/src/AngleMeasure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/

#include "StelUtils.hpp"
#include "StelProjector.hpp"
#include "StelPainter.hpp"
#include "StelApp.hpp"
Expand Down
2 changes: 1 addition & 1 deletion plugins/AngleMeasure/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SET(AngleMeasure_SRCS
SET(AngleMeasure_RES ../AngleMeasure.qrc)
QT5_ADD_RESOURCES(AngleMeasure_RES_CXX ${AngleMeasure_RES})
#
SET(extLinkerOption ${QT_LIBRARIES} ${FreeType2_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${FreeType2_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/CompassMarks/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SET(CompassMarks_RES ../CompassMarks.qrc)
QT5_ADD_RESOURCES(CompassMarks_RES_CXX ${CompassMarks_RES})


SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Exoplanets/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ QT5_WRAP_UI(ExoplanetsDialog_UIS_H ${ExoplanetsDialog_UIS})
SET(Exoplanets_RES ../resources/Exoplanets.qrc)
QT5_ADD_RESOURCES(Exoplanets_RES_CXX ${Exoplanets_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Exoplanets/src/Exoplanet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ float Exoplanet::getSelectPriority(const StelCore* core) const
QString Exoplanet::getNameI18n(void) const
{
// Use SkyTranslator for translation star names
StelTranslator trans = StelApp::getInstance().getLocaleMgr().getSkyTranslator();
const StelTranslator& trans = StelApp::getInstance().getLocaleMgr().getSkyTranslator();
return trans.qtranslate(designation);
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/Observability/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SET(Observability_RES ../Observability.qrc)
QT5_ADD_RESOURCES(Observability_RES_CXX ${Observability_RES})


SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

IF(BUILD_DYNAMIC_PLUGINS)
ADD_LIBRARY(Observability MODULE ${Observability_SRCS} ${Observability_RES_CXX} ${ObservabilityDialog_UIS_H})
Expand Down
2 changes: 1 addition & 1 deletion plugins/Observability/src/Observability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ void Observability::draw(StelCore* core)
double currH = HourAngle(mylat,alti,selDec);
horizH = HourAngle(mylat,RefracHoriz,selDec);
QString RS1, RS2, Cul; // strings with Rise/Set/Culmination times
double Rise, Set; // Actual Rise/Set times (in GMT).
double Rise=0, Set=0; // Actual Rise/Set times (in GMT).
int d1,m1,s1,d2,m2,s2,dc,mc,sc; // Integers for the time spans in hh:mm:ss.
bool solvedMoon = false; // Check if solutions were found for Sun, Moon, or planet.
bool transit = false; // Is the source above the horizon? Did it culminate?
Expand Down
2 changes: 1 addition & 1 deletion plugins/Oculars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ QT5_WRAP_UI(Oculars_UIS_H ${Oculars_UIS})

INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})

SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Pulsars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ QT5_WRAP_UI(PulsarsDialog_UIS_H ${PulsarsDialog_UIS})
SET(Pulsars_RES ../resources/Pulsars.qrc)
QT5_ADD_RESOURCES(Pulsars_RES_CXX ${Pulsars_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Quasars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ QT5_WRAP_UI(QuasarsDialog_UIS_H ${QuasarsDialog_UIS})
SET(Quasars_RES ../resources/Quasars.qrc)
QT5_ADD_RESOURCES(Quasars_RES_CXX ${Quasars_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/Satellites/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ QT5_WRAP_UI(SatellitesDialog_UIS_H ${SatellitesDialog_UIS})
SET(Satellites_RES ../resources/Satellites.qrc)
QT5_ADD_RESOURCES(Satellites_RES_CXX ${Satellites_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/SolarSystemEditor/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SET(SolarSystemEditor_UIS
QT5_WRAP_UI(SolarSystemEditor_UIS_H ${SolarSystemEditor_UIS})


SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

#Dynamic library
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
1 change: 1 addition & 0 deletions plugins/SolarSystemEditor/src/SolarSystemEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "SolarSystemEditor.hpp"
#include "SolarSystemManagerWindow.hpp"

#include "StelUtils.hpp"
#include "StelApp.hpp"
#include "StelGui.hpp"
#include "StelGuiItems.hpp"
Expand Down
2 changes: 1 addition & 1 deletion plugins/Supernovae/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ QT5_WRAP_UI(SupernovaeDialog_UIS_H ${SupernovaeDialog_UIS})
SET(Supernovae_RES ../resources/Supernovae.qrc)
QT5_ADD_RESOURCES(Supernovae_RES_CXX ${Supernovae_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/TelescopeControl/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ QT5_WRAP_UI(TelescopeControl_UIS_H ${TelescopeControl_UIS})
SET(TelescopeControl_RES ../resources/TelescopeControl.qrc)
QT5_ADD_RESOURCES(TelescopeControl_RES_CXX ${TelescopeControl_RES})

SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
1 change: 1 addition & 0 deletions plugins/TelescopeControl/src/TelescopeControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/

#include "StelUtils.hpp"
#include "TelescopeControl.hpp"
#include "TelescopeClient.hpp"
#include "TelescopeDialog.hpp"
Expand Down
2 changes: 1 addition & 1 deletion plugins/TextUserInterface/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SET(TextUserInterface_SRCS
TextUserInterface.hpp
TextUserInterface.cpp)

SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
2 changes: 1 addition & 1 deletion plugins/TextUserInterface/src/TextUserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void TextUserInterface::init()
TuiNode* m3_2 = new TuiNodeEnum(N_("Language"),
this,
SLOT(setAppLanguage(QString)),
StelTranslator::globalTranslator.getAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()),
StelTranslator::globalTranslator->getAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()),
StelTranslator::iso639_1CodeToNativeName(localeMgr.getAppLanguage()),
m3, m3_1);
m3_1->setNextNode(m3_2);
Expand Down
2 changes: 1 addition & 1 deletion plugins/TimeZoneConfiguration/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SET(TimeZoneConfiguration_UIS

QT5_WRAP_UI(TimeZoneConfiguration_UIS_H ${TimeZoneConfiguration_UIS})

SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${ICONV_LIBRARIES} ${INTL_LIBRARIES})
SET(extLinkerOption ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

#Dynamic library
IF(BUILD_DYNAMIC_PLUGINS)
Expand Down
60 changes: 37 additions & 23 deletions po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@
# anyway.)

ADD_CUSTOM_TARGET(translations)
ADD_CUSTOM_TARGET(generate-pot)
ADD_CUSTOM_TARGET(update-po)

FIND_PACKAGE(Qt5LinguistTools)
# These packages are now used only to generate .pot and .po files
FIND_PACKAGE(Gettext)
FIND_PACKAGE(XGettext)

IF(${XGETTEXT_FOUND})
ADD_CUSTOM_TARGET(generate-pot)
ENDIF()

IF(${GETTEXT_FOUND})
ADD_CUSTOM_TARGET(update-po)
ENDIF()

FIND_PACKAGE(Qt5LinguistTools REQUIRED)
GET_TARGET_PROPERTY(lupdate_executable Qt5::lupdate IMPORTED_LOCATION)
GET_FILENAME_COMPONENT(qtbindirectory ${lupdate_executable} PATH)
SET(lconvert_executable "${qtbindirectory}/lconvert")
Expand Down Expand Up @@ -52,13 +62,15 @@ 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})
IF(${GETTEXT_FOUND})
# 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})
# Make sure the POT file is updated before updating the PO files.
ADD_DEPENDENCIES(update-po-${_domain} generate-pot-${_domain})
ENDIF()

SET(_addToAll)
IF(${_firstLang} STREQUAL "DEFAULT_TARGET")
Expand All @@ -78,26 +90,28 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _domain _firstLang)
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
)
IF(${GETTEXT_MSGMERGE_EXECUTABLE})
# 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
)
ENDIF()

INSTALL(FILES ${_gmoFile} DESTINATION share/${PACKAGE}/translations/${_domain}/)
SET(_gmoFiles ${_gmoFiles} ${_gmoFile})

ENDFOREACH (_lang)

# Create the GMO files when building the "translations-<DOMAIN>" and
# Create the .qm files when building the "translations-<DOMAIN>" and
# "translations" targets.
ADD_CUSTOM_TARGET(translations-${_domain} ${_addToAll} DEPENDS ${_gmoFiles})
ADD_DEPENDENCIES(translations translations-${_domain})
Expand Down
43 changes: 21 additions & 22 deletions po/stellarium-skycultures/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
SET(skycultures_DOMAIN stellarium-skycultures)
SET(skycultures_POT ${skycultures_DOMAIN}.pot)

GETTEXT_CREATE_TRANSLATIONS(${skycultures_DOMAIN} DEFAULT_TARGET
GETTEXT_CREATE_TRANSLATIONS(stellarium-skycultures DEFAULT_TARGET
aa ab ae af ak am an ar as ast av az ba be bg bh bi bn bo br bs ca ce ckb cs cv cy da de dv el en en_AU en_CA en_GB en_US eo es et eu fa fi fil fj fr ga gd gl gn gu haw he hi hr hrx ht hu hy ia id is it ja ka kg kk kn ko ky la lb lo lt lv mi mk ml mn mo mr ms mt nan nb nl nn oc os pa pl pt pt_BR ro ru sah se si sk sl sm sq sr su sv sw ta te tg th tl tr tt uk uz vi zh_CN zh_HK zh_TW zu
)

ADD_CUSTOM_TARGET(
generate-pot-${skycultures_DOMAIN}
${GETTEXT_XGETTEXT_EXECUTABLE}
-o ${skycultures_POT}
--keyword=_
-C
--directory=${PROJECT_SOURCE_DIR}
--files-from=POTFILES.in
--copyright-holder=Stellarium's\ team
--from-code=utf-8
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating ${skycultures_POT}"
VERBATIM
)

# Generate this POT file when building the "generate-pot" target.
ADD_DEPENDENCIES(generate-pot generate-pot-${skycultures_DOMAIN})

# Discard this target if xgettext is not installed
IF(${XGETTEXT_FOUND})
ADD_CUSTOM_TARGET(
generate-pot-stellarium-skycultures
${GETTEXT_XGETTEXT_EXECUTABLE}
-o stellarium-skycultures.pot
--keyword=_
-C
--directory=${PROJECT_SOURCE_DIR}
--files-from=POTFILES.in
--copyright-holder=Stellarium's\ team
--from-code=utf-8
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating stellarium-skycultures.pot"
VERBATIM
)

# Generate this POT file when building the "generate-pot" target.
ADD_DEPENDENCIES(generate-pot generate-pot-stellarium-skycultures)
ENDIF()
Loading

0 comments on commit 62a7655

Please sign in to comment.