Updating CheckCLDR Subtype Mapping

The page, CheckCLDR Subtypes is a special page which instructs the Survey Tool where to send users for more information when a particular check returns an error or warning.

For example, the following image shows a screenshot of an error message that vetters might encounter. The “(how to fix…)” link is circled, this link takes the user to a page with further information on the specific error. Also note the flyover text showing the error type and subtype. The subtype in this case is displayCollision.

What is an Error Subtype?

Technically, Subtype is an enum nested inside the org.unicode.cldr.test.CheckCLDR class. (follow that link for the source code, search for "Subtype".) There are multiple values of this enum type, and they are each used to specify a class of errors.

The special page linked above contains a mapping from error subtypes, to a URL providing more details.

Checking on the current subtype mapping.

While logged in as a TC member, access the Gear menu. You will see an "Error Subtypes" link, as shown here:

Mapping Format

The mapping page consists of a text block as follows. The text "BEGIN CheckCLDR.Subtype Mapping" and "END CheckCLDR.Subtype Mapping" MUST occur to identify the start and end of the text block.

The pound sign “#” indicates comment lines which are ignored (apart from the BEGIN/END lines).

In between the start and end lines are stanzas, organized by page URL, that map subtypes to URLs. These are organized by URL because one URL may be relevant to more than one subtype.

Each stanza contains a URL, beginning with "http..." or "https…", followed by whitespace (linebreaks or spaces), and then multiple Subtype values. Each subtype value is also separated by whitespace (linebreaks or spaces). Commas are ignored, and trailing commas are allowed and ignored.

In the example below, six error subtypes are covered by the <http://cldr.unicode.org/translation/timezones#metazones> URL.

One error subtype, numberPatternNotCanonical is covered by a specific URL. Note the comma after "numberPatternNotCanonical". This keeps every row in a similar format.

# -*- BEGIN CheckCLDR.Subtype Mapping -*-

# Note: This is just an example, and may not match the current mapping file.

http://cldr.unicode.org/translation/timezones#metazones

noMetazoneMapping,

noMetazoneMappingAfter1970,

noMetazoneMappingBeforeNow,

multipleMetazoneMappings,

metazoneContainsDigit,

extraMetazoneString,

http://cldr.unicode.org/translation/numbers-currency/number-symbols

numberPatternNotCanonical,

# -*- END CheckCLDR.Subtype Mapping -*-

Status Page

Below is a screenshot of the status page

    • The Reload button is used to reload the map from the the Google Sites page.

    • The Recheck button is used to verify that the URLs all point to valid pages.

    • Any subtypes which are not present in the map are listed in the "Missing" section.

How to add or update an error subtype mapping

      1. Example: “incompleteLogicalGroup” and "inconsistentDraftStatus" are two relevant subtypes

    1. Add the URL and the subtypes to the "map" page. Note: Use the "paste without formatting" option if you copy and paste text.

      1. Example: (see the code block immediately below)

    1. Click Save in the editor for the CheckCLDR Subtypes page (and you will also need to publish the page)

    2. On the Status page, click the "Reload Map" button.

      1. If there is a problem loading/parsing the page, you have the opportunity to try again. The SurveyTool will use the last cached version, so failures do not affect vetters.

    1. You're done!

# adding this as an example

https://cldr.unicode.org/translation/getting-started/resolving-errors

incompleteLogicalGroup,

inconsistentDraftStatus,