From 2c46db4977d24b15d9596ae06d0f7a59f43192db Mon Sep 17 00:00:00 2001 From: Yuubari Date: Mon, 8 Feb 2016 18:32:07 +0300 Subject: [PATCH 1/2] UI localisation (WIP) --- .../Properties/Resources.Designer.cs | 63 +++ .../Properties/Resources.en.resx | 21 + .../Properties/Resources.resx | 21 + .../Settings/WindowSettingsViewModel.cs | 2 +- .../Views/Settings/Operation.xaml | 6 +- .../Views/Settings/VersionInfo.xaml | 7 +- .../Views/Settings/Window.xaml | 394 +++++++++--------- 7 files changed, 311 insertions(+), 203 deletions(-) diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs index 58daec01a..bce63e7ec 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs @@ -1852,6 +1852,33 @@ public static string Settings_Operation { } } + /// + /// Looks up a localized string similar to 艦隊自動選択. + /// + public static string Settings_Operation_AutomaticFleetSelection { + get { + return ResourceManager.GetString("Settings_Operation_AutomaticFleetSelection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊の編成を変更したとき、その艦隊を自動的に選択する. + /// + public static string Settings_Operation_AutomaticFleetSelection_OnOrganisation { + get { + return ResourceManager.GetString("Settings_Operation_AutomaticFleetSelection_OnOrganisation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 艦隊が出撃したとき、その艦隊を自動的に選択する. + /// + public static string Settings_Operation_AutomaticFleetSelection_OnSortie { + get { + return ResourceManager.GetString("Settings_Operation_AutomaticFleetSelection_OnSortie", resourceCulture); + } + } + /// /// Looks up a localized string similar to 旗艦に工作艦が編成されているときは出撃可能と判断しない. /// @@ -2482,6 +2509,33 @@ public static string Settings_Window_Layout_SingleWindow { } } + /// + /// Looks up a localized string similar to タスク バー設定. + /// + public static string Settings_Window_Taskbar { + get { + return ResourceManager.GetString("Settings_Window_Taskbar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to インジケーターの動作. + /// + public static string Settings_Window_Taskbar_IndicatorBehaviour { + get { + return ResourceManager.GetString("Settings_Window_Taskbar_IndicatorBehaviour", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to インジケーターの動作 (出撃中). + /// + public static string Settings_Window_Taskbar_IndicatorBehaviour_OnSortie { + get { + return ResourceManager.GetString("Settings_Window_Taskbar_IndicatorBehaviour_OnSortie", resourceCulture); + } + } + /// /// Looks up a localized string similar to ウィンドウを常に最前面に表示する. /// @@ -3679,6 +3733,15 @@ public static string System_Flash_Not_Installed_Text { } } + /// + /// Looks up a localized string similar to 使用しない. + /// + public static string TaskbarIndicator_DoNotUse { + get { + return ResourceManager.GetString("TaskbarIndicator_DoNotUse", resourceCulture); + } + } + /// /// Looks up a localized string similar to ツール. /// diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx index b3aceb686..437ab60fe 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx @@ -1372,4 +1372,25 @@ HTTP proxy settings are applied immediately. Settings for all other protocols ar Check that the flagship is not a repair ship + + Automatically select fleets + + + When fleet composition is changed + + + When a fleet sorties + + + Taskbar Button Settings + + + Indicator behaviour + + + Indicator behaviour during sortie + + + Disable + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.resx index 6e97f34e3..b7063b54f 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.resx @@ -1364,4 +1364,25 @@ HTTP プロトコルの通信は自動構成も含め「インターネット 旗艦に工作艦が編成されているときは出撃可能と判断しない + + 艦隊自動選択 + + + 艦隊の編成を変更したとき、その艦隊を自動的に選択する + + + 艦隊が出撃したとき、その艦隊を自動的に選択する + + + タスク バー設定 + + + インジケーターの動作 + + + インジケーターの動作 (出撃中) + + + 使用しない + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/ViewModels/Settings/WindowSettingsViewModel.cs b/source/Grabacr07.KanColleViewer/ViewModels/Settings/WindowSettingsViewModel.cs index 0368874a0..0bd7f7825 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/Settings/WindowSettingsViewModel.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/Settings/WindowSettingsViewModel.cs @@ -76,7 +76,7 @@ public WindowSettingsViewModel() DisplayViewModel.Create(ExitConfirmationType.Always, Resources.Settings_Window_ConfirmExit_Always), }; this.TaskbarProgressFeatures = EnumerableEx - .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay("使用しない")) + .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay(Resources.TaskbarIndicator_DoNotUse)) .Concat(TaskbarProgress.Features.ToDisplay(x => x.Id, x => x.DisplayName)) .ToList(); } diff --git a/source/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml b/source/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml index ca0ecffc6..93b446170 100644 --- a/source/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml +++ b/source/Grabacr07.KanColleViewer/Views/Settings/Operation.xaml @@ -89,15 +89,15 @@ - - - diff --git a/source/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml b/source/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml index 5c019f1ec..5abd73712 100644 --- a/source/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml +++ b/source/Grabacr07.KanColleViewer/Views/Settings/VersionInfo.xaml @@ -71,8 +71,8 @@ - - + + @@ -92,6 +92,9 @@ + + + diff --git a/source/Grabacr07.KanColleViewer/Views/Settings/Window.xaml b/source/Grabacr07.KanColleViewer/Views/Settings/Window.xaml index fca1e6039..75e39436c 100644 --- a/source/Grabacr07.KanColleViewer/Views/Settings/Window.xaml +++ b/source/Grabacr07.KanColleViewer/Views/Settings/Window.xaml @@ -15,34 +15,34 @@ d:DesignWidth="540" d:DesignHeight="600" d:DataContext="{d:DesignInstance vms:WindowSettingsViewModel}" - Background="{DynamicResource ThemeBrushKey}"> - - - - - - - - - + Background="{DynamicResource ThemeBrushKey}"> + + + + + + + + + - + Style="{DynamicResource SettingsHeaderTextStyleKey}" /> + + Margin="0,0,10,0" /> - - + MinWidth="140" /> + + - - @@ -58,7 +58,7 @@ + Text="{Binding Resources.Settings_Window_Taskbar_IndicatorBehaviour, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" /> + Text="{Binding Resources.Settings_Window_Taskbar_IndicatorBehaviour_OnSortie, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" /> - + - + @@ -87,287 +87,287 @@ MethodName="SetLocationLeft" Padding="20,4" Margin="20,0,0,0" - HorizontalAlignment="Left"> - + HorizontalAlignment="Left"> + + HorizontalAlignment="Center" /> - - - - + HorizontalAlignment="Center" /> + + + + - + - - + + - + Margin="16,0,0,5"> + - + Value="{DynamicResource InactiveForegroundBrushKey}" /> + + + + - + Value="{DynamicResource AccentForegroundBrushKey}" /> + + - - + + - - - - - + + + + + - - + Value="{DynamicResource HighlightBackgroundBrushKey}" /> + + + + + + IsEnabled="{Binding ElementName=MergedCheckBox, Path=IsChecked}"> + Height="48" /> - + vs:Window.IsDockMatched="{Binding DockTop}" /> + - - - + vs:Window.IsDockMatched="{Binding DockLeft}" /> + + + - + vs:Window.IsDockMatched="{Binding DockRight}" /> + - - - - - - - - - - + Value="{DynamicResource HighlightBackgroundBrushKey}" /> + + + + + - - - - - - - - - - - + IsEnabled="{Binding ElementName=SplitCheckBox, Path=IsChecked}"> + + + + + + + + + + + - + Margin="12"> + - - + Value="{DynamicResource ActiveForegroundBrushKey}" /> + + + - - - - - + Style="{DynamicResource KanColleMarkStyleKey}" /> + + + + + @@ -376,19 +376,19 @@ Content="{Binding Resources.Common_Apply, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" MinWidth="110" Padding="16,6" - Margin="4,2" /> + Margin="4,2" /> - - + Margin="4,2" /> + + - + - - - + + + From 8cba3ccef0230dcd9dab0ff2ed2e287ef0e3f30d Mon Sep 17 00:00:00 2001 From: Yuubari Date: Mon, 8 Feb 2016 18:47:21 +0300 Subject: [PATCH 2/2] Update localisation (ship catalog window) --- .../Properties/Resources.Designer.cs | 45 +++++++++++++++++++ .../Properties/Resources.en.resx | 15 +++++++ .../Properties/Resources.resx | 15 +++++++ .../Catalogs/ShipCatalogSortWorker.cs | 35 ++++++++------- .../Views/Catalogs/ShipCatalogWindow.xaml | 22 ++++++--- 5 files changed, 109 insertions(+), 23 deletions(-) diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs index bce63e7ec..846b61346 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs @@ -2815,6 +2815,24 @@ public static string ShipCatalog_Column_Torpedo { } } + /// + /// Looks up a localized string similar to 修復時間. + /// + public static string ShipCatalog_Column_TTR { + get { + return ResourceManager.GetString("ShipCatalog_Column_TTR", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 入渠にかかる時間です. + /// + public static string ShipCatalog_Column_TTR_ToolTip { + get { + return ResourceManager.GetString("ShipCatalog_Column_TTR_ToolTip", resourceCulture); + } + } + /// /// Looks up a localized string similar to 索敵. /// @@ -2932,6 +2950,33 @@ public static string ShipCatalog_Filter_Misc_All { } } + /// + /// Looks up a localized string similar to 損傷. + /// + public static string ShipCatalog_Filter_Misc_Damage { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_Damage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 損傷なし. + /// + public static string ShipCatalog_Filter_Misc_DamageNo { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_DamageNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 損傷あり. + /// + public static string ShipCatalog_Filter_Misc_DamageYes { + get { + return ResourceManager.GetString("ShipCatalog_Filter_Misc_DamageYes", resourceCulture); + } + } + /// /// Looks up a localized string similar to 遠征中の艦を除外する. /// diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx index 437ab60fe..5931a75b8 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx @@ -1393,4 +1393,19 @@ HTTP proxy settings are applied immediately. Settings for all other protocols ar Disable + + Repairs + + + Time until the repairs finish. + + + Damage + + + Not damaged + + + Damaged + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.resx index b7063b54f..32e1d835a 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.resx @@ -1385,4 +1385,19 @@ HTTP プロトコルの通信は自動構成も含め「インターネット 使用しない + + 修復時間 + + + 入渠にかかる時間です + + + 損傷 + + + 損傷なし + + + 損傷あり + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs index 747d8b522..44af004cb 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogSortWorker.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleWrapper; using Grabacr07.KanColleWrapper.Models; using Livet; @@ -13,21 +14,22 @@ public class ShipCatalogSortWorker : ViewModel #region static members private const int selectorNum = 4; - public static readonly SortableColumn NoneColumn = new SortableColumn { Name = "なし", KeySelector = null }; - public static readonly SortableColumn IdColumn = new SortableColumn { Name = "ID", KeySelector = x => x.Id, }; - public static readonly SortableColumn StypeColumn = new SortableColumn { Name = "艦種", KeySelector = x => x.Info.ShipType.SortNumber, }; - public static readonly SortableColumn NameColumn = new SortableColumn { Name = "艦名", KeySelector = x => x.Info.SortId, }; - public static readonly SortableColumn LevelColumn = new SortableColumn { Name = "レベル", KeySelector = x => x.Level, DefaultIsDescending = true, }; - public static readonly SortableColumn ExpColumn = new SortableColumn { Name = "次のレベルまでの経験値", KeySelector = x => x.ExpForNextLevel, }; - public static readonly SortableColumn CondColumn = new SortableColumn { Name = "Condition 値", KeySelector = x => x.Condition, DefaultIsDescending = true, }; - public static readonly SortableColumn FirepowerColumn = new SortableColumn { Name = "火力", KeySelector = x => x.Firepower.Current, DefaultIsDescending = true, }; - public static readonly SortableColumn TorpedoColumn = new SortableColumn { Name = "雷装", KeySelector = x => x.Torpedo.Current, DefaultIsDescending = true, }; - public static readonly SortableColumn AAColumn = new SortableColumn { Name = "対空", KeySelector = x => x.AA.Current, DefaultIsDescending = true, }; - public static readonly SortableColumn ArmerColumn = new SortableColumn { Name = "装甲", KeySelector = x => x.Armer.Current, DefaultIsDescending = true, }; - public static readonly SortableColumn LuckColumn = new SortableColumn { Name = "運", KeySelector = x => x.Luck.Current, DefaultIsDescending = true, }; - public static readonly SortableColumn HPColumn = new SortableColumn { Name = "耐久", KeySelector = x => x.HP.Maximum, DefaultIsDescending = true, }; - public static readonly SortableColumn ViewRangeColumn = new SortableColumn { Name = "索敵", KeySelector = x => x.ViewRange, DefaultIsDescending = true, }; - public static readonly SortableColumn TimeToRepairColumn = new SortableColumn { Name = "修復時間", KeySelector = x => x.TimeToRepair.Ticks, DefaultIsDescending = true, }; + public static readonly SortableColumn NoneColumn = new SortableColumn { Name = Resources.ShipCatalog_Sort_None, KeySelector = null }; + public static readonly SortableColumn IdColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ObtainedID, KeySelector = x => x.Id, }; + public static readonly SortableColumn StypeColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_HullCode, KeySelector = x => x.Info.ShipType.SortNumber, }; + public static readonly SortableColumn SortIdColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_CatalogID, KeySelector = x => x.Info.SortId, }; + public static readonly SortableColumn NameColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Name, KeySelector = x => x.Info.Name, }; + public static readonly SortableColumn LevelColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Level, KeySelector = x => x.Level, DefaultIsDescending = true, }; + public static readonly SortableColumn ExpColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_Experience, KeySelector = x => x.ExpForNextLevel, }; + public static readonly SortableColumn CondColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_Condition, KeySelector = x => x.Condition, DefaultIsDescending = true, }; + public static readonly SortableColumn FirepowerColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Firepower, KeySelector = x => x.Firepower.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn TorpedoColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Torpedo, KeySelector = x => x.Torpedo.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn AAColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_AntiAir, KeySelector = x => x.AA.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn ArmerColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Armour, KeySelector = x => x.Armer.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn LuckColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_Luck, KeySelector = x => x.Luck.Current, DefaultIsDescending = true, }; + public static readonly SortableColumn HPColumn = new SortableColumn { Name = Resources.ShipCatalog_SortBy_MaxHP, KeySelector = x => x.HP.Maximum, DefaultIsDescending = true, }; + public static readonly SortableColumn ViewRangeColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_ViewRange, KeySelector = x => x.ViewRange, DefaultIsDescending = true, }; + public static readonly SortableColumn TimeToRepairColumn = new SortableColumn { Name = Resources.ShipCatalog_Column_TTR, KeySelector = x => x.TimeToRepair.Ticks, DefaultIsDescending = true, }; public static SortableColumn[] Columns { get; set; } @@ -38,6 +40,7 @@ static ShipCatalogSortWorker() NoneColumn, IdColumn, StypeColumn, + SortIdColumn, NameColumn, LevelColumn, CondColumn, @@ -266,6 +269,6 @@ public class SortableColumn { public string Name { get; set; } public bool DefaultIsDescending { get; set; } - public Func KeySelector { get; set; } + public Func KeySelector { get; set; } } } diff --git a/source/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml b/source/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml index fac0371d8..67d3b9daf 100644 --- a/source/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml +++ b/source/Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml @@ -80,6 +80,12 @@ HorizontalAlignment="Right" VerticalAlignment="Top" WindowChrome.IsHitTestVisibleInChrome="True"> + @@ -409,17 +415,17 @@ - + - - - - + @@ -451,6 +457,7 @@ + @@ -554,6 +561,7 @@ ItemContainerStyle="{DynamicResource GridViewItemContainerStyleKey}" ScrollViewer.PanningMode="Both"> +