move resources to language specific locations

上级 9354fc02
......@@ -289,7 +289,7 @@
<data name="Suppression_operator_has_no_effect_and_can_be_misinterpreted" xml:space="preserve">
<value>Suppression operator has no effect and can be misinterpreted</value>
</data>
<data name="Convert_typeof_to_nameof" xml:space="preserve">
<value>Convert 'typeof' to 'nameof'</value>
<data name="typeof_can_be_converted_ to_nameof" xml:space="preserve">
<value>'typeof' can be converted to 'nameof'</value>
</data>
</root>
</root>
\ No newline at end of file
......@@ -4,13 +4,9 @@
#nullable enable
using Microsoft.CodeAnalysis.CodeStyle;
using Microsoft.CodeAnalysis.ConvertTypeOfToNameOf;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.ConvertTypeOfToNameOf;
using Microsoft.CodeAnalysis.LanguageServices;
using Microsoft.CodeAnalysis.Operations;
using Microsoft.CodeAnalysis.Shared.Extensions;
namespace Microsoft.CodeAnalysis.CSharp.ConvertTypeOfToNameOf
{
......@@ -21,6 +17,7 @@ namespace Microsoft.CodeAnalysis.CSharp.ConvertTypeOfToNameOf
internal sealed class CSharpConvertTypeOfToNameOfDiagnosticAnalyzer : AbstractConvertTypeOfToNameOfDiagnosticAnalyzer
{
public CSharpConvertTypeOfToNameOfDiagnosticAnalyzer()
: base(new LocalizableResourceString(nameof(CSharpAnalyzersResources.typeof_can_be_converted__to_nameof), CSharpAnalyzersResources.ResourceManager, typeof(CSharpAnalyzersResources)))
{
}
......@@ -39,14 +36,5 @@ protected override bool IsValidTypeofAction(OperationAnalysisContext context)
// expression that we want to analyze
return node is TypeOfExpressionSyntax { Parent: MemberAccessExpressionSyntax _ };
}
protected override Diagnostic LanguageReportDiagnostic(Location location, DiagnosticDescriptor cSharpDescriptor, DiagnosticDescriptor visualBasicDescriptor, CompilationOptions options)
{
return DiagnosticHelper.Create(visualBasicDescriptor,
location,
visualBasicDescriptor.GetEffectiveSeverity(options),
additionalLocations: null,
properties: null);
}
}
}
......@@ -17,11 +17,6 @@
<target state="translated">Převést příkaz switch na výraz</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Dekonstruovat deklaraci proměnné</target>
......@@ -267,6 +262,11 @@
<target state="translated">Příkaz if lze zjednodušit.</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">Použít var místo explicitního typu</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Switch-Anweisung in Ausdruck konvertieren</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Variablendeklaration dekonstruieren</target>
......@@ -267,6 +262,11 @@
<target state="translated">Die If-Anweisung kann vereinfacht werden.</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">"var" anstelle des expliziten Typs verwenden</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Convertir una instrucción switch en expresión</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Desconstruir la declaración de variable</target>
......@@ -267,6 +262,11 @@
<target state="translated">La instrucción "if" se puede simplificar</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">Usar 'var' en lugar de un tipo explícito</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Convertir l'instruction switch en expression</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Déconstruire la déclaration de variable</target>
......@@ -267,6 +262,11 @@
<target state="translated">L'instruction 'if' peut être simplifiée</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">utiliser 'var' au lieu d'un type explicite</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Converti l'istruzione switch in espressione</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Decostruisci la dichiarazione di variabile</target>
......@@ -267,6 +262,11 @@
<target state="translated">L'istruzione 'If' può essere semplificata</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">usa 'var' invece del tipo esplicito</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">switch ステートメントを式に変換します</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">変数の宣言を分解</target>
......@@ -267,6 +262,11 @@
<target state="translated">'if' ステートメントは簡素化できます</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">明示的な型ではなく 'var' を使用します</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">switch 문을 식으로 변환</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">변수 선언 분해</target>
......@@ -267,6 +262,11 @@
<target state="translated">'if' 문을 간단하게 줄일 수 있습니다.</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">대신 명시적 형식의 'var'을 사용합니다.</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Konwertuj instrukcję switch na wyrażenie</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Zdekonstruuj deklarację zmiennej</target>
......@@ -267,6 +262,11 @@
<target state="translated">Instrukcja „if” może zostać uproszczona</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">użyj deklaracji „var” zamiast jawnego typu</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Converter a instrução switch em expressão</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Desconstruir declaração de variável</target>
......@@ -267,6 +262,11 @@
<target state="translated">A instrução 'if' pode ser simplificada</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">usar 'var' em vez do tipo explícito</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Преобразовать оператор switch в выражение</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Деконструировать объявление переменной</target>
......@@ -267,6 +262,11 @@
<target state="translated">Оператор if можно упростить</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">Использовать var вместо явного типа</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">Switch deyimini ifadeye dönüştür</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">Değişken bildirimini ayrıştır</target>
......@@ -267,6 +262,11 @@
<target state="translated">'If' deyimi basitleştirilebilir</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">açık tür yerine 'var' kullan</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">将 switch 语句转换为表达式</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">析构变量声明</target>
......@@ -267,6 +262,11 @@
<target state="translated">可简化“If”语句</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">用 "var" 代替显式类型</target>
......
......@@ -17,11 +17,6 @@
<target state="translated">將 switch 陳述式轉換為運算式</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Deconstruct_variable_declaration">
<source>Deconstruct variable declaration</source>
<target state="translated">解構變數宣告</target>
......@@ -267,6 +262,11 @@
<target state="translated">'if' 陳述式可簡化</target>
<note />
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
<source>use 'var' instead of explicit type</source>
<target state="translated">使用 'var',而非明確類型</target>
......
......@@ -132,4 +132,7 @@
<data name="Warning_colon_Adding_parameters_to_local_function_declaration_may_produce_invalid_code" xml:space="preserve">
<value>Warning: Adding parameters to local function declaration may produce invalid code.</value>
</data>
<data name="Convert_typeof_to_nameof" xml:space="preserve">
<value>Convert 'typeof' to 'nameof'</value>
</data>
</root>
\ No newline at end of file
......@@ -22,10 +22,8 @@ public CSharpConvertTypeOfToNameOfCodeFixProvider()
{
}
protected override string GetCodeFixTitle(string visualbasic, string csharp)
{
return csharp;
}
protected override string GetCodeFixTitle()
=> CSharpCodeFixesResources.Convert_typeof_to_nameof;
protected override ITypeSymbol? GetSymbolType(SemanticModel model, SyntaxNode node)
{
......
......@@ -7,6 +7,11 @@
<target state="translated">Přidejte položku this.</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Předat zachycené proměnné jako argumenty</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">"this." hinzufügen</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Erfasste Variablen als Argumente übergeben</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Agregar "this."</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Pasar variables capturadas como argumentos</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Ajouter 'this.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Passer les variables capturées en tant qu'arguments</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Aggiungi 'this.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Passa le variabili acquisite come argomenti</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">this' を追加します。</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">キャプチャされた変数を引数として渡す</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">this'를 추가합니다.</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">캡처된 변수를 인수로 전달</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Dodaj „this.”</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Przekaż przechwycone zmienne jako argumenty</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Adicionar 'isso.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Passar variáveis capturadas como argumentos</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Добавьте "this".</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Передача захваченных переменных в качестве аргументов</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">this' ekleyin.</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">Yakalanan değişkenleri bağımsız değişken olarak geçir</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">添加 "this."</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">以参数形式传入捕获的变量</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">新增 'this.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Pass_in_captured_variables_as_arguments">
<source>Pass in captured variables as arguments</source>
<target state="translated">以引數形式傳入擷取到的變數</target>
......
......@@ -325,10 +325,4 @@
<data name="Remove_unnecessary_suppression" xml:space="preserve">
<value>Remove unnecessary suppression</value>
</data>
<data name="Convert_typeof_to_nameof" xml:space="preserve">
<value>Convert 'typeof' to 'nameof'</value>
</data>
<data name="Convert_gettype_to_nameof" xml:space="preserve">
<value>Convert 'GetType' to 'NameOf'</value>
</data>
</root>
\ No newline at end of file
......@@ -2,13 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
# nullable enable
using Microsoft.CodeAnalysis.CodeStyle;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
using Microsoft.CodeAnalysis.Options;
using Roslyn.Utilities;
#if CODE_STYLE
using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions;
......@@ -18,24 +16,16 @@ namespace Microsoft.CodeAnalysis.ConvertTypeOfToNameOf
{
internal abstract class AbstractConvertTypeOfToNameOfDiagnosticAnalyzer : AbstractBuiltInCodeStyleDiagnosticAnalyzer
{
protected AbstractConvertTypeOfToNameOfDiagnosticAnalyzer()
: base(IDEDiagnosticIds.ConvertTypeOfToNameOfDiagnosticId, option: null, new LocalizableResourceString(
nameof(AnalyzersResources.Convert_gettype_to_nameof), AnalyzersResources.ResourceManager, typeof(AnalyzersResources)))
public override DiagnosticAnalyzerCategory GetAnalyzerCategory()
=> DiagnosticAnalyzerCategory.SemanticSpanAnalysis;
protected AbstractConvertTypeOfToNameOfDiagnosticAnalyzer(LocalizableString Title)
: base(IDEDiagnosticIds.ConvertTypeOfToNameOfDiagnosticId, option: null, Title)
{
var csharpMessage = new LocalizableResourceString(nameof(AnalyzersResources.Convert_typeof_to_nameof), AnalyzersResources.ResourceManager, typeof(AnalyzersResources));
CSharpDescriptor = CreateDescriptorWithId(DescriptorId, csharpMessage, csharpMessage);
}
internal DiagnosticDescriptor VBDescriptor => Descriptor;
internal DiagnosticDescriptor CSharpDescriptor { get; }
protected abstract bool IsValidTypeofAction(OperationAnalysisContext context);
protected abstract Diagnostic LanguageReportDiagnostic(Location location, DiagnosticDescriptor cSharpDescriptor, DiagnosticDescriptor visualBasicDescriptor, CompilationOptions options);
public override DiagnosticAnalyzerCategory GetAnalyzerCategory()
=> DiagnosticAnalyzerCategory.SemanticSpanAnalysis;
protected override void InitializeWorker(AnalysisContext context)
{
context.RegisterOperationAction(AnalyzeAction, OperationKind.TypeOf);
......@@ -56,7 +46,13 @@ protected void AnalyzeAction(OperationAnalysisContext context)
return;
}
var location = parent.GetLocation();
context.ReportDiagnostic(LanguageReportDiagnostic(location, CSharpDescriptor, VBDescriptor, context.Compilation.Options));
var options = context.Compilation.Options;
context.ReportDiagnostic(
DiagnosticHelper.Create(Descriptor,
location,
Descriptor.GetEffectiveSeverity(options),
additionalLocations: null,
properties: null));
}
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Převést na podmíněný výraz</target>
......@@ -82,11 +77,6 @@
<target state="translated">Převést na řazenou kolekci členů</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">Hodnota výrazu se nikdy nepoužívá.</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">In bedingten Ausdruck konvertieren</target>
......@@ -82,11 +77,6 @@
<target state="translated">In Tupel konvertieren</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">Der Ausdruckswert wird niemals verwendet.</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Convertir a expresión condicional</target>
......@@ -82,11 +77,6 @@
<target state="translated">Convertir a tupla</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">El valor de la expresión no se utiliza nunca.</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Convertir en expression conditionnelle</target>
......@@ -82,11 +77,6 @@
<target state="translated">Convertir en tuple</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">La valeur d'expression n'est jamais utilisée</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Converti nell'espressione condizionale</target>
......@@ -82,11 +77,6 @@
<target state="translated">Converti in tupla</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">Il valore dell'espressione non viene mai usato</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">条件式に変換します</target>
......@@ -82,11 +77,6 @@
<target state="translated">タプルに変換</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">式の値が使用されていません</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">조건식으로 변환</target>
......@@ -82,11 +77,6 @@
<target state="translated">튜플로 변환</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">식 값은 절대 사용되지 않습니다.</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Konwertuj na wyrażenie warunkowe</target>
......@@ -82,11 +77,6 @@
<target state="translated">Konwertuj na spójną kolekcję</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">Wartość wyrażenia nie jest nigdy używana.</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Converter em expressão condicional</target>
......@@ -82,11 +77,6 @@
<target state="translated">Converter a tupla</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">O valor da expressão nunca é usado</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Преобразовать в условное выражение</target>
......@@ -82,11 +77,6 @@
<target state="translated">Преобразовать в кортеж</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">Значение выражения никогда не используется</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">Koşullu ifadeye dönüştürme</target>
......@@ -82,11 +77,6 @@
<target state="translated">Başlığa dönüştür</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">İfade değeri asla kullanılmaz</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">转换为条件表达式</target>
......@@ -82,11 +77,6 @@
<target state="translated">转换为元组</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">永远不会使用表达式值</target>
......
......@@ -67,11 +67,6 @@
<target state="new">Conditional expression can be simplified</target>
<note />
</trans-unit>
<trans-unit id="Convert_gettype_to_nameof">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Convert_to_conditional_expression">
<source>Convert to conditional expression</source>
<target state="translated">轉換至條件運算式</target>
......@@ -82,11 +77,6 @@
<target state="translated">轉換為元組</target>
<note />
</trans-unit>
<trans-unit id="Convert_typeof_to_nameof">
<source>Convert 'typeof' to 'nameof'</source>
<target state="new">Convert 'typeof' to 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="Expression_value_is_never_used">
<source>Expression value is never used</source>
<target state="translated">永遠不會使用運算式值</target>
......
......@@ -11,9 +11,7 @@
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Editing;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Simplification;
namespace Microsoft.CodeAnalysis.ConvertTypeOfToNameOf
{
......@@ -22,7 +20,7 @@ internal abstract class AbstractConvertTypeOfToNameOfCodeFixProvider : SyntaxEdi
internal static string _codeFixTitle;
public AbstractConvertTypeOfToNameOfCodeFixProvider()
{
_codeFixTitle = GetCodeFixTitle(AnalyzersResources.Convert_gettype_to_nameof, AnalyzersResources.Convert_typeof_to_nameof);
_codeFixTitle = GetCodeFixTitle();
}
public sealed override ImmutableArray<string> FixableDiagnosticIds
......@@ -62,7 +60,7 @@ public void ConvertTypeOfToNameOf(SemanticModel semanticModel, SyntaxEditor edit
protected abstract ITypeSymbol GetSymbolType(SemanticModel model, SyntaxNode node);
protected abstract string GetCodeFixTitle(string visualbasic, string csharp);
protected abstract string GetCodeFixTitle();
private class MyCodeAction : CustomCodeActions.DocumentChangeAction
{
......
......@@ -5,34 +5,25 @@
Imports Microsoft.CodeAnalysis.Diagnostics
Imports Microsoft.CodeAnalysis.ConvertTypeOfToNameOf
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports Microsoft.CodeAnalysis
Namespace Microsoft.CodeAnalysis.VisualBasic.ConvertTypeOfToNameOf
<DiagnosticAnalyzer(LanguageNames.VisualBasic)>
Friend NotInheritable Class VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer
Inherits AbstractConvertTypeOfToNameOfDiagnosticAnalyzer
Protected Overrides Function IsValidTypeofAction(context As OperationAnalysisContext) As Boolean
Dim node As SyntaxNode
Dim compilation As Compilation
Dim isValidLanguage As Boolean
Dim IsValidType As Boolean
Dim IsParentValid As Boolean
node = context.Operation.Syntax
compilation = context.Compilation
isValidLanguage = DirectCast(compilation, VisualBasicCompilation).LanguageVersion >= LanguageVersion.VisualBasic14
IsValidType = node.IsKind(SyntaxKind.GetTypeExpression)
IsParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Public Sub New()
MyBase.New(New LocalizableResourceString(NameOf(VisualBasicAnalyzersResources.GetType_can_be_converted_to_NameOf), VisualBasicAnalyzersResources.ResourceManager, GetType(VisualBasicAnalyzersResources)))
End Sub
Return isValidLanguage And IsValidType And IsParentValid
End Function
Protected Overrides Function IsValidTypeofAction(context As OperationAnalysisContext) As Boolean
Dim node = context.Operation.Syntax
Dim compilation = context.Compilation
Dim isValidLanguage = DirectCast(compilation, VisualBasicCompilation).LanguageVersion >= LanguageVersion.VisualBasic14
Dim isValidType = node.IsKind(SyntaxKind.GetTypeExpression)
Dim isParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Protected Overrides Function LanguageReportDiagnostic(location As Location, cSharpDescriptor As DiagnosticDescriptor, visualBasicDescriptor As DiagnosticDescriptor, options As CompilationOptions) As Diagnostic
Return DiagnosticHelper.Create(visualBasicDescriptor,
location,
visualBasicDescriptor.GetEffectiveSeverity(options),
additionalLocations:=Nothing,
properties:=Nothing)
Return isValidLanguage And isValidType And isParentValid
End Function
End Class
End Namespace
......@@ -133,4 +133,7 @@
<value>'ByVal' keyword is unnecessary and can be removed.</value>
<comment>{locked: ByVal}This is a Visual Basic keyword and should not be localized or have its casing changed</comment>
</data>
</root>
<data name="GetType_can_be_converted_to_NameOf" xml:space="preserve">
<value>'GetType' can be converted to 'NameOf'</value>
</data>
</root>
\ No newline at end of file
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">Příkaz if lze zjednodušit.</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">Die If-Anweisung kann vereinfacht werden.</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">La instrucción "if" se puede simplificar</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">L'instruction 'If' peut être simplifiée</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">L'istruzione 'If' può essere semplificata</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">'if' ステートメントは簡素化できます</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">'if' 문을 간단하게 줄일 수 있습니다.</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">Instrukcja „if” może zostać uproszczona</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">A instrução 'If' pode ser simplificada</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">Оператор if можно упростить</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">'If' deyimi basitleştirilebilir</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">可简化“If”语句</target>
......
......@@ -2,6 +2,11 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../VisualBasicAnalyzersResources.resx">
<body>
<trans-unit id="GetType_can_be_converted_to_NameOf">
<source>'GetType' can be converted to 'NameOf'</source>
<target state="new">'GetType' can be converted to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="If_statement_can_be_simplified">
<source>'If' statement can be simplified</source>
<target state="translated">'If' 陳述式可簡化</target>
......
......@@ -20,8 +20,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ConvertTypeOfToNameOf
Public Sub New()
End Sub
Protected Overrides Function GetCodeFixTitle(visualbasic As String, csharp As String) As String
Return visualbasic
Protected Overrides Function GetCodeFixTitle() As String
Return VisualBasicCodeFixesResources.Convert_GetType_to_NameOf
End Function
Protected Overrides Function GetSymbolType(semanticModel As SemanticModel, node As SyntaxNode) As ITypeSymbol
......
......@@ -123,4 +123,7 @@
<data name="Add_Me" xml:space="preserve">
<value>Add 'Me.'</value>
</data>
<data name="Convert_GetType_to_NameOf" xml:space="preserve">
<value>Convert 'GetType' to 'NameOf'</value>
</data>
</root>
\ No newline at end of file
......@@ -7,6 +7,11 @@
<target state="translated">Přidejte položku Me.</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Odebrat nepotřebné importy</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">"Me." hinzufügen</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Unnötige Import-Direktiven entfernen</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Agregar "Me."</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Quitar instrucciones Import innecesarias</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Ajouter 'Me.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Supprimer les importations superflues</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Aggiungi 'Me.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Rimuovi Import non necessari</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Me' を追加します。</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">不要なインポートの削除</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Me'를 추가하세요.</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">불필요한 Imports 제거</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Dodaj „mnie”.</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Usuń niepotrzebne importy</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Adicionar 'Me.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Remover Importações Desnecessárias</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Добавьте "'Me".</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Удалить ненужные импорты</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">Me' ekleyin.</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">Gereksiz İçeri Aktarmaları Kaldır</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">添加 "Me."</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">删除不必要的导入</target>
......
......@@ -7,6 +7,11 @@
<target state="translated">新增 'Me.'</target>
<note />
</trans-unit>
<trans-unit id="Convert_GetType_to_NameOf">
<source>Convert 'GetType' to 'NameOf'</source>
<target state="new">Convert 'GetType' to 'NameOf'</target>
<note />
</trans-unit>
<trans-unit id="Remove_Unnecessary_Imports">
<source>Remove Unnecessary Imports</source>
<target state="translated">移除不必要的匯入</target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册