]> git.lyx.org Git - features.git/commitdiff
support for the languages Latin and North Sami
authorUwe Stöhr <uwestoehr@web.de>
Sun, 25 Nov 2007 21:09:01 +0000 (21:09 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sun, 25 Nov 2007 21:09:01 +0000 (21:09 +0000)
- fileformat change

(I wonder why support for them was removed (must be before LyX 1.3), because the old reLyX script listed them as supported)

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

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

index 298a787d9cb237a7d2048da5ef40f91523ffeeb8..7af2d070aa3d1d244069fefe98afe2c04cc1af14 100644 (file)
@@ -1,6 +1,9 @@
 LyX file-format changes
 -----------------------
 
+2007-11-25 Uwe Stöhr <uwestoehr@web.de>
+       * Format incremented to 302: support for Latin and North Sami
+
 2007-11-24 Uwe Stöhr <uwestoehr@web.de>
        * Format incremented to 301: support for \linebreak
 
index 429c399394eda4b00d686c6c122f9ba14a699476..2cd3478ee0ce91d28134a819d4c416decd544da5 100644 (file)
@@ -41,6 +41,7 @@ hebrew      hebrew    "Hebrew"        true   cp1255     he_IL  ""
 # "hungarian" is a synonym for the "magyar" babel language option
 # "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  ""
 irish       irish      "Irish"         false  iso8859-15 ga_IE  ""
 italian     italian    "Italian"       false  iso8859-15 it_IT  ""
 japanese    ""         "Japanese"      false  euc-jp     ja_JP  ""
@@ -48,10 +49,11 @@ japanese-plain ""   "Japanese (non-CJK)"    false  euc-jp-plain ja_JP        ""
 kazakh     kazakh      "Kazakh"        false  pt154      kk_KZ  ""
 # there is no country code for Korean because ko_KR is the same as ko_KI
 korean      ""         "Korean"        false  euc-kr     ko     ""
-lowersorbian    lowersorbian   "Lower Sorbian" false  iso8859-2  dsb_DE         ""
-lithuanian  lithuanian "Lithuanian"    false  iso8859-13 lt_LT  ""
+# there is no country code for Latin because it is a dead language
+latin       latin      "Latin"         false  iso8859-15 la     ""
 latvian     latvian    "Latvian"       false  iso8859-13 lv_LV  ""
-icelandic   icelandic  "Icelandic"     false  iso8859-15 is_IS  ""
+lithuanian  lithuanian "Lithuanian"    false  iso8859-13 lt_LT  ""
+lowersorbian    lowersorbian   "Lower Sorbian" false  iso8859-2  dsb_DE         ""
 magyar      magyar     "Hungarian"     false  iso8859-2  hu_HU  ""
 norsk       norsk      "Norsk"         false  iso8859-15 nb_NO  ""
 nynorsk     nynorsk    "Nynorsk"       false  iso8859-15 nn_NO  ""
@@ -59,12 +61,13 @@ polish      polish  "Polish"        false  iso8859-2  pl_PL  ""
 portuguese  portuges   "Portuguese"    false  iso8859-15 pt_PT  ""
 romanian    romanian   "Romanian"      false  iso8859-2  ro_RO  ""
 russian     russian    "Russian"       false  koi8       ru_RU  ""
+samin       samin      "North Sami"    false  iso8859-15 se_NO  ""
 scottish    scottish   "Scottish"      false  iso8859-15 gd_GB  ""
 serbian     croatian   "Serbian"       false  iso8859-5  sr_HR  ""
 serbocroatian croatian "Serbo-Croatian"        false  iso8859-2  sh_HR  ""
-spanish     spanish    "Spanish"       false  iso8859-15 es_ES  "\deactivatetilden\renewcommand\shorthandsspanish{}"
 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{}"
 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 6cb03c5b3a7ff5746ffd99cabd781bb4713fea1c..1f98a2d0b822bc3793a9f381ebda9639316fae10 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,302), minor_versions("1.6" , 0))] # Uwe: \linebreak
+                   ("1_6", range(277,303), minor_versions("1.6" , 0))] # Uwe: Latin and North Sami
 
 
 def formats_list():
index 1d191621da349c8259ff58b2d992e97972c50923..c33160caeac0b2adbd839c0ae1653d99dcbef58b 100644 (file)
@@ -810,6 +810,40 @@ def revert_linebreak(document):
       i = i + 1
 
 
+def revert_latin(document):
+    "Set language Latin to English"
+    i = 0
+    if document.language == "latin":
+        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 latin", j)
+        if j == -1:
+            return
+        document.body[j] = document.body[j].replace("\\lang latin", "\\lang english")
+        j = j + 1
+
+
+def revert_samin(document):
+    "Set language North Sami to English"
+    i = 0
+    if document.language == "samin":
+        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 samin", j)
+        if j == -1:
+            return
+        document.body[j] = document.body[j].replace("\\lang samin", "\\lang english")
+        j = j + 1
+
+
 ##
 # Conversion hub
 #
@@ -839,10 +873,12 @@ convert = [[277, [fix_wrong_tables]],
            [298, []],
            [299, []],
            [300, []],
-           [301, []]
+           [301, []],
+           [302, []]
           ]
 
-revert =  [[300, [revert_linebreak]],
+revert =  [[301, [revert_latin, revert_samin]],
+           [300, [revert_linebreak]],
            [299, [revert_pagebreak]],
            [298, [revert_hyperlinktype]],
            [297, [revert_macro_optional_params]],
index 526c4bae6b71b3e775a2021d75f717638de8e120..223767aed8309c79af371dcb52dde25f34267cd1 100644 (file)
@@ -153,7 +153,7 @@ namespace os = support::os;
 
 namespace {
 
-int const LYX_FORMAT = 301; // Uwe: \linebreak
+int const LYX_FORMAT = 302; // Uwe: Latin and North Sami
 
 } // namespace anon