全UIテキストをハードコードされた日本語文字列からTranslateクラス経由の多言語対応リソースへ完全移行しました。
YukkuriMovieMaker.Generatorをgitサブモジュールとして追加しソリューションファイルに組み込み、ソースジェネレータによるローカライズクラス自動生成の基盤を整えました。
ZeroDiskProxy/Localization/ディレクトリを新設し、[AutoGenLocalizer]属性を持つpartialクラスTranslateをTexts.csに定義しました。
.gitmodulesにYukkuriMovieMaker.GeneratorのGitHubリポジトリURLを登録し、サブモジュールとして管理します。
ZeroDiskProxy.slnxにYukkuriMovieMaker.Generatorプロジェクトを追加しました。
ProxyCacheManagerのプロキシ生成完了・キャンセル・失敗時のステータスメッセージをそれぞれTranslate.ProxyGenerationStatusCompleted・Translate.ProxyGenerationStatusCanceled・Translate.ProxyGenerationStatusFailedPrefixに置換しました。
ProxyGenerationItemの初期ステータス文字列をTranslate.ProxyGenerationStatusGeneratingに、格納先表示をTranslate.StorageMemory・Translate.StorageDiskに置換しました。
ZeroDiskProxySettings.NameプロパティをリテラルからTranslate.SettingsNameに変更しました。
SettingsViewModelの初期キャッシュ概要テキストをTranslate.CacheSummaryLoadingに変更しました。
キャッシュ削除ダイアログのメッセージをstring.Concatからstring.Format(Translate.CacheNoEntriesToDelete)およびstring.Format(Translate.CacheDeleteSummaryFormat, ...)に変更しました。
ダイアログタイトルをリテラルからTranslate.AppNameに変更しました。
プラグイン未初期化メッセージ・キャッシュ件数表示・メモリおよびディスク使用量表示・割当済メモリ表示をいずれもstring.FormatとTranslateキーに置き換えました。
CacheEntryViewModelのストレージ種別表示をTranslate.StorageMemory・Translate.StorageDiskに置換しました。
GenerationPopupView.xamlにxmlns:local名前空間宣言を追加し、ウィンドウタイトル・ヘッダ文言・空状態メッセージをすべて{x:Static local:Translate.XXX}バインディングに変更しました。
ZeroDiskProxySettingsView.xamlにxmlns:local名前空間宣言を追加し、設定カード説明文・全Expanderヘッダ・全ラベル・全ツールチップ・全ボタン文言・キャッシュ一覧ヘッダおよび空状態メッセージをすべて{x:Static local:Translate.XXX}バインディングに変更しました。
74 行
4.1 KiB
XML
74 行
4.1 KiB
XML
<Window x:Class="ZeroDiskProxy.Views.GenerationPopupView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:views="clr-namespace:ZeroDiskProxy.Views"
|
|
xmlns:local="clr-namespace:ZeroDiskProxy.Localization"
|
|
Title="{x:Static local:Translate.GenerationPopupWindowTitle}"
|
|
Width="380" MinWidth="380" MinHeight="120" MaxHeight="640"
|
|
WindowStyle="ToolWindow" ShowInTaskbar="False" Topmost="False"
|
|
ResizeMode="CanResize" SizeToContent="Height" WindowStartupLocation="Manual"
|
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
|
<Window.Resources>
|
|
<views:InvertBoolToVisibilityConverter x:Key="InvertBoolToVis"/>
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
|
|
<Style x:Key="ThinScrollBar" TargetType="ScrollViewer">
|
|
<Style.Resources>
|
|
<Style TargetType="ScrollBar">
|
|
<Setter Property="Width" Value="6"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="Orientation" Value="Horizontal">
|
|
<Setter Property="Height" Value="6"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid Margin="8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="{x:Static local:Translate.GenerationPopupHeader}"
|
|
FontSize="13" FontWeight="SemiBold" Margin="0,0,0,6"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Style="{StaticResource ThinScrollBar}" MaxHeight="500">
|
|
<Grid>
|
|
<ItemsControl ItemsSource="{Binding Items}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Margin="0,4">
|
|
<Grid>
|
|
<TextBlock Text="{Binding FileName}" FontSize="11" TextTrimming="CharacterEllipsis"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
<TextBlock Text="{Binding StorageText}" FontSize="10" HorizontalAlignment="Right"
|
|
Opacity="0.6"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
</Grid>
|
|
<Grid Height="18" Margin="0,2,0,0">
|
|
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress, Mode=OneWay}"/>
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}">
|
|
<Run Text="{Binding ProgressText, Mode=OneWay}"/>
|
|
<Run Text=" " Foreground="Gray"/>
|
|
<Run Text="{Binding StatusMessage, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</Grid>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<TextBlock Text="{x:Static local:Translate.GenerationPopupNoActiveItems}" FontSize="11"
|
|
Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Visibility="{Binding HasItems, Converter={StaticResource InvertBoolToVis}}"/>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
</Window> |