Correct the name of Portuguese and Brazilian variants of Portuguese language, fix bug 1627

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17334 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2007-02-24 23:43:18 +00:00
parent fce3a8c36e
commit 13c6c959c9
5 changed files with 33 additions and 6 deletions

View File

@ -1,5 +1,10 @@
LyX file-format changes
-----------------------§
2007-02-22 José Matos <jamatos@lyx.org>
* format incremented to 263: changes in the language names (overdue):
brazil -> brazilian
portuges -> portuguese
2007-02-16 Georg Baum <Georg.Baum@post.rwth-aachen.de>

View File

@ -7,7 +7,7 @@ naustrian naustrian "Austrian (new spelling)" false iso8859-15 de_AT ""
bahasa bahasa "Bahasa" false iso8859-15 in_ID ""
belarusian belarusian "Belarusian" false cp1251 be_BY ""
basque basque "Basque" false iso8859-15 eu_ES ""
brazil brazil "Portuguese (Brazil)" false iso8859-15 pt_BR ""
brazilian brazil "Portuguese (Brazil)" false iso8859-15 pt_BR ""
breton breton "Breton" false iso8859-15 br_FR ""
british british "British" false iso8859-15 en_GB ""
bulgarian bulgarian "Bulgarian" false cp1251 bg_BG ""
@ -45,7 +45,7 @@ magyar magyar "Magyar" false iso8859-2 hu_HU ""
norsk norsk "Norsk" false iso8859-15 nb_NO ""
nynorsk nynorsk "Nynorsk" false iso8859-15 nn_NO ""
polish polish "Polish" false iso8859-2 pl_PL ""
portuges portuges "Portugese" false iso8859-15 pt_PT ""
portuguese portuges "Portuguese" false iso8859-15 pt_PT ""
romanian romanian "Romanian" false iso8859-2 ro_RO ""
russian russian "Russian" false koi8 ru_RU ""
scottish scottish "Scottish" false iso8859-15 gd_GB ""

View File

@ -74,7 +74,7 @@ format_relation = [("0_06", [200], generate_minor_versions("0.6" , 4)),
("1_2", [220], generate_minor_versions("1.2" , 4)),
("1_3", [221], generate_minor_versions("1.3" , 7)),
("1_4", range(222,246), generate_minor_versions("1.4" , 3)),
("1_5", range(246,263), generate_minor_versions("1.5" , 0))]
("1_5", range(246,264), generate_minor_versions("1.5" , 0))]
def formats_list():

View File

@ -1222,6 +1222,26 @@ def revert_ascii(document):
document.inputencoding = get_value(document.header, "\\inputencoding", 0)
def normalize_language_name(document):
lang = { "brazil": "brazilian",
"portuges": "portuguese"}
if document.language in lang:
document.language = lang[document.language]
i = find_token(document.header, "\\language", 0)
document.header[i] = "\\language %s" % document.language
def revert_language_name(document):
lang = { "brazilian": "brazil",
"portuguese": "portuges"}
if document.language in lang:
document.language = lang[document.language]
i = find_token(document.header, "\\language", 0)
document.header[i] = "\\language %s" % document.language
##
# Conversion hub
#
@ -1243,9 +1263,11 @@ convert = [[246, []],
[259, [convert_accent, normalize_font_whitespace]],
[260, []],
[261, [convert_changes]],
[262, []]]
[262, []],
[263, [normalize_language_name]]]
revert = [[261, [revert_ascii]],
revert = [[262, [revert_language_name]],
[261, [revert_ascii]],
[260, []],
[259, [revert_utf8x]],
[258, []],

View File

@ -141,7 +141,7 @@ using std::string;
namespace {
int const LYX_FORMAT = 262;
int const LYX_FORMAT = 263;
} // namespace anon