<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Adam+majewski</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Adam+majewski"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Adam_majewski"/>
	<updated>2026-05-25T14:36:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:NUMBERTEXT/MONEYTEXT_development&amp;diff=173688</id>
		<title>Talk:NUMBERTEXT/MONEYTEXT development</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:NUMBERTEXT/MONEYTEXT_development&amp;diff=173688"/>
		<updated>2010-06-30T15:27:27Z</updated>

		<summary type="html">&lt;p&gt;Adam majewski: /* language / mony codes */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Discussion page of NUMBERTEXT/MONEYTEXT development ==&lt;br /&gt;
&lt;br /&gt;
Start a new section for a new theme, bug report or a language module (Soros program). See also [http://numbertext.org NUMBERTEXT.org].&lt;br /&gt;
&lt;br /&gt;
License requirements: Soros programs of NUMBERTEXT project are released under LGPL/BSD dual-license.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt; (four tilde) at the end of your comment to include your login name and a time stamp.&lt;br /&gt;
&lt;br /&gt;
To indent your comment, use one or more colons at the beginning of it.&lt;br /&gt;
&lt;br /&gt;
== Some languages need male/female option for number to text==&lt;br /&gt;
&lt;br /&gt;
Hi, in Catalan de  numbers 1 and 2 can be male or female, based on what&amp;#039;s numered. Example: cotxe (car) is male and flor (flower) is female. So 1 cotxe (one car) is spelled &amp;quot;un cotxe&amp;quot; and 1 flor (one flower) is spelled &amp;quot;una flor&amp;quot;. So, 1--&amp;gt; un (if male noun) and una (if female noun), 2 --&amp;gt; dos (if male noun) and dues (if female noun).&lt;br /&gt;
&lt;br /&gt;
This male/female change also happens in numbers finished in 1 and 2 different that 11 and 12 (21, 22, 31, 32, ...) and also in hundreds and thousands.&lt;br /&gt;
&lt;br /&gt;
Spanish also has this male/female, but only in numbers finished in 1. In Spanish 2 it&amp;#039;s always spelled &amp;quot;dos&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, this male/female isseu als is important for currency to text. Many currency are treated as male nouns: euro, dollar. But few currencis are &amp;quot;female&amp;quot;: sterling pounds or the old spanish peseta. So, 1200 $ is spelled as &amp;quot;mil dos-cents dòllars&amp;quot;, but 1200 PTA is spelled as &amp;quot;mil dues-centes pessetes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: I have fixed them by text converters. ca_ES uses manual arguments for the gender of the currency units and subunits, es_ES module uses automatic gender detection (feminine units end with &amp;quot;a&amp;quot; or &amp;quot;as&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
 # masculine to feminine conversion of &amp;quot;un&amp;quot; after millions,&lt;br /&gt;
 # if &amp;quot;as?$&amp;quot; matches currency name&lt;br /&gt;
 &lt;br /&gt;
 f:(.*ill)(.*),(.*) \1$(f:\2,\3)		# don&amp;#039;t modify un in millions&lt;br /&gt;
 f:(.*un)([^a].*,|,)(.*as?) $(f:\1a\2\3)	# un libra -&amp;gt; una libra&lt;br /&gt;
 f:(.*),(.*) \1 \2&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;([A-Z]{3}) ([-−]?1)&amp;quot; $(f:|$2,$(\1:us))&lt;br /&gt;
 &amp;quot;([A-Z]{3}) ([-−]?\d+0{6,})&amp;quot; $2 de $(\1:up)&lt;br /&gt;
 &amp;quot;([A-Z]{3}) ([-−]?\d+)&amp;quot; $(f:|$2,$(\1:up))&lt;br /&gt;
&lt;br /&gt;
: Thanks for your report. [[User:Nemeth|Nemeth]] 22:12, 3 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Works fine with currency, thanks.  But I&amp;#039;m thinking in some additional option in NUMBERTEX OOo Calc function.&lt;br /&gt;
Currently we have,&lt;br /&gt;
=NUMBERTEXT(number);&lt;br /&gt;
=NUMBERTEXT(number,lang_code);&lt;br /&gt;
What about?&lt;br /&gt;
=NUMBERTEXT(number,lang_code, gender_code); Where gender_code can be: 0,1,2,.... Catalan only needs 2 variations, but may be other languages uses 3 or more variations. Of course, masculine/0 code as default.&lt;br /&gt;
&lt;br /&gt;
or maybe better?&lt;br /&gt;
=NUMBERTEXT_FEM(number);&lt;br /&gt;
=NUMBERTEXT_FEM(number,lang_code); for &amp;quot;feminine&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
Of course, we could use MONEYTEXT function with a fake currency code, with feminine tag, but empty units strings. But I think it is a workarround.&lt;br /&gt;
--[[User:Jmontane|Jmontane]] 20:35, 6 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: NUMBERTEXT is a string function. The numeric input converted by Calc automatically. What about&lt;br /&gt;
&lt;br /&gt;
 NUMBERTEXT(&amp;quot;ordinal:4545&amp;quot;)&lt;br /&gt;
 NUMBERTEXT(&amp;quot;feminine:564&amp;quot;)&lt;br /&gt;
 NUMBERTEXT(&amp;quot;ordinal-feminine:564&amp;quot;)&lt;br /&gt;
 NUMBERTEXT(CONCATENATE(&amp;quot;ordinal-feminine:&amp;quot;;$A1))&lt;br /&gt;
&lt;br /&gt;
: and similar expressions?&lt;br /&gt;
&lt;br /&gt;
: Maybe for the special handling of dates, we have to add a DATETEXT() function. Thanks for your suggestions. [[User:Nemeth|Nemeth]] 11:36, 10 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Yes, I thinks it&amp;#039;s fine. I looked at en_US_2 code on Numbertext IDE. But, will be these prefixes (ordinal, feminine,...) language dependant? Whe can define them freely?&lt;br /&gt;
:: I think it&amp;#039;s a good option.&lt;br /&gt;
--[[User:Jmontane|Jmontane]] 12:10, 28 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Minor bug in Spanish language definition ==&lt;br /&gt;
&lt;br /&gt;
Spanish has gender variation in numbers containing the string &amp;quot;ientos&amp;quot; (doscientos/as, quinientos/as, novecientos/as, etc). It generates &amp;quot;doscientos libras&amp;quot;, but the correct would be &amp;quot;doscientas libras&amp;quot;. I think that this line should solve this:&lt;br /&gt;
&lt;br /&gt;
 f:(.*ient)o(s.*),(.*as?) $(f:\1a\2,\3)   # doscientos libra/libras -&amp;gt; doscientas&lt;br /&gt;
&lt;br /&gt;
--[[User:Roebek|Roebek]] 16:24, 25 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Thanks for your patch. There is in the new Numbertext 0.7 release. [[User:Nemeth|Nemeth]] 11:36, 10 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some fixes on Catalan definition ==&lt;br /&gt;
&lt;br /&gt;
 __numbertext__ &lt;br /&gt;
 &lt;br /&gt;
 ^0 zero&lt;br /&gt;
 1$ u&lt;br /&gt;
 1 un&lt;br /&gt;
 2 dos&lt;br /&gt;
 3 tres&lt;br /&gt;
 4 quatre&lt;br /&gt;
 5 cinc&lt;br /&gt;
 6 sis&lt;br /&gt;
 7 set&lt;br /&gt;
 8 vuit&lt;br /&gt;
 9 nou&lt;br /&gt;
 10 deu&lt;br /&gt;
 11 onze&lt;br /&gt;
 12 dotze&lt;br /&gt;
 13 tretze&lt;br /&gt;
 14 catorze&lt;br /&gt;
 15 quinze&lt;br /&gt;
 16 setze&lt;br /&gt;
 17 disset&lt;br /&gt;
 1(\d) di$1&lt;br /&gt;
 20 vint&lt;br /&gt;
 2(\d) vint-i-$1&lt;br /&gt;
 30 trenta&lt;br /&gt;
 40 quaranta&lt;br /&gt;
 50 cinquanta&lt;br /&gt;
 60 seixanta&lt;br /&gt;
 70 setanta&lt;br /&gt;
 80 vuitanta&lt;br /&gt;
 90 noranta&lt;br /&gt;
 (\d)(\d) $(\10)-$2&lt;br /&gt;
 1(\d\d) cent $1&lt;br /&gt;
 (\d)(\d\d) $1-cents $2&lt;br /&gt;
 1(\d{3}) mil $1&lt;br /&gt;
 (\d{1,3})(\d{3}) $1 mil $2&lt;br /&gt;
 1(\d{6}) un milió $1&lt;br /&gt;
 (\d{1,6})(\d{6}) $1 milions $2&lt;br /&gt;
 1(\d{9}) mil milions $1&lt;br /&gt;
 1(\d{12}) un bilió $1&lt;br /&gt;
 (\d{1,6})(\d{12}) $1 bilions $2&lt;br /&gt;
 1(\d{18}) un trilió $1&lt;br /&gt;
 (\d{1,6})(\d{18}) $1 trilions $2&lt;br /&gt;
 1(\d{24}) un quadrilió $1&lt;br /&gt;
 (\d{1,6})(\d{24}) $1 quadrilions $2  &lt;br /&gt;
 &lt;br /&gt;
 # negative number?&lt;br /&gt;
 &lt;br /&gt;
 [-−](\d+) menys |$1&lt;br /&gt;
 &lt;br /&gt;
 # decimals&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;([-−]?\d+)[.,]&amp;quot; $1| coma&lt;br /&gt;
 &amp;quot;([-−]?\d+[.,]\d*)(\d)&amp;quot; $1| |$2&lt;br /&gt;
 &lt;br /&gt;
 # currency&lt;br /&gt;
 &lt;br /&gt;
 # unit/subunit singular/plural&lt;br /&gt;
 &lt;br /&gt;
 us:([^,]*),([^,]*),([^,]*),([^,]*) \1&lt;br /&gt;
 up:([^,]*),([^,]*),([^,]*),([^,]*) \2&lt;br /&gt;
 ss:([^,]*),([^,]*),([^,]*),([^,]*) \3&lt;br /&gt;
 sp:([^,]*),([^,]*),([^,]*),([^,]*) \4&lt;br /&gt;
 CHF:(\D+) $(\1: franc suís, francs suís, cèntim, cèntims)&lt;br /&gt;
 EUR:(\D+) $(\1: euro, euros, cèntim, cèntims)&lt;br /&gt;
 GBP:(\D+) $(\1: lliura esterlina, lliures esterlines, penic, penics)&lt;br /&gt;
 JPY:(\D+) $(\1: ien, iens, sen, sen)&lt;br /&gt;
 USD:(\D+) $(\1: dòlar EUA, dòlar EUA, cent, cents)&lt;br /&gt;
 &amp;quot;([A-Z]{3}) ([-−]?1)([.,]00?)?&amp;quot; $2 $(\1:us)&lt;br /&gt;
 &amp;quot;([A-Z]{3}) ([-−]?\d+)([.,]00?)?&amp;quot; $2 $(\1:up)&lt;br /&gt;
 &amp;quot;(([A-Z]{3}) [-−]?\d+)[.,](01)&amp;quot; $1 amb $(1) $(\2:ss)&lt;br /&gt;
 &amp;quot;(([A-Z]{3}) [-−]?\d+)[.,](\d)&amp;quot; $1 amb $(\30) $(\2:sp)&lt;br /&gt;
 &amp;quot;(([A-Z]{3}) [-−]?\d+)[.,](\d\d)&amp;quot; $1 amb $3 $(\2:sp) &lt;br /&gt;
&lt;br /&gt;
: Fixed in Numbertext 0.6. Many thanks for your help. [[User:Nemeth|Nemeth]] 22:16, 3 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Thanks for your work. I&amp;#039;ve updated at launchpad (bug #425374) Catalan Soros code with some additional fixes and improvements.--[[User:Jmontane|Jmontane]] 20:36, 6 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== French numbering remarks ==&lt;br /&gt;
&lt;br /&gt;
Congratulations for this fantastic extension ! It was needed for many years !&lt;br /&gt;
&lt;br /&gt;
These remarks are still valid for version 0.9 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== MONEYTEXT ====&lt;br /&gt;
&lt;br /&gt;
a) Not language specific : When there is more than two decimals, MONEYTEXT rounds the value to 2 decimals, that is correct behaviour, I think. But currently it rounds up only above decimal 5, instead of from decimal 5, and not even in every cases.&lt;br /&gt;
&lt;br /&gt;
Compare with the rounding of Calc when formatted with 2 decimals :&lt;br /&gt;
&lt;br /&gt;
: Value 9,9949 is displayed 10 by Calc, but MONEYTEXT will treat it like 9,99&lt;br /&gt;
: MONEYTEXT produces 10 only for a value strictly greater that 9,995, for example 9,995001&lt;br /&gt;
&lt;br /&gt;
Value 5,995 Euros in en-US gives : six euro and zero cents&lt;br /&gt;
: rounding up is correct but...&lt;br /&gt;
: the text should be : &amp;#039;&amp;#039;&amp;#039;six euros&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:: (plural for euros, no mention of cents)&lt;br /&gt;
&lt;br /&gt;
Value 9,995 Euros in en-US gives : nine euro and ninety-nine cents&lt;br /&gt;
: no round up this time ! round up occurs only with a slightly greater value.&lt;br /&gt;
&lt;br /&gt;
:: I believe, Python (the implementation language of the Numbertext extension) uses different rounding algorithm, but I will check it. [[User:Nemeth|Nemeth]] 11:44, 10 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b) not language specific, case of rounding down :&lt;br /&gt;
&lt;br /&gt;
MONEYTEXT value 7,004 gives in fr-FR : &amp;quot;sept euros et zéro centimes&amp;quot; instead of : &amp;quot;sept euros&amp;quot;&lt;br /&gt;
&lt;br /&gt;
MONEYTEXT value 0,004 gives in fr-FR : &amp;quot;zéro euros et zéro centimes&amp;quot; instead of : &amp;quot;zéro euro&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: I will fix it. Many thanks for your great bug reports, especially for the previous missing 0.x decimals. It was a complementer character group bug of the interpreter. [[User:Nemeth|Nemeth]] 11:44, 10 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Still existing in version 0.9 /  [[User:BMarcelly|BMarcelly]] 07:03, 26 May 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Turkish language source ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
First I thank to developers of this extension.&lt;br /&gt;
I made turkish version numbertext_tr_TR.py. Here is the source&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[File:Numbertext_tr_TR.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope in newer versions turkish version adds to the project&lt;br /&gt;
----&lt;br /&gt;
In turkish;&amp;lt;br/&amp;gt;&lt;br /&gt;
Number texts written with spaces like one hundered twent five, but money texts written with deleting of spaces, like &amp;#039;&amp;#039;onehunderedtwentyfive&amp;#039;&amp;#039; turkish lira&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is it possible to do this?&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;[[User:Ramdem|Ramdem]] 20:01, 12 September 2009 (UTC)&lt;br /&gt;
: Yes, it&amp;#039;s possible by a space deletion call. I will add it, and you can check the result. [[User:Nemeth|Nemeth]] 13:09, 27 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I have integrated with some small fixes the Turkish description to Numbertext 0.7. See http://NUMBERTEXT.org, too. Thanks, [[User:Nemeth|Nemeth]] 11:45, 10 November 2009 (UTC)&lt;br /&gt;
Thanks Nemeth I will announce this release numbertext at turkish openoffice.org forum [[User:Ramdem|Ramdem]] 17:27, 11 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Minor Bug in Thai BAHTTEXT or NUMBERTEXT/MONEYTEXT ==&lt;br /&gt;
&lt;br /&gt;
In OOo, it spells all the numbers ending with &amp;#039;-01&amp;#039; as &amp;#039;หนึ่ง&amp;#039;, not &amp;#039;เอ็ด&amp;#039; which are all wrong. There is only 2 cases that OOo spells them correctly, that are when the number is 1, and when the number has other number before 1 such as &amp;#039;-21&amp;#039; or &amp;#039;-51&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The rule of spelling a number in Thai when &amp;#039;1&amp;#039; is at the least digit of integral part of a number in Thai, it is spelled &amp;#039;เอ็ด&amp;#039; not &amp;#039;หนึ่ง&amp;#039; such as;&lt;br /&gt;
31 is spelled &amp;#039;สามสิบ&amp;#039;&amp;#039;&amp;#039;เอ็ด&amp;#039;&amp;#039;&amp;#039;&amp;#039; not &amp;#039;สามสิบ&amp;#039;&amp;#039;&amp;#039;หนึ่ง&amp;#039;&amp;#039;&amp;#039;&amp;#039;, or&lt;br /&gt;
201 is spelled &amp;#039;สองร้อย&amp;#039;&amp;#039;&amp;#039;เอ็ด&amp;#039;&amp;#039;&amp;#039;&amp;#039; not &amp;#039;สองร้อย&amp;#039;&amp;#039;&amp;#039;หนึ่ง&amp;#039;&amp;#039;&amp;#039;&amp;#039;, or&lt;br /&gt;
50001 is spelled &amp;#039;ห้าหมื่น&amp;#039;&amp;#039;&amp;#039;เอ็ด&amp;#039;&amp;#039;&amp;#039;&amp;#039; not &amp;#039;ห้าหมื่น&amp;#039;&amp;#039;&amp;#039;หนึ่ง&amp;#039;&amp;#039;&amp;#039;&amp;#039;, and so on.&lt;br /&gt;
&lt;br /&gt;
There is only one case it is spelled &amp;#039;หนึ่ง&amp;#039; when the number is 1.&lt;br /&gt;
&lt;br /&gt;
See the issue at [http://www.openoffice.org/issues/show_bug.cgi?id=83490 OO.o Bug Tracker]&lt;br /&gt;
&lt;br /&gt;
And now I find that NUMBERTEXT.org is also make it wrong.&lt;br /&gt;
&lt;br /&gt;
: What a surprise! I have fixed in the version 0.8. Thanks for your report! László ([[User:Nemeth|Nemeth]] 06:43, 20 April 2010 (UTC))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What is the longest string numbertext can parse? ==&lt;br /&gt;
Just for info. What escale is the limit of numbertext? [http://en.wikipedia.org/wiki/Long_and_short_scales]&lt;br /&gt;
Is there any limit on input or output string?&lt;br /&gt;
--[[User:Jmontane|Jmontane]] 12:14, 28 April 2010 (UTC)&lt;br /&gt;
: There is no limitation for the input and output size (null-terminated strings). [[User:Nemeth|Nemeth]] 07:14, 30 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== language / mony codes ==&lt;br /&gt;
&lt;br /&gt;
Hi. It works graet, but where I can find language / mony codes ? --[[User:Adam majewski|Adam majewski]] 15:27, 30 June 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Adam majewski</name></author>
	</entry>
</feed>