Handle python projects with multiple modules
Keystone has now two modules and our extraction generates the same content for both modules. To confirm, check current keystone directory, it contains the same locale files: $ l keystone_tempest_plugin/locale/keystone_tempest_plugin.pot \ keystone/locale/keystone.pot -rw-r--r-- 1 aj users 44265 Apr 9 19:46 keystone/locale/keystone.pot -rw-r--r-- 1 aj users 44265 Apr 9 19:46 keystone_tempest_plugin/locale/keystone_tempest_plugin.pot Fix the extraction so that only the module directory is scanned for input, and not anything outside of it. This will generate in this case file with just the boilerplate in it since the plugin is not translated. Change-Id: I1d19d8f5172fc44b686fd9f1912af2e88a769d7e
This commit is contained in:
parent
5fbda07f6c
commit
ff03a350a5
@ -257,6 +257,7 @@ function extract_messages {
|
||||
# "_C" for message with context, "_P" for plural form message.
|
||||
python setup.py $QUIET extract_messages --keyword "_C:1c,2 _P:1,2" \
|
||||
--add-comments Translators: \
|
||||
--input-dirs ${modulename} \
|
||||
--output-file ${POT}
|
||||
}
|
||||
|
||||
@ -273,6 +274,7 @@ function extract_messages_log {
|
||||
python setup.py $QUIET extract_messages --no-default-keywords \
|
||||
--keyword ${LKEYWORD[$level]} \
|
||||
--add-comments Translators: \
|
||||
--input-dirs ${modulename} \
|
||||
--output-file ${POT}
|
||||
# We don't need to add or send around empty source files.
|
||||
trans=$(msgfmt --statistics -o /dev/null ${POT} 2>&1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user