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.

example of an error message, ending in “(how to fix…)” and also showing “Error: CheckDisplayCollisions.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, with different sections marked up. 
  • 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. Create or update the web page which discuses the error type. The Information Hub, http://cldr.unicode.org/translation/ is probably the hierarchy where such pages should be located.
    1. Examplehttp://cldr.unicode.org/translation/getting-started/resolving-errors has information about logical group errors
  2. Bring up the CheckCLDR Subtypes page (the map) for editing in one window, and the Subtype Status Page ("Error Subtypes" under the gear) in another window so that you can compare them.
  3. View the "Missing subtypes" portion of the status page to verify the subtype name
    1. Example:   “incompleteLogicalGroup” and "inconsistentDraftStatus" are two relevant subtypes  
  4. 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)
  5. Click Save in the editor for the CheckCLDR Subtypes page
  6. 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.
  7. You're done!

# adding this as an example
http://cldr.unicode.org/translation/getting-started/resolving-errors
incompleteLogicalGroup,
inconsistentDraftStatus,


ą
Steven R. Loomis,
Dec 2, 2020, 12:04 PM
Comments