Skip to content

Commit c5791b8

Browse files
committed
fix untranslaed string in updator
1 parent e74a0c9 commit c5791b8

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

Flow.Launcher.Core/Updater.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
3535
UpdateInfo newUpdateInfo;
3636

3737
if (!silentUpdate)
38-
api.ShowMsg("Please wait...", "Checking for new update");
38+
api.ShowMsg(api.GetTranslation("pleaseWait"),
39+
api.GetTranslation("update_flowlauncher_update_check"));
3940

4041
using var updateManager = await GitHubUpdateManager(GitHubRepository).ConfigureAwait(false);
4142

@@ -51,12 +52,13 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
5152
if (newReleaseVersion <= currentVersion)
5253
{
5354
if (!silentUpdate)
54-
MessageBox.Show("You already have the latest Flow Launcher version");
55+
MessageBox.Show(api.GetTranslation("update_flowlauncher_already_on_latest"));
5556
return;
5657
}
5758

5859
if (!silentUpdate)
59-
api.ShowMsg("Update found", "Updating...");
60+
api.ShowMsg(api.GetTranslation("update_flowlauncher_update_found"),
61+
api.GetTranslation("update_flowlauncher_updating"));
6062

6163
await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply).ConfigureAwait(false);
6264

@@ -67,8 +69,9 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
6769
var targetDestination = updateManager.RootAppDirectory + $"\\app-{newReleaseVersion.ToString()}\\{DataLocation.PortableFolderName}";
6870
FilesFolders.CopyAll(DataLocation.PortableDataPath, targetDestination);
6971
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));
7275
}
7376
else
7477
{
@@ -79,15 +82,16 @@ public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true)
7982

8083
Log.Info($"|Updater.UpdateApp|Update success:{newVersionTips}");
8184

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)
8386
{
8487
UpdateManager.RestartApp(Constant.ApplicationFileName);
8588
}
8689
}
8790
catch (Exception e) when (e is HttpRequestException || e is WebException || e is SocketException)
8891
{
8992
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"));
9195
return;
9296
}
9397
}

Flow.Launcher/Languages/en.xaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
<system:String x:Key="actionKeywords">Action keyword:</system:String>
4646
<system:String x:Key="currentActionKeywords">Current action keyword:</system:String>
4747
<system:String x:Key="newActionKeyword">New action keyword:</system:String>
48-
<system:String x:Key="currentPriority">Current Priority: </system:String>
49-
<system:String x:Key="newPriority">New Priority: </system:String>
48+
<system:String x:Key="currentPriority">Current Priority:</system:String>
49+
<system:String x:Key="newPriority">New Priority:</system:String>
5050
<system:String x:Key="pluginDirectory">Plugin Directory</system:String>
5151
<system:String x:Key="author">Author</system:String>
5252
<system:String x:Key="plugin_init_time">Init time:</system:String>
@@ -111,7 +111,7 @@
111111
<!--Priority Setting Dialog-->
112112
<system:String x:Key="priority_tips">Greater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative number</system:String>
113113
<system:String x:Key="invalidPriority">Please provide an valid integer for Priority!</system:String>
114-
114+
115115
<!--Action Keyword Setting Dialog-->
116116
<system:String x:Key="oldActionKeywords">Old Action Keyword</system:String>
117117
<system:String x:Key="newActionKeywords">New Action Keyword</system:String>
@@ -149,11 +149,23 @@
149149
<system:String x:Key="reportWindow_report_failed">Failed to send report</system:String>
150150
<system:String x:Key="reportWindow_flowlauncher_got_an_error">Flow Launcher got an error</system:String>
151151

152+
<!--General Notice-->
153+
<system:String x:Key="pleaseWait">Please wait...</system:String>
154+
152155
<!--update-->
156+
<system:String x:Key="update_flowlauncher_update_check">Checking for new update</system:String>
157+
<system:String x:Key="update_flowlauncher_already_on_latest">You already have the latest Flow Launcher version</system:String>
158+
<system:String x:Key="update_flowlauncher_update_found">Update found</system:String>
159+
<system:String x:Key="update_flowlauncher_updating">Updating...</system:String>
160+
<system:String x:Key="update_flowlauncher_fail_moving_portable_user_profile_data">Flow Launcher was not able to move your user profile data to the new update version.
161+
Please manually move your profile data folder from {0} to {1}</system:String>
162+
<system:String x:Key="update_flowlauncher_new_update">New Update</system:String>
153163
<system:String x:Key="update_flowlauncher_update_new_version_available">New Flow Launcher release {0} is now available</system:String>
154164
<system:String x:Key="update_flowlauncher_update_error">An error occurred while trying to install software updates</system:String>
155165
<system:String x:Key="update_flowlauncher_update">Update</system:String>
156166
<system:String x:Key="update_flowlauncher_update_cancel">Cancel</system:String>
167+
<system:String x:Key="update_flowlauncher_fail">Update Failed</system:String>
168+
<system:String x:Key="update_flowlauncher_check_connection">Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com.</system:String>
157169
<system:String x:Key="update_flowlauncher_update_restart_flowlauncher_tip">This upgrade will restart Flow Launcher</system:String>
158170
<system:String x:Key="update_flowlauncher_update_upadte_files">Following files will be updated</system:String>
159171
<system:String x:Key="update_flowlauncher_update_files">Update files</system:String>

0 commit comments

Comments
 (0)