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

source: trunk/tools/java/org/unicode/cldr/web/data/root/tmpl/day_periods.jsp @ 4378

Revision 4378, 2.3 KB checked in by mdavis, 9 years ago (diff)

cldrbug 2417: Fine-tune the day periods

  • Property svn:mime-type set to text/plain
Line 
1    <%@ include file="report_top.jspf" %>
2
3<h2>Day periods are used with 12 hour time formats: please provide them here.</h2>
4<p>If your language can use 12 hour time formats, but doesn't normally use AM/PM, please see below for how to fix it.</i></p>
5<%
6//  Copy "x=___"  from input to output URL
7subCtx.setQuery(SurveyMain.QUERY_SECTION,subCtx.field(SurveyMain.QUERY_SECTION));
8
9SurveyForum.printSectionTableOpenShort(subCtx, "//ldml/dates/calendars/calendar[@type=\"gregorian\"]/dayPeriods");
10
11CLDRFile file = SurveyForum.getCLDRFile(subCtx);
12
13SupplementalDataInfo supplementalData = SupplementalDataInfo.getInstance(file.getSupplementalDirectory());
14DayPeriodInfo dayPeriods = supplementalData.getDayPeriods(file.getLocaleID());
15LinkedHashSet<DayPeriodInfo.DayPeriod> items = new LinkedHashSet(dayPeriods.getPeriods());
16String prefix = "//ldml/dates/calendars/calendar[@type=\"gregorian\"]/dayPeriods/dayPeriodContext[@type=\"format\"]/dayPeriodWidth[@type=\"wide\"]/dayPeriod[@type=\"";
17
18for (DayPeriodInfo.DayPeriod dayPeriod : items) {
19    SurveyForum.showXpathShort(subCtx, prefix + dayPeriod + "\"]");
20}
21
22SurveyForum.printSectionTableCloseShort(subCtx, "//ldml/dates/calendars/calendar[@type=\"gregorian\"]/dayPeriods");
23String rules = dayPeriods.toString().replace("<","&lt;").replace("\n","<br>");
24%>
25<p>The day period categories for this locale are currently:</p>
26<blockquote><b><%=rules%></b></blockquote>
27<p>If these are incorrect, please <a target="_blank" href='http://unicode.org/cldr/trac/newticket'>file a ticket</a> to get the categories you need.
28For comparison, see the <a target="_blank" href="<%= ctx.base(request)+"?_=de&x=r_steps&step=day_periods" %>">German day periods</a>
29or <a target="_blank" href="<%= ctx.base(request)+"?_=zh&x=r_steps&step=day_periods" %>">Chinese day periods</a>.
30In your ticket, make sure that the periods need to cover the entire day in order, from 0:00 to 24:00, and do not overlap. That means that you can have cases like:
31<ul>
32<li>... earlyMorning &#x2264; 09:00 &#x2264; morning ...</li>
33<li>... earlyMorning &#x2264; 09:00 &lt; morning ...</li>
34<li>... earlyMorning &lt; 09:00 &#x2264; morning ...</li>
35</ul>
36<p>but <b>not</b> two &lt; signs around the same time, as in:</p>
37<ul>
38<li>... earlyMorning &lt; 09:00 &lt; morning ... </li>
39</ul>
40<p>It is easiest to take rules like the German ones, edit them, and include in the ticket.</p>
Note: See TracBrowser for help on using the repository browser.