[Libreoffice-commits] dictionaries.git: en/pythonpath hu_HU/pythonpath pt_BR/pythonpath

2021-09-26 Thread Julien Nabet (via logerrit)
 en/pythonpath/lightproof_impl_en.py   |2 +-
 hu_HU/pythonpath/lightproof_impl_hu_HU.py |2 +-
 pt_BR/pythonpath/lightproof_impl_pt_BR.py |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5d9d7d50c9000119abd7b89fe0f48a41cc6a2502
Author: Julien Nabet 
AuthorDate: Sun Sep 26 13:01:02 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 26 13:03:42 2021 +0200

tdf#144730: Replace CONVERT_ADD to CONVERT to fix metric/non metric 
conversions

Regression from

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ced79363cc30f225e766195ace4f892754fc85a0
author  Eike Rathke   2016-08-03 18:56:01 +0200
committer   Eike Rathke   2016-08-03 18:57:37 +0200
commit  ced79363cc30f225e766195ace4f892754fc85a0 (patch)
tree94b2554faecda3744b05dcf61b99ebc2b25be5ab
parent  fa2fdb6607a7b961affadb6ca633b8feed828467 (diff)
Resolves: tdf#69539 UI rename CONVERT to CONVERT_OOO, CONVERT_ADD to CONVERT
... with same syntax but different semantics that was even more confusing.

Change-Id: I8d0badb231e58c9208f58fcbe013bbad4309ce74

diff --git a/en/pythonpath/lightproof_impl_en.py 
b/en/pythonpath/lightproof_impl_en.py
index 06d44a6..264b73b 100644
--- a/en/pythonpath/lightproof_impl_en.py
+++ b/en/pythonpath/lightproof_impl_en.py
@@ -326,7 +326,7 @@ aB = set(["H", "habitual", "hallucination", "haute", 
"hauteur", "herb", "herbace
 def measurement(mnum, min, mout, mstr, decimal, remove):
 if min == "ft" or min == "in" or min == "mi":
 mnum = mnum.replace(" 1/2", ".5").replace(u" \xbd", 
".5").replace(u"\xbd",".5")
-m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, 
"").replace(decimal, ".").replace(u"\u2212", "-"))), min, mout))
+m = calc("CONVERT", (float(eval(mnum.replace(remove, "").replace(decimal, 
".").replace(u"\u2212", "-"))), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
 a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") 
+ mstr
diff --git a/hu_HU/pythonpath/lightproof_impl_hu_HU.py 
b/hu_HU/pythonpath/lightproof_impl_hu_HU.py
index ef8fb0a..144b2b5 100644
--- a/hu_HU/pythonpath/lightproof_impl_hu_HU.py
+++ b/hu_HU/pythonpath/lightproof_impl_hu_HU.py
@@ -256,7 +256,7 @@ def suggest_foreign(word):
 
 
 def measurement(mnum, min, mout, mstr):
-m = calc("CONVERT_ADD", (float(mnum.replace(",", ".").replace(u"\u2212", 
"-")), min, mout))
+m = calc("CONVERT", (float(mnum.replace(",", ".").replace(u"\u2212", 
"-")), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
 a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "|").join(a).replace(".", ",").replace("-", u"\u2212") + 
mstr
diff --git a/pt_BR/pythonpath/lightproof_impl_pt_BR.py 
b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
index 8087e97..233cd42 100644
--- a/pt_BR/pythonpath/lightproof_impl_pt_BR.py
+++ b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
@@ -24417,7 +24417,7 @@ acvbPst = set(["aluem",
 def measurement(mnum, min, mout, mstr, decimal, remove):
 if min == "ft" or min == "in" or min == "mi":
 mnum = mnum.replace(" 1/2", ".5").replace(u" ½", 
".5").replace(u"½",".5")
-m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, 
"").replace(decimal, ".").replace(u"\u2212", "-"))), min, mout))
+m = calc("CONVERT", (float(eval(mnum.replace(remove, "").replace(decimal, 
".").replace(u"\u2212", "-"))), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
 a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "\n").join(a).replace(".", decimal).replace("-","\u2212") + 
mstr


[Libreoffice-commits] dictionaries.git: en/pythonpath hu_HU/pythonpath pt_BR/pythonpath

2014-05-15 Thread László Németh
 en/pythonpath/lightproof_impl_en.py   |2 +-
 hu_HU/pythonpath/lightproof_impl_hu_HU.py |2 +-
 pt_BR/pythonpath/lightproof_impl_pt_BR.py |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 38b1410ca674bd47d218e4e77cf90e6adcc6d87c
Author: László Németh 
Date:   Thu May 15 13:03:17 2014 +0200

fix LightProof measurement conversion for Python 3

Change-Id: I6d36bc804271956e1c8649df0832615311fcf5e1

diff --git a/en/pythonpath/lightproof_impl_en.py 
b/en/pythonpath/lightproof_impl_en.py
index 2c7072c..ac668dc 100644
--- a/en/pythonpath/lightproof_impl_en.py
+++ b/en/pythonpath/lightproof_impl_en.py
@@ -328,7 +328,7 @@ def measurement(mnum, min, mout, mstr, decimal, remove):
 mnum = mnum.replace(" 1/2", ".5").replace(u" \xbd", 
".5").replace(u"\xbd",".5")
 m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, 
"").replace(decimal, ".").replace(u"\u2212", "-"))), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
-a.sort(lambda x, y: len(x) - len(y)) # sort by string length
+a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") 
+ mstr
 
 
diff --git a/hu_HU/pythonpath/lightproof_impl_hu_HU.py 
b/hu_HU/pythonpath/lightproof_impl_hu_HU.py
index 62e0025..d88c136 100644
--- a/hu_HU/pythonpath/lightproof_impl_hu_HU.py
+++ b/hu_HU/pythonpath/lightproof_impl_hu_HU.py
@@ -244,7 +244,7 @@ paralcap = 
re.compile(u"(?u)^[a-z\xf6\xfc\xf3\u0151\xfa\xe9\xe1\u0171\xed].*[.?!
 def measurement(mnum, min, mout, mstr):
 m = calc("CONVERT_ADD", (float(mnum.replace(",", ".").replace(u"\u2212", 
"-")), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
-a.sort(lambda x, y: len(x) - len(y)) # sort by string length
+a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "|").join(a).replace(".", ",").replace("-", u"\u2212") + 
mstr
 
 
diff --git a/pt_BR/pythonpath/lightproof_impl_pt_BR.py 
b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
index 8d0100f..8611ee5 100644
--- a/pt_BR/pythonpath/lightproof_impl_pt_BR.py
+++ b/pt_BR/pythonpath/lightproof_impl_pt_BR.py
@@ -24417,7 +24417,7 @@ def measurement(mnum, min, mout, mstr, decimal, remove):
 mnum = mnum.replace(" 1/2", ".5").replace(u" \xbd", 
".5").replace(u"\xbd",".5")
 m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, 
"").replace(decimal, ".").replace(u"\u2212", "-"))), min, mout))
 a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), 
str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items
-a.sort(lambda x, y: len(x) - len(y)) # sort by string length
+a.sort(key=lambda x: len(x)) # sort by string length
 return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") 
+ mstr
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits