]> git.lyx.org Git - lyx.git/commitdiff
languages: support for Mexican Spanish as discussed in http://bugzilla.lyx.org/show_b...
authorUwe Stöhr <uwestoehr@web.de>
Wed, 16 Apr 2008 00:25:08 +0000 (00:25 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 16 Apr 2008 00:25:08 +0000 (00:25 +0000)
   fileformat change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24288 a592a061-630c-0410-9148-cb99ea01b6c8

development/FORMAT
lib/languages
lib/lyx2lyx/LyX.py
lib/lyx2lyx/lyx_1_6.py
src/Buffer.cpp

index 0f1831b7c1c30be0095681ca8fa03fc532166824..6a4c2dd6406672d73fb0ee802033c28768b239e0 100644 (file)
@@ -1,6 +1,9 @@
 LyX file-format changes
 -----------------------
 
+2008-04-16 Uwe Stöhr <uwestoehr@web.de>
+       * Format incremented to 327: support for Mexican Spanish.
+
 2008-04-11 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
        * Format incremented to 326: support for pdflatex via external inset.
 
index 277c5aab65b768f426692f8f7bfd6eb1d203a417..c0cfdb8084fd12344bb2c15241e2cdc9f1587740 100644 (file)
@@ -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  ""
index d0fcb185718bfe673b0992c0dcddc7718bbdde90..3166028510aa61fa55cc4deb5f20c1a00c7377dc 100644 (file)
@@ -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():
index b1d5597bdfca6a50483750bd7cec688b5558aae6..8996a05e1babb6ac997cee8fa5d7a6bb46400567 100644 (file)
@@ -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]],
index fea5eab3550d06e17685e6e883d5d8ac0f72ab11..6f7369843d60e24ad715450496cb820562a4ddda 100644 (file)
@@ -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<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;