From 32e7c6972654870682e83c8ff796a39f23987c90 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 24 Feb 2020 21:06:23 +0000 Subject: [PATCH] Gettext pot update improvements. Extract strings from all wx sources, not just the enabled ones. Ignore comments in the generated pot when checking if it was updated, we don't care about just changes in line numbers. Signed-off-by: Rafael Kitover --- po/wxvbam/wxvbam.pot | 18 +++++++++++++++++- src/wx/CMakeLists.txt | 24 +++++++++++++++++++++--- src/wx/check-pot-updated.cmake | 2 +- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/po/wxvbam/wxvbam.pot b/po/wxvbam/wxvbam.pot index 95dcd0e6..03c8e377 100644 --- a/po/wxvbam/wxvbam.pot +++ b/po/wxvbam/wxvbam.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-24 20:36+0000\n" +"POT-Creation-Date: 2020-02-24 20:58+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1142,6 +1142,22 @@ msgstr "" msgid "XAudio2: Creating source voice failed!" msgstr "" +#: faudio.cpp:32 +msgid "FAudio: Enumerating devices failed!" +msgstr "" + +#: faudio.cpp:67 faudio.cpp:352 +msgid "The FAudio interface failed to initialize!" +msgstr "" + +#: faudio.cpp:384 +msgid "FAudio: Creating mastering voice failed!" +msgstr "" + +#: faudio.cpp:395 +msgid "FAudio: Creating source voice failed!" +msgstr "" + #: dsound.cpp:90 dsound.cpp:104 #, c-format msgid "Cannot create DirectSound %08x" diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 9b87594a..b1fbb951 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -746,8 +746,12 @@ set( ../common/version.cpp ) +set(ALL_SRC_WX ${SRC_WX}) + +list(APPEND ALL_SRC_WX ${CMAKE_CURRENT_SOURCE_DIR}/macsupport.mm) + if(APPLE) - set(SRC_WX ${SRC_WX} ${CMAKE_CURRENT_SOURCE_DIR}/macsupport.mm) + list(APPEND SRC_WX ${CMAKE_CURRENT_SOURCE_DIR}/macsupport.mm) endif() set( @@ -775,6 +779,11 @@ set( ../common/contains.h ) +set(ALL_HDR_WX ${HDR_WX}) + +list(APPEND ALL_SRC_WX winsparkle-wrapper.cpp) +list(APPEND ALL_HDR_WX winsparkle-wrapper.h winsparkle-rc.h) + if(WIN32 AND (AMD64 OR X86_32) AND ENABLE_ONLINEUPDATES) list(APPEND SRC_WX winsparkle-wrapper.cpp) list(APPEND HDR_WX winsparkle-wrapper.h winsparkle-rc.h) @@ -800,19 +809,28 @@ set( copy-events.cmake ) +list(APPEND ALL_SRC_WX openal.cpp) +list(APPEND ALL_HDR_WX openal.h) + if(ENABLE_OPENAL) list(APPEND SRC_WX openal.cpp) list(APPEND HDR_WX openal.h) endif() +list(APPEND ALL_SRC_WX xaudio2.cpp) + if(ENABLE_XAUDIO2) list(APPEND SRC_WX xaudio2.cpp) endif() +list(APPEND ALL_SRC_WX faudio.cpp) + if(ENABLE_FAUDIO) list(APPEND SRC_WX faudio.cpp) endif() +list(APPEND ALL_SRC_WX dsound.cpp) + if(WIN32) list(APPEND SRC_WX dsound.cpp) @@ -965,8 +983,8 @@ if(ENABLE_NLS) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/wxvbam.pot - COMMAND ${XGETTEXT} -k_ -kN_ -o ${CMAKE_BINARY_DIR}/wxvbam.pot ${SRC_WX} ${HDR_WX} ${CMAKE_BINARY_DIR}/wx-xrc-strings.h - DEPENDS ${SRC_WX} ${HDR_WX} ${CMAKE_BINARY_DIR}/wx-xrc-strings.h + COMMAND ${XGETTEXT} -k_ -kN_ -o ${CMAKE_BINARY_DIR}/wxvbam.pot ${ALL_SRC_WX} ${ALL_HDR_WX} ${CMAKE_BINARY_DIR}/wx-xrc-strings.h + DEPENDS ${ALL_SRC_WX} ${ALL_HDR_WX} ${CMAKE_BINARY_DIR}/wx-xrc-strings.h WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/wx/check-pot-updated.cmake b/src/wx/check-pot-updated.cmake index 0183cd77..eb0663d0 100644 --- a/src/wx/check-pot-updated.cmake +++ b/src/wx/check-pot-updated.cmake @@ -10,7 +10,7 @@ macro(read_pot path var) # Ignore timestamp. foreach(line IN LISTS ${var}_file) - if(NOT line MATCHES [=[^"POT-Creation-Date: ]=]) + if(NOT (line MATCHES [=[^"POT-Creation-Date: ]=] OR line MATCHES "^#")) list(APPEND ${var} ${line}) endif() endforeach()