From 2f7fa651b9575ef7292046181eaa1fe02c9cc75e Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sun, 11 Sep 2022 01:39:17 -0700 Subject: [PATCH] Fix MacVim's Korean menu translations causing startup error Apple's Korean translations contain individual "." instead of using ellipsis, and the extraction script wasn't escapting them when using them in `menutrans` commands. Add the escape and re-generate the Korean menu translations. Fix #1278 --- runtime/lang/macvim_menu/menu_ko_kr.utf-8.apple.vim | 2 +- src/MacVim/scripts/extract-specific-localised-strings.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/lang/macvim_menu/menu_ko_kr.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_ko_kr.utf-8.apple.vim index 3f3baf94cb..fd36136473 100644 --- a/runtime/lang/macvim_menu/menu_ko_kr.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_ko_kr.utf-8.apple.vim @@ -7,7 +7,7 @@ menutrans Open… 열기… menutrans Open\ Recent 최근\ 사용\ 열기 menutrans Close\ Window:qa 윈도우\ 닫기 menutrans Close:q 닫기 -menutrans Save\ As…:sav 별도\ 저장... +menutrans Save\ As…:sav 별도\ 저장\.\.\. menutrans Save\ All 모두\ 저장 menutrans Find 찾기 menutrans Find… 찾기… diff --git a/src/MacVim/scripts/extract-specific-localised-strings.swift b/src/MacVim/scripts/extract-specific-localised-strings.swift index ac312f2ec7..e859973f1d 100755 --- a/src/MacVim/scripts/extract-specific-localised-strings.swift +++ b/src/MacVim/scripts/extract-specific-localised-strings.swift @@ -363,6 +363,7 @@ for localisation in localisations { else { let escapedTranslation = translation.replacingOccurrences(of: " ", with: "\\ ", options: .literal, range: nil) .replacingOccurrences(of: " ", with: "\\ ", options: .literal, range: nil) + .replacingOccurrences(of: ".", with: "\\.", options: .literal, range: nil) return """ menutrans \(neededLocalisation.targetKey) \(escapedTranslation)