The attached patch adds support for Turkmen (http://en.wikipedia.org/wiki/Turkmen_language) This will be a fileformat change.
regards Uwe
Index: development/FORMAT =================================================================== --- development/FORMAT (revision 33963) +++ development/FORMAT (working copy) @@ -2,6 +2,9 @@ ----------------------- 2010-03-31 Uwe Stöhr <uwesto...@web.de> + * Format incremented to 383: support for Turkmen + +2010-03-31 Uwe Stöhr <uwesto...@web.de> * Format incremented to 382: support to change the font color for greyed-out notes Index: lib/languages =================================================================== --- lib/languages (revision 33963) +++ lib/languages (working copy) @@ -82,6 +82,7 @@ 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 "" +turkmen turkmen "Turkmen" false utf8 tk_TM "" ukrainian ukrainian "Ukrainian" false koi8-u uk_UA "" uppersorbian uppersorbian "Upper Sorbian" false iso8859-2 hsb_DE "" vietnamese vietnam "Vietnamese" false utf8 vi_VN "" Index: lib/lyx2lyx/lyx_2_0.py =================================================================== --- lib/lyx2lyx/lyx_2_0.py (revision 33963) +++ lib/lyx2lyx/lyx_2_0.py (working copy) @@ -1376,6 +1376,23 @@ + ' {\\textcolor{note_fontcolor}\\bgroup}{\\egroup}\n') +def revert_turkmen(document): + "Set language Turkmen to English" + i = 0 + if document.language == "turkmen": + 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 turkmen", j) + if j == -1: + return + document.body[j] = document.body[j].replace("\\lang turkmen", "\\lang english") + j = j + 1 + + ## # Conversion hub # @@ -1417,10 +1434,12 @@ [379, [convert_math_output]], [380, []], [381, []], - [382, []] + [382, []], + [383, []] ] -revert = [[381, [revert_notefontcolor]], +revert = [[382, [revert_turkmen]], + [381, [revert_notefontcolor]], [380, [revert_equalspacing_xymatrix]], [379, [revert_inset_preview]], [378, [revert_math_output]], Index: src/Buffer.cpp =================================================================== --- src/Buffer.cpp (revision 33963) +++ src/Buffer.cpp (working copy) @@ -126,7 +126,7 @@ // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 382; // uwestoehr: support to change font color for greyed-out notes +int const LYX_FORMAT = 383; // uwestoehr: support for Turkmen typedef map<string, bool> DepClean; typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache; Index: src/BufferParams.cpp =================================================================== --- src/BufferParams.cpp (revision 33963) +++ src/BufferParams.cpp (working copy) @@ -1210,10 +1210,12 @@ // viet = string::npos when not found // the same is for all other languages that are not directly supported by // babel, but where LaTeX-packages add babel support. - // this is currently the case for Latvian, Lithuanian, and Mongolian + // this is currently the case for Latvian, Lithuanian, Mongolian + // and Turkmen size_t latvian = language_options.str().find("latvian"); size_t lithu = language_options.str().find("lithuanian"); size_t mongo = language_options.str().find("mongolian"); + size_t turkmen = language_options.str().find("turkmen"); // if Japanese is used, babel must directly be loaded // with language options, not in the class options, see // http://www.lyx.org/trac/ticket/4597#c4 @@ -1221,7 +1223,7 @@ if (lyxrc.language_global_options && !language_options.str().empty() && viet == string::npos && japan == string::npos && latvian == string::npos && lithu == string::npos - && mongo == string::npos) + && mongo == string::npos && turkmen == string::npos) clsoptions << language_options.str() << ','; } @@ -2103,17 +2105,20 @@ // viet = string::npos when not found // the same is for all other languages that are not directly supported by // babel, but where LaTeX-packages add babel support. - // this is currently the case for Latvian, Lithuanian, and Mongolian + // this is currently the case for Latvian, Lithuanian, Mongolian + // and Turkmen size_t latvian = lang_opts.find("latvian"); size_t lithu = lang_opts.find("lithuanian"); size_t mongo = lang_opts.find("mongolian"); + size_t turkmen = lang_opts.find("turkmen"); // If Japanese is used, babel must directly be loaded with the // language options, see // http://www.lyx.org/trac/ticket/4597#c4 size_t japan = lang_opts.find("japanese"); if (!lyxrc.language_global_options || viet != string::npos || japan != string::npos || latvian != string::npos - || lithu != string::npos || mongo != string::npos) + || lithu != string::npos || mongo != string::npos + || turkmen != string::npos) return "\\usepackage[" + lang_opts + "]{babel}"; return lang_pack; }
Turkmen.lyx
Description: application/lyx