Skip to content

Commit

Permalink
Extract translatable strings for planetary features into separate tem…
Browse files Browse the repository at this point in the history
…plate
  • Loading branch information
alex-w committed Oct 5, 2017
1 parent 38d3f67 commit 748f20b
Show file tree
Hide file tree
Showing 7 changed files with 76,405 additions and 3 deletions.
1 change: 1 addition & 0 deletions po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )

ADD_SUBDIRECTORY(stellarium)
ADD_SUBDIRECTORY(stellarium-skycultures)
ADD_SUBDIRECTORY(stellarium-planetary-features)
IF(USE_PLUGIN_REMOTECONTROL)
ADD_SUBDIRECTORY(stellarium-remotecontrol)
ENDIF()
27 changes: 27 additions & 0 deletions po/stellarium-planetary-features/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FILE(GLOB poscfiles RELATIVE "${CMAKE_SOURCE_DIR}/po/stellarium-planetary-features/" "*.po")
LIST(SORT poscfiles)
STRING(REGEX REPLACE ".po" "" outposcfiles "${poscfiles}")

GETTEXT_CREATE_TRANSLATIONS(stellarium-planetary-features DEFAULT_TARGET ${outposcfiles})

# Discard this target if xgettext is not installed
IF(${XGETTEXT_FOUND})
ADD_CUSTOM_TARGET(
generate-pot-stellarium-planetary-features
${GETTEXT_XGETTEXT_EXECUTABLE}
-o stellarium-planetary-features.pot
--keyword=_:1,2c
--language=Python
--add-comments=TRANSLATORS:
--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-planetary-features.pot"
VERBATIM
)

# Generate this POT file when building the "generate-pot" target.
ADD_DEPENDENCIES(generate-pot generate-pot-stellarium-planetary-features)
ENDIF()
2 changes: 2 additions & 0 deletions po/stellarium-planetary-features/POTFILES.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Proper names of planetary features
data/nomenclature.fab
Loading

0 comments on commit 748f20b

Please sign in to comment.