Oh. Sorry. Thank you for the help.
Joice


08.03.2019, 21:35, "Jürgen Spitzmüller" <sp...@lyx.org>:

Am Freitag, den 08.03.2019, 21:17 +0530 schrieb Joe Doe:



 08.03.2019, 21:10, "Joe Doe" <joi...@yandex.com>:
 > I will update and send the patch now within,


I think you misunderstood. You should not change lyx_2_3.py at all.
Instead, move your new reversion routines to lyx_2_4.py.

Jürgen

 > ~ Joice
 >
 >
 > 08.03.2019, 20:09, "Jürgen Spitzmüller" <sp...@lyx.org>:
 > > Am Donnerstag, den 21.02.2019, 10:12 +0530 schrieb Joe Doe:
 > > > I made some changes. I don't know the changes I made to
 > > > lib/lyx2lyx/lyx_2_3.py is correct. Please help me to complete
 > > > the
 > > > changes please.
 > > > Please find the patches.
 > >
 > > The lyx2lyx stuff must go to lyx_2_4.py (rather than lyx_2_3.py).
 > >
 > > Other than that, the patch looks good to me.
 > >
 > > Thanks,
 > > Jürgen
 > >
 > > > ~ Joice
 > > >
 > > >
 > > > 21.02.2019, 07:38, "Richard Kimberly Heck" <rikih...@lyx.org>:
 > > > > On 2/20/19 12:43 PM, Jean-Marc Lasgouttes wrote:
 > > > > > Le 20/02/2019 à 16:23, Pavel Sanda a écrit :
 > > > > > > On Wed, Feb 20, 2019 at 09:04:59AM +0000, Joice Joseph
 > > > wrote:
 > > > > > > > Hi, last day. I had send a patch file which introduced
 > > > > > > > language support
 > > > > > > > for Malayalam - an Indic language like Tamil and
 > > > Telugu. I
 > > > > > > > didn't
 > > > > > > > placed
 > > > > > > > the definition in the correct (alphabetic order)
 > > > place. So I
 > > > > > > > had
 > > > > > > > changed
 > > > > > > > the patch placing it correctly. babel have support for
 > > > > > > > Malayalam now.
 > > > > > > > So, I have included that as well.
 > > > > > > >
 > > > > > > > Please merge with the main code base and make it
 > > > available
 > > > > > > > for everyone
 > > > > > > > please.
 > > > > > > >
 > > > > > > > Please find the attached patch with this email.
 > > > > > >
 > > > > > > Hello and welcome here!
 > > > > > >
 > > > > > > I am afraid this patch is not enough, see e.g. this
 > > > commit
 > > > > > > which
 > > > > > > introduces different
 > > > > > > langauge support:
 > > > > > >
 > > > > > >
 > > > https://www.lyx.org/trac/changeset/d9c52c7a3f06ec892cd2e36d0d20998bc99b2fd8/lyxgit
 > > > > > >
 > > > > > >
 > > > > > > Uwe is not much around these days, but maybe someone
 > > > else
 > > > > > > could give
 > > > > > > you a helping hand
 > > > > > > if the hint above is too difficult...
 > > > > >
 > > > > > I am not a specialist either but the changes boil down to
 > > > three
 > > > > > parts:
 > > > > >
 > > > > > 1/ Introduce a new LyX document version (because older
 > > > versions
 > > > > > of LyX
 > > > > > will not be able to read a document in malayalam. We
 > > > increase
 > > > > > version
 > > > > > number at each change.
 > > > > >
 > > > > > Note that this means that the new language will only be
 > > > > > available with
 > > > > > LyX 2.4.0. This is annoying, but we do not add new
 > > > language sto
 > > > > > stable
 > > > > > releases.
 > > > > >
 > > > > > Concerns: src/version.h
 > > > > >
 > > > > > 2/ update the mechanism that converts old documents to new
 > > > > > format
 > > > > > (trivial, nothing to do) and to revert documents using
 > > > malayalam
 > > > > > to
 > > > > > older format. This is the ugly part in the commit shown by
 > > > > > Pavel, and
 > > > > > unfortunately I do not know how to do it
 > > > > >
 > > > > > Concerns: stuff in lib/lyx2lyx
 > > > >
 > > > > I can probably find time to do these parts on Thursday.
 > > > >
 > > > >
 > > > > > 3/ implement LaTeX importation. In proactice, one just has
 > > > to
 > > > > > add the
 > > > > > language names to some array. This shouid probably use the
 > > > > > lib/language file, but it is not done currently.
 > > > >
 > > > > I can also figure that part out, but for now it could be
 > > > left as
 > > > > TODO.
 > > > >
 > > > > Riki
 > > > >
 > > > >
From c0d1813f12fa114d2b428c529478151daccaab82 Mon Sep 17 00:00:00 2001
From: Joice <josuku...@outlook.com>
Date: Thu, 21 Feb 2019 09:55:50 +0530
Subject: [PATCH 2/2] Support for malayalam language

---
 development/FORMAT     |  3 +++
 lib/lyx2lyx/lyx_2_4.py | 25 +++++++++++++++++++++++++
 src/version.h          |  4 ++--
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/development/FORMAT b/development/FORMAT
index b87d395bc3..a568b44bc5 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be
 
 -----------------------
 
+2019-02-21 Joice Joseph <josuku...@outlook.com>
+    * Format incremented to 567: Support for Malayalam:
+        \lang malayalam
 
 2018-10-29  Guy Rutenberg <guyrutenb...@gmail.com>
 	* format incremeneted to 566: Fix direction of Hebrew parentheses in the LyX file.
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 6c0b1c707f..acb2121ad1 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -997,6 +997,7 @@ def revert_dateinfo(document):
         "lowersorbian" : ["%A, %d. %B %Y", "%d.%m.%y", "%d %B %Y", "%d %b %Y", "%d.%m.%Y"],
         "macedonian" : ["%A, %d %B %Y", "%d.%m.%y", "%d %B %Y", "%d %b %Y", "%d.%m.%Y"],
         "magyar" : ["%Y. %B %d., %A", "%Y. %m. %d.", "%Y. %B %d.", "%Y. %b %d.", "%Y.%m.%d."],
+        "malayalam" : ["%A, %d %B, %Y", "%d/%m/%y", "%d %B %Y", "%d %b %Y", "%d-%m-%Y"],
         "marathi" : ["%A, %d %B, %Y", "%d/%m/%y", "%d %B %Y", "%d %b %Y", "%d-%m-%Y"],
         "mongolian" : ["%A, %Y оны %m сарын %d", "%Y-%m-%d", "%Y оны %m сарын %d", "%d-%m-%Y", "%d-%m-%Y"],
         "naustrian" : ["%A, %d. %B %Y", "%d.%m.%y", "%d. %B %Y", "%d. %b %Y", "%d.%m.%Y"],
@@ -1179,6 +1180,7 @@ def revert_timeinfo(document):
         "lowersorbian" : ["%H:%M:%S %Z", "%H:%M"],
         "macedonian" : ["%H:%M:%S %Z", "%H:%M"],
         "magyar" : ["%H:%M:%S %Z", "%H:%M"],
+        "malayalam" : ["%p %I:%M:%S %Z", "%p %I:%M"],
         "marathi" : ["%I:%M:%S %p %Z", "%I:%M %p"],
         "mongolian" : ["%H:%M:%S %Z", "%H:%M"],
         "naustrian" : ["%H:%M:%S %Z", "%H:%M"],
@@ -1398,6 +1400,27 @@ def convert_hebrew_parentheses(document):
         elif current_language == 'hebrew' and not line.startswith('\\'):
             document.body[i] = line.replace('(','\x00').replace(')','(').replace('\x00',')')
 
+def revert_malayalam(document):
+    "Set the document language to English but assure Malayalam output"
+
+    if document.language == "malayalam":
+        document.language = "english"
+        i = find_token(document.header, "\\language malayalam", 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 default"
+        add_to_preamble(document, ["\\AtBeginDocument{\setotherlanguage{malayalam}}"])
+        document.body[2 : 2] = ["\\begin_layout Standard",
+                                "\\begin_inset ERT", "status open", "",
+                                "\\begin_layout Plain Layout", "", "",
+                                "\\backslash",
+                                "resetdefaultlanguage{malayalam}",
+                                "\\end_layout", "", "\\end_inset", "", "",
+                                "\\end_layout", ""]
+
+
 
 def revert_hebrew_parentheses(document):
     " Store parentheses in Hebrew text reversed"
@@ -1433,9 +1456,11 @@ convert = [
            [564, []],
            [565, [convert_AdobeFonts]], # Handle adobe fonts in GUI
            [566, [convert_hebrew_parentheses]],
+	   [567, []],
           ]
 
 revert =  [
+	   [567, [revert_malayalam]],
            [565, [revert_hebrew_parentheses]],
            [564, [revert_AdobeFonts]],
            [563, [revert_lformatinfo]],
diff --git a/src/version.h b/src/version.h
index 09d0ddc487..9ded82120d 100644
--- a/src/version.h
+++ b/src/version.h
@@ -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 566 // guyru: Fix parentheses in Hebrew
-#define LYX_FORMAT_TEX2LYX 566
+#define LYX_FORMAT_LYX 567 // Joice : Added support for malayalam. 
+#define LYX_FORMAT_TEX2LYX 567
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
 #ifndef _MSC_VER
-- 
2.21.0

From f5041d5f5325709bb8b126bbdde9aa6ce96e2143 Mon Sep 17 00:00:00 2001
From: Joice <josuku...@outlook.com>
Date: Wed, 20 Feb 2019 14:28:24 +0530
Subject: [PATCH 1/2] Added Malayalam language support.

---
 lib/languages | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/languages b/lib/languages
index d409ce0ba5..261728cb9d 100644
--- a/lib/languages
+++ b/lib/languages
@@ -1002,6 +1002,16 @@ Language macedonian
 	Provides         textcyrillic
 End
 
+Language malayalam
+	GuiName          "Malayalam"
+	BabelName        malayalam
+    PolyglossiaName  malayalam
+	Encoding         utf8
+    QuoteStyle       english
+	DateFormats      "dd MMMM yyyy|d MMM yyyy|dd-MM-yyyy"
+	LangCode         ml_IN
+End
+
 # not supported by babel
 Language marathi
 	GuiName          "Marathi"
-- 
2.21.0

Reply via email to