[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 

Changeset 12592


Ignore:
Timestamp:
04/23/16 03:03:59 (11 months ago)
Author:
mdavis
Message:

cldrbug 8330: add new structure for week formats

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/common/dtd/ldml.dtd

    r12548 r12592  
    14231423<!ELEMENT dateFormatItem ( #PCDATA ) > 
    14241424<!ATTLIST dateFormatItem id CDATA #REQUIRED > 
     1425<!ATTLIST dateFormatItem count (zero | one | two | few | many | other) #IMPLIED > 
    14251426<!ATTLIST dateFormatItem alt NMTOKENS #IMPLIED > 
    14261427<!ATTLIST dateFormatItem draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED > 
     
    15081509    <!--@DEPRECATED--> 
    15091510 
    1510 <!ELEMENT field ( alias | ( displayName*, relative*, relativeTime*, special* ) ) > 
     1511<!ELEMENT field ( alias | ( displayName*, relative*, relativeTime*, relativePeriod*, special* ) ) > 
    15111512<!ATTLIST field type (era | year | year-short | year-narrow | quarter | quarter-short | quarter-narrow | month | month-short | month-narrow | week | week-short | week-narrow | day | day-short | day-narrow | weekday | sun | sun-short | sun-narrow | mon | mon-short | mon-narrow | tue | tue-short | tue-narrow | wed | wed-short | wed-narrow | thu | thu-short | thu-narrow | fri | fri-short | fri-narrow | sat | sat-short | sat-narrow | dayperiod | hour | hour-short | hour-narrow | minute | minute-short | minute-narrow | second | second-short | second-narrow | zone) #IMPLIED > 
    15121513<!ATTLIST field alt NMTOKENS #IMPLIED > 
     
    15571558    <!--@VALUE--> 
    15581559    <!--@DEPRECATED--> 
     1560 
     1561<!ELEMENT relativePeriod ( #PCDATA ) > 
     1562<!ATTLIST relativePeriod alt NMTOKENS #IMPLIED > 
     1563<!ATTLIST relativePeriod draft (approved | contributed | provisional | unconfirmed) #IMPLIED > 
     1564    <!--@METADATA--> 
    15591565 
    15601566<!ELEMENT timeZoneNames ( alias | ( hourFormat*, hoursFormat*, gmtFormat*, gmtZeroFormat*, regionFormat*, fallbackFormat*, fallbackRegionFormat*, abbreviationFallback*, preferenceOrdering*, singleCountries*, default*, zone*, metazone*, special* ) ) > 
  • trunk/common/main/en.xml

    r12584 r12592  
    21552155                                                <dateFormatItem id="yQQQ">QQQ y</dateFormatItem> 
    21562156                                                <dateFormatItem id="yQQQQ">QQQQ y</dateFormatItem> 
     2157                                                <dateFormatItem id='MMMMW' count='one'>'week' W 'of' MMM</dateFormatItem> 
     2158                                                <dateFormatItem id='MMMMW' count='other'>'week' W 'of' MMM</dateFormatItem> 
     2159                                                <dateFormatItem id='yw' count='one'>'week' w 'of' y</dateFormatItem> 
     2160                                                <dateFormatItem id='yw' count='other'>'week' w 'of' y</dateFormatItem> 
    21572161                                        </availableFormats> 
    21582162                                        <appendItems> 
     
    25232527                                        <relativeTimePattern count="other">{0} weeks ago</relativeTimePattern> 
    25242528                                </relativeTime> 
     2529                                <relativePeriod>the week of {0}</relativePeriod> <!-- for example, “the week of April 1” --> 
    25252530                        </field> 
    25262531                        <field type="week-short"> 
  • trunk/common/main/root.xml

    r12584 r12592  
    12681268                                                <dateFormatItem id="yQQQ">y QQQ</dateFormatItem> 
    12691269                                                <dateFormatItem id="yQQQQ">y QQQQ</dateFormatItem> 
     1270                                                <dateFormatItem id='MMMMW' count='other'>'week' W 'of' MMM</dateFormatItem> 
     1271                                                <dateFormatItem id='yw' count='other'>'week' w 'of' y</dateFormatItem> 
    12701272                                        </availableFormats> 
    12711273                                        <appendItems> 
     
    24212423                                        <relativeTimePattern count="other">-{0} w</relativeTimePattern> 
    24222424                                </relativeTime> 
     2425                                <relativePeriod>the week of {0}</relativePeriod> <!-- for example, “the week of April 1” --> 
    24232426                        </field> 
    24242427                        <field type="week-short"> 
  • trunk/common/supplemental/coverageLevels.xml

    r12589 r12592  
    426426                <coverageLevel value="moderate" match="dates/calendars/calendar[@type='generic']/dateTimeFormats/intervalFormats/intervalFormatItem[@id='%intervalFormatDateItems']/greatestDifference[@id='%intervalFormatGDiff']"/> 
    427427                <coverageLevel value="moderate" match="dates/fields/field[@type='(year|month|week)']/relative[@type='(-1|0|1)']"/> 
     428                <coverageLevel value="moderate" match="dates/fields/field[@type='week(-short|-narrow)?']/relativePeriod"/> 
    428429                <coverageLevel value="moderate" match="dates/timeZoneNames/metazone[@type='%metazone60']/long/generic"/> 
    429430                <coverageLevel value="moderate" match="dates/timeZoneNames/metazone[@type='%metazone60']/long/standard"/> 
     
    459460                <coverageLevel value="modern" match="dates/calendars/calendar[@type='gregorian']/days/dayContext[@type='%contextTypes']/dayWidth[@type='short']/day[@type='%dayTypes']"/> 
    460461                <coverageLevel value="modern" match="dates/calendars/calendar[@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[@id='%dateFormatItemsAll']"/> 
     462                <coverageLevel value="modern" match="dates/calendars/calendar[@type='gregorian']/dateTimeFormats/availableFormats/dateFormatItem[@id='MMMMW|yw'][@count='${Target-Plurals}']"/> 
    461463                <coverageLevel inLanguage="(ja|ko|vi|zh)" value="modern" match="dates/calendars/calendar[@type='chinese']/monthPatterns/monthPatternContext[@type='format']/monthPatternWidth[@type='wide']/monthPattern[@type='leap']"/> 
    462464                <coverageLevel inLanguage="(ja|ko|vi|zh)" value="modern" match="dates/calendars/calendar[@type='chinese']/monthPatterns/monthPatternContext[@type='numeric']/monthPatternWidth[@type='all']/monthPattern[@type='leap']"/> 
  • trunk/tools/java/org/unicode/cldr/icu/ldml2icu_locale.txt

    r12548 r12592  
    107107 
    108108//ldml/dates/calendars/calendar[@type="(%A)"]/dateTimeFormats/availableFormats/dateFormatItem[@id="(%A)"]$ ; /calendar/$1/availableFormats/$2 
     109//ldml/dates/calendars/calendar[@type="(%A)"]/dateTimeFormats/availableFormats/dateFormatItem[@id="(%A)"][@count="(%A)"]$ ; /calendar/$1/availableFormats/$2/$3 
    109110 
    110111//ldml/dates/calendars/calendar[@type="(%A)"]/dateTimeFormats/intervalFormats/intervalFormatItem[@id="(%A)"]/greatestDifference[@id="(%A)"]$ ; /calendar/$1/intervalFormats/$2/$3 
     
    138139//ldml/dates/fields/field[@type="(%A)"]/displayName ; /fields/$1/dn 
    139140//ldml/dates/fields/field[@type="(%A)"]/relative[@type="(%A)"] ; /fields/$1/relative/"$2" 
     141//ldml/dates/fields/field[@type="(%A)"]/relativePeriod ; /fields/$1/relativePeriod 
    140142//ldml/dates/fields/field[@type="(%A)"]/relativeTime[@type="(%A)"]/relativeTimePattern[@count="(%A)"] ; /fields/$1/relativeTime/$2/$3 
    141143 
  • trunk/tools/java/org/unicode/cldr/util/data/PathDescription.txt

    r12548 r12592  
    121121^//ldml/dates/fields/field\[@type="([^"]*)"]/relativeTime\[@type="past"]/relativeTimePattern\[@count="([^"]*)"] ; Provide a pattern used to display times in the past. For more information, please see http://cldr.org/translation/date-time-names 
    122122 
     123^//ldml/dates/fields/field\[@type="([^"]*)"]/relativePeriod    ;   Provide a name for “the {1} of SOME_DATE”. For more information, please see http://cldr.org/translation/date-time-names. 
     124 
    123125^//ldml/dates/calendars/calendar\[@type="([^"]*)"]/dateTimeFormats/dateTimeFormatLength\[@type="([^"]*)"]/dateTimeFormat\[@type="([^"]*)"]/pattern\[@type="([^"]*)"]    ;   Provide the {2} version of the date-time pattern. Note: before translating, be sure to read http://cldr.org/translation/date-time-patterns. 
    124126^//ldml/dates/calendars/calendar\[@type="([^"]*)"]/dateFormats/dateFormatLength\[@type="([^"]*)"]/dateFormat\[@type="([^"]*)"]/pattern\[@type="([^"]*)"]    ;   Provide the {2} version of the basic date pattern. Note: before translating, be sure to read http://cldr.org/translation/date-time-patterns. 
  • trunk/tools/java/org/unicode/cldr/util/data/PathHeader.txt

    r12548 r12592  
    5858//ldml/dates/fields/field[@type="%A"]/relative[@type="%A"]                  ; DateTime ; Fields ; &relativeDate($1) ; &numericSort($2) 
    5959//ldml/dates/fields/field[@type="%A"]/relativeTime[@type="%P"]/relativeTimePattern[@count="%A"] ; DateTime ; Fields ; &relativeDate($1) ; &count($2-$3) 
     60//ldml/dates/fields/field[@type="%A"]/relativePeriod ; DateTime ; Fields ; &relativeDate($1) ; Period 
    6061 
    6162//ldml/dates/calendars/calendar[@type="%R"]/eras/eraAbbr/era[@type="%A"]   ; DateTime ; &calendar($1) ; &calField(Eras:abbreviated:none) ; $2 
     
    8990//ldml/dates/calendars/calendar[@type="%A"]/dateTimeFormats/dateTimeFormatLength[@type="%A"]/dateTimeFormat[@type="%A"]/pattern[@type="%A"]       ; Special  ; Suppress ; Non-Gregorian ; Non-Gregorian ; HIDE 
    9091 
     92//ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="%A"][@count="%A"]                 ; DateTime ; &calendar(gregorian); &calField(Formats:Flexible:date) ; $1-$2 ; LTR_ALWAYS 
    9193//ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="(?![^"]*H)%A"]                 ; DateTime ; &calendar(gregorian); &calField(Formats:Flexible:time12) ; $1 ; LTR_ALWAYS 
    9294//ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="%A"]                           ; DateTime ; &calendar(gregorian); &calField(Formats:Flexible:time24) ; $1 ; LTR_ALWAYS 
  • trunk/tools/java/org/unicode/cldr/util/data/Placeholders.txt

    r12582 r12592  
    131131^//ldml/dates/fields/field\[@type="year-narrow"]/relativeTime\[@type="(future|past)"]/relativeTimePattern\[@count="\w+"] ; locale ; {0}=NUMBER_OF_YEARS 3 
    132132 
     133^//ldml/dates/fields/field\[@type="week"]/relativePeriod ; locale ; {0}=NUMBER_OF_WEEKS 3 
     134^//ldml/dates/fields/field\[@type="week-short"]/relativePeriod ; locale ; {0}=NUMBER_OF_WEEKS 3 
     135^//ldml/dates/fields/field\[@type="week-narrow"]/relativePeriod ; locale ; {0}=NUMBER_OF_WEEKS 3 
     136 
    133137^//ldml/dates/calendars/calendar\[@type="%A"]/dateTimeFormats/appendItems/appendItem\[@request="Day-Of-Week"] ; {0}=BASE_FORMAT January 23; {1}=APPEND_FIELD_FORMAT Monday 
    134138^//ldml/dates/calendars/calendar\[@type="%A"]/dateTimeFormats/appendItems/appendItem\[@request="Timezone"] ; {0}=BASE_FORMAT 12:30; {1}=APPEND_FIELD_FORMAT Pacific Time 
Note: See TracChangeset for help on using the changeset viewer.