Data for root for day periods in ICU data

kz kazede at google.com
Wed Dec 2 15:24:08 CST 2015


Okay, got it. Empty rules == fall back to am/pm.

I'll submit a ticket for LDML2ICU.


Thanks!
kz

On Wed, Dec 2, 2015 at 12:42 PM, Mark Davis ☕️ <mark at macchiato.com> wrote:

> ​No, because if there are no variable rules, there are no variable rules.
>
> What the spec should say is:
>
> If there are variable day periods specified by a set of
> dayPeriodRules, that set needs to completely....
>
>
> The AM/PM are fixed day periods, don't require rules, and always valid as
> a fallback.​
>
> Mark
>
> On Wed, Dec 2, 2015 at 8:39 PM, kz <kazede at google.com> wrote:
>
>> But root shouldn't be empty. TR35 says
>>
>> The set of dayPeriodRules need to completely cover the 24 hours in a day
>>> (from 0:00 before 24:00), with no overlaps between any dayPeriodRules.
>>
>>
>> Now root is allowed to have *no strings* for the variable day periods
>> (making it fall back to am/pm -- btw I submitted a ticket for that
>> clarification), but to conform to the spec, it still needs to state, even
>> trivially, which day period each moment in time falls in. Or we need to
>> change the spec to allow empty rule sets.
>>
>> What do you think?
>>
>>
>> Thanks
>> kz
>>
>> On Wed, Dec 2, 2015 at 11:26 AM, Mark Davis ☕️ <mark at macchiato.com>
>> wrote:
>>
>>> Makes sense now. Root is empty, which is correct. Based on what you
>>> said, I suspect that set1 is being suppressed because it is empty. Probably
>>> needs a tweak to the LDML2ICU converter to have a special value for "no
>>> rules" to show up in ICU. Mind filing a ticket for that?
>>>
>>> In the meantime—*as a workaround*—if there is no set1 in the ICU data
>>> you can assume it is an empty rule set.
>>>
>>> Mark
>>>
>>> On Wed, Dec 2, 2015 at 7:44 PM, kz <kazede at google.com> wrote:
>>>
>>>> My mistake; I meant "variable day periods" when I said "day periods".
>>>>
>>>> The lack of localized strings is not the problem; what I'm having
>>>> trouble with are the rules
>>>> <http://unicode.org/repos/cldr/tags/latest/common/supplemental/dayPeriods.xml>
>>>> for when to use what string. Root has a presence in that file but no rules
>>>> are defined. In ICU data, this results in root pointing to "set1" but set1
>>>> doesn't exist.
>>>>
>>>> Is this a mistake, or should I hard code in how to handle root?
>>>>
>>>>
>>>> Thanks
>>>> kz
>>>>
>>>> On Wed, Dec 2, 2015 at 2:55 AM, Mark Davis ☕️ <mark at macchiato.com>
>>>> wrote:
>>>>
>>>>> There are day periods in CLDR for root; I see:
>>>>>
>>>>> <dayPeriods>
>>>>> <dayPeriodContext type="format">
>>>>> <dayPeriodWidth type="abbreviated">
>>>>> <dayPeriod type="am">AM</dayPeriod>
>>>>> <dayPeriod type="pm">PM</dayPeriod>
>>>>> </dayPeriodWidth>
>>>>> <dayPeriodWidth type="narrow">
>>>>> <alias source="locale" path="../dayPeriodWidth[@type='abbreviated']"/>
>>>>> </dayPeriodWidth>
>>>>> <dayPeriodWidth type="wide">
>>>>> <alias source="locale" path="../dayPeriodWidth[@type='abbreviated']"/>
>>>>> </dayPeriodWidth>
>>>>> </dayPeriodContext>
>>>>> <dayPeriodContext type="stand-alone">
>>>>> <dayPeriodWidth type="abbreviated">
>>>>> <alias source="locale"
>>>>> path="../../dayPeriodContext[@type='format']/dayPeriodWidth[@type='abbreviated']"/>
>>>>> </dayPeriodWidth>
>>>>> <dayPeriodWidth type="narrow">
>>>>> <alias source="locale" path="../dayPeriodWidth[@type='abbreviated']"/>
>>>>> </dayPeriodWidth>
>>>>> <dayPeriodWidth type="wide">
>>>>> <alias source="locale" path="../dayPeriodWidth[@type='abbreviated']"/>
>>>>> </dayPeriodWidth>
>>>>> </dayPeriodContext>
>>>>> </dayPeriods>
>>>>>
>>>>> If a locale has no variable day periods, then AM/PM is the default. We
>>>>> should make that clearer in the spec. Would you mind filing a ticket?
>>>>>
>>>>> For more info, see
>>>>> http://unicode.org/reports/tr35/tr35-dates.html#Day_Period_Rules
>>>>>
>>>>> Mark
>>>>>
>>>>> On Wed, Dec 2, 2015 at 1:41 AM, kz <kazede at google.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> In the CLDR data for day periods
>>>>>> <http://unicode.org/repos/cldr/tags/latest/common/supplemental/dayPeriods.xml>,
>>>>>> there's an entry for root but the content is commented out. This results in
>>>>>> root having a presence but not given a rule set in ICU data for day
>>>>>> periods
>>>>>> <http://bugs.icu-project.org/trac/browser/icu/trunk/source/data/misc/dayPeriods.txt>
>>>>>> .
>>>>>>
>>>>>> What should be the proper formatting behavior for the root locale for
>>>>>> the day period character 'B'? Is an empty string acceptable?
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> kz
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> CLDR-Users mailing list
>>>>>> CLDR-Users at unicode.org
>>>>>> http://unicode.org/mailman/listinfo/cldr-users
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://unicode.org/pipermail/cldr-users/attachments/20151202/458cc937/attachment.html>


More information about the CLDR-Users mailing list