Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies & added spanish translation #8

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Localization/en_US.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="LOCPlaylist_Playlist">Playlist</sys:String>
<sys:String x:Key="LOCPlaylist_AddToPlaylist">Add to Playlist</sys:String>
<sys:String x:Key="LOCPlaylist_ErrorNotLoadFile">Playlist extension could not load file:</sys:String>
<sys:String x:Key="LOCPlaylist_ShowInLibrary">Show in Library</sys:String>
<sys:String x:Key="LOCPlaylist_MoveToTop">Move to Top</sys:String>
<sys:String x:Key="LOCPlaylist_MoveToBottom">Move to Bottom</sys:String>
<sys:String x:Key="LOCPlaylist_RemoveFromPlaylist">Remove from Playlist</sys:String>
<sys:String x:Key="LOCPlaylist_EmptyPlaylistMessage">Right click a game in the library and select "Add to Playlist"</sys:String>
</ResourceDictionary>

12 changes: 12 additions & 0 deletions Localization/es_ES.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="LOCPlaylist_Playlist">Lista de juegos pendientes</sys:String>
<sys:String x:Key="LOCPlaylist_AddToPlaylist">Añadir a la lista de juegos pendientes</sys:String>
<sys:String x:Key="LOCPlaylist_ErrorNotLoadFile">La extension Playlist no pudo cargar el archivo:</sys:String>
<sys:String x:Key="LOCPlaylist_ShowInLibrary">Mostrar en biblioteca</sys:String>
<sys:String x:Key="LOCPlaylist_MoveToTop">Mover al principio</sys:String>
<sys:String x:Key="LOCPlaylist_MoveToBottom">Mover al final</sys:String>
<sys:String x:Key="LOCPlaylist_RemoveFromPlaylist">Eliminar de la lista de juegos pendientes</sys:String>
<sys:String x:Key="LOCPlaylist_EmptyPlaylistMessage">En la biblioteca haga clic derecho en un juego y seleccione "Añadir a la lista de juegos pendientes"</sys:String>
</ResourceDictionary>

