Merge pull request #5152 from Mailaender/auto-l10n
Automated translation string extraction
This commit is contained in:
@@ -20,6 +20,11 @@ namespace OpenRA
|
||||
{
|
||||
public static class Exts
|
||||
{
|
||||
public static bool IsUppercase(this string str)
|
||||
{
|
||||
return string.Compare(str.ToUpperInvariant(), str, false) == 0;
|
||||
}
|
||||
|
||||
public static string F(this string fmt, params object[] args)
|
||||
{
|
||||
return string.Format(fmt, args);
|
||||
|
||||
@@ -111,9 +111,13 @@ namespace OpenRA
|
||||
public IEnumerable<Type> GetTypesImplementing<T>()
|
||||
{
|
||||
var it = typeof(T);
|
||||
return GetTypes().Where(t => t != it && it.IsAssignableFrom(t));
|
||||
}
|
||||
|
||||
public IEnumerable<Type> GetTypes()
|
||||
{
|
||||
return assemblies.Select(ma => ma.First).Distinct()
|
||||
.SelectMany(ma => ma.GetTypes()
|
||||
.Where(t => t != it && it.IsAssignableFrom(t)));
|
||||
.SelectMany(ma => ma.GetTypes());
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Constructor)]
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA.Widgets
|
||||
Lazy<TooltipContainerWidget> tooltipContainer;
|
||||
public readonly string TooltipContainer;
|
||||
public readonly string TooltipTemplate = "BUTTON_TOOLTIP";
|
||||
public string TooltipText;
|
||||
[Translate] public string TooltipText;
|
||||
|
||||
// Equivalent to OnMouseUp, but without an input arg
|
||||
public Action OnClick = () => {};
|
||||
|
||||
Reference in New Issue
Block a user