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 <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-02-24 21:06:23 +00:00
parent 2f0653824e
commit 32e7c69726
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
3 changed files with 39 additions and 5 deletions

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

@ -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}
)

View File

@ -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()