Re: patch: added document language malayalam

2019-03-10 Thread Joe Doe
Thank you very much. :-)Joice10.03.2019, 21:15, "Jürgen Spitzmüller" :Am Sonntag, den 10.03.2019, 20:57 +0530 schrieb Joe Doe: Thank you very much for the support, Jürgen.Thank you! It's committed.Jürgen Joice


Re: patch: added document language malayalam

2019-03-10 Thread Jürgen Spitzmüller
Am Sonntag, den 10.03.2019, 20:57 +0530 schrieb Joe Doe:
> Thank you very much for the support, Jürgen.

Thank you! It's committed.

Jürgen

>  
> Joice


signature.asc
Description: This is a digitally signed message part


Re: patch: added document language malayalam

2019-03-10 Thread Joe Doe
  10.03.2019, 12:29, "Jürgen Spitzmüller" :Am Samstag, den 09.03.2019, 20:52 +0530 schrieb Joe Doe: hi. why not. Thanks for the help. I hereby grant permission to license any and all contributions I've made to LyX under the Gnu GPL version 2 or later.Thanks for this. Meanwhile I had a closer look at the languagesituation. If I am not mistaken, there is not yet proper malayalamsupport in babel, is it? So  + BabelName malayalam https://github.com/latex3/latex2e/blob/master/required/babel/locale/ml/babel-ml.inidoes most probably not work.(Malayalam is experimentally supported by a babel "ini" file, but I amunable to produce a working document)I see, however, that there is the malayalam-latex package fortypesetting Mayalalam with traditional LaTeX:http://www.ctan.org/pkg/malayalam-latexBut this uses latin transliteration, so we cannot support it withoutmajor work.Thus, I'd suggest to only support polyglossia for the moment.It is al right. I will update the patch and send it. thank yIs that fine with you, Joice?JürgenThank you very much for the support, Jürgen. JoiceFrom b663546a41fb4db0762cd894d63f0c21d76a2642 Mon Sep 17 00:00:00 2001
From: Joice 
Date: Thu, 21 Feb 2019 09:55:50 +0530
Subject: [PATCH 2/2] Support for malayalam language

---
 development/FORMAT |  3 +++
 lib/languages  |  1 -
 lib/lyx2lyx/lyx_2_4.py | 25 +
 src/version.h  |  4 ++--
 4 files changed, 30 insertions(+), 3 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 
+* Format incremented to 567: Support for Malayalam:
+\lang malayalam
 
 2018-10-29  Guy Rutenberg 
 	* format incremeneted to 566: Fix direction of Hebrew parentheses in the LyX file.
diff --git a/lib/languages b/lib/languages
index 261728cb9d..256ac933b3 100644
--- a/lib/languages
+++ b/lib/languages
@@ -1004,7 +1004,6 @@ End
 
 Language malayalam
 	GuiName  "Malayalam"
-	BabelNamemalayalam
 PolyglossiaName  malayalam
 	Encoding utf8
 QuoteStyle   english
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 6c0b1c707f..9fe041e87d 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]], # 

Re: patch: added document language malayalam

2019-03-09 Thread Jürgen Spitzmüller
Am Samstag, den 09.03.2019, 20:52 +0530 schrieb Joe Doe:
> hi.
> why not. Thanks for the help.
> I hereby grant permission to license any and all contributions I've
> made to LyX under the Gnu GPL version 2 or later.

Thanks for this. Meanwhile I had a closer look at the language
situation. If I am not mistaken, there is not yet proper malayalam
support in babel, is it? So

> + BabelNamemalayalam

does most probably not work.

(Malayalam is experimentally supported by a babel "ini" file, but I am
unable to produce a working document)

I see, however, that there is the malayalam-latex package for
typesetting Mayalalam with traditional LaTeX: 
http://www.ctan.org/pkg/malayalam-latex

But this uses latin transliteration, so we cannot support it without
major work.

Thus, I'd suggest to only support polyglossia for the moment.

Is that fine with you, Joice?

Jürgen


signature.asc
Description: This is a digitally signed message part


