X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flyx2lyx%2Flyx_2_2.py;h=9011c66975076ba5ed992f1693b8889561430c6f;hb=057753dc7549743a826d52b301eb846cb419b2b9;hp=73765bb7683ae65e564bdbfc1747471afd3ffbae;hpb=8c219daeeb7e4d9e831334486ac8a413d145b398;p=lyx.git diff --git a/lib/lyx2lyx/lyx_2_2.py b/lib/lyx2lyx/lyx_2_2.py index 73765bb768..9011c66975 100644 --- a/lib/lyx2lyx/lyx_2_2.py +++ b/lib/lyx2lyx/lyx_2_2.py @@ -25,7 +25,8 @@ import sys, os # Uncomment only what you need to import, please. from lyx2lyx_tools import (add_to_preamble, put_cmd_in_ert, get_ert, - lyx2latex, lyx2verbatim, length_in_bp, convert_info_insets, insert_document_option) + lyx2latex, lyx2verbatim, length_in_bp, convert_info_insets, insert_document_option, + revert_language) from parser_tools import (check_token, del_complete_lines, find_end_of_inset, find_end_of_layout, find_nonempty_line, find_re, @@ -346,7 +347,8 @@ def convert_parbreak(document): return lay = get_containing_layout(document.body, i) if lay == False: - document.warning("Malformed LyX document: Can't convert separator inset at line " + str(i)) + document.warning("Malformed LyX document: " + "Can't convert separator inset at line %d"%i) i += 1 continue if lay[0] == "Standard": @@ -851,15 +853,7 @@ def revert_specialchar(document): def revert_georgian(document): "Set the document language to English but assure Georgian output" - if document.language == "georgian": - document.language = "english" - i = find_token(document.header, "\\language georgian", 0) - if i != -1: - document.header[i] = "\\language english" - j = find_token(document.header, "\\language_package default", 0) - if j != -1: - document.header[j] = "\\language_package babel" - insert_document_option(document, "georgian") + revert_language(document, "georgian", "georgian", "") def revert_sigplan_doi(document):