ar.lproj/Localizable.strings contains unescaped ASCII double quotes, fails Xcode validation

#234 · closed · 0 comments

View on GitHub ↗

yusixian

Here are the reasons I found using AI, but I'm not sure if they're correct, so I'm seeking your advice. ## Description The Arabic localization file `Sources/KeyboardShortcuts/Localization/ar.lproj/Localizable.strings` contains unescaped ASCII double quotes (`"`, U+0022) inside a value string, which causes Xcode's `builtin-copyStrings --validate` to fail with: ``` error: validation failed: Couldn't parse property list because the input data was in an invalid format ``` ## Root Cause In the `keyboard_shortcuts_can_be_changed` entry, the value contains literal ASCII `"` (0x22) around the settings path: ``` "keyboard_shortcuts_can_be_changed" = "...في "إعدادات النظام › لوحة المفاتيح › اختصارات لوحة المفاتيح"."; ^ ^ ASCII " (0x22) — breaks the .strings parser ``` In old-style `.strings` format, `"` is the value delimiter. An unescaped `"` inside the value causes the parser to treat it as the end of the string. Note that the `keyboard_shortcut_used_by_menu_item` entry correctly uses Unicode smart quotes (`"` U+201C / `"` U+201D) for `"%@"`, which do not conflict with the parser. This issue exists in all versions that include the Arabic localization (at least 2.2.4, 2.3.0, 2.4.0). ## Suggested Fix Either: 1. **Escape the quotes**: `\"إعدادات النظام...\"` 2. **Use smart quotes**: Replace ASCII `"` with `"` (U+201C) and `"` (U+201D) 3. **Convert to XML plist format** (like Xcode does automatically when it edits `.strings` files) ## Reproduction ```bash plutil -lint Sources/KeyboardShortcuts/Localization/ar.lproj/Localizable.strings # => Unexpected character " at line 1 ``` Compare with any other localization (e.g. `cs.lproj`): ```bash plutil -lint Sources/KeyboardShortcuts/Localization/cs.lproj/Localizable.strings # => OK ``` ## Environment - Xcode 26 - macOS 26 - KeyboardShortcuts v2.4.0

Comments