Skip to content

Commit 934bad6

Browse files
authored
Merge pull request #311 from taooceros/FixUntranslatedString
Fix untranslated string
2 parents 5dd12d2 + fd32d48 commit 934bad6

File tree

8 files changed

+49
-21
lines changed

8 files changed

+49
-21
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/CustomQueryHotkeySetting.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Icon="Images\app.png"
66
ResizeMode="NoResize"
77
WindowStartupLocation="CenterScreen"
8-
Title="Custom Plugin Hotkey" Height="200" Width="674.766">
8+
Title="{DynamicResource customeQueryHotkeyTitle}" Height="200" Width="674.766">
99
<Window.InputBindings>
1010
<KeyBinding Key="Escape" Command="Close"/>
1111
</Window.InputBindings>

Flow.Launcher/Languages/en.xaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<!--Setting General-->
1818
<system:String x:Key="flowlauncher_settings">Flow Launcher Settings</system:String>
1919
<system:String x:Key="general">General</system:String>
20+
<system:String x:Key="portableMode">Portable Mode</system:String>
2021
<system:String x:Key="startFlowLauncherOnSystemStartup">Start Flow Launcher on system startup</system:String>
2122
<system:String x:Key="hideFlowLauncherWhenLoseFocus">Hide Flow Launcher when focus is lost</system:String>
2223
<system:String x:Key="dontPromptUpdateMsg">Do not show new version notifications</system:String>
@@ -39,12 +40,13 @@
3940
<!--Setting Plugin-->
4041
<system:String x:Key="plugin">Plugin</system:String>
4142
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
43+
<system:String x:Key="enable">Enable</system:String>
4244
<system:String x:Key="disable">Disable</system:String>
4345
<system:String x:Key="actionKeywords">Action keyword:</system:String>
4446
<system:String x:Key="currentActionKeywords">Current action keyword:</system:String>
4547
<system:String x:Key="newActionKeyword">New action keyword:</system:String>
46-
<system:String x:Key="currentPriority">Current Priority: </system:String>
47-
<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>
4850
<system:String x:Key="pluginDirectory">Plugin Directory</system:String>
4951
<system:String x:Key="author">Author</system:String>
5052
<system:String x:Key="plugin_init_time">Init time:</system:String>
@@ -109,7 +111,7 @@
109111
<!--Priority Setting Dialog-->
110112
<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>
111113
<system:String x:Key="invalidPriority">Please provide an valid integer for Priority!</system:String>
112-
114+
113115
<!--Action Keyword Setting Dialog-->
114116
<system:String x:Key="oldActionKeywords">Old Action Keyword</system:String>
115117
<system:String x:Key="newActionKeywords">New Action Keyword</system:String>
@@ -122,6 +124,7 @@
122124
<system:String x:Key="actionkeyword_tips">Use * if you don't want to specify an action keyword</system:String>
123125

124126
<!--Custom Query Hotkey Dialog-->
127+
<system:String x:Key="customeQueryHotkeyTitle">Custom Plugin Hotkey</system:String>
125128
<system:String x:Key="preview">Preview</system:String>
126129
<system:String x:Key="hotkeyIsNotUnavailable">Hotkey is unavailable, please select a new hotkey</system:String>
127130
<system:String x:Key="invalidPluginHotkey">Invalid plugin hotkey</system:String>
@@ -146,11 +149,23 @@
146149
<system:String x:Key="reportWindow_report_failed">Failed to send report</system:String>
147150
<system:String x:Key="reportWindow_flowlauncher_got_an_error">Flow Launcher got an error</system:String>
148151

152+
<!--General Notice-->
153+
<system:String x:Key="pleaseWait">Please wait...</system:String>
154+
149155
<!--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>
150163
<system:String x:Key="update_flowlauncher_update_new_version_available">New Flow Launcher release {0} is now available</system:String>
151164
<system:String x:Key="update_flowlauncher_update_error">An error occurred while trying to install software updates</system:String>
152165
<system:String x:Key="update_flowlauncher_update">Update</system:String>
153166
<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>
154169
<system:String x:Key="update_flowlauncher_update_restart_flowlauncher_tip">This upgrade will restart Flow Launcher</system:String>
155170
<system:String x:Key="update_flowlauncher_update_upadte_files">Following files will be updated</system:String>
156171
<system:String x:Key="update_flowlauncher_update_files">Update files</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<ScrollViewer ui:ScrollViewerHelper.AutoHideScrollBars="True" Margin="60,30,0,30">
3838
<StackPanel Orientation="Vertical">
3939
<ui:ToggleSwitch Margin="10" IsOn="{Binding PortableMode}">
40-
<TextBlock Text="Portable Mode" />
40+
<TextBlock Text="{DynamicResource portableMode}" />
4141
</ui:ToggleSwitch>
4242
<CheckBox Margin="10" IsChecked="{Binding Settings.StartFlowLauncherOnSystemStartup}"
4343
Checked="OnAutoStartupChecked" Unchecked="OnAutoStartupUncheck">
@@ -166,7 +166,7 @@
166166
</TextBlock>
167167
</ToolTipService.ToolTip>
168168
</TextBlock>
169-
<ui:ToggleSwitch Grid.Column="1" OffContent="Disabled" OnContent="Enabled"
169+
<ui:ToggleSwitch Grid.Column="1" OffContent="{DynamicResource disable}" OnContent="{DynamicResource enable}"
170170
MaxWidth="110" HorizontalAlignment="Right"
171171
IsOn="{Binding PluginState}"/>
172172
</Grid>

Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:system="clr-namespace:System;assembly=mscorlib">
44

