Merge pull request #1329 from colobot/dev-msvc-sed-fix

Fix update-pot not working with MSBuild
1164-fix
Mateusz Przybył 2020-07-10 11:33:41 +02:00 committed by GitHub
commit b8523aa1db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ add_custom_command(OUTPUT ${_potFile}
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/app/app.cpp --output=${_potFile} --no-wrap COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/app/app.cpp --output=${_potFile} --no-wrap
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/common/restext.cpp --output=${_potFile} --no-wrap --join-existing --no-location --keyword=TR COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/common/restext.cpp --output=${_potFile} --no-wrap --join-existing --no-location --keyword=TR
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/script/script.cpp --output=${_potFile} --no-wrap --join-existing --no-location COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/script/script.cpp --output=${_potFile} --no-wrap --join-existing --no-location
COMMAND sed -i -e "s|^\\(\"POT-Creation-Date:\\).*$|\\1 DATE\\\\n\"|" ${_potFile} COMMAND sed -bi -e "s/^\\(\"POT-Creation-Date:\\).*$/\\1 DATE\\\\n\"/" ${_potFile}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Extract translatable messages to ${_potFile}" COMMENT "Extract translatable messages to ${_potFile}"

View File

@ -48,8 +48,8 @@ const char* stringsCbot[CBot::CBotErrMAX] = { nullptr };
*/ */
#define TR(x) x #define TR(x) x
/* Please run `make update-pot` after changing this file /* Please run `cmake --build <path_to_build_folder> --target update-pot`
* in order to update translation files. Thank you. * after changing this file in order to update translation files. Thank you.
*/ */
void InitializeRestext() void InitializeRestext()