Skip to content

Commit 0dcf2ba

Browse files
committed
Fix a missing logic of updating language in plugin;Adjust Resource Name to match the culture we use; Adjust some of the key name; Put Tasklink item into culture
1 parent 6f2e8f5 commit 0dcf2ba

18 files changed

+4389
-1318
lines changed

Flow.Launcher.Core/Resource/Internationalization.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void ChangeLanguage(Language language)
9999
Settings.Language = language.LanguageCode;
100100
CultureInfo.CurrentCulture = new CultureInfo(language.LanguageCode);
101101
CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture;
102-
Task.Run(() =>
102+
_ = Task.Run(() =>
103103
{
104104
UpdatePluginMetadataTranslations();
105105
});
@@ -182,6 +182,7 @@ private void UpdatePluginMetadataTranslations()
182182
{
183183
p.Metadata.Name = pluginI18N.GetTranslatedPluginTitle();
184184
p.Metadata.Description = pluginI18N.GetTranslatedPluginDescription();
185+
pluginI18N.OnCultureInfoChanged(CultureInfo.CurrentCulture);
185186
}
186187
catch (Exception e)
187188
{

Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Library</OutputType>
44
<TargetFramework>net6.0-windows</TargetFramework>
@@ -32,22 +32,11 @@
3232
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3333
</PropertyGroup>
3434

35-
<ItemGroup>
36-
<None Remove="WindowsSettings.json" />
37-
</ItemGroup>
38-
3935
<ItemGroup>
4036
<None Include="plugin.json">
4137
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4238
</None>
4339
</ItemGroup>
44-
45-
46-
<ItemGroup>
47-
<EmbeddedResource Include="WindowsSettings.json">
48-
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
49-
</EmbeddedResource>
50-
</ItemGroup>
5140

5241
<ItemGroup>
5342
<Compile Update="Properties\Resources.Designer.cs">
@@ -59,7 +48,7 @@
5948

6049
<ItemGroup>
6150
<EmbeddedResource Update="Properties\Resources.resx">
62-
<Generator>ResXFileCodeGenerator</Generator>
51+
<Generator>PublicResXFileCodeGenerator</Generator>
6352
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
6453
</EmbeddedResource>
6554
</ItemGroup>
@@ -69,6 +58,12 @@
6958
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7059
</Content>
7160
</ItemGroup>
61+
62+
63+
<ItemGroup>
64+
<EmbeddedResource Include="WindowsSettings.json">
65+
</EmbeddedResource>
66+
</ItemGroup>
7267
<ItemGroup>
7368
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
7469
</ItemGroup>

Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/TranslationHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using System.Collections.ObjectModel;
3+
using System.Globalization;
34
using System.Linq;
45
using Flow.Launcher.Plugin.WindowsSettings.Classes;
56
using Flow.Launcher.Plugin.WindowsSettings.Properties;

0 commit comments

Comments
 (0)