5+
<system:String x:Key="flowlauncher_plugin_url_open_search_in">Open search in:</system:String>
6+
<system:String x:Key="flowlauncher_plugin_new_window">New Window</system:String>
7+
<system:String x:Key="flowlauncher_plugin_new_tab">New Tab</system:String>
8+
59
<system:String x:Key="flowlauncher_plugin_url_open_url">Open url:{0}</system:String>
610
<system:String x:Key="flowlauncher_plugin_url_canot_open_url">Can't open url:{0}</system:String>
711

Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<RowDefinition />
1111
</Grid.RowDefinitions>
1212
<StackPanel Orientation="Horizontal" Grid.Row="0">
13-
<Label Content="Open search in:" Margin="0 10 15 0" />
13+
<Label Content="{DynamicResource flowlauncher_plugin_url_open_search_in}" Margin="0 10 15 0" />
1414
<RadioButton x:Name="NewWindowBrowser" GroupName="OpenSearchBehaviour"
15-
Content="New window" Click="OnNewBrowserWindowClick" />
15+
Content="{DynamicResource flowlauncher_plugin_new_window}" Click="OnNewBrowserWindowClick" />
1616
<RadioButton x:Name="NewTabInBrowser" GroupName="OpenSearchBehaviour"
17-
Content="New tab" Click="OnNewTabClick" />
17+
Content="{DynamicResource flowlauncher_plugin_new_tab}" Click="OnNewTabClick" />
1818
</StackPanel>
1919
<StackPanel VerticalAlignment="Top" Grid.Row="1" Height="106" Margin="0 20 0 0">
2020
<Label Content="{DynamicResource flowlauncher_plugin_url_plugin_set_tip}" Height="28" Margin="0,0,155,0"

Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:system="clr-namespace:System;assembly=mscorlib">
44

5+
<system:String x:Key="flowlauncher_plugin_websearch_open_search_in">Open search in:</system:String>
6+
<system:String x:Key="flowlauncher_plugin_websearch_new_window">New Window</system:String>
7+
<system:String x:Key="flowlauncher_plugin_websearch_new_tab">New Tab</system:String>
8+
<system:String x:Key="flowlaucnher_plugin_websearch_set_browser_path">Set browser from path:</system:String>
9+
<system:String x:Key="flowlauncher_plugin_websearch_choose">Choose</system:String>
510
<system:String x:Key="flowlauncher_plugin_websearch_delete">Delete</system:String>
611
<system:String x:Key="flowlauncher_plugin_websearch_edit">Edit</system:String>
712
<system:String x:Key="flowlauncher_plugin_websearch_add">Add</system:String>

Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@
3333
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
3434
</StackPanel>
3535
<StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal">
36-
<Label Content="Open search in:" Margin="0 15 20 0"/>
37-
<RadioButton Name="NewWindowBrowser" GroupName="OpenSearchBehaviour" Content="New window" Click="OnNewBrowserWindowClick"
36+
<Label Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" Margin="0 15 20 0"/>
37+
<RadioButton Name="NewWindowBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_window}" Click="OnNewBrowserWindowClick"
3838
Margin="0 0 20 0"/>
39-
<RadioButton Name="NewTabInBrowser" GroupName="OpenSearchBehaviour" Content="New tab" Click="OnNewTabClick" />
39+
<RadioButton Name="NewTabInBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}" Click="OnNewTabClick" />
4040
</StackPanel>
4141
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Margin="0 3 0 0">
42-
<Label Content="Set browser from path:" Margin="0 0 350 0" HorizontalAlignment="Left" Width="140"/>
42+
<Label Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" Margin="0 0 350 0" HorizontalAlignment="Left" Width="140"/>
4343
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Margin="160,-22,0,0" TextChanged="OnBrowserPathTextChanged"
4444
Width="214" Style="{StaticResource BrowserPathBoxStyle}"/>
4545
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="400,-30,0,0"
46-
Click="OnChooseClick" FontSize="13" Content="Choose" Width="80"/>
46+
Click="OnChooseClick" FontSize="13" Content="{DynamicResource flowlauncher_plugin_websearch_choose}" Width="80"/>
4747
</StackPanel>
4848
<ListView ItemsSource="{Binding Settings.SearchSources}"
4949
SelectedItem="{Binding Settings.SelectedSearchSource}"

0 commit comments

Comments
 (0)