mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 09:07:21 +00:00
Added the informal address to the BeyondFacts Lab (#1176)
This commit is contained in:
1 parent
b6c3fbb5db
commit
e77645f44c
48 files changed
+1254
-160
No files matched your search
@@ -18,9 +18,9 @@ public sealed class DirectI18NGetTextAnalyzer : DiagnosticAnalyzer
|
||||
|
||||
private const string TITLE = "Direct translation lookup is not allowed";
|
||||
|
||||
private const string MESSAGE_FORMAT = "Call GetText only from a T or TB wrapper whose first string parameter is forwarded as the fallback text";
|
||||
private const string MESSAGE_FORMAT = "Call GetText only from a T, TB, or TA wrapper whose first string parameter is forwarded as the fallback text";
|
||||
|
||||
private const string DESCRIPTION = "Translation calls must use collector-compatible T or TB wrappers so that every fallback text is included in the generated I18N resources.";
|
||||
private const string DESCRIPTION = "Translation calls must use collector-compatible T, TB, or TA wrappers so that every fallback text is included in the generated I18N resources.";
|
||||
|
||||
private const string CATEGORY = "Usage";
|
||||
|
||||
@@ -67,7 +67,7 @@ public sealed class DirectI18NGetTextAnalyzer : DiagnosticAnalyzer
|
||||
|
||||
private static bool IsCollectorCompatibleWrapper(IMethodSymbol? containingMethod, IInvocationOperation invocation)
|
||||
{
|
||||
if (containingMethod?.Name is not ("T" or "TB")
|
||||
if (containingMethod?.Name is not ("T" or "TB" or "TA")
|
||||
|| containingMethod.ReturnType.SpecialType != SpecialType.System_String
|
||||
|| containingMethod.Parameters.Length == 0
|
||||
|| containingMethod.Parameters[0].Type.SpecialType != SpecialType.System_String)
|
||||
|
||||
@@ -89,8 +89,8 @@ public sealed class ThisUsageAnalyzer : DiagnosticAnalyzer
|
||||
|
||||
private static bool IsTranslationMethod(SyntaxNode node)
|
||||
{
|
||||
// Check if this is a method called 'T' (translation method)
|
||||
if (node is IdentifierNameSyntax { Identifier.Text: "T" })
|
||||
// Check if this is a method called 'T' or 'TA' (translation methods)
|
||||
if (node is IdentifierNameSyntax { Identifier.Text: "T" or "TA" })
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user