support for Georgian

add support to set Georgian as document language, fileformat change
This commit is contained in:
Uwe Stöhr 2015-04-06 06:00:11 +02:00
parent c55f68304e
commit c6b17b685a
6 changed files with 50 additions and 17 deletions

View File

@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
-----------------------
2015-04-06 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 484: support for Georgian:
\lang georgian
2015-03-23 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* Format incremented to 483
Make InsetSpecialChar names more consistent:

View File

@ -469,6 +469,16 @@ Language galician
EndPostBabelPreamble
End
Language georgian
GuiName "Georgian"
BabelName georgian
QuoteStyle german
Encoding utf8
InternalEncoding true
FontEncoding "T8M,T8K"
LangCode ka_GE
End
# german does not use a country code (due to the variety)
Language german
GuiName "German (old spelling)"

View File

@ -83,9 +83,9 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
("1_4", list(range(222,246)), minor_versions("1.4" , 5)),
("1_5", list(range(246,277)), minor_versions("1.5" , 7)),
("1_6", list(range(277,346)), minor_versions("1.6" , 10)),
("2_0", list(range(346,414)), minor_versions("2.0", 8)),
("2_1", list(range(414,475)), minor_versions("2.1", 0)),
("2_2", list(range(475,484)), minor_versions("2.2", 0))
("2_0", list(range(346,414)), minor_versions("2.0" , 8)),
("2_1", list(range(414,475)), minor_versions("2.1" , 0)),
("2_2", list(range(475,485)), minor_versions("2.2" , 0))
]
####################################################################

View File

@ -686,7 +686,24 @@ def revert_specialchar(document):
"convert special characters to old syntax"
convert_specialchar_internal(document, False)
def revert_georgian(document):
"Set the document language for new supported languages to English"
if document.language == "georgian":
document.language = "english"
i = find_token(document.header, "\\language georgian", 0)
if i != -1:
document.header[i] = "\\language english"
j = find_token(document.header, "\\language_package default", 0)
if j != -1:
document.header[j] = "\\language_package babel"
k = find_token(document.header, "\\options", 0)
if k != -1:
document.header[k] = document.header[k].replace("\\options", "\\options georgian,")
else:
l = find_token(document.header, "\\use_default_options", 0)
document.header.insert(l + 1, "\\options georgian")
##
# Conversion hub
@ -705,10 +722,12 @@ convert = [
[480, []],
[481, [convert_dashes]],
[482, [convert_phrases]],
[483, [convert_specialchar]]
[483, [convert_specialchar]],
[484, []]
]
revert = [
[483, [revert_georgian]],
[482, [revert_specialchar]],
[481, [revert_phrases]],
[480, [revert_dashes]],

View File

@ -56,11 +56,11 @@ const char * const known_languages[] = {"acadian", "afrikaans", "albanian",
"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", "japanese", "kazakh", "kurmanji", "latin", "latvian", "lithuanian",
"lowersorbian", "lsorbian", "magyar", "malay", "meyalu", "mongolian", "naustrian",
"newzealand", "ngerman", "ngermanb", "norsk", "nswissgerman", "nynorsk",
"polutonikogreek", "polish", "portuges", "portuguese", "romanian", "russian",
"georgian", "greek", "hebrew", "hungarian", "icelandic", "indon", "indonesian",
"interlingua", "irish", "italian", "japanese", "kazakh", "kurmanji", "latin",
"latvian", "lithuanian", "lowersorbian", "lsorbian", "magyar", "malay", "meyalu",
"mongolian", "naustrian", "newzealand", "ngerman", "ngermanb", "norsk", "nswissgerman",
"nynorsk", "polutonikogreek", "polish", "portuges", "portuguese", "romanian", "russian",
"russianb", "samin", "scottish", "serbian", "serbian-latin", "slovak",
"slovene", "spanish", "swedish", "swissgerman", "thai", "turkish", "turkmen",
"ukraineb", "ukrainian", "uppersorbian", "UKenglish", "USenglish", "usorbian",
@ -77,11 +77,11 @@ const char * const known_coded_languages[] = {"french", "afrikaans", "albanian",
"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", "japanese", "kazakh", "kurmanji", "latin", "latvian", "lithuanian",
"lowersorbian", "lowersorbian", "magyar", "bahasam", "bahasam", "mongolian", "naustrian",
"newzealand", "ngerman", "ngerman", "norsk", "german-ch", "nynorsk",
"polutonikogreek", "polish", "portuguese", "portuguese", "romanian", "russian",
"georgian", "greek", "hebrew", "magyar", "icelandic", "bahasa", "bahasa",
"interlingua", "irish", "italian", "japanese", "kazakh", "kurmanji", "latin",
"latvian", "lithuanian", "lowersorbian", "lowersorbian", "magyar", "bahasam", "bahasam",
"mongolian", "naustrian", "newzealand", "ngerman", "ngerman", "norsk", "german-ch",
"nynorsk", "polutonikogreek", "polish", "portuguese", "portuguese", "romanian", "russian",
"russian", "samin", "scottish", "serbian", "serbian-latin", "slovak",
"slovene", "spanish", "swedish", "german-ch-old", "thai", "turkish", "turkmen",
"ukrainian", "ukrainian", "uppersorbian", "english", "english", "uppersorbian",
@ -106,7 +106,7 @@ const char * const known_french_quotes_languages[] = {"albanian",
/// languages with german quotes (.lyx names)
const char * const known_german_quotes_languages[] = {"austrian", "bulgarian",
"czech", "german", "icelandic", "lithuanian", "lowersorbian", "naustrian",
"czech", "german", "georgian", "icelandic", "lithuanian", "lowersorbian", "naustrian",
"ngerman", "serbian", "serbian-latin", "slovak", "slovene", "uppersorbian", 0};
/// languages with polish quotes (.lyx names)

View File

@ -32,8 +32,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 483 // gb: sanitize SpecialChar format
#define LYX_FORMAT_TEX2LYX 483
#define LYX_FORMAT_LYX 484 // uwestoehr: support for Georgian
#define LYX_FORMAT_TEX2LYX 484
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER