From ddc9037b3eb161f930cc5ca7c977ffdeff981b9a Mon Sep 17 00:00:00 2001 From: Yuubari Date: Mon, 2 Nov 2015 15:41:38 +0300 Subject: [PATCH] Fixed missing localisation strings Window titles might be wonky and changes to them may not go into effect without a restart. --- .../Models/NotifierHost.cs | 8 ++++---- .../Properties/Resources.Designer.cs | 20 ++++++++++++++++++- .../Properties/Resources.en.resx | 14 ++++++------- .../Properties/Resources.resx | 8 +++++++- .../Catalogs/ShipCatalogWindowViewModel.cs | 5 +++-- .../Catalogs/SlotItemCatalogViewModel.cs | 3 ++- .../Contents/Fleets/FleetStateViewModel.cs | 2 +- .../ViewModels/FleetWindowViewModel.cs | 3 ++- 8 files changed, 45 insertions(+), 18 deletions(-) diff --git a/source/Grabacr07.KanColleViewer/Models/NotifierHost.cs b/source/Grabacr07.KanColleViewer/Models/NotifierHost.cs index 26c1ef3cb..6e8b13477 100644 --- a/source/Grabacr07.KanColleViewer/Models/NotifierHost.cs +++ b/source/Grabacr07.KanColleViewer/Models/NotifierHost.cs @@ -65,9 +65,9 @@ public void Notify(INotification notify) } } - public INotification CreateTest(string header = "テスト通知", string body = "これは「提督業も忙しい!」のテスト通知です。", Action activated = null, Action failed = null) + public INotification CreateTest(string header = null, string body = null, Action activated = null, Action failed = null) { - return Notification.Create(Notification.Types.Test, header, body, activated ?? WindowService.Current.MainWindow.Activate, failed); + return Notification.Create(Notification.Types.Test, header ?? Resources.Notifications_Test, body ?? Resources.Notifications_Test_Details, activated ?? WindowService.Current.MainWindow.Activate, failed); } #region Initialize() method parts @@ -198,8 +198,8 @@ private void HandleConditionRejuvenated(object sender, ConditionRejuvenatedEvent var notification = Notification.Create( Notification.Types.FleetRejuvenated, - "疲労回復完了", - $"「{args.FleetName}」に編成されている艦娘の疲労が回復しました。", + Resources.Notifications_MoraleRestored, + string.Format(Resources.Notifications_MoraleRestored_Details, args.FleetName), () => WindowService.Current.MainWindow.Activate()); this.Notify(notification); diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs index 26915b2cc..9ca0915f1 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs @@ -969,6 +969,24 @@ public static string Notifications_MoraleRestored_Details { } } + /// + /// Looks up a localized string similar to テスト通知. + /// + public static string Notifications_Test { + get { + return ResourceManager.GetString("Notifications_Test", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to これは「提督業も忙しい!」のテスト通知です。. + /// + public static string Notifications_Test_Details { + get { + return ResourceManager.GetString("Notifications_Test_Details", resourceCulture); + } + } + /// /// Looks up a localized string similar to データ. /// @@ -1952,7 +1970,7 @@ public static string Settings_Operation_SortieCondition { } /// - /// Looks up a localized string similar to ※通常は、間宮アイコンが消灯する 40 か、自然回復上限の 49 に設定します。. + /// Looks up a localized string similar to ※通常は、間宮アイコンが消灯する 49 か、自然回復上限の 49 に設定します。. /// public static string Settings_Operation_SortieCondition_Description { get { diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx index 68142e75b..426b11d79 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.en.resx @@ -432,12 +432,6 @@ Ready - - Fast Fleet - - - Slow Fleet - {0}% zoom is not supported. @@ -761,7 +755,7 @@ GPU: Slow! GPU optimization for tablets. Sortie Condition - ※Value must be within the range of 40 and 49. (Default: 40) + ※Value must be within the range of 40 and 49. (Default: 49) Minimum fleet condition to be considered ready for sorties. @@ -1345,4 +1339,10 @@ HTTP proxy settings are applied immediately. Settings for all other protocols ar Use this proxy server for all protocols (except SOCKS) + + Test Notification + + + This is a test notification from KanColleViewer. + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/Properties/Resources.resx b/source/Grabacr07.KanColleViewer/Properties/Resources.resx index 2fed12376..b8a74c920 100644 --- a/source/Grabacr07.KanColleViewer/Properties/Resources.resx +++ b/source/Grabacr07.KanColleViewer/Properties/Resources.resx @@ -756,7 +756,7 @@ GPU: Slow! GPU optimization for tablets. 出撃コンディション - ※通常は、間宮アイコンが消灯する 40 か、自然回復上限の 49 に設定します。 + ※通常は、間宮アイコンが消灯する 49 か、自然回復上限の 49 に設定します。 艦隊内の全艦のコンディションが次の数値以上になったとき、出撃可能と判断する @@ -1349,4 +1349,10 @@ HTTP プロトコルの通信は自動構成も含め「インターネット 全てのプロトコルでこのプロキシ サーバーを使用する + + テスト通知 + + + これは「提督業も忙しい!」のテスト通知です。 + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs index 2909477ef..ff2025e38 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/ShipCatalogWindowViewModel.cs @@ -5,6 +5,7 @@ using System.Reactive.Linq; using System.Reactive.Subjects; using Grabacr07.KanColleViewer.Models.Settings; +using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleWrapper; using MetroTrilithon.Mvvm; @@ -116,14 +117,14 @@ public bool IsReloading public ShipCatalogWindowViewModel() { - this.Title = "所属艦娘一覧"; + this.Title = Resources.ShipCatalog_WindowTitle; this.IsOpenFilterSettings = true; this.Settings = new ShipCatalogWindowSettings(); this.SortWorker = new ShipCatalogSortWorker(); this.ShipTypes = KanColleClient.Current.Master.ShipTypes - .Where(kvp => !(kvp.Value.Id == 15 && kvp.Value.Name == "補給艦")) // おそらく敵艦用と思われる補給艦を除外 + // .Where(kvp => !(kvp.Value.Id == 15 && kvp.Value.Name == "補給艦")) // おそらく敵艦用と思われる補給艦を除外 .Select(kvp => new ShipTypeViewModel(kvp.Value) { IsSelected = true, diff --git a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs index dcaf9a814..e680a43ec 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/Catalogs/SlotItemCatalogViewModel.cs @@ -5,6 +5,7 @@ using System.Reactive.Linq; using System.Reactive.Subjects; using Grabacr07.KanColleViewer.Models.Settings; +using Grabacr07.KanColleViewer.Properties; using Grabacr07.KanColleWrapper; using MetroTrilithon.Mvvm; @@ -56,7 +57,7 @@ public bool IsReloading public SlotItemCatalogViewModel() { - this.Title = "所有装備一覧"; + this.Title = Resources.SlotItemCatalog_WindowTitle; this.Settings = new SlotItemCatalogWindowSettings(); this.updateSource diff --git a/source/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs b/source/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs index 84b83bea4..0594acab9 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/Contents/Fleets/FleetStateViewModel.cs @@ -36,7 +36,7 @@ public string Speed case FleetSpeed.Low: return Resources.Fleets_Speed_Slow; default: - return "速度混成艦隊"; + return Resources.Fleets_Speed_Hybrid; } } } diff --git a/source/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs b/source/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs index 743e0c8b0..8f14dede6 100644 --- a/source/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs +++ b/source/Grabacr07.KanColleViewer/ViewModels/FleetWindowViewModel.cs @@ -6,6 +6,7 @@ using Grabacr07.KanColleViewer.ViewModels.Contents.Fleets; using Grabacr07.KanColleWrapper; using MetroTrilithon.Mvvm; +using Resources = Grabacr07.KanColleViewer.Properties.Resources; namespace Grabacr07.KanColleViewer.ViewModels { @@ -60,7 +61,7 @@ public ItemViewModel SelectedFleet public FleetWindowViewModel() { - this.Title = "艦隊詳細"; + this.Title = Resources.FleetWindow_Title; this.Fleets = new ItemViewModel[0]; KanColleClient.Current.Homeport.Organization