This commit is contained in:
Hakoyu 2023-10-13 22:27:33 +08:00
parent b080396cfd
commit e5e572fde8
3 changed files with 11 additions and 11 deletions

View File

@ -244,10 +244,10 @@ public class ModInfoModel : I18nModel<I18nModInfoModel>
/// </summary>
private void LoadI18nData()
{
foreach (var lang in I18nDatas)
foreach (var lang in I18nDatas.Keys.Union(OtherI18nDatas.Keys))
{
if (I18nHelper.Current.CultureNames.Contains(lang.Key) is false)
I18nHelper.Current.CultureNames.Add(lang.Key);
if (I18nHelper.Current.CultureNames.Contains(lang) is false)
I18nHelper.Current.CultureNames.Add(lang);
}
if (I18nHelper.Current.CultureNames.Count > 0)
{

View File

@ -62,7 +62,7 @@ public class PetPageVM
public void Edit(PetModel model)
{
if (model.IsSimplePetModel.Value)
if (model.IsSimplePetModel)
{
MessageBox.Show("这是本体自带的宠物, 无法编辑".Translate());
return;
@ -88,7 +88,7 @@ public class PetPageVM
private void Remove(PetModel model)
{
if (model.IsSimplePetModel.Value)
if (model.IsSimplePetModel)
{
MessageBox.Show("这是本体自带的宠物, 无法删除".Translate());
return;

View File

@ -32,15 +32,15 @@
<MenuItem
Command="{Binding PlacementTarget.Tag.AddImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
Header="添加图片" />
Header="{ll:Str 添加图片}" />
<MenuItem
Command="{Binding PlacementTarget.Tag.ClearImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
Header="清空图片" />
Header="{ll:Str 清空图片}" />
<MenuItem
Command="{Binding PlacementTarget.Tag.RemoveAnimeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
Header="删除此项" />
Header="{ll:Str 删除此项}" />
</ContextMenu>
</Expander.ContextMenu>
<Expander.Header>
@ -50,7 +50,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox pu:TextBoxHelper.Watermark="动画Id" Text="{Binding Id.Value, UpdateSourceTrigger=PropertyChanged}" />
<TextBox pu:TextBoxHelper.Watermark="{ll:Str 动画Id}" Text="{Binding Id.Value, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Column="1" Margin="10,0,0,0">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0})">
@ -88,7 +88,7 @@
<MenuItem
Command="{Binding PlacementTarget.Tag.RemoveImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
Header="删除图片" />
Header="{ll:Str 删除图片}" />
</ContextMenu>
</Grid.ContextMenu>
<Grid.RowDefinitions>
@ -113,7 +113,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Content="持续时间(ms)" />
<Label Content="{ll:Str 持续时间(ms)}" />
<pu:NumberInput Grid.Column="1" Value="{Binding DataContext.Duration.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
</Grid>
</Grid>