Bug 127011 - i18n: add locale data for English (Nigeria) [en-NG]
Summary: i18n: add locale data for English (Nigeria) [en-NG]
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-18 14:53 UTC by Benjamin Chiagoziem Livinus
Modified: 2019-08-20 20:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Locale data for Nigerian English (11.51 KB, text/xml)
2019-08-18 14:53 UTC, Benjamin Chiagoziem Livinus
Details
Updated Locale data for Nigerian English (1.83 KB, text/xml)
2019-08-20 17:26 UTC, Benjamin Chiagoziem Livinus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Chiagoziem Livinus 2019-08-18 14:53:38 UTC
Created attachment 153482 [details]
Locale data for Nigerian English

Locale data for Nigerian English, created using en_GB.xml. Notable differences are the country's name, id, measurement system and currency.
Comment 1 Benjamin Chiagoziem Livinus 2019-08-18 15:14:26 UTC
Comment on attachment 153482 [details]
Locale data for Nigerian English

><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE Locale SYSTEM 'locale.dtd'>
><!--
> * This file is part of the LibreOffice project.
> *
> * This Source Code Form is subject to the terms of the Mozilla Public
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/.
> *
> * This file incorporates work covered by the following license notice:
> *
> *   Licensed to the Apache Software Foundation (ASF) under one or more
> *   contributor license agreements. See the NOTICE file distributed
> *   with this work for additional information regarding copyright
> *   ownership. The ASF licenses this file to you under the Apache
> *   License, Version 2.0 (the "License"); you may not use this file
> *   except in compliance with the License. You may obtain a copy of
> *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
> -->
><Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.2">
>  <LC_INFO>
>    <Language>
>      <LangID>en</LangID>
>      <DefaultName>English</DefaultName>
>    </Language>
>    <Country>
>      <CountryID>NG</CountryID>
>      <DefaultName>Nigeria</DefaultName>
>    </Country>
>  </LC_INFO>
>  <LC_CTYPE unoid="generic">
>    <Separators>
>      <DateSeparator>/</DateSeparator>
>      <ThousandSeparator>,</ThousandSeparator>
>      <DecimalSeparator>.</DecimalSeparator>
>      <TimeSeparator>:</TimeSeparator>
>      <Time100SecSeparator>.</Time100SecSeparator>
>      <ListSeparator>;</ListSeparator>
>      <LongDateDayOfWeekSeparator> </LongDateDayOfWeekSeparator>
>      <LongDateDaySeparator> </LongDateDaySeparator>
>      <LongDateMonthSeparator> </LongDateMonthSeparator>
>      <LongDateYearSeparator> </LongDateYearSeparator>
>    </Separators>
>    <Markers>
>      <QuotationStart>â</QuotationStart>
>      <QuotationEnd>â</QuotationEnd>
>      <DoubleQuotationStart>â</DoubleQuotationStart>
>      <DoubleQuotationEnd>â</DoubleQuotationEnd>
>    </Markers>
>    <TimeAM>AM</TimeAM>
>    <TimePM>PM</TimePM>
>    <MeasurementSystem>Metric</MeasurementSystem>
>  </LC_CTYPE>
>  <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$â¦-809]">
>    <DateAcceptancePattern>D/M</DateAcceptancePattern>
>    <DateAcceptancePattern>D-M</DateAcceptancePattern>
>    <FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
>      <FormatCode>DD/MM/YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28">
>      <FormatCode>NN DD/MMM YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34">
>      <FormatCode>MM/YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35">
>      <FormatCode>DD/MMM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36">
>      <FormatCode>MMMM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey6" default="false" type="medium" usage="DATE" formatindex="37">
>      <FormatCode>QQ YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
>      <FormatCode>DD/MM/YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
>      <FormatCode>DD/MM/YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
>      <FormatCode>DD MMMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
>      <FormatCode>D MMM YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey11" default="false" type="long" usage="DATE" formatindex="23">
>      <FormatCode>D MMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="25">
>      <FormatCode>D MMMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="27">
>      <FormatCode>NN D MMM YY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29">
>      <FormatCode>NN D MMMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="30">
>      <FormatCode>NNNND MMMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="24">
>      <FormatCode>D. MMM. YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="26">
>      <FormatCode>D. MMMM YYYY</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey18" default="false" type="short" usage="DATE" formatindex="31">
>      <FormatCode>MM-DD</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey19" default="false" type="medium" usage="DATE" formatindex="32">
>      <FormatCode>YY-MM-DD</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="33">
>      <FormatCode>YYYY-MM-DD</FormatCode>
>      <DefaultName>ISO 8601 (EN 28601)</DefaultName>
>    </FormatElement>
>    <FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38">
>      <FormatCode>WW</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME"  formatindex="39">
>      <FormatCode>HH:MM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey2" default="true" type="medium" usage="TIME"  formatindex="40">
>      <FormatCode>HH:MM:SS</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey3" default="false" type="short" usage="TIME"  formatindex="41">
>      <FormatCode>HH:MM AM/PM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey4" default="false" type="medium" usage="TIME"  formatindex="42">
>      <FormatCode>HH:MM:SS AM/PM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME"  formatindex="43">
>      <FormatCode>[HH]:MM:SS</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME"  formatindex="44">
>      <FormatCode>MM:SS.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME"  formatindex="45">
>      <FormatCode>[HH]:MM:SS.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME"  formatindex="46">
>      <FormatCode>DD/MM/YY HH:MM</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME"  formatindex="47">
>      <FormatCode>DD/MM/YYYY HH:MM:SS</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER"  formatindex="0">
>      <FormatCode>General</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER"  formatindex="1">
>      <FormatCode>0</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER"  formatindex="2">
>      <FormatCode>0.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER"  formatindex="3">
>      <FormatCode>#,##0</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER"  formatindex="4">
>      <FormatCode>#,##0.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER"  formatindex="5">
>      <FormatCode>#,###.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70">
>      <FormatCode>#,##0_);(#,##0)</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71">
>      <FormatCode>#,##0.00_);(#,##0.00)</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY"  formatindex="12">
>      <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY"  formatindex="13">
>      <FormatCode>[CURRENCY]#,##0.00;-[CURRENCY]#,##0.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY"  formatindex="14">
>      <FormatCode>[CURRENCY]#,##0;[RED]-[CURRENCY]#,##0</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY"  formatindex="15">
>      <FormatCode>[CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY"  formatindex="16">
>      <FormatCode>#,##0.00 CCC</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY"  formatindex="17">
>      <FormatCode>[CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.--</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey7" default="false" type="short" usage="CURRENCY"  formatindex="72">
>      <FormatCode>[CURRENCY]* #,##0;-[CURRENCY]* #,##0</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="CurrencyFormatskey8" default="false" type="medium" usage="CURRENCY"  formatindex="73">
>      <FormatCode>[CURRENCY]* #,##0.00;-[CURRENCY]* #,##0.00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER"  formatindex="8">
>      <FormatCode>0%</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER"  formatindex="9">
>      <FormatCode>0.00%</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="ScientificFormatskey1" default="false" type="medium" usage="SCIENTIFIC_NUMBER"  formatindex="6">
>      <FormatCode>0.00E+000</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="ScientificFormatskey2" default="true" type="medium" usage="SCIENTIFIC_NUMBER"  formatindex="7">
>      <FormatCode>0.00E+00</FormatCode>
>    </FormatElement>
>    <FormatElement msgid="ScientificFormatskey3" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="78">
>      <FormatCode>##0.00E+00</FormatCode>
>    </FormatElement>
>  </LC_FORMAT>
>  <LC_COLLATION ref="en_US"/>
>  <LC_SEARCH ref="en_US"/>
>  <LC_INDEX ref="en_US"/>
>  <LC_CALENDAR ref="en_US"/>
>  <LC_CURRENCY>
>    <Currency default="true" usedInCompatibleFormatCodes="true">
>      <CurrencyID>NGN</CurrencyID>
>      <CurrencySymbol>â¦</CurrencySymbol>
>      <BankSymbol>NGN</BankSymbol>
>      <CurrencyName>Naira</CurrencyName>
>      <DecimalPlaces>2</DecimalPlaces>
>    </Currency>
>  </LC_CURRENCY>
>  <LC_TRANSLITERATION ref="en_US"/>
>  <LC_MISC ref="en_US"/>
>  <LC_NumberingLevel ref="en_US"/>
>  <LC_OutLineNumberingLevel ref="en_US"/>
></Locale>
Comment 2 Eike Rathke 2019-08-20 11:35:26 UTC
So this is almost identical to the en_GB.xml locale data file (except locale names and currency of course), then we can use the ref="en_GB" mechanism instead of duplicating all data.

However, are you sure about

    <MeasurementSystem>Imperial</MeasurementSystem>

instead of

    <MeasurementSystem>Metric</MeasurementSystem>

? I doubt it. That's not even used in en_GB. The ha_Latn_NG.xml locale data uses metric as well.
Comment 3 Benjamin Chiagoziem Livinus 2019-08-20 17:13:22 UTC
You're right.
Comment 4 Benjamin Chiagoziem Livinus 2019-08-20 17:26:34 UTC
Created attachment 153540 [details]
Updated Locale data for Nigerian English

I'm still an amateur who's learning to program, but wants to help the open source community. Please help me confirm is these are done right:

  <LC_CTYPE ref="en_GB" unoid="generic"/>
  <LC_FORMAT ref="en_GB" replaceFrom="[CURRENCY]" replaceTo="[$₦-809]"/>
Comment 5 Eike Rathke 2019-08-20 18:06:25 UTC
Perfect :-)  Well, almost, because the 809 LCID is en-GB, but we don't have one for en-NG yet, so I'll introduce a new LCID. Also, the other ref="en_US" should be ref="en_GB" as well, whether those then refer en_US or define something else will be inherited from en_GB. Btw, the unoid="generic" in <LC_CTYPE> is unnecessary, but also doesn't harm.

I'll do the necessary changes. Thanks!
Comment 6 Eike Rathke 2019-08-20 18:23:31 UTC
Apparently we don't have your license statement on file, could you
please send us a blanket statement that you contribute all your past and
future patches under the MPLv2 and LGPLv3+ licenses? Best on the dev
mailing list libreoffice@lists.freedesktop.org so we can link to it from
https://wiki.documentfoundation.org/Development/Developers

Something like this does nicely:

All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.

Best use Subject: <your full name> license statement

Sorry for the inconvenience and thank you for cooperating :-)
Comment 7 Benjamin Chiagoziem Livinus 2019-08-20 18:36:50 UTC
Sent the license statement. I'm in no way inconvenienced, I'm glad! This is my first contribution to any open source project.
Comment 8 Eike Rathke 2019-08-20 19:08:41 UTC
Thank you!
Comment 9 Commit Notification 2019-08-20 19:08:44 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a66098e901dc06cd09d7243dde6552fa15129c28%5E%21

Related: tdf#127011 add English (Nigeria) [en-NG] 0xA809 to language list

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2019-08-20 20:11:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e51bf749af8b881d6a0df214b84642f093471c54%5E%21

Resolves: tdf#127011 add English (Nigeria) [en-NG] locale data

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.