Skip to content

Commit

Permalink
Fleet Details window localisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed Sep 7, 2015
1 parent 66b1f34 commit 4d9c4c4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 27 deletions.

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

3 changes: 3 additions & 0 deletions source/Grabacr07.KanColleViewer/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1327,4 +1327,7 @@ HTTP proxy settings are applied immediately. Settings for all other protocols ar
<data name="Settings_Plugins_PluginInfo_ToolWindow" xml:space="preserve">
<value>Tool</value>
</data>
<data name="FleetWindow_Status" xml:space="preserve">
<value>Status</value>
</data>
</root>
3 changes: 3 additions & 0 deletions source/Grabacr07.KanColleViewer/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1331,4 +1331,7 @@ HTTP プロトコルの通信は自動構成も含め「インターネット
<data name="Settings_Plugins_PluginInfo_ToolWindow" xml:space="preserve">
<value>ツール表示</value>
</data>
<data name="FleetWindow_Status" xml:space="preserve">
<value>ステータス</value>
</data>
</root>
51 changes: 24 additions & 27 deletions source/Grabacr07.KanColleViewer/Views/FleetWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="1,2">
<Run Text="合計レベル" />
<Run Text=":" />
<Run Text="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_LevelTotal, StringFormat='{}{0}', Mode=OneWay}" /><Run Text=":" />
</TextBlock>
<TextBlock Grid.Row="0"
Grid.Column="1"
Expand All @@ -617,8 +616,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="1,2">
<Run Text="平均レベル" />
<Run Text=":" />
<Run Text="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_LevelAverage, StringFormat='{}{0}', Mode=OneWay}" /><Run Text=":" />
</TextBlock>
<TextBlock Grid.Row="1"
Grid.Column="1"
Expand All @@ -633,8 +631,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="1,2">
<Run Text="索敵値" />
<Run Text=":" />
<Run Text="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_LoS, StringFormat='{}{0}', Mode=OneWay}" /><Run Text=":" />
</TextBlock>
<TextBlock Grid.Row="3"
Grid.Column="1"
Expand All @@ -649,8 +646,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="1,2">
<Run Text="制空戦力" />
<Run Text=":" />
<Run Text="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_AirSuperiority, StringFormat='{}{0}', Mode=OneWay}" /><Run Text=":" />
</TextBlock>
<TextBlock Grid.Row="4"
Grid.Column="1"
Expand All @@ -677,8 +673,7 @@
VerticalAlignment="Bottom"
Margin="1,2"
Visibility="Collapsed">
<Run Text="ステータス" />
<Run Text=":" />
<Run Text="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status, StringFormat='{}{0}', Mode=OneWay}" /><Run Text=":" />
</TextBlock>
<TextBlock Grid.Row="7"
Grid.Column="1"
Expand Down Expand Up @@ -733,7 +728,7 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊は出撃していません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_NotSortied, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="FontFamily"
Value="{DynamicResource EmphaticFontFamilyKey}" />
<Setter Property="FontSize"
Expand All @@ -746,7 +741,7 @@
<DataTrigger Binding="{Binding Source.State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=Sortie}"
Value="True">
<Setter Property="Text"
Value="艦隊は出撃中です!" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_Sortied, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
<Setter Property="Background"
Expand All @@ -763,12 +758,12 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊の出撃準備は完了していません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_SortieNotReady, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Source.State.IsReady}"
Value="True">
<Setter Property="Text"
Value="出撃準備完了!" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_SortieReady, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
<Setter Property="Background"
Expand All @@ -777,7 +772,7 @@
<DataTrigger Binding="{Binding Source.State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=Sortie}"
Value="True">
<Setter Property="Text"
Value="出撃準備完了!" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_SortieReady, StringFormat='{}{0}', Mode=OneWay}" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand All @@ -792,7 +787,7 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊は遠征中ではありません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_NoExpedition, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
Expand All @@ -801,9 +796,10 @@
</MultiDataTrigger.Conditions>
<Setter Property="Text">
<Setter.Value>
<MultiBinding StringFormat="艦隊は遠征中です: {0} - {1}">
<MultiBinding StringFormat="{}{2}: {0} - {1}">
<Binding Path="Expedition.Mission.Title" />
<Binding Path="Expedition.Remaining" />
<Binding Path="Resources.FleetWindow_Status_Expedition" Source="{x:Static models:ResourceService.Current}" />
</MultiBinding>
</Setter.Value>
</Setter>
Expand All @@ -823,7 +819,7 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="連合艦隊は遠征に参加できません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_CombinedNoExpedition, StringFormat='{}{0}', Mode=OneWay}" />
</Style>
</TextBlock.Style>
</TextBlock>
Expand All @@ -843,15 +839,15 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊の艦娘に大きなダメージはありません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_DamageInsignificant, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Source.State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=Homeport|HeavilyDamaged}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Text"
Value="艦隊に大破した艦娘がいます" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_DamageTaiha, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
<Setter Property="Background"
Expand All @@ -863,7 +859,7 @@
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Text"
Value="艦隊に大破した艦娘がいます!" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_DamageTaihaSortie, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
</MultiDataTrigger>
Expand All @@ -877,15 +873,15 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊の艦娘は入渠していません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_NoDocked, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Source.State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=Repairing}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Text"
Value="艦隊に入渠中の艦娘がいます" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_Docked, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
<Setter Property="Background"
Expand All @@ -901,15 +897,15 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊は補給済みです" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_Resupplied, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Source.State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=InShortSupply}"
Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Text"
Value="艦隊に未補給の艦娘がいます" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_ResupplyNeeded, StringFormat='{}{0}', Mode=OneWay}" />
<Setter Property="Foreground"
Value="{DynamicResource ActiveForegroundBrushKey}" />
<Setter Property="Background"
Expand All @@ -925,7 +921,7 @@
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource IndicatorTextBlockStyleKey}">
<Setter Property="Text"
Value="艦隊の艦娘は疲労していません" />
Value="{Binding Source={x:Static models:ResourceService.Current}, Path=Resources.FleetWindow_Status_NoFatigued, StringFormat='{}{0}', Mode=OneWay}" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
Expand All @@ -936,8 +932,9 @@
</MultiDataTrigger.Conditions>
<Setter Property="Text">
<Setter.Value>
<MultiBinding StringFormat="疲労回復まで: {0}">
<MultiBinding StringFormat="{}{1}: {0}">
<Binding Path="State.Homeport.Condition.Remaining" />
<Binding Path="Resources.FleetWindow_Status_FatigueTimer" Source="{x:Static models:ResourceService.Current}" />
</MultiBinding>
</Setter.Value>
</Setter>
Expand Down

0 comments on commit 4d9c4c4

Please sign in to comment.