gs-content-rating: Add CSM → rating fixups to allow round trips

It would be useful to be able to do round trips converting a
locale-specific rating → CSM → OARS → CSM → back to the locale-specific
rating system. That’s currently not possible as the OARS  CSM mapping
doesn’t include several ages (1–2, 5, 16–17 or 18+), with age 16 being
the most critical omission. (The OARS  CSM mapping comes from

Add some tweaks in gs_utils_content_rating_age_to_str() to make a
round-trip possible for most rating systems. It’s unfortunately not
possible for ESRA, CERO or OFLCNZ, though.

ESRA currently has a +25 rating, which can’t be mapped through CSM
because we only do CSM ages up to 18.

CERO has 15 and 17 ratings, which both currently map to CSM age 15, and
hence can’t be separated in the reverse mapping.

Similarly, OFLCNZ has 15 and 16 ratings, which both currently map to CSM
age 15.

A proper fix for this would be to produce OARS v1.2 with mappings to
differentiate CSM ages 15, 16, 17, but that requires a new version of
the specification.

Signed-off-by: Philip Withnall <>
1 job for content-rating-round-trips in 18 minutes and 39 seconds (queued for 1 second)
Status Job ID Name Coverage
passed #183298