diff --git a/lib/languages b/lib/languages index 5d1dcf2c7e..271022a3f2 100644 --- a/lib/languages +++ b/lib/languages @@ -41,6 +41,7 @@ french french "French" false iso8859-15 fr_FR "\addto\extrasfrench{\prov galician galician "Galician" false iso8859-15 gl_ES "" german german "German (old spelling)" false iso8859-15 de_DE "" ngerman ngerman "German" false iso8859-15 de_DE "" +german-ch ngerman "German (Switzerland)" false iso8859-15 de_CH "" greek greek "Greek" false iso8859-7 el_GR "" polutonikogreek polutonikogreek "Greek (polytonic)" false iso8859-7 el_GR "\makeatletter\let\lyx@tildeaccent\~\addto\extraspolutonikogreek{\bbl@deactivate{~}\let\~\lyx@tildeaccent}\addto\extrasgreek{\bbl@deactivate{~}\let\~\lyx@tildeaccent}\makeatother" hebrew hebrew "Hebrew" true cp1255 he_IL "" diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index ba3067d3f7..680f33c88f 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -81,8 +81,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("1_4", range(222,246), minor_versions("1.4" , 5)), ("1_5", range(246,277), minor_versions("1.5" , 7)), ("1_6", range(277,346), minor_versions("1.6" , 0)), - ] -# ("2_0", [], minor_versions("2.0", 0))] + ("2_0", [], minor_versions("2.0", 0))] #################################################################### # This is useful just for development versions # diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 681e1089bb..b56f31123c 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -29,18 +29,32 @@ def find_end_of_inset(lines, i): #################################################################### -def dummy(document): - pass + +def revert_swiss(document): + "Set language german-ch to ngerman" + i = 0 + if document.language == "german-ch": + document.language = "ngerman" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language ngerman" + j = 0 + while True: + j = find_token(document.body, "\\lang german-ch", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang german-ch", "\\lang ngerman") + j = j + 1 ## # Conversion hub # supported_versions = ["2.2.0","2.0"] -convert = [[346, [dummy]] +convert = [[346, []] ] -revert = [[345, []] +revert = [[345, [revert_swiss]] ] diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 31fba248c8..5138c4227c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -118,7 +118,7 @@ namespace { // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 345; // jamatos: xml elements +int const LYX_FORMAT = 346; // jspitzm: Swiss German typedef map DepClean; typedef map > RefCache;