Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Flow.Launcher.Core/Resource/TranslationConverter.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Plugin;

namespace Flow.Launcher.Infrastructure.UserSettings
{
Expand Down Expand Up @@ -53,6 +55,12 @@ public class BaseBuiltinShortcutModel : ShortcutBaseModel
{
public string Description { get; set; }

public string LocalizedDescription => API.GetTranslation(Description);

// We should not initialize API in static constructor because it will create another API instance
private static IPublicAPI api = null;
private static IPublicAPI API => api ??= Ioc.Default.GetRequiredService<IPublicAPI>();

public BaseBuiltinShortcutModel(string key, string description)
{
Key = key;
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/Resources/SettingWindowStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<converters:BorderClipConverter x:Key="BorderClipConverter" />
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:TextConverter x:Key="TextConverter" />
<core:TranslationConverter x:Key="TranslationConverter" />

<!-- Icon for Theme Type Label -->
<Geometry x:Key="circle_half_stroke_solid">F1 M512,512z M0,0z M448,256C448,150,362,64,256,64L256,448C362,448,448,362,448,256z M0,256A256,256,0,1,1,512,256A256,256,0,1,1,0,256z</Geometry>
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
<GridViewColumn Width="430" Header="{DynamicResource builtinShortcutDescription}">
<GridViewColumn.CellTemplate>
<DataTemplate DataType="{x:Type userSettings:BuiltinShortcutModel}">
<TextBlock Text="{Binding Description, Converter={StaticResource TranslationConverter}}" />
<TextBlock Text="{Binding LocalizedDescription}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,14 @@

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Droplex" Version="1.7.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was it working without this reference?
I think it wasn't added here because flow core/infrastructure project already references Droplex. Do we need this reference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok nvm I didn't read below those two projects are removed, so I guess it needs direct reference now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EverythingDownloadHelper.cs we need this project reference

Copy link
Member

@jjw24 jjw24 Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I suppose we didn't need to add direct reference before because either core or infrastructure project had the reference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I suppose we didn't need to add direct reference before because either core or infrastructure project had the reference?

I think so

<!-- Do not upgrade System.Data.OleDb since we are .Net7.0 -->
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="tlbimp-Microsoft.Search.Interop" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Flow.Launcher.Core\Flow.Launcher.Core.csproj" />
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ internal ActionKeywordModel(Settings.ActionKeyword actionKeyword, string descrip

public string Description { get; private init; }

public string LocalizedDescription => Main.Context.API.GetTranslation(Description);

internal Settings.ActionKeyword KeywordProperty { get; }

private void OnPropertyChanged([CallerMemberName] string propertyName = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Plugin.Explorer.Views.Converters"
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:qa="clr-namespace:Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks"
Expand All @@ -24,7 +23,7 @@
<TextBlock
Margin="0 5 0 0"
IsEnabled="{Binding Enabled}"
Text="{Binding Description, Mode=OneTime, Converter={StaticResource TranslationConverter}}">
Text="{Binding LocalizedDescription, Mode=OneTime}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
Expand Down Expand Up @@ -76,7 +75,6 @@
</Grid>
</DataTemplate>

<core:TranslationConverter x:Key="TranslationConverter" />
<converters:EnumNameConverter x:Key="EnumNameConverter" />

<Style x:Key="CustomExpanderStyle" TargetType="Expander">
Expand Down Expand Up @@ -494,22 +492,22 @@
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
VerticalAlignment="Center"
Foreground="{DynamicResource Color05B}"
Text="{DynamicResource plugin_explorer_previewpanel_file_info_label}" />

Check warning on line 495 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`previewpanel` is not a recognized word. (unrecognized-spelling)
<WrapPanel
Width="Auto"
HorizontalAlignment="Right"
DockPanel.Dock="Right">
<CheckBox
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Content="{DynamicResource plugin_explorer_previewpanel_display_file_size_checkbox}"

Check warning on line 502 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`previewpanel` is not a recognized word. (unrecognized-spelling)
IsChecked="{Binding ShowFileSizeInPreviewPanel}" />
<CheckBox
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Content="{DynamicResource plugin_explorer_previewpanel_display_file_creation_checkbox}"

Check warning on line 506 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`previewpanel` is not a recognized word. (unrecognized-spelling)
IsChecked="{Binding ShowCreatedDateInPreviewPanel}" />
<CheckBox
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Content="{DynamicResource plugin_explorer_previewpanel_display_file_modification_checkbox}"

Check warning on line 510 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`previewpanel` is not a recognized word. (unrecognized-spelling)
IsChecked="{Binding ShowModifiedDateInPreviewPanel}" />
<CheckBox
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
Expand Down Expand Up @@ -732,11 +730,11 @@
Height="200"
AllowDrop="True"
BorderThickness="1"
DragEnter="lbxAccessLinks_DragEnter"

Check warning on line 733 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`lbx` is not a recognized word. (unrecognized-spelling)
Drop="LbxAccessLinks_OnDrop"
ItemTemplate="{StaticResource ListViewTemplateAccessLinks}"
ItemsSource="{Binding Settings.QuickAccessLinks}"
Loaded="lbxAccessLinks_Loaded"

Check warning on line 737 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`lbx` is not a recognized word. (unrecognized-spelling)
SelectedItem="{Binding SelectedQuickAccessLink}" />
</Border>

Expand Down Expand Up @@ -796,11 +794,11 @@
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="1">
<ListView
Name="lbxExcludedPaths"

Check warning on line 797 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`lbx` is not a recognized word. (unrecognized-spelling)
Height="200"
AllowDrop="True"
DragEnter="lbxAccessLinks_DragEnter"

Check warning on line 800 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`lbx` is not a recognized word. (unrecognized-spelling)
Drop="LbxExcludedPaths_OnDrop"

Check warning on line 801 in Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`Lbx` is not a recognized word. (unrecognized-spelling)
ItemTemplate="{StaticResource ListViewTemplateAccessLinks}"
ItemsSource="{Binding Settings.IndexSearchExcludedSubdirectoryPaths}"
Loaded="lbxExcludedPaths_Loaded"
Expand Down
Loading