mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Add support for Swiss German (bug 5450). File format change.
Babel doesn't support this variant (yet), so we use ngerman. However, for spell checking and thesaurus, this makes a difference. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27725 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b6938386a2
commit
9b39fbf557
@ -41,6 +41,7 @@ french french "French" false iso8859-15 fr_FR "\addto\extrasfrench{\prov
|
||||
galician galician "Galician" false iso8859-15 gl_ES ""
|
||||
german german "German (old spelling)" false iso8859-15 de_DE ""
|
||||
ngerman ngerman "German" false iso8859-15 de_DE ""
|
||||
german-ch ngerman "German (Switzerland)" false iso8859-15 de_CH ""
|
||||
greek greek "Greek" false iso8859-7 el_GR ""
|
||||
polutonikogreek polutonikogreek "Greek (polytonic)" false iso8859-7 el_GR "\makeatletter\let\lyx@tildeaccent\~\addto\extraspolutonikogreek{\bbl@deactivate{~}\let\~\lyx@tildeaccent}\addto\extrasgreek{\bbl@deactivate{~}\let\~\lyx@tildeaccent}\makeatother"
|
||||
hebrew hebrew "Hebrew" true cp1255 he_IL ""
|
||||
|
@ -81,8 +81,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
|
||||
("1_4", range(222,246), minor_versions("1.4" , 5)),
|
||||
("1_5", range(246,277), minor_versions("1.5" , 7)),
|
||||
("1_6", range(277,346), minor_versions("1.6" , 0)),
|
||||
]
|
||||
# ("2_0", [], minor_versions("2.0", 0))]
|
||||
("2_0", [], minor_versions("2.0", 0))]
|
||||
|
||||
####################################################################
|
||||
# This is useful just for development versions #
|
||||
|
@ -29,18 +29,32 @@ def find_end_of_inset(lines, i):
|
||||
|
||||
####################################################################
|
||||
|
||||
def dummy(document):
|
||||
pass
|
||||
|
||||
def revert_swiss(document):
|
||||
"Set language german-ch to ngerman"
|
||||
i = 0
|
||||
if document.language == "german-ch":
|
||||
document.language = "ngerman"
|
||||
i = find_token(document.header, "\\language", 0)
|
||||
if i != -1:
|
||||
document.header[i] = "\\language ngerman"
|
||||
j = 0
|
||||
while True:
|
||||
j = find_token(document.body, "\\lang german-ch", j)
|
||||
if j == -1:
|
||||
return
|
||||
document.body[j] = document.body[j].replace("\\lang german-ch", "\\lang ngerman")
|
||||
j = j + 1
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
|
||||
supported_versions = ["2.2.0","2.0"]
|
||||
convert = [[346, [dummy]]
|
||||
convert = [[346, []]
|
||||
]
|
||||
|
||||
revert = [[345, []]
|
||||
revert = [[345, [revert_swiss]]
|
||||
]
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ namespace {
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
int const LYX_FORMAT = 345; // jamatos: xml elements
|
||||
int const LYX_FORMAT = 346; // jspitzm: Swiss German
|
||||
|
||||
typedef map<string, bool> DepClean;
|
||||
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
Loading…
Reference in New Issue
Block a user