diff --git a/development/FORMAT b/development/FORMAT index 0f1831b7c1..6a4c2dd640 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,9 @@ LyX file-format changes ----------------------- +2008-04-16 Uwe Stöhr + * Format incremented to 327: support for Mexican Spanish. + 2008-04-11 Jürgen Spitzmüller * Format incremented to 326: support for pdflatex via external inset. diff --git a/lib/languages b/lib/languages index 277c5aab65..c0cfdb8084 100644 --- a/lib/languages +++ b/lib/languages @@ -74,6 +74,7 @@ serbian-latin serbian "Serbian (Latin)" false iso8859-2 sr_RS "" slovak slovak "Slovak" false iso8859-2 sk_SK "" slovene slovene "Slovene" false iso8859-2 sl_SI "" spanish spanish "Spanish" false iso8859-15 es_ES "\deactivatetilden\renewcommand\shorthandsspanish{}" +spanish-mexico spanish "Spanish (Mexico)" false iso8859-15 es_MX "\renewcommand\shorthandsspanish{}" swedish swedish "Swedish" false iso8859-15 sv_SE "" thai thai "Thai" false tis620-0 th_TH "\usepackage{thswitch}" turkish turkish "Turkish" false iso8859-9 tr_TR "" diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index d0fcb18571..3166028510 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,327), minor_versions("1.6" , 0))] + ("1_6", range(277,328), minor_versions("1.6" , 0))] # Uwe: support for Spanish(Mexico) def formats_list(): diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index b1d5597bdf..8996a05e1b 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -1970,6 +1970,23 @@ def revert_pdfpages(document): i = i + 1 +def revert_mexican(document): + "Set language Spanish(Mexico) to Spanish" + i = 0 + if document.language == "spanish-mexico": + document.language = "spanish" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language spanish" + j = 0 + while True: + j = find_token(document.body, "\\lang spanish-mexico", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang spanish-mexico", "\\lang spanish") + j = j + 1 + + ## # Conversion hub # @@ -2024,10 +2041,12 @@ convert = [[277, [fix_wrong_tables]], [323, [convert_pagebreaks]], [324, [convert_linebreaks]], [325, [convert_japanese_plain]], - [326, []] + [326, []], + [327, []] ] -revert = [[325, [revert_pdfpages]], +revert = [[326, [revert_mexican]], + [325, [revert_pdfpages]], [324, []], [323, [revert_linebreaks]], [322, [revert_pagebreaks]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index fea5eab355..6f7369843d 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -117,7 +117,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 326; +int const LYX_FORMAT = 327; // Uwe: support for Spanish(Mexico) typedef map DepClean; typedef map > RefCache;