From: Uwe Stöhr Date: Sun, 25 Nov 2007 22:39:04 +0000 (+0000) Subject: - remove Serbocroatian from the language list because this was a fake. Croatian was... X-Git-Tag: 1.6.10~7204 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0ef6b7c5fe1163f4583a23af9a969d54b6a300f3;p=lyx.git - remove Serbocroatian from the language list because this was a fake. Croatian was used under the hood but we already have Croatian separately. - implement Serbian git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21786 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/FORMAT b/development/FORMAT index 7af2d070aa..f119437786 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,11 @@ LyX file-format changes ----------------------- +2007-11-25 Uwe Stöhr + * Format incremented to 303: remove Serbocroatian as this was not a real + babel language (Croatian was used instead in the background) + * Implement Serbian + 2007-11-25 Uwe Stöhr * Format incremented to 302: support for Latin and North Sami diff --git a/lib/languages b/lib/languages index 2cd3478ee0..272abe298f 100644 --- a/lib/languages +++ b/lib/languages @@ -63,8 +63,7 @@ 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 "" +serbian serbian "Serbian" false iso8859-5 sr_CS "" 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{}" diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 1f98a2d0b8..081ad0f893 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,303), minor_versions("1.6" , 0))] # Uwe: Latin and North Sami + ("1_6", range(277,304), minor_versions("1.6" , 0))] # Uwe: Serbocroatian def formats_list(): diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index c33160caea..bf8d7b022f 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -696,7 +696,6 @@ def revert_include(document): def revert_albanian(document): "Set language Albanian to English" - # Set document language from Albanian to English i = 0 if document.language == "albanian": document.language = "english" @@ -714,7 +713,6 @@ def revert_albanian(document): def revert_lowersorbian(document): "Set language lower Sorbian to English" - # Set document language from lower Sorbian to English i = 0 if document.language == "lowersorbian": document.language = "english" @@ -732,7 +730,6 @@ def revert_lowersorbian(document): def revert_uppersorbian(document): "Set language uppersorbian to usorbian as this was used in LyX 1.5" - # Set document language from uppersorbian to usorbian i = 0 if document.language == "uppersorbian": document.language = "usorbian" @@ -749,8 +746,7 @@ def revert_uppersorbian(document): def convert_usorbian(document): - "Set language uppersorbian to usorbian as this was used in LyX 1.5" - # Set document language from uppersorbian to usorbian + "Set language usorbian to uppersorbian" i = 0 if document.language == "usorbian": document.language = "uppersorbian" @@ -844,6 +840,23 @@ def revert_samin(document): j = j + 1 +def convert_serbocroatian(document): + "Set language Serbocroatian to Croatian as this was really Croatian in LyX 1.5" + i = 0 + if document.language == "serbocroatian": + document.language = "croatian" + i = find_token(document.header, "\\language", 0) + if i != -1: + document.header[i] = "\\language croatian" + j = 0 + while True: + j = find_token(document.body, "\\lang serbocroatian", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang serbocroatian", "\\lang croatian") + j = j + 1 + + ## # Conversion hub # @@ -874,10 +887,12 @@ convert = [[277, [fix_wrong_tables]], [299, []], [300, []], [301, []], - [302, []] + [302, []], + [303, [convert_serbocroatian]] ] -revert = [[301, [revert_latin, revert_samin]], +revert = [[302, []], + [301, [revert_latin, revert_samin]], [300, [revert_linebreak]], [299, [revert_pagebreak]], [298, [revert_hyperlinktype]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 223767aed8..e068bc9d91 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -153,7 +153,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 302; // Uwe: Latin and North Sami +int const LYX_FORMAT = 303; // Uwe: Serbocroatian } // namespace anon