diff --git a/runtime/doc/gui_mac.txt b/runtime/doc/gui_mac.txt index cb09c22c5e..294113d49c 100644 --- a/runtime/doc/gui_mac.txt +++ b/runtime/doc/gui_mac.txt @@ -308,6 +308,7 @@ KEY VALUE ~ *MMVerticalSplit* files open in vertical splits [bool] *MMZoomBoth* zoom button maximizes both directions [bool] *MMUpdaterPrereleaseChannel* opt-in to pre-release software update [bool] +*MMShowWhatsNewOnStartup* show "What's New" after updating to new version [bool] As an example, if you have more than one mouse button and would wish to free up Ctrl-click so you can bind it to something else, then the appropriate diff --git a/runtime/doc/tags b/runtime/doc/tags index 838b10e179..7069bc6637 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5520,6 +5520,7 @@ MMNonNativeFullScreenShowMenu gui_mac.txt /*MMNonNativeFullScreenShowMenu* MMRendererClipToRow gui_mac.txt /*MMRendererClipToRow* MMShareFindPboard gui_mac.txt /*MMShareFindPboard* MMShowAddTabButton gui_mac.txt /*MMShowAddTabButton* +MMShowWhatsNewOnStartup gui_mac.txt /*MMShowWhatsNewOnStartup* MMSmoothResize gui_mac.txt /*MMSmoothResize* MMTabMaxWidth gui_mac.txt /*MMTabMaxWidth* MMTabMinWidth gui_mac.txt /*MMTabMinWidth* diff --git a/runtime/lang/macvim_menu/menu_ca_es.latin1.apple.vim b/runtime/lang/macvim_menu/menu_ca_es.latin1.apple.vim index 528f39dc78..1abaa9662b 100644 --- a/runtime/lang/macvim_menu/menu_ca_es.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_ca_es.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Fer\ zoom\ a\ tot menutrans Show\ Next\ Tab Mostrar\ la\ pestanya\ següent menutrans Show\ Previous\ Tab Mostrar\ la\ pestanya\ anterior menutrans Bring\ All\ to\ Front Portar-ho\ tot\ a\ primer\ pla +menutrans What's\ New Novetats menutrans Release\ Notes Notes\ de\ la\ versió menutrans Look\ Up Consultar diff --git a/runtime/lang/macvim_menu/menu_cs_cz.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_cs_cz.utf-8.apple.vim index c2ecd17ae1..285e355192 100644 --- a/runtime/lang/macvim_menu/menu_cs_cz.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_cs_cz.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Přepnout\ velikost\ všech menutrans Show\ Next\ Tab Zobrazit\ další\ panel menutrans Show\ Previous\ Tab Zobrazit\ předchozí\ panel menutrans Bring\ All\ to\ Front Převést\ vše\ do\ popředí +menutrans What's\ New Novinky menutrans Release\ Notes Poznámky\ k\ vydání menutrans Look\ Up Vyhledat diff --git a/runtime/lang/macvim_menu/menu_da.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_da.utf-8.apple.vim index 6cde565afe..6363d60554 100644 --- a/runtime/lang/macvim_menu/menu_da.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_da.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zoom\ alle menutrans Show\ Next\ Tab Vis\ næste\ fane menutrans Show\ Previous\ Tab Vis\ forrige\ fane menutrans Bring\ All\ to\ Front Anbring\ alle\ forrest +menutrans What's\ New Nyheder menutrans Release\ Notes Frigivelsesnoter menutrans Look\ Up Slå\ op diff --git a/runtime/lang/macvim_menu/menu_de_de.latin1.apple.vim b/runtime/lang/macvim_menu/menu_de_de.latin1.apple.vim index 8804a0c914..9b8f42ee76 100644 --- a/runtime/lang/macvim_menu/menu_de_de.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_de_de.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Alle\ zoomen menutrans Show\ Next\ Tab Nächsten\ Tab\ anzeigen menutrans Show\ Previous\ Tab Vorherigen\ Tab\ anzeigen menutrans Bring\ All\ to\ Front Alle\ nach\ vorne\ bringen +menutrans What's\ New Neue\ Funktionen menutrans Release\ Notes Aktuelle\ Informationen menutrans Look\ Up Nachschlagen diff --git a/runtime/lang/macvim_menu/menu_es_es.latin1.apple.vim b/runtime/lang/macvim_menu/menu_es_es.latin1.apple.vim index 008737b8bb..51a12aa9ac 100644 --- a/runtime/lang/macvim_menu/menu_es_es.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_es_es.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Aplicar\ zoom\ a\ todas\ las\ ventanas menutrans Show\ Next\ Tab Mostrar\ pestaña\ siguiente menutrans Show\ Previous\ Tab Mostrar\ pestaña\ anterior menutrans Bring\ All\ to\ Front Traer\ todo\ al\ frente +menutrans What's\ New Novedades menutrans Release\ Notes Notas\ de\ la\ versión menutrans Look\ Up Consultar diff --git a/runtime/lang/macvim_menu/menu_fi_fi.latin1.apple.vim b/runtime/lang/macvim_menu/menu_fi_fi.latin1.apple.vim index c697531e8f..1f53714a40 100644 --- a/runtime/lang/macvim_menu/menu_fi_fi.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_fi_fi.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zoomaa\ kaikki menutrans Show\ Next\ Tab Näytä\ seuraava\ välilehti menutrans Show\ Previous\ Tab Näytä\ edellinen\ välilehti menutrans Bring\ All\ to\ Front Tuo\ kaikki\ eteen +menutrans What's\ New Uutta menutrans Release\ Notes Julkaisutiedot menutrans Look\ Up Katso\ lisää diff --git a/runtime/lang/macvim_menu/menu_fr_fr.latin1.apple.vim b/runtime/lang/macvim_menu/menu_fr_fr.latin1.apple.vim index ba4564ec95..ba926d291e 100644 --- a/runtime/lang/macvim_menu/menu_fr_fr.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_fr_fr.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Réduire/agrandir\ toutes\ les\ fenêtres menutrans Show\ Next\ Tab Afficher\ l’onglet\ suivant menutrans Show\ Previous\ Tab Afficher\ l’onglet\ précédent menutrans Bring\ All\ to\ Front Tout\ ramener\ au\ premier\ plan +menutrans What's\ New Nouveautés menutrans Release\ Notes Notes\ de\ mise\ à\ jour menutrans Look\ Up Définition diff --git a/runtime/lang/macvim_menu/menu_hu_hu.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_hu_hu.utf-8.apple.vim index 249f2ce8e7..e5bf5f675e 100644 --- a/runtime/lang/macvim_menu/menu_hu_hu.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_hu_hu.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Összes\ nagyítása menutrans Show\ Next\ Tab Következő\ lap\ megjelenítése menutrans Show\ Previous\ Tab Előző\ lap\ megjelenítése menutrans Bring\ All\ to\ Front Összes\ előtérbe\ hozása +menutrans What's\ New Újdonságok menutrans Release\ Notes Kibocsátási\ megjegyzések menutrans Look\ Up Definiálás diff --git a/runtime/lang/macvim_menu/menu_it_it.latin1.apple.vim b/runtime/lang/macvim_menu/menu_it_it.latin1.apple.vim index 79e8f3e481..66a808e661 100644 --- a/runtime/lang/macvim_menu/menu_it_it.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_it_it.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Ridimensiona\ tutto menutrans Show\ Next\ Tab Mostra\ pannello\ successivo menutrans Show\ Previous\ Tab Mostra\ pannello\ precedente menutrans Bring\ All\ to\ Front Porta\ tutto\ in\ primo\ piano +menutrans What's\ New Novità menutrans Release\ Notes Note\ di\ uscita menutrans Look\ Up Cerca diff --git a/runtime/lang/macvim_menu/menu_ja_jp.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_ja_jp.utf-8.apple.vim index 8ea9acc8c3..156e67ac1e 100644 --- a/runtime/lang/macvim_menu/menu_ja_jp.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_ja_jp.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All すべてを拡大/縮小 menutrans Show\ Next\ Tab 次のタブを表示 menutrans Show\ Previous\ Tab 前のタブを表示 menutrans Bring\ All\ to\ Front すべてを手前に移動 +menutrans What's\ New 新機能 menutrans Release\ Notes リリースノート menutrans Look\ Up 調べる 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 173fa86414..65428f6604 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 @@ -25,5 +25,6 @@ menutrans Zoom\ All 모두\ 확대/축소 menutrans Show\ Next\ Tab 다음\ 탭\ 보기 menutrans Show\ Previous\ Tab 이전\ 탭\ 보기 menutrans Bring\ All\ to\ Front 모두\ 앞으로\ 가져오기 +menutrans What's\ New 새로운\ 기능 menutrans Release\ Notes 릴리즈\ 노트 menutrans Look\ Up 찾아보기 diff --git a/runtime/lang/macvim_menu/menu_nl_nl.latin1.apple.vim b/runtime/lang/macvim_menu/menu_nl_nl.latin1.apple.vim index c6b7378a4f..0f82652181 100644 --- a/runtime/lang/macvim_menu/menu_nl_nl.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_nl_nl.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Vergroot/verklein\ alles menutrans Show\ Next\ Tab Toon\ volgende\ tabblad menutrans Show\ Previous\ Tab Toon\ vorige\ tabblad menutrans Bring\ All\ to\ Front Alles\ op\ voorgrond +menutrans What's\ New Nieuw menutrans Release\ Notes Versienotities menutrans Look\ Up Zoek\ op diff --git a/runtime/lang/macvim_menu/menu_no_no.latin1.apple.vim b/runtime/lang/macvim_menu/menu_no_no.latin1.apple.vim index b0c06e6c4b..2974e6d844 100644 --- a/runtime/lang/macvim_menu/menu_no_no.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_no_no.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zoom\ alle menutrans Show\ Next\ Tab Vis\ neste\ fane menutrans Show\ Previous\ Tab Vis\ forrige\ fane menutrans Bring\ All\ to\ Front Legg\ alle\ øverst +menutrans What's\ New Nytt menutrans Release\ Notes Merknader menutrans Look\ Up Slå\ opp diff --git a/runtime/lang/macvim_menu/menu_pl_pl.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_pl_pl.utf-8.apple.vim index 83d85f7046..a7e09668be 100644 --- a/runtime/lang/macvim_menu/menu_pl_pl.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_pl_pl.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zoom\ wszystkich menutrans Show\ Next\ Tab Pokaż\ następną\ kartę menutrans Show\ Previous\ Tab Pokaż\ poprzednią\ kartę menutrans Bring\ All\ to\ Front Umieść\ wszystko\ na\ wierzchu +menutrans What's\ New Co\ nowego menutrans Release\ Notes Informacje\ o\ wersji menutrans Look\ Up Definicja diff --git a/runtime/lang/macvim_menu/menu_pt_br.apple.vim b/runtime/lang/macvim_menu/menu_pt_br.apple.vim index 7e910b288a..e5b99942cb 100644 --- a/runtime/lang/macvim_menu/menu_pt_br.apple.vim +++ b/runtime/lang/macvim_menu/menu_pt_br.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zoom\ em\ Todas menutrans Show\ Next\ Tab Mostrar\ Aba\ Seguinte menutrans Show\ Previous\ Tab Mostrar\ Aba\ Anterior menutrans Bring\ All\ to\ Front Trazer\ Todas\ para\ a\ Frente +menutrans What's\ New Novidades menutrans Release\ Notes Notas\ de\ Lançamento menutrans Look\ Up Pesquisar diff --git a/runtime/lang/macvim_menu/menu_pt_pt.apple.vim b/runtime/lang/macvim_menu/menu_pt_pt.apple.vim index da9c823aca..42b63023a0 100644 --- a/runtime/lang/macvim_menu/menu_pt_pt.apple.vim +++ b/runtime/lang/macvim_menu/menu_pt_pt.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Aumentar/reduzir\ todas\ as\ janelas menutrans Show\ Next\ Tab Mostrar\ separador\ seguinte menutrans Show\ Previous\ Tab Mostrar\ separador\ anterior menutrans Bring\ All\ to\ Front Passar\ tudo\ para\ a\ frente +menutrans What's\ New Novidades menutrans Release\ Notes Notas\ de\ lançamento menutrans Look\ Up Procurar diff --git a/runtime/lang/macvim_menu/menu_ru_ru.apple.vim b/runtime/lang/macvim_menu/menu_ru_ru.apple.vim index 4265f32134..a74a9568cf 100644 --- a/runtime/lang/macvim_menu/menu_ru_ru.apple.vim +++ b/runtime/lang/macvim_menu/menu_ru_ru.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Изменить\ масштаб\ всех\ окон menutrans Show\ Next\ Tab Показать\ следующую\ вкладку menutrans Show\ Previous\ Tab Показать\ предыдущую\ вкладку menutrans Bring\ All\ to\ Front Все\ окна\ —\ на\ передний\ план +menutrans What's\ New Что\ нового menutrans Release\ Notes Примечания\ к\ выпуску menutrans Look\ Up Найти\ в\ словаре diff --git a/runtime/lang/macvim_menu/menu_sv_se.latin1.apple.vim b/runtime/lang/macvim_menu/menu_sv_se.latin1.apple.vim index ef87fa6220..e9bee8819f 100644 --- a/runtime/lang/macvim_menu/menu_sv_se.latin1.apple.vim +++ b/runtime/lang/macvim_menu/menu_sv_se.latin1.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Zooma\ alla menutrans Show\ Next\ Tab Visa\ nästa\ flik menutrans Show\ Previous\ Tab Visa\ föregående\ flik menutrans Bring\ All\ to\ Front Lägg\ alla\ överst +menutrans What's\ New Nyheter menutrans Release\ Notes Versions­anmärkningar menutrans Look\ Up Slå\ upp diff --git a/runtime/lang/macvim_menu/menu_tr_tr.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_tr_tr.utf-8.apple.vim index b5b3fe0e49..d2875bc348 100644 --- a/runtime/lang/macvim_menu/menu_tr_tr.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_tr_tr.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All Tümünü\ Büyüt/Küçült menutrans Show\ Next\ Tab Sonraki\ Sekmeyi\ Göster menutrans Show\ Previous\ Tab Önceki\ Sekmeyi\ Göster menutrans Bring\ All\ to\ Front Tümünü\ Öne\ Getir +menutrans What's\ New Yenilikler menutrans Release\ Notes Çıkış\ Notları menutrans Look\ Up Araştır diff --git a/runtime/lang/macvim_menu/menu_zh_cn.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_zh_cn.utf-8.apple.vim index 646715734a..6d0e86f527 100644 --- a/runtime/lang/macvim_menu/menu_zh_cn.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_zh_cn.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All 全部缩放 menutrans Show\ Next\ Tab 显示下一个标签页 menutrans Show\ Previous\ Tab 显示上一个标签页 menutrans Bring\ All\ to\ Front 前置全部窗口 +menutrans What's\ New 新功能 menutrans Release\ Notes 发布说明 menutrans Look\ Up 查询 diff --git a/runtime/lang/macvim_menu/menu_zh_tw.utf-8.apple.vim b/runtime/lang/macvim_menu/menu_zh_tw.utf-8.apple.vim index d631ad8aee..375470713a 100644 --- a/runtime/lang/macvim_menu/menu_zh_tw.utf-8.apple.vim +++ b/runtime/lang/macvim_menu/menu_zh_tw.utf-8.apple.vim @@ -25,5 +25,6 @@ menutrans Zoom\ All 縮放全部 menutrans Show\ Next\ Tab 顯示下一個標籤頁 menutrans Show\ Previous\ Tab 顯示上一個標籤頁 menutrans Bring\ All\ to\ Front 將此程式所有視窗移至最前 +menutrans What's\ New 新功能 menutrans Release\ Notes 版本附註 menutrans Look\ Up 查詢 diff --git a/runtime/menu.vim b/runtime/menu.vim index 28f724df22..283e8a2367 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -102,16 +102,18 @@ if has("gui_macvim") an 9999.1 &Help.MacVim\ Help :h gui_mac tln 9999.1 &Help.MacVim\ Help :h gui_mac an 9999.2 &Help.MacVim\ Website - an 9999.3 &Help.Release\ Notes silent !open https://github.com/macvim-dev/macvim/releases - tln 9999.3 &Help.Release\ Notes silent !open https://github.com/macvim-dev/macvim/releases - an 9999.4 &Help.-sep0- + an 9999.3 &Help.What's\ New + tln 9999.3 &Help.What's\ New + an 9999.4 &Help.Release\ Notes silent !open https://github.com/macvim-dev/macvim/releases + tln 9999.4 &Help.Release\ Notes silent !open https://github.com/macvim-dev/macvim/releases + an 9999.5 &Help.-sep0- endif if has("gui_macvim") " Run vimtutor in GUI mode. Need to make sure to override the PATH so we use " this app instead of accidentally opening another installed Vim/MacVim. - an 9999.5 &Help.Vim\ Tutor :silent call system('PATH="$VIM/../../bin":/usr/bin:/bin:/usr/sbin:/sbin $VIM/../../bin/vimtutor -g&') - tln 9999.5 &Help.Vim\ Tutor :silent call system('PATH="$VIM/../../bin":/usr/bin:/bin:/usr/sbin:/sbin $VIM/../../bin/vimtutor -g&') - an 9999.6 &Help.-sep-vim-tutor- + an 9999.6 &Help.Vim\ Tutor :silent call system('PATH="$VIM/../../bin":/usr/bin:/bin:/usr/sbin:/sbin $VIM/../../bin/vimtutor -g&') + tln 9999.6 &Help.Vim\ Tutor :silent call system('PATH="$VIM/../../bin":/usr/bin:/bin:/usr/sbin:/sbin $VIM/../../bin/vimtutor -g&') + an 9999.7 &Help.-sep-vim-tutor- endif an 9999.10 &Help.&Overview :help an 9999.20 &Help.&User\ Manual :help usr_toc @@ -1312,6 +1314,7 @@ if has("gui_macvim") macm Help.MacVim\ Help key= macm Help.MacVim\ Website action=openWebsite: + macm Help.What's\ New action=showWhatsNew: endif " if has("gui_macvim") endif " !exists("did_install_default_menus") diff --git a/src/MacVim/Actions.plist b/src/MacVim/Actions.plist index 2415e6b16f..ced98af89e 100644 --- a/src/MacVim/Actions.plist +++ b/src/MacVim/Actions.plist @@ -38,6 +38,8 @@ openWebsite: + showWhatsNew: + orderFrontCharacterPalette: orderFrontFontPanel: diff --git a/src/MacVim/Base.lproj/MainMenu.xib b/src/MacVim/Base.lproj/MainMenu.xib index a6ef8ffd01..f878ddc7e7 100644 --- a/src/MacVim/Base.lproj/MainMenu.xib +++ b/src/MacVim/Base.lproj/MainMenu.xib @@ -185,6 +185,11 @@ + + + + + diff --git a/src/MacVim/Base.lproj/Preferences.xib b/src/MacVim/Base.lproj/Preferences.xib index 3bad81f8bb..0ecc7b8278 100644 --- a/src/MacVim/Base.lproj/Preferences.xib +++ b/src/MacVim/Base.lproj/Preferences.xib @@ -24,11 +24,11 @@ - + - + @@ -73,7 +73,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -185,7 +185,7 @@ - + + + + + + + + + + + + @@ -244,19 +270,10 @@ - - - - - - - - - - + diff --git a/src/MacVim/Base.lproj/WhatsNew.xib b/src/MacVim/Base.lproj/WhatsNew.xib new file mode 100644 index 0000000000..9d6fe8c207 --- /dev/null +++ b/src/MacVim/Base.lproj/WhatsNew.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MacVim/Info.plist b/src/MacVim/Info.plist index 8995d40303..21d935c493 100644 --- a/src/MacVim/Info.plist +++ b/src/MacVim/Info.plist @@ -1309,6 +1309,8 @@ + MMWhatsNewURL + https://macvim.org/release-notes/whatsnew.html SUEnableJavaScript YES SUFeedURL diff --git a/src/MacVim/MMAppController.h b/src/MacVim/MMAppController.h index a8acd9c219..cbf1fb89e6 100644 --- a/src/MacVim/MMAppController.h +++ b/src/MacVim/MMAppController.h @@ -51,6 +51,7 @@ int processingFlag; BOOL hasShownWindowBefore; + BOOL shouldShowWhatsNewPage; #if !DISABLE_SPARKLE #if USE_SPARKLE_1 @@ -93,6 +94,7 @@ - (IBAction)selectPreviousWindow:(id)sender; - (IBAction)orderFrontPreferencePanel:(id)sender; - (IBAction)openWebsite:(id)sender; +- (IBAction)showWhatsNew:(id)sender; - (IBAction)showVimHelp:(id)sender withCmd:(NSString *)cmd; - (IBAction)showVimHelp:(id)sender; - (IBAction)checkForUpdates:(id)sender; diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index 5cf6cbb1f4..b12b5637a8 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -43,6 +43,7 @@ #import "MMVimView.h" #import "MMWindowController.h" #import "MMTextView.h" +#import "MMWhatsNewController.h" #import "Miscellaneous.h" #import #import @@ -108,6 +109,8 @@ - (void)newFileHere:(NSPasteboard *)pboard userData:(NSString *)userData @interface MMAppController (Private) +- (void)startUpdaterAndWhatsNewPage; + - (MMVimController *)topmostVimController; - (int)launchVimProcessWithArguments:(NSArray *)args workingDirectory:(NSString *)cwd; @@ -264,6 +267,7 @@ + (void)initialize [NSNumber numberWithBool:YES], MMAllowForceClickLookUpKey, [NSNumber numberWithBool:NO], MMUpdaterPrereleaseChannelKey, @"", MMLastUsedBundleVersionKey, + [NSNumber numberWithBool:YES], MMShowWhatsNewOnStartupKey, nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:dict]; @@ -323,7 +327,11 @@ - (id)init updater = [[SUUpdater alloc] init]; #else sparkle2delegate = [[MMSparkle2Delegate alloc] init]; - updater = [[SPUStandardUpdaterController alloc] initWithUpdaterDelegate:sparkle2delegate userDriverDelegate:sparkle2delegate]; + + // We don't immediately start the updater, because if it sees an update + // and immediately shows the dialog box it will pop up behind a new MacVim + // window. Instead, startUpdaterAndWhatsNewPage will be called later to do so. + updater = [[SPUStandardUpdaterController alloc] initWithStartingUpdater:NO updaterDelegate:sparkle2delegate userDriverDelegate:sparkle2delegate]; #endif #endif @@ -501,10 +509,39 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification if (currentVersionLarger) { [ud setValue:currentVersion forKey:MMLastUsedBundleVersionKey]; + + // We have successfully updated to a new version. Show a "What's + // New" page to the user with latest release notes if the main + // release number has increased (we don't count the pre-release + // minor revision number for now). + if (lastUsedVersionItems[0].integerValue < currentVersionItems[0].integerValue) { + + BOOL showWhatsNewSetting = [ud boolForKey:MMShowWhatsNewOnStartupKey]; + + shouldShowWhatsNewPage = showWhatsNewSetting; + [MMWhatsNewController setRequestVersionRange:lastUsedVersion + to:currentVersion]; + } } } } + // Start the Sparkle updater and potentially show "What's New". If the user + // doesn't want a new untitled MacVim window shown, we immediately do so. + // Otherwise we want to do it *after* the untitled window is opened so the + // updater / "What's New" page can be shown on top of it. We still schedule + // a timer to open it as a backup in case something wrong happened with the + // Vim window (e.g. a crash in Vim) but we still want the updater to work since + // that update may very well be the fix for the crash. + const NSInteger untitledWindowFlag = [ud integerForKey:MMUntitledWindowKey]; + if ((untitledWindowFlag & MMUntitledWindowOnOpen) == 0) { + [self startUpdaterAndWhatsNewPage]; + } else { + // Per above, this is just a backup. startUpdaterAndWhatsNewPage will + // not do anything if it's called a second time. + [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(startUpdaterAndWhatsNewPage) userInfo:nil repeats:NO]; + } + ASLogInfo(@"MacVim finished launching"); } @@ -955,6 +992,11 @@ - (void)windowControllerWillOpen:(MMWindowController *)windowController } hasShownWindowBefore = YES; + + // If this is the first untitled window we defer starting updater/what's new + // to now to make sure they can be shown on top. Otherwise calling this will + // do nothing so it's safe. + [self startUpdaterAndWhatsNewPage]; } - (void)setMainMenu:(NSMenu *)mainMenu @@ -1232,7 +1274,10 @@ - (void)refreshAllTextViews - (BOOL)validateMenuItem:(NSMenuItem *)item { - // For the actions defined in this class we do want them to always be + if ([item action] == @selector(showWhatsNew:)) { + return [MMWhatsNewController canOpen]; + } + // For most of the actions defined in this class we do want them to always be // enabled since they are usually app functionality and independent of // each Vim's state. return YES; @@ -1370,6 +1415,12 @@ - (IBAction)openWebsite:(id)sender [NSURL URLWithString:MMWebsiteString]]; } +- (IBAction)showWhatsNew:(id)sender +{ + ASLogDebug(@"Open What's New page"); + [MMWhatsNewController openSharedInstance]; +} + - (IBAction)showVimHelp:(id)sender withCmd:(NSString *)cmd { ASLogDebug(@"Open window with Vim help"); @@ -1771,6 +1822,28 @@ - (void)newFileHere:(NSPasteboard *)pboard userData:(NSString *)userData @implementation MMAppController (Private) +/// Initializes the Sparkle updater and show a "What's New" page if needed. +/// Can be called more than once, but later calls will be silently ignored. +/// This should be called after the initial untitled window is shown to make +/// sure the updater/"What's New" windows can be shown on top of it. +- (void)startUpdaterAndWhatsNewPage +{ + static BOOL started = NO; + if (!started) { +#if !DISABLE_SPARKLE && !USE_SPARKLE_1 + [updater startUpdater]; +#endif + + if (shouldShowWhatsNewPage) { + // Schedule it to be run later to make sure it will show up on top + // of the new untitled window. + [MMWhatsNewController performSelectorOnMainThread:@selector(openSharedInstance) withObject:nil waitUntilDone:NO]; + } + + started = YES; + } +} + - (MMVimController *)topmostVimController { // Find the topmost visible window which has an associated vim controller diff --git a/src/MacVim/MMApplication.m b/src/MacVim/MMApplication.m index 85d5074ec3..61b212a996 100644 --- a/src/MacVim/MMApplication.m +++ b/src/MacVim/MMApplication.m @@ -53,7 +53,7 @@ - (void)orderFrontStandardAboutPanel:(id)sender NSString *marketingVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - BOOL isPrerelease = [version containsSubstring:@"."]; + BOOL isPrerelease = [version rangeOfString:@"."].length > 0; NSString *prerelease = isPrerelease ? @"\npre-release" : @""; NSString *title = [NSString stringWithFormat: diff --git a/src/MacVim/MMWhatsNewController.h b/src/MacVim/MMWhatsNewController.h new file mode 100644 index 0000000000..a2fd05764c --- /dev/null +++ b/src/MacVim/MMWhatsNewController.h @@ -0,0 +1,23 @@ +// +// MMWhatsNewWindow.h +// +// Window for displaying a "What's New" page with latest release notes. +// + +#import + +/// A controller to open a web view showing the latest release notes. This is +/// designed to show what's new since you updated your software and therefore +/// accepts a version range to request. +@interface MMWhatsNewController : NSWindowController +{ + IBOutlet NSTextField *messageTextField; + IBOutlet NSView *webViewContainer; + IBOutlet NSLayoutConstraint *webViewAlignTopConstraint; ///< Constraint to pin the web view to the top of window instead of the message +} + ++ (void)openSharedInstance; ++ (BOOL)canOpen; ++ (void)setRequestVersionRange:(NSString*)fromVersion to:(NSString*)latestVersion; + +@end diff --git a/src/MacVim/MMWhatsNewController.m b/src/MacVim/MMWhatsNewController.m new file mode 100644 index 0000000000..976db2c16d --- /dev/null +++ b/src/MacVim/MMWhatsNewController.m @@ -0,0 +1,169 @@ +// +// MMWhatsNewWindow.m +// +// Window for displaying a "What's New" page with latest release notes. +// + +#import "MMWhatsNewController.h" + +#import "MacVim.h" + +#import + +@interface MMWhatsNewController () + +@property WKWebView* webView; +@property NSURL *whatsNewURL; + +- (id)init; +- (void)dealloc; +@end + +@implementation MMWhatsNewController + +static MMWhatsNewController *singleton = nil; +static NSString *_fromVersion; +static NSString *_latestVersion; + ++ (void)openSharedInstance +{ + if (![MMWhatsNewController canOpen]) { + return; + } + + if (!singleton) { + singleton = [[MMWhatsNewController alloc] init]; + } + NSWindow *window = [singleton window]; + [window makeKeyAndOrderFront:self]; + [window setDelegate:singleton]; + + return; +} + +/// Whether this feature is supported on this OS. ++ (BOOL)canOpen +{ + // While macOS 10.10 added WKWebView, 10.10-10.11 have issues with expired + // certs which means they can't easily access macvim.org. Just disable this + // feature to avoid confusing certifate errors when we pop up a blank page. + if (AVAILABLE_MAC_OS(10, 12)) + { + return YES; + } + return NO; +} + +/// Sets a requested version range for displaying What's New. Useful for when +/// we have updated across multiple versions and we can show a list of them. ++ (void)setRequestVersionRange:(NSString *)fromVersion to:(NSString *)latestVersion +{ + // These will leak as we never release, but it's ok. We intentionally remember + // the values so that even if the user dismissed the initial window they can + // open this again and it will be remembered as long as MacVim is open. This + // results in a better UX than only seeing the info once. + _fromVersion = [fromVersion retain]; + _latestVersion = [latestVersion retain]; +} + +- (id)init +{ + self = [super initWithWindowNibName:@"WhatsNew"]; + [self setWindowFrameAutosaveName:@"WhatsNew"]; + + NSString *whatsNewURLStr = [[NSBundle mainBundle] + objectForInfoDictionaryKey:@"MMWhatsNewURL"]; + + if (_fromVersion != nil && _latestVersion != nil) { + // We just updated to a new version. Show a message to user and also + // requests specifically these new versions for the welcome message + whatsNewURLStr = [NSString stringWithFormat:@"%@?from=%@&to=%@", + whatsNewURLStr, + _fromVersion, + _latestVersion]; + } + else { + // We just updated to a new version. Show a message to user and also + // requests specifically these new versions for the welcome message + NSString *currentVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; + + whatsNewURLStr = [NSString stringWithFormat:@"%@?version=%@", + whatsNewURLStr, + currentVersion]; + } + _whatsNewURL = [[NSURL URLWithString:whatsNewURLStr] retain]; + + return self; +} + +- (void)dealloc +{ + webViewContainer = nil; + [_webView release]; _webView = nil; + [_whatsNewURL release]; _whatsNewURL = nil; + + [super dealloc]; +} + +- (void)windowDidLoad +{ + if (_fromVersion != nil && _latestVersion != nil) { + messageTextField.stringValue = [NSString stringWithFormat: + NSLocalizedString(@"MacVim has been updated to a new version (from r%@ to r%@)! See below for what's new.", @"New version prompt"), + _fromVersion, _latestVersion]; + } + else { + // This will pin the web view to the top, on top of the message box + [webViewAlignTopConstraint setPriority:999]; + + messageTextField.stringValue = @""; + } + + // Construct a web view at runtime instead of relying on using the xib because this is + // more backwards compatible as we can use runtime checks and compiler defines. + _webView = [[WKWebView alloc] initWithFrame:NSZeroRect + configuration:[[[WKWebViewConfiguration alloc] init] autorelease]]; + + [webViewContainer addSubview:_webView]; + _webView.frame = webViewContainer.bounds; + _webView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; + + _webView.navigationDelegate = self; + + [_webView loadRequest:[NSURLRequest requestWithURL:_whatsNewURL]]; +} + +// NSWindowDelegate methods + +- (void)windowWillClose:(NSNotification *)notification +{ + [singleton release]; singleton = nil; + return; +} + +// WKNavigationDelegate methods + +/// Tells web view how to handle links and navigation. Current behavior is +/// anything that is not the release notes will be opened by system web browser. +- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler +{ + NSURLRequest *request = navigationAction.request; + NSURL *requestURL = request.URL; + + if ([requestURL isEqual:_whatsNewURL]) { + decisionHandler(WKNavigationActionPolicyAllow); + } + else { + // We want to open any links in the release notes with a browser instead. + decisionHandler(WKNavigationActionPolicyCancel); + + if ([request.URL.scheme isEqualToString:@"https"]) { + // Just try to be sane and only open https:// urls. There should be + // no reason why the release notes should contain other schemes and it + // would be an indication something is wrong or malicious (e.g. file: + // URLs). + [[NSWorkspace sharedWorkspace] openURL: requestURL]; + } + } +} +@end diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj index c12a024632..4f2418b750 100644 --- a/src/MacVim/MacVim.xcodeproj/project.pbxproj +++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj @@ -72,7 +72,10 @@ 907FF7512521BCE200BADACB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 907FF74F2521BCE200BADACB /* MainMenu.xib */; }; 907FF7542521BDA600BADACB /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 907FF7522521BDA600BADACB /* Preferences.xib */; }; 907FF7572521BDC300BADACB /* FindAndReplace.xib in Resources */ = {isa = PBXBuildFile; fileRef = 907FF7552521BDC200BADACB /* FindAndReplace.xib */; }; + 909894382A56EB1E007B84A3 /* WhatsNew.xib in Resources */ = {isa = PBXBuildFile; fileRef = 909894362A56EB1E007B84A3 /* WhatsNew.xib */; }; + 9098943C2A56ECF6007B84A3 /* MMWhatsNewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9098943B2A56ECF6007B84A3 /* MMWhatsNewController.m */; }; 90A33BEA28D563DF003A2E2F /* MMSparkle2Delegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A33BE928D563DF003A2E2F /* MMSparkle2Delegate.m */; }; + 90B9877D2A579F9500FC95D6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90B9877B2A579F9500FC95D6 /* WebKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -415,8 +418,12 @@ 90922ABC221D42F700F1E1F4 /* MMBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMBackend.h; sourceTree = ""; }; 90922ABD221D42F700F1E1F4 /* gui_macvim.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = gui_macvim.m; sourceTree = ""; }; 90922ABE221D42F700F1E1F4 /* MMBackend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMBackend.m; sourceTree = ""; }; + 909894372A56EB1E007B84A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/WhatsNew.xib; sourceTree = ""; }; + 9098943A2A56ECF6007B84A3 /* MMWhatsNewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMWhatsNewController.h; sourceTree = ""; }; + 9098943B2A56ECF6007B84A3 /* MMWhatsNewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMWhatsNewController.m; sourceTree = ""; }; 90A33BE928D563DF003A2E2F /* MMSparkle2Delegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MMSparkle2Delegate.m; sourceTree = ""; }; 90A33BEC28D56423003A2E2F /* MMSparkle2Delegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MMSparkle2Delegate.h; sourceTree = ""; }; + 90B9877B2A579F9500FC95D6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 90F84F1E2521F2270000268B /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/MainMenu.strings; sourceTree = ""; }; 90F84F232521F6480000268B /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/MainMenu.strings; sourceTree = ""; }; 90F84F242521F6590000268B /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/MainMenu.strings; sourceTree = ""; }; @@ -455,6 +462,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 90B9877D2A579F9500FC95D6 /* WebKit.framework in Frameworks */, 1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */, 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, 1D8B5A53104AF9FF002E59D5 /* Carbon.framework in Frameworks */, @@ -468,6 +476,8 @@ 080E96DDFE201D6D7F000001 /* MacVim Source */ = { isa = PBXGroup; children = ( + 9098943A2A56ECF6007B84A3 /* MMWhatsNewController.h */, + 9098943B2A56ECF6007B84A3 /* MMWhatsNewController.m */, 1D44972111FCA9B400B0630F /* MMCoreTextView+ToolTip.m */, 1D6008890E96A0B2003763F0 /* MMFindReplaceController.h */, 1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */, @@ -632,6 +642,7 @@ 907FF7552521BDC200BADACB /* FindAndReplace.xib */, 907FF7522521BDA600BADACB /* Preferences.xib */, 907FF74F2521BCE200BADACB /* MainMenu.xib */, + 909894362A56EB1E007B84A3 /* WhatsNew.xib */, ); name = Resources; sourceTree = ""; @@ -639,6 +650,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 90B9877B2A579F9500FC95D6 /* WebKit.framework */, 52A364721C4A5789005757EC /* Sparkle.framework */, 1D8B5A52104AF9FF002E59D5 /* Carbon.framework */, 1D493DB30C52533B00AB718C /* PSMTabBarControl.xcodeproj */, @@ -990,6 +1002,7 @@ 1DCD00CF0E50B2B700460166 /* Save.png in Resources */, 1DCD00D00E50B2B700460166 /* SaveAll.png in Resources */, 1DCD00D10E50B2B700460166 /* SaveSesn.png in Resources */, + 909894382A56EB1E007B84A3 /* WhatsNew.xib in Resources */, 1DCD00D20E50B2B700460166 /* TagJump.png in Resources */, 1DCD00D30E50B2B700460166 /* Undo.png in Resources */, 1D9C60520EF79C0C0034AD44 /* MacVim.icns in Resources */, @@ -1124,6 +1137,7 @@ 1DE3F8EB0D50F84600052B9E /* MMPreferenceController.m in Sources */, 0395A8330D71ED7800881434 /* DBPrefsWindowController.m in Sources */, 1D80591F0E1185EA001699D1 /* Miscellaneous.m in Sources */, + 9098943C2A56ECF6007B84A3 /* MMWhatsNewController.m in Sources */, 1D145C7F0E5227CE00691AA0 /* MMTextViewHelper.m in Sources */, 1D60088B0E96A0B2003763F0 /* MMFindReplaceController.m in Sources */, 1DE63FFB0E71820F00959BDB /* MMCoreTextView.m in Sources */, @@ -1200,6 +1214,14 @@ name = FindAndReplace.xib; sourceTree = ""; }; + 909894362A56EB1E007B84A3 /* WhatsNew.xib */ = { + isa = PBXVariantGroup; + children = ( + 909894372A56EB1E007B84A3 /* Base */, + ); + name = WhatsNew.xib; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/src/MacVim/Miscellaneous.h b/src/MacVim/Miscellaneous.h index 9b51f277c8..dec2a5adea 100644 --- a/src/MacVim/Miscellaneous.h +++ b/src/MacVim/Miscellaneous.h @@ -65,6 +65,7 @@ extern NSString *MMRendererClipToRowKey; extern NSString *MMAllowForceClickLookUpKey; extern NSString *MMUpdaterPrereleaseChannelKey; extern NSString *MMLastUsedBundleVersionKey; // The last used version of MacVim before this launch +extern NSString *MMShowWhatsNewOnStartupKey; // Enum for MMUntitledWindowKey diff --git a/src/MacVim/Miscellaneous.m b/src/MacVim/Miscellaneous.m index 5a1eef0f43..0718755183 100644 --- a/src/MacVim/Miscellaneous.m +++ b/src/MacVim/Miscellaneous.m @@ -61,6 +61,7 @@ NSString *MMAllowForceClickLookUpKey = @"MMAllowForceClickLookUp"; NSString *MMUpdaterPrereleaseChannelKey = @"MMUpdaterPrereleaseChannel"; NSString *MMLastUsedBundleVersionKey = @"MMLastUsedBundleVersion"; +NSString *MMShowWhatsNewOnStartupKey = @"MMShowWhatsNewOnStartup"; @implementation NSIndexSet (MMExtras) diff --git a/src/MacVim/ca.lproj/MainMenu.strings b/src/MacVim/ca.lproj/MainMenu.strings index 5561b849c6..8419d0a2e6 100644 --- a/src/MacVim/ca.lproj/MainMenu.strings +++ b/src/MacVim/ca.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Portar-ho tot a primer pla"; "233.title" = "Ajuda"; "232.title" = "Ajuda"; +"e16-xE-q4U.title" = "Novetats"; diff --git a/src/MacVim/cs.lproj/MainMenu.strings b/src/MacVim/cs.lproj/MainMenu.strings index a4231b47a5..1b9ee17fe6 100644 --- a/src/MacVim/cs.lproj/MainMenu.strings +++ b/src/MacVim/cs.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Převést vše do popředí"; "233.title" = "Nápověda"; "232.title" = "Nápověda"; +"e16-xE-q4U.title" = "Novinky"; diff --git a/src/MacVim/da.lproj/MainMenu.strings b/src/MacVim/da.lproj/MainMenu.strings index e5781acadf..f1fe09b5c6 100644 --- a/src/MacVim/da.lproj/MainMenu.strings +++ b/src/MacVim/da.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Anbring alle forrest"; "233.title" = "Hjælp"; "232.title" = "Hjælp"; +"e16-xE-q4U.title" = "Nyheder"; diff --git a/src/MacVim/de.lproj/MainMenu.strings b/src/MacVim/de.lproj/MainMenu.strings index 502184ae54..d3b4bf7bdd 100644 --- a/src/MacVim/de.lproj/MainMenu.strings +++ b/src/MacVim/de.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Alle nach vorne bringen"; "233.title" = "Hilfe"; "232.title" = "Hilfe"; +"e16-xE-q4U.title" = "Neue Funktionen"; diff --git a/src/MacVim/es.lproj/MainMenu.strings b/src/MacVim/es.lproj/MainMenu.strings index 571d6a9887..b74aa2e169 100644 --- a/src/MacVim/es.lproj/MainMenu.strings +++ b/src/MacVim/es.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Traer todo al frente"; "233.title" = "Ayuda"; "232.title" = "Ayuda"; +"e16-xE-q4U.title" = "Novedades"; diff --git a/src/MacVim/fi.lproj/MainMenu.strings b/src/MacVim/fi.lproj/MainMenu.strings index c0d0df10a3..c53d077da8 100644 --- a/src/MacVim/fi.lproj/MainMenu.strings +++ b/src/MacVim/fi.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Tuo kaikki eteen"; "233.title" = "Ohje"; "232.title" = "Ohje"; +"e16-xE-q4U.title" = "Uutta"; diff --git a/src/MacVim/fr.lproj/MainMenu.strings b/src/MacVim/fr.lproj/MainMenu.strings index 1d6f8d173c..9e20f2ebdf 100644 --- a/src/MacVim/fr.lproj/MainMenu.strings +++ b/src/MacVim/fr.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Tout ramener au premier plan"; "233.title" = "Aide"; "232.title" = "Aide"; +"e16-xE-q4U.title" = "Nouveautés"; diff --git a/src/MacVim/hu.lproj/MainMenu.strings b/src/MacVim/hu.lproj/MainMenu.strings index b976076e56..2e0969e5a7 100644 --- a/src/MacVim/hu.lproj/MainMenu.strings +++ b/src/MacVim/hu.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Összes előtérbe hozása"; "233.title" = "Súgó"; "232.title" = "Súgó"; +"e16-xE-q4U.title" = "Újdonságok"; diff --git a/src/MacVim/it.lproj/MainMenu.strings b/src/MacVim/it.lproj/MainMenu.strings index cecae3b9dd..8d7205832c 100644 --- a/src/MacVim/it.lproj/MainMenu.strings +++ b/src/MacVim/it.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Porta tutto in primo piano"; "233.title" = "Aiuto"; "232.title" = "Aiuto"; +"e16-xE-q4U.title" = "Novità"; diff --git a/src/MacVim/ja.lproj/MainMenu.strings b/src/MacVim/ja.lproj/MainMenu.strings index b22c66c669..5308de93d4 100644 --- a/src/MacVim/ja.lproj/MainMenu.strings +++ b/src/MacVim/ja.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "すべてを手前に移動"; "233.title" = "ヘルプ"; "232.title" = "ヘルプ"; +"e16-xE-q4U.title" = "新機能"; diff --git a/src/MacVim/ko.lproj/MainMenu.strings b/src/MacVim/ko.lproj/MainMenu.strings index a316350246..b83432f78c 100644 --- a/src/MacVim/ko.lproj/MainMenu.strings +++ b/src/MacVim/ko.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "모두 앞으로 가져오기"; "233.title" = "도움말"; "232.title" = "도움말"; +"e16-xE-q4U.title" = "새로운 기능"; diff --git a/src/MacVim/nb.lproj/MainMenu.strings b/src/MacVim/nb.lproj/MainMenu.strings index cefa9636b9..35b278440b 100644 --- a/src/MacVim/nb.lproj/MainMenu.strings +++ b/src/MacVim/nb.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Legg alle øverst"; "233.title" = "Hjelp"; "232.title" = "Hjelp"; +"e16-xE-q4U.title" = "Nytt"; diff --git a/src/MacVim/nl.lproj/MainMenu.strings b/src/MacVim/nl.lproj/MainMenu.strings index 7971fe775e..efa318c778 100644 --- a/src/MacVim/nl.lproj/MainMenu.strings +++ b/src/MacVim/nl.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Alles op voorgrond"; "233.title" = "Help"; "232.title" = "Help"; +"e16-xE-q4U.title" = "Nieuw"; diff --git a/src/MacVim/pl.lproj/MainMenu.strings b/src/MacVim/pl.lproj/MainMenu.strings index 640d25d700..e24c884d89 100644 --- a/src/MacVim/pl.lproj/MainMenu.strings +++ b/src/MacVim/pl.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Umieść wszystko na wierzchu"; "233.title" = "Pomoc"; "232.title" = "Pomoc"; +"e16-xE-q4U.title" = "Co nowego"; diff --git a/src/MacVim/pt-BR.lproj/MainMenu.strings b/src/MacVim/pt-BR.lproj/MainMenu.strings index f86bbf6e88..709153fdb2 100644 --- a/src/MacVim/pt-BR.lproj/MainMenu.strings +++ b/src/MacVim/pt-BR.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Trazer Todas para a Frente"; "233.title" = "Ajuda"; "232.title" = "Ajuda"; +"e16-xE-q4U.title" = "Novidades"; diff --git a/src/MacVim/pt-PT.lproj/MainMenu.strings b/src/MacVim/pt-PT.lproj/MainMenu.strings index e36e3534c1..b8c699748e 100644 --- a/src/MacVim/pt-PT.lproj/MainMenu.strings +++ b/src/MacVim/pt-PT.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Passar tudo para a frente"; "233.title" = "Ajuda"; "232.title" = "Ajuda"; +"e16-xE-q4U.title" = "Novidades"; diff --git a/src/MacVim/ru.lproj/MainMenu.strings b/src/MacVim/ru.lproj/MainMenu.strings index c698401c45..0127550321 100644 --- a/src/MacVim/ru.lproj/MainMenu.strings +++ b/src/MacVim/ru.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Все окна — на передний план"; "233.title" = "Справка"; "232.title" = "Справка"; +"e16-xE-q4U.title" = "Что нового"; diff --git a/src/MacVim/scripts/extract-specific-localised-strings.swift b/src/MacVim/scripts/extract-specific-localised-strings.swift index 43dd0fd960..f235c97149 100755 --- a/src/MacVim/scripts/extract-specific-localised-strings.swift +++ b/src/MacVim/scripts/extract-specific-localised-strings.swift @@ -15,7 +15,8 @@ // To use this: // 1. First download all the glossaries from Apple Developer, and mount the DMG's. // 2. Run this script with --mainMenu. This will generate the translations for MainMenu.xib. Copy each locale's -// Localizable.strings into each MainMenu.strings in MacVim. +// Localizable.strings into each MainMenu.strings in MacVim. You can do so by doing this: +// cd xib_strings; for f in *.lproj; do cat ../../$f/MainMenu.strings | head -$(awk -v line='Apple localization glossaries' '$0 ~ line {print NR-1}' ../../$f/MainMenu.strings) >! ./test.strings; cat $f/Localizable.strings >> ./test.strings; cp ./test.strings ../../$f/MainMenu.strings; rm ./test.strings; done // 3. Run this script with --vimMenu. This should output the updated string names to the individual locale's .vim // translation files. @@ -156,6 +157,8 @@ let neededLocalisations_mainmenu_xib = [ NeededLocalisation(targetKey: "233.title", appleKey: "526.title", glossaryFilename: "TextEdit"), // Help NeededLocalisation(targetKey: "232.title", appleKey: "524.title", glossaryFilename: "TextEdit"), + // Help + NeededLocalisation(targetKey: "e16-xE-q4U.title", appleKey: "WHATS_NEW_TITLE", glossaryFilename: "Marmoset"), ] // These are the translations for the Vim menus that MacVim re-named to fit Apple's HIG better. @@ -184,6 +187,7 @@ let neededLocalisations_vim = [ NeededLocalisation(targetKey: "Show\\ Next\\ Tab", appleKey: "Show Next Tab", glossaryFilename: "AppKit"), NeededLocalisation(targetKey: "Show\\ Previous\\ Tab", appleKey: "Show Previous Tab", glossaryFilename: "AppKit"), NeededLocalisation(targetKey: "Bring\\ All\\ to\\ Front", appleKey: "Bring All to Front", glossaryFilename: "AppKit"), + NeededLocalisation(targetKey: "What's\\ New", appleKey: "WHATS_NEW_TITLE", glossaryFilename: "Marmoset"), NeededLocalisation(targetKey: "Release\\ Notes", appleKey: "Release Notes (WFContentItemPropertyName)", glossaryFilename: "Shortcuts"), NeededLocalisation(targetKey: "Look\\ Up", appleKey: "Look Up", glossaryFilename: "iBooks"), ] diff --git a/src/MacVim/sv.lproj/MainMenu.strings b/src/MacVim/sv.lproj/MainMenu.strings index bc57f6bfd4..f8096ceba9 100644 --- a/src/MacVim/sv.lproj/MainMenu.strings +++ b/src/MacVim/sv.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Lägg alla överst"; "233.title" = "Hjälp"; "232.title" = "Hjälp"; +"e16-xE-q4U.title" = "Nyheter"; diff --git a/src/MacVim/tr.lproj/MainMenu.strings b/src/MacVim/tr.lproj/MainMenu.strings index b5d3283d0b..e620f9d817 100644 --- a/src/MacVim/tr.lproj/MainMenu.strings +++ b/src/MacVim/tr.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "Tümünü Öne Getir"; "233.title" = "Yardım"; "232.title" = "Yardım"; +"e16-xE-q4U.title" = "Yenilikler"; diff --git a/src/MacVim/zh-Hans.lproj/MainMenu.strings b/src/MacVim/zh-Hans.lproj/MainMenu.strings index f6ac61a486..2452bc2b0e 100644 --- a/src/MacVim/zh-Hans.lproj/MainMenu.strings +++ b/src/MacVim/zh-Hans.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "前置全部窗口"; "233.title" = "帮助"; "232.title" = "帮助"; +"e16-xE-q4U.title" = "新功能"; diff --git a/src/MacVim/zh-Hant.lproj/MainMenu.strings b/src/MacVim/zh-Hant.lproj/MainMenu.strings index 11d8ed4ef8..71cf51633d 100644 --- a/src/MacVim/zh-Hant.lproj/MainMenu.strings +++ b/src/MacVim/zh-Hant.lproj/MainMenu.strings @@ -60,3 +60,4 @@ "314.title" = "將此程式所有視窗移至最前"; "233.title" = "輔助說明"; "232.title" = "輔助說明"; +"e16-xE-q4U.title" = "新功能";