FAILURE MAP
← Case archive

FA-11771 / Localization message semantics / Open access

Fallback messages use the requested locale plural rule · case 01

Fallback messages use the requested locale plural rule.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The requested locale rule is applied to branches belonging to a fallback locale.

THE FAILURE

The requested locale rule is applied to branches belonging to a fallback locale.

Unsuccessful approach: Always using the default locale fixes fallback but corrupts messages actually found in the requested locale.

Case contract

Catalogs contain key-to-branch maps for toy locales A and B. A selects one for 0 or 1; B only for 1. Resolve requested locale then B and select with the owning locale rule; missing keys return the key.

Why this case matters

This offline controlled message model isolates a localization decision; it does not implement a complete message-format or locale standard.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(catalogs, requested, key, n):
    owner = requested if key in catalogs.get(requested,{}) else 'B'
    branches = catalogs.get(owner,{}).get(key)
    if branches is None: return key
    return branches['one' if (n in (0,1) if requested == 'A' else n == 1) else 'other']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fallback zero', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',0), 'many')
check('local zero', solve({'A':{'k':{'one':'single','other':'many'}}},'A','k',0), 'single')
check('local one', solve({'A':{'k':{'one':'single','other':'many'}}},'A','k',1), 'single')
check('fallback one', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',1), 'single')
check('many', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',N+1), 'many')
check('missing', solve({},'A','k'+str(N),0), 'k'+str(N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fallback zerosinglemanyFailed
local zerosinglesinglePassed
local onesinglesinglePassed
fallback onesinglesinglePassed
manymanymanyPassed
missingk1k1Passed

SHA-256 / 92343acd1117906743aef8d9c3c9d6a2b29ab42f10467de5065350a9d1ebc621

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(catalogs, requested, key, n):
    owner = requested if key in catalogs.get(requested,{}) else 'B'
    branches = catalogs.get(owner,{}).get(key)
    if branches is None: return key
    return branches['one' if n == 1 else 'other']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fallback zero', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',0), 'many')
check('local zero', solve({'A':{'k':{'one':'single','other':'many'}}},'A','k',0), 'single')
check('local one', solve({'A':{'k':{'one':'single','other':'many'}}},'A','k',1), 'single')
check('fallback one', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',1), 'single')
check('many', solve({'B':{'k':{'one':'single','other':'many'}}},'A','k',N+1), 'many')
check('missing', solve({},'A','k'+str(N),0), 'k'+str(N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fallback zeromanymanyPassed
local zeromanysingleFailed
local onesinglesinglePassed
fallback onesinglesinglePassed
manymanymanyPassed
missingk1k1Passed

SHA-256 / 148a57dad7d837622ae772a755e638e0010823cb68c6b745e5a67d8b98008095

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Only the explicitly specified miniature locale/message rules are modeled. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:50.888451+00:00.

Case digest / 80b8f87aec83a2b97621666f7619dd158b83fb638cae4704f21c641c0ce96334