Issue 125980 - Set default currency to Euro in Lithuanian locale
Summary: Set default currency to Euro in Lithuanian locale
Status: CLOSED FIXED
Alias: None
Product: Internationalization
Classification: Code
Component: localedata (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.3
Assignee: Ariel Constenla-Haile
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-29 22:34 UTC by Andrea Pescetti
Modified: 2016-10-14 20:07 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---
pats: 4.1.3_release_blocker+


Attachments
Text file for LT locale (25.23 KB, text/plain)
2014-12-31 16:14 UTC, Aivaras Stepukonis
no flags Details
Text file for LT locale (25.23 KB, text/plain)
2014-12-31 17:27 UTC, Aivaras Stepukonis
no flags Details
EURO as default currency (848 bytes, patch)
2015-01-16 17:23 UTC, Ariel Constenla-Haile
no flags Details | Diff
Number Format dialog (61.32 KB, image/png)
2015-01-16 18:07 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Andrea Pescetti 2014-12-29 22:34:38 UTC
As discussed on the l10n list http://markmail.org/message/6lbfhmny3ijdmktr Lithuania switches to Euro on 1st January 2015. OpenOffice versions released in 2015 should have EUR as default currency for Lithuania.

See https://issues.apache.org/ooo/show_bug.cgi?id=121638 and https://issues.apache.org/ooo/show_bug.cgi?id=69339 for reference.
Comment 1 Aivaras Stepukonis 2014-12-31 16:14:42 UTC
Created attachment 84330 [details]
Text file for LT locale
Comment 2 Aivaras Stepukonis 2014-12-31 16:20:13 UTC
Comment on attachment 84330 [details]
Text file for LT locale

Attached is the newly edited "lt_LT" file to reflect the currency switch from LTL to EUR. The editing was based on the example of "de_DE" and "fi_FI".
Comment 3 Ariel Constenla-Haile 2014-12-31 16:38:59 UTC
Currency default="true" should not be set on both, only on the one you want to be the default, EURO or LTL (exclusive "or")
Comment 4 Ariel Constenla-Haile 2014-12-31 16:53:38 UTC
EURO in Lithuanian is "euras" - https://en.wikipedia.org/wiki/Linguistic_issues_concerning_the_euro#Lithuanian
so 

<CurrencyName>Euro</CurrencyName>

should be the localized name, Euras instead of Euro
Comment 5 Aivaras Stepukonis 2014-12-31 17:27:14 UTC
Created attachment 84331 [details]
Text file for LT locale

Thanks for catching the mistake. Attached is the corrected file.
Comment 6 hanya 2015-01-16 15:37:21 UTC
When I tried to build with the file attached in Comment 5, I got the following error: 
file generated=../../../unxlngx6.pro/misc/localedata_lt_LT.cxx
parsing document lt_LT started
Warning: DoubleQuotationEnd may be wrong: U+201C “
Error: Currency: more than one default currency.
Error: in data for lt_LT: 1
parsing document lt_LT finished
dmake:  Error code 1, while making '../../../unxlngx6.pro/misc/localedata_lt_LT.cxx'

There are two Currency node having default="true" attribute. 
I built with EUR as default currency. Both "EUR € Lithuanian" and 
"LTL Lt Lithuanian" entries are shown in the currency selector list box on some 
dialogs.
Comment 7 Ariel Constenla-Haile 2015-01-16 17:23:46 UTC
Created attachment 84430 [details]
EURO as default currency

attachment 84331 [details] fixes Euras as described in Comment 4, but not default="true" in both currencies, as described in Comment 3.
Comment 8 Aivaras Stepukonis 2015-01-16 17:44:59 UTC
This is really a sub-issue of the one under question, so I'm stating it here, instead of opening a new thread.

Calc > Format Cells... > Numbers > Category: Currency > Format

In the dropdown list, the format of "Euro €" is associated with different locales (e.g. "Euro € German (Germany") or "Euro € Finnish") to specify different local formatting.

"Euro € Lithuanian (Lithuania)" is not mentioned, yet. Volunteers who are in a position to effect the required change, please, do so.

The proper formats for "Euro €" in Lithuanian are the following:

1.234,00 Eur
1.234,00 EUR
1.234,00 €

