{"record":{"id":"df6391213a4589f8","repo":"zed-industries/zed","slug":"no-localised-string-for-locale","errorCode":null,"errorMessage":"No localised string for {locale}","messagePattern":"No localised string for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_windows/src/direct_write.rs","lineNumber":1836,"sourceCode":"        direct_write_features.AddFontFeature(feature_calt)?;\n    }\n\n    Ok(())\n}\n\n#[inline]\nconst fn make_direct_write_feature(feature_name: &str, parameter: u32) -> DWRITE_FONT_FEATURE {\n    let tag = make_direct_write_tag(feature_name);\n    DWRITE_FONT_FEATURE {\n        nameTag: tag,\n        parameter,\n    }\n}\n\n#[inline]\nconst fn make_open_type_tag(tag_name: &str) -> u32 {\n    let bytes = tag_name.as_bytes();\n    debug_assert!(bytes.len() == 4);\n    u32::from_le_bytes([bytes[0], bytes[1], bytes[2], bytes[3]])\n}\n\n#[inline]\nconst fn make_direct_write_tag(tag_name: &str) -> DWRITE_FONT_FEATURE_TAG {\n    DWRITE_FONT_FEATURE_TAG(make_open_type_tag(tag_name))\n}\n\n#[inline]\nfn get_name(string: IDWriteLocalizedStrings, locale: &HSTRING) -> Result<String> {\n    let mut locale_name_index = 0u32;\n    let mut exists = BOOL(0);\n    unsafe { string.FindLocaleName(locale, &mut locale_name_index, &mut exists as _)? };\n    if !exists.as_bool() {\n        unsafe {\n            string.FindLocaleName(\n                DEFAULT_LOCALE_NAME,\n                &mut locale_name_index as _,","sourceCodeStart":1818,"sourceCodeEnd":1854,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/gpui_windows/src/direct_write.rs#L1818-L1854","documentation":"Raised in `get_name` (DirectWrite font metadata helper) after `FindLocaleName` fails to find the requested locale AND the DEFAULT_LOCALE_NAME fallback lookup also reports no matching localized string — the IDWriteLocalizedStrings genuinely has no entry for either locale, so the requested font property (family/face name) cannot be resolved.","triggerScenarios":"Thrown at crates/gpui_windows/src/direct_write.rs:1839 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Iterate all GetLocaleNameLength/GetLocaleName entries and pick the first available instead of failing.","Fall back to index 0 of the localized strings collection as a last resort.","Return an empty/placeholder name rather than erroring for cosmetic metadata lookups.","Log the font identity alongside the error to identify the offending font file."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}