Add conversion of \language_use_babel.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37254 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-01-18 16:50:43 +00:00
parent e5b25ce78e
commit bc176dc904

View File

@ -35,9 +35,21 @@ def remove_obsolete(line):
return (True, "")
return no_match
def language_use_babel(line):
if not line.startswith("\language_use_babel"):
return no_match
re_lub = re.compile(r'^\\language_use_babel\s+(true|false)')
m = re_lub.match(line)
val = m.group(1)
newval = '0'
if val == 'false':
newval = '3'
newline = "\\language_package_selection " + newval
return (True, newline)
conversions = [
[ # this will be a long list of conversions for format 0
remove_obsolete
remove_obsolete,
language_use_babel
] # end conversions for format 0
]