mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Second iteration of source generated localized strings
- Strs renamed to strs - Generic params will now default to object instead of string for convenient argument passing - Many strings changed to use generated properties
This commit is contained in:
		@@ -16,6 +16,7 @@ using SixLabors.ImageSharp.PixelFormats;
 | 
			
		||||
using SixLabors.ImageSharp.Processing;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Globalization;
 | 
			
		||||
using System.IO;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Net.Http;
 | 
			
		||||
@@ -375,5 +376,22 @@ namespace NadekoBot.Extensions
 | 
			
		||||
 | 
			
		||||
            return msg.Content.Headers.ContentLength / 1.MB();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static string GetText(this IBotStrings strings, LocStr str, ulong? guildId = null)
 | 
			
		||||
            => strings.GetText(str.Key, guildId);
 | 
			
		||||
        
 | 
			
		||||
        public static string GetText(this IBotStrings strings, LocStr str, CultureInfo culture)
 | 
			
		||||
            => strings.GetText(str.Key, culture);
 | 
			
		||||
        
 | 
			
		||||
        public static string GetText<T>(this IBotStrings strings, LocStr<T> str, ulong? guildId, T obj1)
 | 
			
		||||
            => strings.GetText(str.Key, guildId, obj1);
 | 
			
		||||
        
 | 
			
		||||
        public static string GetText<T>(this IBotStrings strings, LocStr<T> str, CultureInfo culture, T obj1)
 | 
			
		||||
            => strings.GetText(str.Key, culture, obj1);
 | 
			
		||||
        
 | 
			
		||||
        public static string GetText<T1, T2>(this IBotStrings strings, LocStr<T1, T2> str, ulong? guildId, T1 obj1, T2 obj2)
 | 
			
		||||
            => strings.GetText(str.Key, guildId, obj1, obj2);
 | 
			
		||||
        public static string GetText<T1, T2>(this IBotStrings strings, LocStr<T1, T2> str, CultureInfo culture, T1 obj1, T2 obj2)
 | 
			
		||||
            => strings.GetText(str.Key, culture, obj1, obj2);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user