mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 11:28:16 +00:00
Bugfixes for pangoization and handling of stringfreeze option.
This commit is contained in:
parent
f5a1fd54c8
commit
059daa4ecb
@ -706,7 +706,7 @@ def pangoize(message, filename, line):
|
|||||||
continue
|
continue
|
||||||
# This is the common, simple case we can fix automatically
|
# This is the common, simple case we can fix automatically
|
||||||
message = message[:where] + newstart + message[where+1:]
|
message = message[:where] + newstart + message[where+1:]
|
||||||
endq = lines[where].rfind('"')
|
endq = line[where].rfind('"')
|
||||||
message = message[:endq] + newend + message[endq+1:]
|
message = message[:endq] + newend + message[endq+1:]
|
||||||
# Check for unescaped < and >
|
# Check for unescaped < and >
|
||||||
if "<" in message or ">" in message:
|
if "<" in message or ">" in message:
|
||||||
@ -1971,11 +1971,12 @@ Usage: wmllint [options] [dir]
|
|||||||
-s, --stripcr Convert DOS-style CR/LF to Unix-style LF.
|
-s, --stripcr Convert DOS-style CR/LF to Unix-style LF.
|
||||||
-f, --future Enable experimental WML conversions.
|
-f, --future Enable experimental WML conversions.
|
||||||
-S, --nospellcheck Suppress spellchecking
|
-S, --nospellcheck Suppress spellchecking
|
||||||
|
-Z, --stringfreeze Suppress warnings about newlines in messages
|
||||||
""")
|
""")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
(options, arguments) = getopt.getopt(sys.argv[1:], "cdDfhnrsvS", [
|
(options, arguments) = getopt.getopt(sys.argv[1:], "cdDfhnrsvSZ", [
|
||||||
"clean",
|
"clean",
|
||||||
"diffs",
|
"diffs",
|
||||||
"dryrun",
|
"dryrun",
|
||||||
@ -2015,7 +2016,7 @@ if __name__ == '__main__':
|
|||||||
revert = True
|
revert = True
|
||||||
elif switch in ('-s', '--stripcr'):
|
elif switch in ('-s', '--stripcr'):
|
||||||
stripcr = True
|
stripcr = True
|
||||||
elif switch in ('-S', '--stringfreeze'):
|
elif switch in ('-Z', '--stringfreeze'):
|
||||||
stringfreeze = True
|
stringfreeze = True
|
||||||
elif switch in ('-v', '--verbose'):
|
elif switch in ('-v', '--verbose'):
|
||||||
verbose += 1
|
verbose += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user