Skip to content

Commit 8aa2da5

Browse files
committed
Files.App.Extensions
1 parent 48a52fd commit 8aa2da5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Files.App/Extensions/StringExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ public static string WithEnding(this string str, string ending)
6060

6161
private static readonly Dictionary<string, string> abbreviations = new()
6262
{
63-
{ "KiB", "KiloByteSymbol".GetLocalizedResource() },
64-
{ "MiB", "MegaByteSymbol".GetLocalizedResource() },
65-
{ "GiB", "GigaByteSymbol".GetLocalizedResource() },
66-
{ "TiB", "TeraByteSymbol".GetLocalizedResource() },
67-
{ "PiB", "PetaByteSymbol".GetLocalizedResource() },
68-
{ "B", "ByteSymbol".GetLocalizedResource() },
69-
{ "b", "ByteSymbol".GetLocalizedResource() }
63+
{ "KiB", Strings.KiloByteSymbol.GetLocalizedResource() },
64+
{ "MiB", Strings.MegaByteSymbol.GetLocalizedResource() },
65+
{ "GiB", Strings.GigaByteSymbol.GetLocalizedResource() },
66+
{ "TiB", Strings.TeraByteSymbol.GetLocalizedResource() },
67+
{ "PiB", Strings.PetaByteSymbol.GetLocalizedResource() },
68+
{ "B", Strings.ByteSymbol.GetLocalizedResource() },
69+
{ "b", Strings.ByteSymbol.GetLocalizedResource() }
7070
};
7171

7272
public static string ConvertSizeAbbreviation(this string value)
@@ -87,7 +87,7 @@ public static string ConvertSizeAbbreviation(this string value)
8787

8888
public static string ToLongSizeString(this long size) => ByteSize.FromBytes(size).ToLongSizeString();
8989
public static string ToLongSizeString(this ulong size) => ByteSize.FromBytes(size).ToLongSizeString();
90-
public static string ToLongSizeString(this ByteSize size) => $"{size.ToSizeString()} ({size.Bytes:#,##0} {"ItemSizeBytes".GetLocalizedResource()})";
90+
public static string ToLongSizeString(this ByteSize size) => $"{size.ToSizeString()} ({size.Bytes:#,##0} {Strings.ItemSizeBytes.GetLocalizedResource()})";
9191

9292
//public static string GetLocalizedResource(this string s) => s.GetLocalized("Resources");
9393

0 commit comments

Comments
 (0)