1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Fix locale output

This commit is contained in:
Mathieu Schroeter 2017-02-21 22:35:48 +01:00
parent b77327aec0
commit a6c17df306
2 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,6 @@ set (_potFile ${CMAKE_CURRENT_SOURCE_DIR}/resources/po/${PROJECT_NAME}.pot)
add_custom_command (OUTPUT ${_potFile}
COMMAND xgettext --keyword=translate -o ${_potFile} ${sources}
DEPENDS ${sources}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Extract translatable messages to ${_potFile}"
)
@ -103,7 +102,7 @@ gettext_create_translations (${_potFile} ALL ${po})
## Put mo files to appropriate directory
foreach (file ${_gmoFiles})
get_filename_component (_lang ${file} NAME_WE)
set (_out "${CMAKE_CURRENT_BINARY_DIR}/share/planetblupi/locale/${_lang}/LC_MESSAGES")
set (_out "share/locale/${_lang}/LC_MESSAGES")
add_custom_command (OUTPUT ${_out}/planetblupi.mo
COMMAND ${CMAKE_COMMAND} -E copy ${file} ${_out}/planetblupi.mo

View File

@ -622,7 +622,7 @@ static void initGettext ()
{
setlocale (LC_ALL, "");
textdomain ("planetblupi");
bindtextdomain ("planetblupi", (GetBaseDir () + "locale").c_str ());
bindtextdomain ("planetblupi", (GetShareDir () + "locale").c_str ());
bind_textdomain_codeset ("planetblupi", "UTF-8");
}