6 changes: 3 additions & 3 deletions Playlist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override IEnumerable<SidebarItem> GetSidebarItems()
{
yield return new SidebarItem
{
Title = "Playlist",
Title = ResourceProvider.GetString("LOCPlaylist_Playlist"),
Type = SiderbarItemType.View,
Icon = new TextBlock
{
Expand All @@ -50,7 +50,7 @@ public override IEnumerable<GameMenuItem> GetGameMenuItems(GetGameMenuItemsArgs
{
yield return new GameMenuItem
{
Description = "Add to Playlist",
Description = ResourceProvider.GetString("LOCPlaylist_AddToPlaylist"),
Icon = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "icon.png"),
Action = (itemArgs) =>
{
Expand Down Expand Up @@ -117,7 +117,7 @@ public override void OnApplicationStarted(OnApplicationStartedEventArgs args)
catch (Exception e)
{
logger.Error(e, "Error loading PlaylistGames in OnApplicationStarted");
PlayniteApi.Notifications.Add($"{Id}-OnApplicationStarted", $"Playlist extension could not load file: {e.Message}", NotificationType.Error);
PlayniteApi.Notifications.Add($"{Id}-OnApplicationStarted", $"{ResourceProvider.GetString("LOCPlaylist_ErrorNotLoadFile")} {e.Message}", NotificationType.Error);
}
}
}
Expand Down
21 changes: 16 additions & 5 deletions Playlist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="GongSolutions.WPF.DragDrop, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
<HintPath>packages\gong-wpf-dragdrop.2.4.1\lib\net462\GongSolutions.WPF.DragDrop.dll</HintPath>
<Reference Include="GongSolutions.WPF.DragDrop, Version=3.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
<HintPath>packages\gong-wpf-dragdrop.3.2.0\lib\net462\GongSolutions.WPF.DragDrop.dll</HintPath>
</Reference>
<Reference Include="Playnite.SDK, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\PlayniteSDK.6.0.0-preview3\lib\net462\Playnite.SDK.dll</HintPath>
<Reference Include="Playnite.SDK, Version=6.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\PlayniteSDK.6.2.2\lib\net462\Playnite.SDK.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand Down Expand Up @@ -65,6 +65,16 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Localization\en_US.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Localization\es_ES.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Page Include="PlaylistView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -80,8 +90,9 @@
<ItemGroup>
<ZipFiles Include="README.md" />
<ZipFiles Include="LICENSE" />
<ZipFiles Include="Localization" />
<ZipFiles Include="$(OutputPath)*" Exclude="$(OutputPath)Playnite.SDK.*" />
</ItemGroup>
<Exec Command="PowerShell -NoProfile -command Compress-Archive -Force @(ZipFiles, ',') '$(OutputPath)..\$(AssemblyName).zip' ; Move-Item '$(OutputPath)..\$(AssemblyName).zip' '$(OutputPath)..\$(AssemblyName).pext'" />
</Target>
</Project>
</Project>
14 changes: 6 additions & 8 deletions PlaylistView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</MenuItem>
<Separator Style="{StaticResource visibleIfOneGameSelected_Separator}" />
<MenuItem
Header="Show in Library"
Header="{DynamicResource LOCPlaylist_ShowInLibrary}"
Icon="{DynamicResource SidebarLibraryIcon}"
Command="{Binding DataContext.ShowGameInLibraryCommand, Source={x:Reference Name=playlistListView}}"
CommandParameter="{Binding}"
Expand All @@ -89,16 +89,16 @@
</MenuItem>
<Separator />
<MenuItem
Header="Move to Top"
Header="{DynamicResource LOCPlaylist_MoveToTop}"
Command="{Binding DataContext.MoveGamesToTopCommand, Source={x:Reference Name=playlistListView}}"
CommandParameter="{Binding SelectedItems, Source={x:Reference Name=playlistListView}}" />
<MenuItem
Header="Move to Bottom"
Header="{DynamicResource LOCPlaylist_MoveToBottom}"
Command="{Binding DataContext.MoveGamesToBottomCommand, Source={x:Reference Name=playlistListView}}"
CommandParameter="{Binding SelectedItems, Source={x:Reference Name=playlistListView}}" />
<Separator />
<MenuItem
Header="Remove from Playlist"
Header="{DynamicResource LOCPlaylist_RemoveFromPlaylist}"
Icon="{DynamicResource RemoveGameIcon}"
InputGestureText="{Binding DataContext.RemoveGamesCommand.GestureText, Source={x:Reference Name=playlistListView}}"
Command="{Binding DataContext.RemoveGamesCommand, Source={x:Reference Name=playlistListView}}"
Expand Down Expand Up @@ -178,7 +178,7 @@
FontSize="26" />
</Hyperlink>
</TextBlock>
<TextBlock Text="Playlist" VerticalAlignment="Center"
<TextBlock Text="{DynamicResource LOCPlaylist_Playlist}" VerticalAlignment="Center"
Style="{StaticResource BaseTextBlockStyle}"
Margin="10,0,0,0" FontSize="18"/>
</StackPanel>
Expand Down Expand Up @@ -225,8 +225,6 @@
</GridView>
</ListView.View>
</ListView>
<TextBlock Style="{StaticResource noGamesText}" TextAlignment="Center" VerticalAlignment="Center">
Right click a game in the library and select "Add to Playlist"
</TextBlock>
<TextBlock Style="{StaticResource noGamesText}" TextAlignment="Center" VerticalAlignment="Center" Text="{DynamicResource LOCPlaylist_EmptyPlaylistMessage}"/>
</DockPanel>
</UserControl>
4 changes: 2 additions & 2 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="gong-wpf-dragdrop" version="2.4.1" targetFramework="net462" />
<package id="PlayniteSDK" version="6.0.0-preview3" targetFramework="net462" />
<package id="gong-wpf-dragdrop" version="3.2.0" targetFramework="net462" />
<package id="PlayniteSDK" version="6.2.2" targetFramework="net462" />
</packages>