Skip to content

Commit

Permalink
Update localisation (ship catalog window)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed Feb 8, 2016
1 parent 2c46db4 commit 8cba3cc
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 23 deletions.
45 changes: 45 additions & 0 deletions source/Grabacr07.KanColleViewer/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions source/Grabacr07.KanColleViewer/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1393,4 +1393,19 @@ HTTP proxy settings are applied immediately. Settings for all other protocols ar
<data name="TaskbarIndicator_DoNotUse" xml:space="preserve">
<value>Disable</value>
</data>
<data name="ShipCatalog_Column_TTR" xml:space="preserve">
<value>Repairs</value>
</data>
<data name="ShipCatalog_Column_TTR_ToolTip" xml:space="preserve">
<value>Time until the repairs finish.</value>
</data>
<data name="ShipCatalog_Filter_Misc_Damage" xml:space="preserve">
<value>Damage</value>
</data>
<data name="ShipCatalog_Filter_Misc_DamageNo" xml:space="preserve">
<value>Not damaged</value>
</data>
<data name="ShipCatalog_Filter_Misc_DamageYes" xml:space="preserve">
<value>Damaged</value>
</data>
</root>
15 changes: 15 additions & 0 deletions source/Grabacr07.KanColleViewer/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1385,4 +1385,19 @@ HTTP プロトコルの通信は自動構成も含め「インターネット
<data name="TaskbarIndicator_DoNotUse" xml:space="preserve">
<value>使用しない</value>
</data>
<data name="ShipCatalog_Column_TTR" xml:space="preserve">
<value>修復時間</value>
</data>
<data name="ShipCatalog_Column_TTR_ToolTip" xml:space="preserve">
<value>入渠にかかる時間です</value>
</data>
<data name="ShipCatalog_Filter_Misc_Damage" xml:space="preserve">
<value>損傷</value>
</data>
<data name="ShipCatalog_Filter_Misc_DamageNo" xml:space="preserve">
<value>損傷なし</value>
</data>
<data name="ShipCatalog_Filter_Misc_DamageYes" xml:space="preserve">
<value>損傷あり</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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; }

Expand All @@ -38,6 +40,7 @@ static ShipCatalogSortWorker()
NoneColumn,
IdColumn,
StypeColumn,
SortIdColumn,
NameColumn,
LevelColumn,
CondColumn,
Expand Down Expand Up @@ -266,6 +269,6 @@ public class SortableColumn
{
public string Name { get; set; }
public bool DefaultIsDescending { get; set; }
public Func<Ship, long> KeySelector { get; set; }
public Func<Ship, object> KeySelector { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
HorizontalAlignment="Right"
VerticalAlignment="Top"
WindowChrome.IsHitTestVisibleInChrome="True">
<CheckBox IsChecked="{Binding ShowAdditionalStats, Mode=TwoWay}"
Content="{Binding Resources.ShipCatalog_AdditionalStats, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
Margin="0,0,5,0"
Height="26"
VerticalAlignment="Top"
HorizontalAlignment="Right"/>
<metro:CaptionButton IsChecked="{Binding Settings.TopMost.Value, Mode=TwoWay}"
ToolTip="{Binding Resources.Settings_Window_TopMost, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
Style="{DynamicResource PinButtonStyleKey}" />
Expand Down Expand Up @@ -409,17 +415,17 @@
</Grid.ColumnDefinitions>
<TextBlock Margin="0,2"
HorizontalAlignment="Right">
<Run Text="損傷" />
<Run Text="{Binding Resources.ShipCatalog_Filter_Misc_Damage, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
<Run Text=":" />
</TextBlock>
<WrapPanel Grid.Column="2">
<RadioButton Content="すべて"
<RadioButton Content="{Binding Resources.ShipCatalog_Filter_Misc_All, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
IsChecked="{Binding Both, Mode=TwoWay}" />
<RadioButton Content="損傷あり"
<RadioButton Content="{Binding Resources.ShipCatalog_Filter_Misc_DamageYes, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
IsChecked="{Binding Damaged, Mode=TwoWay}" />
<RadioButton Content="損傷なし"
<RadioButton Content="{Binding Resources.ShipCatalog_Filter_Misc_DamageNo, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
IsChecked="{Binding Undamaged, Mode=TwoWay}" />
</WrapPanel>
</WrapPanel>
</Grid>
</StackPanel>
</WrapPanel>
Expand Down Expand Up @@ -451,6 +457,7 @@
</ItemsControl>
</DockPanel>
</Border>

</StackPanel>
</Expander>

Expand Down Expand Up @@ -554,6 +561,7 @@
ItemContainerStyle="{DynamicResource GridViewItemContainerStyleKey}"
ScrollViewer.PanningMode="Both">
<ListView.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverterKey" />
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin"
Value="5,4" />
Expand Down Expand Up @@ -830,8 +838,8 @@
<GridViewColumn.Header>
<metro2:SortButton MethodName="Sort"
MethodParameter="{x:Static viewModels:ShipCatalogSortWorker.TimeToRepairColumn}">
<TextBlock Text="修復時間"
ToolTip="入渠にかかる時間です" />
<TextBlock Text="{Binding Resources.ShipCatalog_Column_TTR, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
ToolTip="{Binding Resources.ShipCatalog_Column_TTR_ToolTip, Source={x:Static models:ResourceService.Current}}" />
</metro2:SortButton>
</GridViewColumn.Header>
<GridViewColumn.CellTemplate>
Expand Down

0 comments on commit 8cba3cc

Please sign in to comment.