languages: support for Mexican Spanish as discussed in http://bugzilla.lyx.org/show_bug.cgi?id=4736

fileformat change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24288 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-04-16 00:25:08 +00:00
parent 82fca3a08d
commit 7fa7e2a9d9
5 changed files with 27 additions and 4 deletions

View File

@ -1,6 +1,9 @@
LyX file-format changes 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> 2008-04-11 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* Format incremented to 326: support for pdflatex via external inset. * Format incremented to 326: support for pdflatex via external inset.

View File

@ -74,6 +74,7 @@ serbian-latin serbian "Serbian (Latin)" false iso8859-2 sr_RS ""
slovak slovak "Slovak" false iso8859-2 sk_SK "" slovak slovak "Slovak" false iso8859-2 sk_SK ""
slovene slovene "Slovene" false iso8859-2 sl_SI "" slovene slovene "Slovene" false iso8859-2 sl_SI ""
spanish spanish "Spanish" false iso8859-15 es_ES "\deactivatetilden\renewcommand\shorthandsspanish{}" 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 "" swedish swedish "Swedish" false iso8859-15 sv_SE ""
thai thai "Thai" false tis620-0 th_TH "\usepackage{thswitch}" thai thai "Thai" false tis620-0 th_TH "\usepackage{thswitch}"
turkish turkish "Turkish" false iso8859-9 tr_TR "" turkish turkish "Turkish" false iso8859-9 tr_TR ""

View File

@ -80,7 +80,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
("1_3", [221], minor_versions("1.3" , 7)), ("1_3", [221], minor_versions("1.3" , 7)),
("1_4", range(222,246), minor_versions("1.4" , 5)), ("1_4", range(222,246), minor_versions("1.4" , 5)),
("1_5", range(246,277), minor_versions("1.5" , 2)), ("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(): def formats_list():

View File

@ -1970,6 +1970,23 @@ def revert_pdfpages(document):
i = i + 1 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 # Conversion hub
# #
@ -2024,10 +2041,12 @@ convert = [[277, [fix_wrong_tables]],
[323, [convert_pagebreaks]], [323, [convert_pagebreaks]],
[324, [convert_linebreaks]], [324, [convert_linebreaks]],
[325, [convert_japanese_plain]], [325, [convert_japanese_plain]],
[326, []] [326, []],
[327, []]
] ]
revert = [[325, [revert_pdfpages]], revert = [[326, [revert_mexican]],
[325, [revert_pdfpages]],
[324, []], [324, []],
[323, [revert_linebreaks]], [323, [revert_linebreaks]],
[322, [revert_pagebreaks]], [322, [revert_pagebreaks]],

View File

@ -117,7 +117,7 @@ namespace os = support::os;
namespace { namespace {
int const LYX_FORMAT = 326; int const LYX_FORMAT = 327; // Uwe: support for Spanish(Mexico)
typedef map<string, bool> DepClean; typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache; typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;