From d21c9a2c075b7af29611ce6aa7461e24bf8010ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Wed, 5 Dec 2007 22:04:33 +0000 Subject: [PATCH] support for the language Interlingua - fileformat change (Interlingua was the last missing language supported by babel) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21976 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/FORMAT | 3 +++ lib/languages | 2 ++ lib/lyx2lyx/LyX.py | 2 +- lib/lyx2lyx/lyx_1_6.py | 23 +++++++++++++++++++++-- src/Buffer.cpp | 2 +- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index f99d27624f..58a30c513c 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,9 @@ LyX file-format changes ----------------------- +2007-12-05 Uwe Stöhr + * Format incremented to 306: support for Interlingua + 2007-12-05 Uwe Stöhr * Format incremented to 305: support for Bahasa Malaysia diff --git a/lib/languages b/lib/languages index 2d11567169..d6012276be 100644 --- a/lib/languages +++ b/lib/languages @@ -43,6 +43,8 @@ hebrew hebrew "Hebrew" true cp1255 he_IL "" # "hungarian" might be used for special purposes, see http://www.math.bme.hu/latex/magyar_pre_tug2004.pdf #hungarian hungarian "Hungarian" false iso8859-2 hu_HU "" icelandic icelandic "Icelandic" false iso8859-15 is_IS "" +# there is no country code for Interlingua because it is an auxiliary language +interlingua interlingua "Interlingua" false iso8859-15 ia "" irish irish "Irish" false iso8859-15 ga_IE "" italian italian "Italian" false iso8859-15 it_IT "" japanese "" "Japanese" false euc-jp ja_JP "" diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index a067df5e88..fffba365f4 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -80,7 +80,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("1_3", [221], minor_versions("1.3" , 7)), ("1_4", range(222,246), minor_versions("1.4" , 5)), ("1_5", range(246,277), minor_versions("1.5" , 2)), - ("1_6", range(277,306), minor_versions("1.6" , 0))] # Uwe: support for Bahasa + ("1_6", range(277,307), minor_versions("1.6" , 0))] # Uwe: support for Interlingua def formats_list(): diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index d803f68892..cb692336f6 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -930,6 +930,23 @@ def revert_bahasam(document): j = j + 1 +def revert_interlingua(document): + "Set language Interlingua to English" + i = 0 + if document.language == "interlingua": + document.language = "english" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language english" + j = 0 + while True: + j = find_token(document.body, "\\lang interlingua", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang interlingua", "\\lang english") + j = j + 1 + + ## # Conversion hub # @@ -963,10 +980,12 @@ convert = [[277, [fix_wrong_tables]], [302, []], [303, [convert_serbocroatian]], [304, [convert_framed_notes]], - [305, []] + [305, []], + [306, []] ] -revert = [[304, [revert_bahasam]], +revert = [[305, [revert_interlingua]], + [304, [revert_bahasam]], [303, [revert_framed_notes]], [302, []], [301, [revert_latin, revert_samin]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index a174fae5fe..4f5025b9d2 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -154,7 +154,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 305; // Uwe: support for Bahasa +int const LYX_FORMAT = 306; // Uwe: support for Interlingua } // namespace anon