@@ -35,7 +35,8 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
35
35
UpdateInfo newUpdateInfo ;
36
36
37
37
if ( ! silentUpdate )
38
- api . ShowMsg ( "Please wait..." , "Checking for new update" ) ;
38
+ api . ShowMsg ( api . GetTranslation ( "pleaseWait" ) ,
39
+ api . GetTranslation ( "update_flowlauncher_update_check" ) ) ;
39
40
40
41
using var updateManager = await GitHubUpdateManager ( GitHubRepository ) . ConfigureAwait ( false ) ;
41
42
@@ -51,12 +52,13 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
51
52
if ( newReleaseVersion <= currentVersion )
52
53
{
53
54
if ( ! silentUpdate )
54
- MessageBox . Show ( "You already have the latest Flow Launcher version" ) ;
55
+ MessageBox . Show ( api . GetTranslation ( "update_flowlauncher_already_on_latest" ) ) ;
55
56
return ;
56
57
}
57
58
58
59
if ( ! silentUpdate )
59
- api . ShowMsg ( "Update found" , "Updating..." ) ;
60
+ api . ShowMsg ( api . GetTranslation ( "update_flowlauncher_update_found" ) ,
61
+ api . GetTranslation ( "update_flowlauncher_updating" ) ) ;
60
62
61
63
await updateManager . DownloadReleases ( newUpdateInfo . ReleasesToApply ) . ConfigureAwait ( false ) ;
62
64
@@ -67,8 +69,9 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
67
69
var targetDestination = updateManager . RootAppDirectory + $ "\\ app-{ newReleaseVersion . ToString ( ) } \\ { DataLocation . PortableFolderName } ";
68
70
FilesFolders . CopyAll ( DataLocation . PortableDataPath , targetDestination ) ;
69
71
if ( ! FilesFolders . VerifyBothFolderFilesEqual ( DataLocation . PortableDataPath , targetDestination ) )
70
- MessageBox . Show ( "Flow Launcher was not able to move your user profile data to the new update version. Please manually " +
71
- $ "move your profile data folder from { DataLocation . PortableDataPath } to { targetDestination } ") ;
72
+ MessageBox . Show ( string . Format ( api . GetTranslation ( "update_flowlauncher_fail_moving_portable_user_profile_data" ) ,
73
+ DataLocation . PortableDataPath ,
74
+ targetDestination ) ) ;
72
75
}
73
76
else
74
77
{
@@ -79,15 +82,16 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
79
82
80
83
Log . Info ( $ "|Updater.UpdateApp|Update success:{ newVersionTips } ") ;
81
84
82
- if ( MessageBox . Show ( newVersionTips , "New Update" , MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
85
+ if ( MessageBox . Show ( newVersionTips , api . GetTranslation ( "update_flowlauncher_new_update" ) , MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
83
86
{
84
87
UpdateManager . RestartApp ( Constant . ApplicationFileName ) ;
85
88
}
86
89
}
87
90
catch ( Exception e ) when ( e is HttpRequestException || e is WebException || e is SocketException )
88
91
{
89
92
Log . Exception ( $ "|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e ) ;
90
- api . ShowMsg ( "Update Failed" , "Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com." ) ;
93
+ api . ShowMsg ( api . GetTranslation ( "update_flowlauncher_fail" ) ,
94
+ api . GetTranslation ( "update_flowlauncher_check_connection" ) ) ;
91
95
return ;
92
96
}
93
97
}
0 commit comments