Localization and Machine-Readable Data Failures
Order status returned as "En cours" vs "In progress" depending on locale, breaking consumers that depend on stable machine-readable identifiers.
Failure explanation
An API mixes human-readable localized text with values that consumers need to interpret consistently. If a status enum, error code, date, or number changes based on locale, clients may break when parsing or branching on the value. Human-readable messages can be translated; machine-readable identifiers should remain stable unless the contract explicitly says otherwise.
Example
A response returns {"status":"In progress"} for English and {"status":"En cours"} for French. A consumer compares the status string to "In progress" and fails for French users.
How to test
- Send supported Accept-Language values and unsupported locales.
- Compare enum identifiers, error codes, dates, numbers, and translated messages.
- Test fallback behavior and Unicode preservation.
- Ensure localization does not alter identifiers used for program logic.
Expected behavior
Machine-readable codes and enum values remain stable. Human-readable descriptions may be localized according to a documented locale and fallback policy.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.