Update localizations

This commit is contained in:
Royce551 2021-11-25 11:19:07 -06:00
parent ea623539d8
commit 56014d7f12
8 changed files with 52 additions and 23 deletions

View file

@ -41,7 +41,7 @@ namespace FRESHMusicPlayer
public GUILibrary Library;
public IMetadataProvider CurrentTrack;
public const string WindowName = "FRESHMusicPlayer [Blueprint 11 b.11.14.2021; Not stable!]";
public const string WindowName = "FRESHMusicPlayer [Blueprint 11 b.11.23.2021; Not stable!]";
public PlaytimeTrackingHandler TrackingHandler;
public bool PauseAfterCurrentTrack = false;

View file

@ -367,8 +367,8 @@ namespace FRESHMusicPlayer
if (version != App.Config.LastRecordedVersion)
NotificationHandler.Add(new Notification
{
ContentText = $"You're now on FRESHMusicPlayer {version}!",
ButtonText = "Changelog",
ContentText = string.Format(Properties.Resources.NOTIFICATION_UPTODATE, version),
ButtonText = Properties.Resources.NOTIFICATION_UPTODATE_CHANGELOG,
Type = NotificationType.Success,
OnButtonClicked = () => { Process.Start("https://github.com/royce551/freshmusicplayer/releases/latest"); return true; }
});

View file

@ -16,8 +16,8 @@
</Grid.RowDefinitions>
<DockPanel x:Name="TopBar" Panel.ZIndex="4" Background="Transparent" LastChildFill="False" Grid.Row="0" Height="30">
<Button x:Name="BackButton" DockPanel.Dock="Left" Content="Back" Margin="10,5,0,5" Click="BackButton_Click"/>
<CheckBox x:Name="FocusModeCheckBox" Margin="0,5,10,5" DockPanel.Dock="Right" Content="Focus Mode" Foreground="{StaticResource PrimaryTextColor}" VerticalContentAlignment="Center" Checked="FocusMode_Changed" Unchecked="FocusMode_Changed"/>
<Button x:Name="BackButton" DockPanel.Dock="Left" Content="{x:Static resx:Resources.MINIPLAYER_BACK}" Margin="10,5,0,5" Click="BackButton_Click"/>
<CheckBox x:Name="FocusModeCheckBox" Margin="0,5,10,5" DockPanel.Dock="Right" Content="{x:Static resx:Resources.FULLSCREEN_FOCUSMODE}" Foreground="{StaticResource PrimaryTextColor}" VerticalContentAlignment="Center" Checked="FocusMode_Changed" Unchecked="FocusMode_Changed"/>
</DockPanel>
<Rectangle x:Name="TopBarOverlay" Panel.ZIndex="3" Opacity="0.55" Grid.Row="0" Fill="{StaticResource BackgroundColor}"/>
@ -32,8 +32,6 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Source="https://royce551.github.io/assets/images/fmp/fullfmplogo.png" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Width="100" RenderOptions.BitmapScalingMode="HighQuality" Margin="10,0,0,0"/>
<ContentControl x:Name="InfoThing" Grid.Row="0" Grid.Column="1" Width="300" HorizontalAlignment="Right"/>
<Grid Grid.Row="2" Grid.ColumnSpan="2" VerticalAlignment="Bottom">

View file

@ -78,9 +78,7 @@ namespace FRESHMusicPlayer.Pages
}
else
{
var trackInfo = new TrackInfo();
trackInfo.Update(currentTrack);
InfoThing.Content = trackInfo;
InfoThing.Content = null;
}
}
@ -149,10 +147,7 @@ namespace FRESHMusicPlayer.Pages
TopBar.Visibility = TopBarOverlay.Visibility = Visibility.Hidden;
}
private void BackButton_Click(object sender, RoutedEventArgs e)
{
}
private void BackButton_Click(object sender, RoutedEventArgs e) => window.ChangeTabs(Tab.Playlists);
private void FocusMode_Changed(object sender, RoutedEventArgs e)
{

View file

@ -105,6 +105,15 @@ namespace FRESHMusicPlayer.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Focus Mode.
/// </summary>
public static string FULLSCREEN_FOCUSMODE {
get {
return ResourceManager.GetString("FULLSCREEN_FOCUSMODE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Browse for folders.
/// </summary>
@ -432,6 +441,24 @@ namespace FRESHMusicPlayer.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to You&apos;re now on FRESHMusicPlayer {0}!.
/// </summary>
public static string NOTIFICATION_UPTODATE {
get {
return ResourceManager.GetString("NOTIFICATION_UPTODATE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Changelog.
/// </summary>
public static string NOTIFICATION_UPTODATE_CHANGELOG {
get {
return ResourceManager.GetString("NOTIFICATION_UPTODATE_CHANGELOG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Clear All.
/// </summary>
@ -550,7 +577,7 @@ namespace FRESHMusicPlayer.Properties {
}
/// <summary>
/// Looks up a localized string similar to Remaining Time - .
/// Looks up a localized string similar to Remaining Time: .
/// </summary>
public static string QUEUEMANAGEMENT_REMAININGTIME {
get {

View file

@ -132,6 +132,9 @@
<data name="CONTROLS_PAUSE_AFTTER_CURRENT_TRACK" xml:space="preserve">
<value>Pause after current track</value>
</data>
<data name="FULLSCREEN_FOCUSMODE" xml:space="preserve">
<value>Focus Mode</value>
</data>
<data name="IMPORT_BROWSE_FOLDERS" xml:space="preserve">
<value>Browse for folders</value>
</data>
@ -249,6 +252,12 @@ Missing File: {0}</value>
<data name="NOTIFICATION_UPDATEREADY" xml:space="preserve">
<value>An update is ready! Restart FMP to apply the update.</value>
</data>
<data name="NOTIFICATION_UPTODATE" xml:space="preserve">
<value>You're now on FRESHMusicPlayer {0}!</value>
</data>
<data name="NOTIFICATION_UPTODATE_CHANGELOG" xml:space="preserve">
<value>Changelog</value>
</data>
<data name="PLAYLISTMANAGEMENT" xml:space="preserve">
<value>Playlist Management</value>
</data>
@ -283,7 +292,7 @@ Missing File: {0}</value>
<value>Queue</value>
</data>
<data name="QUEUEMANAGEMENT_REMAININGTIME" xml:space="preserve">
<value>Remaining Time - </value>
<value>Remaining Time: </value>
</data>
<data name="SETTINGS_ABOUT" xml:space="preserve">
<value>About</value>

View file

@ -102,7 +102,7 @@
<Setter Property="Stylus.IsFlicksEnabled"
Value="True" />
<Setter Property="Foreground"
Value="{StaticResource ForegroundColor}" />
Value="{StaticResource ControlColor}" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Width"

View file

@ -34,13 +34,13 @@ namespace FRESHMusicPlayer.Utilities
label.Visibility = Visibility.Visible;
}
}
public static IEnumerable<CultureInfo> GetAvailableCultures()
{
CultureInfo[] culture = CultureInfo.GetCultures(CultureTypes.AllCultures);
string exeLocation = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
//public static IEnumerable<CultureInfo> GetAvailableCultures()
//{
// CultureInfo[] culture = CultureInfo.GetCultures(CultureTypes.AllCultures);
// string exeLocation = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
return culture.Where(cultureInfo => Directory.Exists(Path.Combine(exeLocation, cultureInfo.Name)));
}
// return culture.Where(cultureInfo => Directory.Exists(Path.Combine(exeLocation, cultureInfo.Name)));
//}
/// <summary>
/// Handles everything related to drag drop
/// </summary>