mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
* CUERipper: was still sometimes locking drives it didn't need to
* ArCueDotNet: don't search for cover art * 'Silent track' diagnostics in AR log * LAME.dll: settings were not used * libwavpack: settings were not used (MD5Sum & extra mode) * workarounds for various Mono bugs * Path formatting: %discnumber% produces two-digit numbers if %totaldiscs% > 9 * Overwrite dialog: list files, 'remember the choice' option * Doesn't abort on broken Artwork files * Better locates files in some complicated cases, e.g. when only some tracks have tracknumber tags * Folder browser now sorts contents, because OS didn't do it when browsing external drives etc
This commit is contained in:
58
CUETools.Codecs/Local.cs
Normal file
58
CUETools.Codecs/Local.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
/// <summary>
|
||||
/// Localized description attribute
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
|
||||
public class SRDescriptionAttribute : DescriptionAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Construct the description attribute
|
||||
/// </summary>
|
||||
/// <param name="text"></param>
|
||||
public SRDescriptionAttribute(Type SR, string text)
|
||||
: base(text)
|
||||
{
|
||||
this.localized = false;
|
||||
this.SR = SR;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the return of the description text to localize the text
|
||||
/// </summary>
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!localized)
|
||||
{
|
||||
localized = true;
|
||||
this.DescriptionValue = SR.InvokeMember(
|
||||
this.DescriptionValue,
|
||||
System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Static |
|
||||
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic,
|
||||
null,
|
||||
null,
|
||||
new object[] { }) as string;
|
||||
}
|
||||
|
||||
return base.Description;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Store a flag indicating whether this has been localized
|
||||
/// </summary>
|
||||
private bool localized;
|
||||
|
||||
/// <summary>
|
||||
/// Resource manager to use;
|
||||
/// </summary>
|
||||
private Type SR;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user