mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
support for Australian and Newzealand as document language; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40452 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
14bcaa5f9d
commit
fe8c185a6e
@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
||||
|
||||
-----------------------
|
||||
|
||||
2011-12-09 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 419 (r40452)
|
||||
support for the document languages australian and newzealand
|
||||
|
||||
2011-12-08 Richard Heck <rgheck@lyx.org>
|
||||
* Format incremented to 418 (r40427)
|
||||
Introduce justification preference.
|
||||
|
@ -134,6 +134,15 @@ Language armenian
|
||||
LangCode hy_AM
|
||||
End
|
||||
|
||||
Language australian
|
||||
GuiName "English (Australia)"
|
||||
BabelName australian
|
||||
PolyglossiaName english
|
||||
PolyglossiaOpts "variant=australian"
|
||||
Encoding iso8859-15
|
||||
LangCode en_AU
|
||||
End
|
||||
|
||||
Language austrian
|
||||
GuiName "German (Austria, old spelling)"
|
||||
BabelName austrian
|
||||
@ -595,6 +604,15 @@ Language mongolian
|
||||
AsBabelOptions true
|
||||
End
|
||||
|
||||
Language newzealand
|
||||
GuiName "English (New Zealand)"
|
||||
BabelName newzealand
|
||||
PolyglossiaName english
|
||||
PolyglossiaOpts "variant=newzealand"
|
||||
Encoding iso8859-15
|
||||
LangCode en_NZ
|
||||
End
|
||||
|
||||
Language norsk
|
||||
GuiName "Norwegian (Bokmaal)"
|
||||
BabelName norsk
|
||||
|
@ -198,6 +198,28 @@ def revert_justification(document):
|
||||
if not del_token(document.header, '\\justification', 0):
|
||||
document.warning("Malformed LyX document: Missing \\justification.")
|
||||
|
||||
|
||||
def revert_australian(document):
|
||||
"Set English language variants Australian and Newzealand to English"
|
||||
|
||||
if document.language == "australian" or document.language == "newzealand":
|
||||
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 australian", j)
|
||||
if j == -1:
|
||||
j = find_token(document.body, "\\lang newzealand", 0)
|
||||
if j == -1:
|
||||
return
|
||||
else:
|
||||
document.body[j] = document.body[j].replace("\\lang newzealand", "\\lang english")
|
||||
else:
|
||||
document.body[j] = document.body[j].replace("\\lang australian", "\\lang english")
|
||||
j += 1
|
||||
|
||||
|
||||
##
|
||||
@ -211,9 +233,11 @@ convert = [
|
||||
[416, []],
|
||||
[417, [convert_japanese_encodings]],
|
||||
[418, []],
|
||||
[419, []]
|
||||
]
|
||||
|
||||
revert = [
|
||||
[418, [revert_australian]],
|
||||
[417, [revert_justification]],
|
||||
[416, [revert_japanese_encodings]],
|
||||
[415, [revert_negative_space,revert_math_spaces]],
|
||||
|
@ -57,12 +57,12 @@ namespace {
|
||||
* please keep this in sync with known_coded_languages line by line!
|
||||
*/
|
||||
const char * const known_languages[] = {"acadian", "afrikaans", "albanian",
|
||||
"american", "arabic", "arabtex", "austrian", "bahasa", "bahasai", "bahasam",
|
||||
"basque", "belarusian", "brazil", "brazilian", "breton", "british", "bulgarian",
|
||||
"canadian", "canadien", "catalan", "croatian", "czech", "danish", "dutch",
|
||||
"english", "esperanto", "estonian", "farsi", "finnish", "francais", "french",
|
||||
"frenchb", "frenchle", "frenchpro", "galician", "german", "germanb", "greek",
|
||||
"hebrew", "hungarian", "icelandic", "indon", "indonesian", "interlingua",
|
||||
"american", "arabic", "arabtex", "australian", "austrian", "bahasa", "bahasai",
|
||||
"bahasam", "basque", "belarusian", "brazil", "brazilian", "breton", "british",
|
||||
"bulgarian", "canadian", "canadien", "catalan", "croatian", "czech", "danish",
|
||||
"dutch", "english", "esperanto", "estonian", "farsi", "finnish", "francais",
|
||||
"french", "frenchb", "frenchle", "frenchpro", "galician", "german", "germanb",
|
||||
"greek", "hebrew", "hungarian", "icelandic", "indon", "indonesian", "interlingua",
|
||||
"irish", "italian", "kazakh", "latin", "latvian", "lithuanian", "lowersorbian",
|
||||
"lsorbian", "magyar", "malay", "meyalu", "mongolian", "naustrian", "newzealand",
|
||||
"ngerman", "ngermanb", "norsk", "nynorsk", "polutonikogreek", "polish",
|
||||
@ -77,14 +77,14 @@ const char * const known_languages[] = {"acadian", "afrikaans", "albanian",
|
||||
* please keep this in sync with known_languages line by line!
|
||||
*/
|
||||
const char * const known_coded_languages[] = {"french", "afrikaans", "albanian",
|
||||
"american", "arabic_arabi", "arabic_arabtex", "austrian", "bahasa", "bahasa", "bahasam",
|
||||
"basque", "belarusian", "brazilian", "brazilian", "breton", "british", "bulgarian",
|
||||
"canadian", "canadien", "catalan", "croatian", "czech", "danish", "dutch",
|
||||
"english", "esperanto", "estonian", "farsi", "finnish", "french", "french",
|
||||
"french", "french", "french", "galician", "german", "german", "greek",
|
||||
"hebrew", "magyar", "icelandic", "bahasa", "bahasa", "interlingua",
|
||||
"american", "arabic_arabi", "arabic_arabtex", "australian", "austrian", "bahasa", "bahasa",
|
||||
"bahasam", "basque", "belarusian", "brazilian", "brazilian", "breton", "british",
|
||||
"bulgarian", "canadian", "canadien", "catalan", "croatian", "czech", "danish",
|
||||
"dutch", "english", "esperanto", "estonian", "farsi", "finnish", "french",
|
||||
"french", "french", "french", "french", "galician", "german", "german",
|
||||
"greek", "hebrew", "magyar", "icelandic", "bahasa", "bahasa", "interlingua",
|
||||
"irish", "italian", "kazakh", "latin", "latvian", "lithuanian", "lowersorbian",
|
||||
"lowersorbian", "magyar", "bahasam", "bahasam", "mongolian", "naustrian", "english",
|
||||
"lowersorbian", "magyar", "bahasam", "bahasam", "mongolian", "naustrian", "newzealand",
|
||||
"ngerman", "ngerman", "norsk", "nynorsk", "polutonikogreek", "polish",
|
||||
"portuguese", "portuguese", "romanian", "russian", "russian", "samin",
|
||||
"scottish", "serbian", "serbian-latin", "slovak", "slovene", "spanish",
|
||||
@ -93,9 +93,10 @@ const char * const known_coded_languages[] = {"french", "afrikaans", "albanian",
|
||||
0};
|
||||
|
||||
/// languages with english quotes (.lyx names)
|
||||
const char * const known_english_quotes_languages[] = {"american", "bahasa",
|
||||
"bahasam", "brazilian", "canadian", "chinese-simplified", "english",
|
||||
"esperanto", "hebrew", "irish", "korean", "portuguese", "scottish", "thai", 0};
|
||||
const char * const known_english_quotes_languages[] = {"american", "australian",
|
||||
"bahasa", "bahasam", "brazilian", "canadian", "chinese-simplified", "english",
|
||||
"esperanto", "hebrew", "irish", "korean", "newzealand", "portuguese", "scottish",
|
||||
"thai", 0};
|
||||
|
||||
/// languages with french quotes (.lyx names)
|
||||
const char * const known_french_quotes_languages[] = {"albanian",
|
||||
|
@ -30,8 +30,8 @@ extern char const * const lyx_version_info;
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
#define LYX_FORMAT_LYX 418 // rgh: justification option
|
||||
#define LYX_FORMAT_TEX2LYX 418
|
||||
#define LYX_FORMAT_LYX 419 // uwestoehr: support for the languages australian and newzealand
|
||||
#define LYX_FORMAT_TEX2LYX 419
|
||||
|
||||
#if LYX_FORMAT_FOR_TEX2LYX != LYX_FORMAT_FOR_LYX
|
||||
#warning "tex2lyx produces an out of date file format."
|
||||
|
Loading…
Reference in New Issue
Block a user