forked from Stellarium/stellarium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added translation support for strings within scripts
- Loading branch information
Showing
16 changed files
with
1,566 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FILE(GLOB poscfiles RELATIVE "${CMAKE_SOURCE_DIR}/po/stellarium-scripts/" "*.po") | ||
LIST(SORT poscfiles) | ||
STRING(REGEX REPLACE ".po" "" outposcfiles "${poscfiles}") | ||
|
||
GETTEXT_CREATE_TRANSLATIONS(stellarium-scripts DEFAULT_TARGET ${outposcfiles}) | ||
|
||
# Discard this target if xgettext is not installed | ||
IF(${XGETTEXT_FOUND}) | ||
ADD_CUSTOM_TARGET( | ||
generate-pot-stellarium-scripts | ||
${GETTEXT_XGETTEXT_EXECUTABLE} | ||
-o stellarium-scripts.pot | ||
--keyword=tr | ||
--language=JavaScript | ||
--add-comments=TRANSLATORS: | ||
--directory=${PROJECT_SOURCE_DIR} | ||
--files-from=POTFILES.in | ||
--copyright-holder=Stellarium's\ team | ||
[email protected] | ||
--from-code=utf-8 | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMENT "Generating stellarium-scripts.pot" | ||
VERBATIM | ||
) | ||
|
||
# Generate this POT file when building the "generate-pot" target. | ||
ADD_DEPENDENCIES(generate-pot generate-pot-stellarium-scripts) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Translatable scripts | ||
scripts/bennett.ssc | ||
scripts/best_ngc.ssc | ||
scripts/binocular_highlights.ssc | ||
scripts/binosky.ssc | ||
scripts/double_stars.ssc |
Oops, something went wrong.