Re: patch: added document language malayalam

2019-03-09 Thread Joe Doe
hi.why not. Thanks for the help.I hereby grant permission to license any and all contributions I'vemade to LyX under the Gnu GPL version 2 or later.Joice09.03.2019, 14:34, "Jürgen Spitzmüller" :Am Samstag, den 09.03.2019, 09:55 +0100 schrieb Jürgen Spitzmüller: Am Freitag, den 08.03.2019, 22:16 +0530 schrieb Joe Doe: > Oh. Sorry. Thank you for the help. You're welcome. One minor thing: >  revert =  [ > +	   [567, [revert_malayalam]], must be[566, [revert_malayalam]], since in revert, we refer to the version we revert to (the one before the feature to revert was introduced) Also, it looks like the indentation is wrong at this very place and the convert list above (you used tabs, whereas spaces are used). Python is picky with this.And one last thing we need before I can commit your patch is your GPLagreement. Please post a message to this list with a text such as:"I hereby grant permission to license any and all contributions I'vemade to LyX under the Gnu GPL version 2 or later."ThanksJürgen

Re: patch: added document language malayalam

2019-03-09 Thread Jürgen Spitzmüller
Am Samstag, den 09.03.2019, 09:55 +0100 schrieb Jürgen Spitzmüller:
> Am Freitag, den 08.03.2019, 22:16 +0530 schrieb Joe Doe:
> > Oh. Sorry. Thank you for the help.
> 
> You're welcome. One minor thing:
> 
> >  revert =  [
> > +  [567, [revert_malayalam]],
> 
> must be
> 
>  [566, [revert_malayalam]],
> 
> since in revert, we refer to the version we revert to (the one before
> the feature to revert was introduced)
> 
> Also, it looks like the indentation is wrong at this very place and
> the
> convert list above (you used tabs, whereas spaces are used). Python
> is
> picky with this.

And one last thing we need before I can commit your patch is your GPL
agreement. Please post a message to this list with a text such as:

"I hereby grant permission to license any and all contributions I've
made to LyX under the Gnu GPL version 2 or later."

Thanks
Jürgen




signature.asc
Description: This is a digitally signed message part


Re: patch: added document language malayalam

2019-03-09 Thread Jürgen Spitzmüller
Am Freitag, den 08.03.2019, 22:16 +0530 schrieb Joe Doe:
> Oh. Sorry. Thank you for the help.

You're welcome. One minor thing:

>  revert =  [
> +[567, [revert_malayalam]],

must be

   [566, [revert_malayalam]],

since in revert, we refer to the version we revert to (the one before
the feature to revert was introduced)

Also, it looks like the indentation is wrong at this very place and the
convert list above (you used tabs, whereas spaces are used). Python is
picky with this.

Thanks
Jürgen

> Joice
> 
> 
> 08.03.2019, 21:35, "Jürgen Spitzmüller" :
> > Am Freitag, den 08.03.2019, 21:17 +0530 schrieb Joe Doe:
> > > 
> > >  08.03.2019, 21:10, "Joe Doe" :
> > >  > 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" :
> > >  > > 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 +, 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 

Re: patch: added document language malayalam

2019-03-08 Thread Joe Doe
Oh. Sorry. Thank you for the help.Joice08.03.2019, 21:35, "Jürgen Spitzmüller" :Am Freitag, den 08.03.2019, 21:17 +0530 schrieb Joe Doe: 08.03.2019, 21:10, "Joe Doe" : > 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" : > > 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" : > > >  > 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 +, 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 
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 
+* Format incremented to 567: Support for Malayalam:
+\lang malayalam
 
 2018-10-29  Guy Rutenberg 
 	* 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. 

Re: patch: added document language malayalam

2019-03-08 Thread Jürgen Spitzmüller
Am Freitag, den 08.03.2019, 21:17 +0530 schrieb Joe Doe:
> 
> 
> 08.03.2019, 21:10, "Joe Doe" :
> > 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" :
> > > 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" :
> > > >  > 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 +, 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
> > > >  > 
> > > >  > 


signature.asc
Description: This is a digitally signed message part


Re: patch: added document language malayalam

2019-03-08 Thread Joe Doe
I will update and send the patch now within,~ Joice08.03.2019, 20:09, "Jürgen Spitzmüller" :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" : > 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 +, 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 >  > 

Re: patch: added document language malayalam

2019-03-08 Thread Jürgen Spitzmüller
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" :
> > 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 +, 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
> > 
> > 


signature.asc
Description: This is a digitally signed message part


Re: patch: added document language malayalam

2019-02-20 Thread 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.~ Joice21.02.2019, 07:38, "Richard Kimberly Heck" :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 +, 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/lyx2lyxI 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.RikiFrom 550d89a05ae076520c9d1e8748dd00c19ea8914e Mon Sep 17 00:00:00 2001
From: Joice 
Date: Thu, 21 Feb 2019 09:55:50 +0530
Subject: [PATCH 2/2] Support for malayalam language

---
 development/FORMAT |  3 +++
 lib/lyx2lyx/lyx_2_3.py | 25 -
 lib/lyx2lyx/lyx_2_4.py |  2 ++
 src/version.h  |  4 ++--
 4 files changed, 31 insertions(+), 3 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 
+* Format incremented to 567: Support for Malayalam:
+\lang malayalam
 
 2018-10-29  Guy Rutenberg 
 	* format incremeneted to 566: Fix direction of Hebrew parentheses in the LyX file.
diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py
index ef79484f96..3569e702b9 100644
--- a/lib/lyx2lyx/lyx_2_3.py
+++ b/lib/lyx2lyx/lyx_2_3.py
@@ -319,6 +319,26 @@ def revert_asturian(document):
 "resetdefaultlanguage{asturian}",
 "\\end_layout", "", "\\end_inset", "", "",
 "\\end_layout", ""]
+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_kannada(document):
@@ -2233,10 +2253,13 @@ convert = [
[541, [convert_allowbreak]],
[542, [convert_mathnumberpos]],
[543, [convert_mathnumberingname]],
-   [544, [convert_minted]]
+   [544, [convert_minted]],
+   [567, []]
+
   ]
 
 revert =  [
+   [567, [revert_malayalam]],
[543, [revert_minted, revert_longtable_lscape]],
[542, [revert_mathnumberingname]],
[541, [revert_mathnumberpos]],
diff --git a/lib/lyx2lyx/lyx_2_4.py 

Re: patch: added document language malayalam

2019-02-20 Thread Richard Kimberly Heck
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 +, 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




Re: patch: added document language malayalam

2019-02-20 Thread Jean-Marc Lasgouttes

Le 20/02/2019 à 16:23, Pavel Sanda a écrit :

On Wed, Feb 20, 2019 at 09:04:59AM +, 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...


Hello,

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

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.


Concerns: stuff in src/tex2lyx.



I agree this looks very intimidating, but this is the best advice I can 
offer right now. Maybe someone with better knowledge can chime in.


JMarc


Re: patch: added document language malayalam

2019-02-20 Thread Pavel Sanda
On Wed, Feb 20, 2019 at 09:04:59AM +, 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...

Cheers,
Pavel


Re: patch: added document language malayalam

2019-02-20 Thread Joice Joseph
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.

Thank you, Joice Joseph

On 20/2/19 12:30 AM, Joice wrote:
> please find the patch with this email.
>
> Thank you, Joice Joseph
>
From f5041d5f5325709bb8b126bbdde9aa6ce96e2143 Mon Sep 17 00:00:00 2001
From: Joice 
Date: Wed, 20 Feb 2019 14:28:24 +0530
Subject: [PATCH] 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"
+	BabelNamemalayalam
+PolyglossiaName  malayalam
+	Encoding utf8
+QuoteStyle   english
+	DateFormats  "dd  |d MMM |dd-MM-"
+	LangCode ml_IN
+End
+
 # not supported by babel
 Language marathi
 	GuiName  "Marathi"
-- 
2.20.1