Include header files in pot-updates
It would probably be better to avoid using translatable strings in headers, but certain people keep doing so anyway, so this is more future-proof.
This commit is contained in:
parent
6b251d445c
commit
6bf76d940b
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ if(DOMAIN STREQUAL ${DEFAULT_DOMAIN})
|
|||
-E touch ${PROJECT_SOURCE_DIR}/po/${DOMAIN}/POTFILES.in
|
||||
|
||||
# Find all cpp files which are not in a .git directory.
|
||||
COMMAND find src -name .git -prune -o -name '*cpp' -print |
|
||||
COMMAND find src -name .git -prune -o -name '*.[hc]pp' -print |
|
||||
sort |
|
||||
while read file\; do
|
||||
# If the file doesn't contain a GETTEXT_DOMAIN
|
||||
|
|
|
@ -32,7 +32,7 @@ if "pot-update" in COMMAND_LINE_TARGETS:
|
|||
domain_sources = defaultdict(list)
|
||||
def fill_source_list(arg, dir, files):
|
||||
for file in files:
|
||||
if fnmatch(file, "*.cpp"):
|
||||
if fnmatch(file, "*.[hc]pp"):
|
||||
match = re.search('^#define\\s+GETTEXT_DOMAIN\\s+"wesnoth(-.*)"', Dir(dir).File(file).get_contents(), re.MULTILINE)
|
||||
if match:
|
||||
source_domain = match.group(1)
|
||||
|
|
Loading…
Add table
Reference in a new issue