diff --git a/CHANGELOG b/CHANGELOG index 3f0c6510d2..f56ad4d2b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add monetary formatting to language * Add exceptional parent language * Add get method on ir.lang * Convert format, currency and strftime of ir.lang into instance methods diff --git a/trytond/ir/ir.xml b/trytond/ir/ir.xml index f23fd853d7..f20cd4f837 100644 --- a/trytond/ir/ir.xml +++ b/trytond/ir/ir.xml @@ -14,6 +14,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] . , + [3, 3, 0] + . + , + 1 + 1 + + - + + + + ' are markers if the sign must be inserted # between symbol and value s = '<' + s + '>' if symbol: smb = currency.symbol - precedes = (val < 0 and currency.n_cs_precedes - or currency.p_cs_precedes) - separated = (val < 0 and currency.n_sep_by_space - or currency.p_sep_by_space) + precedes = (val < 0 and self.n_cs_precedes + or self.p_cs_precedes) + separated = (val < 0 and self.n_sep_by_space + or self.p_sep_by_space) if precedes: s = smb + (separated and ' ' or '') + s else: s = s + (separated and ' ' or '') + smb - sign_pos = val < 0 and currency.n_sign_posn or currency.p_sign_posn - sign = val < 0 and currency.negative_sign or currency.positive_sign + sign_pos = val < 0 and self.n_sign_posn or self.p_sign_posn + sign = val < 0 and self.negative_sign or self.positive_sign if sign_pos == 0: s = '(' + s + ')' diff --git a/trytond/ir/lang.xml b/trytond/ir/lang.xml index d75cf40de1..b37f4e1a92 100644 --- a/trytond/ir/lang.xml +++ b/trytond/ir/lang.xml @@ -12,6 +12,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , +   + 1 + 1 + + - + + + + ca @@ -20,6 +31,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , + [] + , + . + 1 + 1 + + - + + + + cs @@ -28,6 +50,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , + [3, 3, 0] + , +   + 1 + 1 + + - + + + + de @@ -36,6 +69,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + . + 1 + 1 + + - + + + + [3, 3, 0] , . + [3, 3, 0] + , + . + 1 + 1 + + - + + + + es_419 Spanish (Latin American) %d/%m/%Y [3, 3, 0] - , - . + . + , + [3, 3, 0] + . + , + 1 + 1 + + - + + + + fr @@ -63,6 +129,17 @@ this repository contains the full copyright notices and license terms. --> [3, 0] , + [3, 0] + , + + 1 + 1 + + - + + + + hu_HU @@ -71,6 +148,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + . + 1 + 1 + + - + + + + it_IT @@ -79,6 +167,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + . + 1 + 1 + + - + + + + lo @@ -87,6 +186,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] . , + [3, 3, 0] + . + , + 4 + 4 + + - + + + + lt @@ -95,6 +205,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] ,   + [3, 3, 0] + , + . + 1 + 1 + + - + + + + nl @@ -103,6 +224,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + + 1 + 2 + + - + + + + pl @@ -110,6 +242,17 @@ this repository contains the full copyright notices and license terms. --> %d.%m.%Y , + [3, 3, 0] + , + . + 1 + 1 + + - + + + + pt_BR @@ -118,6 +261,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + . + 1 + 1 + + - + + + + ru @@ -126,6 +280,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , + [3, 3, 0] + . +   + 1 + 1 + + - + + + + sl @@ -134,6 +299,17 @@ this repository contains the full copyright notices and license terms. --> [3, 3, 0] , . + [3, 3, 0] + , + + 1 + 1 + + - + + + + zh_CN @@ -142,6 +318,17 @@ this repository contains the full copyright notices and license terms. --> [3, 0] . , + [3, 0] + . + , + 4 + 4 + + - + + + + diff --git a/trytond/ir/view/lang_form.xml b/trytond/ir/view/lang_form.xml index 5cc4fffd57..877b2831b7 100644 --- a/trytond/ir/view/lang_form.xml +++ b/trytond/ir/view/lang_form.xml @@ -24,4 +24,31 @@ this repository contains the full copyright notices and license terms. -->