By the way, Latvia (LV) has, too, switched to Euro (the year before). It is not listed under Euro currency formats. Unfortunately, I cannot be more specific about Latvian as I do not know the language.
Comment 9 Aivaras Stepukonis 2015-01-16 17:56:46 UTC
It should probably be just "Euro € Lithuanian" without the part in parenthesis as there is only one locale associated with Lithuanian.
Comment 10 Ariel Constenla-Haile 2015-01-16 18:07:35 UTC
Created attachment 84431 [details]
Number Format dialog

You get "Euro € Lithuanian" once the patch is applied.
The patch is harmless, I will commit it so that you can try it in a nightly build from the build bots.
Comment 11 SVN Robot 2015-01-16 18:21:03 UTC
"arielch" committed SVN revision 1652476 into trunk:
i125980 - EURO as default currency in Lithuanian locale data
Comment 12 Aivaras Stepukonis 2015-01-16 18:28:01 UTC
Thank you. I'll check it out once the build is out.
Comment 13 Ariel Constenla-Haile 2015-01-17 08:04:52 UTC
(In reply to Aivaras Stepukonis from comment #12)
> Thank you. I'll check it out once the build is out.

You can find the Windows builds at http://ci.apache.org/projects/openoffice/install/win/ (the en-US version is enough to test it, independently of the UI language)
Comment 14 Aivaras Stepukonis 2015-01-18 16:59:59 UTC
Installed the latest nightly build AOO420m1(Build:9800)  -  Rev. 1652526.

Successfully located "Euro € Lithuanian" and under it the following two formats:

- 1.234,00 EUR
- 1.234,00 €.

Unfortunately, didn't find the main format:

- 1.234,00 Eur.

It should there.

Let me shed some light on the three usages:

"Eur" is the abbreviation for the Lithuanian designation of Euro as "Euras".

"EUR" and "€" both stand for "Euro" in its international form.

Although all three formats are accepted in Lithuanian, "Eur" is the most commonly used and most preferred abbreviation in Lithuanian. "EUR" and "€" are used when the Lithuanian language comes into contact with information stated in foreign languages (mostly in comparative contexts).

Thus, ideally all three formats should be included under "Euro € Lithuanian".

Priority should be given to "Eur".
Comment 15 Ariel Constenla-Haile 2015-01-18 20:19:25 UTC
(In reply to Aivaras Stepukonis from comment #14)
> Installed the latest nightly build AOO420m1(Build:9800)  -  Rev. 1652526.
> 
> Successfully located "Euro € Lithuanian" and under it the following two
> formats:
> 
> - 1.234,00 EUR
> - 1.234,00 €.
> 
> Unfortunately, didn't find the main format:
> 
> - 1.234,00 Eur.
> 
> It should there.

That's (a) because the locale files attached here have only two currencies, but mainly (b) because that won't be possible, there is no ISO 4217 code for your third currency, it seems there is no such thing as "Lithuanian Euro", see 
http://www.iso.org/iso/home/standards/currency_codes.htm
http://en.wikipedia.org/wiki/ISO_4217

The file won't compile without a valid ISO code in CurrencyID.
Comment 16 Aivaras Stepukonis 2015-01-18 21:04:15 UTC
> That's (a) because the locale files attached here have only two currencies,
> but mainly (b) because that won't be possible, there is no ISO 4217 code for
> your third currency, it seems there is no such thing as "Lithuanian Euro",
> see 
> http://www.iso.org/iso/home/standards/currency_codes.htm
> http://en.wikipedia.org/wiki/ISO_4217
> 
> The file won't compile without a valid ISO code in CurrencyID.

I'm I understanding this correctly:

One (1) can localize the format for currency numerals but (2) not the abbreviation of the name of the currency?

If that is the case, the feature of automatically inserting currency names in calc documents is seriously lacking as it does not respond to a very basic linguistic need: Lithuanians write "Eur" because Euro is called "Euras" in Lithuanian. This per se has nothing to do with ISO codes, and everything to do with a simple fact of life that Lithuanians speak and write about Euro in Lithuanian. In other words, the correct and most widely used way to write 35,27 € in Lithuanian is "35,27 Eur" and AOO, even after having been completely localized, has no means to do this.

Should I start a new thread asking to add to Calc the local abbreviation of the currency in use at a given locale?
Comment 17 Ariel Constenla-Haile 2015-01-21 02:28:18 UTC
(In reply to Aivaras Stepukonis from comment #16)
> > That's (a) because the locale files attached here have only two currencies,
> > but mainly (b) because that won't be possible, there is no ISO 4217 code for
> > your third currency, it seems there is no such thing as "Lithuanian Euro",
> > see 
> > http://www.iso.org/iso/home/standards/currency_codes.htm
> > http://en.wikipedia.org/wiki/ISO_4217
> > 
> > The file won't compile without a valid ISO code in CurrencyID.
> 
> I'm I understanding this correctly:
> 
> One (1) can localize the format for currency numerals but (2) not the
> abbreviation of the name of the currency?

I assume that the reasoning behind this is that the currency code is not localizable because it is a standard, just like you don't translate ISO country codes and the like.

> In other words, the correct and most widely used
> way to write 35,27 € in Lithuanian is "35,27 Eur" and AOO, even after having
> been completely localized, has no means to do this.

I didn't try, but that might be possible with a User-defined number format.

From the source code perspective, the only possible hack/workaround is defining the currency as follows:

    <Currency legacyOnly="true" default="false" usedInCompatibleFormatCodes="false">
      <CurrencyID>Eur</CurrencyID>
      <CurrencySymbol>€</CurrencySymbol>
      <BankSymbol>EUR</BankSymbol>
      <CurrencyName>Euras</CurrencyName>
      <DecimalPlaces>2</DecimalPlaces>
    </Currency>

The currency ID is allowed to be an invalid ISO currency code only is it is declared as legacy
https://svn.apache.org/viewvc/openoffice/trunk/main/i18npool/source/localedata/LocaleNode.cxx?revision=1468386&view=markup#l1416

And if it is legacy, it must not be default nor used in compatible format codes
https://svn.apache.org/viewvc/openoffice/trunk/main/i18npool/source/localedata/LocaleNode.cxx?revision=1468386&view=markup#l1400

But this is a hack. If I understood you correctly, you argument that Eur should be the default; that's not possible because it's not a valid ISO currency code.
Comment 18 Aivaras Stepukonis 2015-01-22 14:39:49 UTC
(In reply to Ariel Constenla-Haile from comment #17)
 
> I assume that the reasoning behind this is that the currency code is not
> localizable because it is a standard, just like you don't translate ISO
> country codes and the like.

I do not question the meaning and usefulness of ISO codes. They're a good thing. But they do not meet (exhaust) all user needs, and some of those unmet needs are of the same type as the needs ISO codes do cover. That is to say, the reason why international ISO codes are implemented in this particular case (catering to the needs of users working on currency calculations) is the reason why those codes should be supplemented with locally standardized terms for currency names. Why? Because the need for "Eur" is of the same type as the ones for "EUR" or "€". The usage of "Eur" in Lithuania has been nationally standardized by the State Commission of the Lithuanian Language (see "http://www.vlkk.lt/lit/1094", unfortunately, the page is in Lithuanian).

> I didn't try, but that might be possible with a User-defined number format.

Thank you for the tip.

I gave it a shot by editing the format code as follows: "#.##0,00 [$Eur];#.##0,00 [$Eur]", and it worked.

So at least there is a workaround, and a relatively easy one (although it may still be too difficult for many users).
Comment 19 Ariel Constenla-Haile 2016-09-08 16:28:49 UTC
Requesting release blocker status for 4.1.3 release.
Revision 1652476 should be merged to AOO410 branch
Comment 20 Ariel Constenla-Haile 2016-09-08 19:21:06 UTC
(In reply to Ariel Constenla-Haile from comment #19)
> Requesting release blocker status for 4.1.3 release.
> Revision 1652476 should be merged to AOO410 branch

Sorry for the noice, now requesting blocker status ;)
Comment 21 SVN Robot 2016-09-12 21:55:33 UTC
"arielch" committed SVN revision 1760448 into branches/AOO413:
i125980 - Cherrypicking revision 1652476 from trunk
Comment 22 Andrea Pescetti 2016-10-14 20:07:32 UTC
This is fixed in Apache OpenOffice 4.1.3. Closing.