diff --git a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems index 929ea027c4b9b..a6e298d42b3bb 100644 --- a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems +++ b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixes.projitems @@ -27,6 +27,7 @@ + diff --git a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx index 3cd22715df642..1234b301e3f8b 100644 --- a/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx +++ b/src/Analyzers/CSharp/CodeFixes/CSharpCodeFixesResources.resx @@ -195,4 +195,7 @@ Assign 'out' parameters (at start) {Locked="out"} "out" is a C# keyword and should not be localized. + + Add parentheses + \ No newline at end of file diff --git a/src/Features/CSharp/Portable/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs similarity index 95% rename from src/Features/CSharp/Portable/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs rename to src/Analyzers/CSharp/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs index a2b23bfbc8af4..2cbf34e2241ce 100644 --- a/src/Features/CSharp/Portable/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs @@ -16,7 +16,7 @@ using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; -namespace Microsoft.CodeAnalysis.CSharp.CodeFixes.ConditionalExpressionInStringInterpolation +namespace Microsoft.CodeAnalysis.CSharp.ConditionalExpressionInStringInterpolation { [ExportCodeFixProvider(LanguageNames.CSharp, Name = PredefinedCodeFixProviderNames.AddParenthesesAroundConditionalExpressionInInterpolatedString), Shared] internal class CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider : CodeFixProvider @@ -44,9 +44,9 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context) if (conditionalExpression != null) { var documentChangeAction = CodeAction.Create( - CSharpFeaturesResources.Add_parentheses_around_conditional_expression_in_interpolated_string, + CSharpCodeFixesResources.Add_parentheses_around_conditional_expression_in_interpolated_string, c => GetChangedDocumentAsync(context.Document, conditionalExpression.SpanStart, c), - nameof(CSharpFeaturesResources.Add_parentheses_around_conditional_expression_in_interpolated_string)); + nameof(CSharpCodeFixesResources.Add_parentheses_around_conditional_expression_in_interpolated_string)); context.RegisterCodeFix(documentChangeAction, diagnostic); } } diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf index c54408d2f7e5c..840f711d765cc 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.cs.xlf @@ -12,6 +12,11 @@ Přidat await {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Přidejte položku this. diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf index c522d997b0a75..81a0e43e0cb46 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.de.xlf @@ -12,6 +12,11 @@ "await" hinzufügen {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' "this." hinzufügen diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf index a2e9c3d6b3999..cfcfc4c0e27ff 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.es.xlf @@ -12,6 +12,11 @@ Agregar "await" {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Agregar "this." diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf index 7551150d6a393..74853cde1cdcd 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.fr.xlf @@ -12,6 +12,11 @@ Ajouter 'await' {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Ajouter 'this.' diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf index feb07f7babf07..1804d5e073246 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.it.xlf @@ -12,6 +12,11 @@ Aggiungi 'await' {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Aggiungi 'this.' diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf index ec4197a1979df..a845871388ed5 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ja.xlf @@ -12,6 +12,11 @@ 'await' の追加 {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' this' を追加します。 diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf index 5da965b5ba5bc..82e24e43a70a6 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ko.xlf @@ -12,6 +12,11 @@ 'await' 추가 {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' this'를 추가합니다. diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf index 4e36bf311bdf5..b670f877e1023 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pl.xlf @@ -12,6 +12,11 @@ Dodaj operator „await” {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Dodaj „this.” diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf index c318522d3f09e..c259a9b55a0ec 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.pt-BR.xlf @@ -12,6 +12,11 @@ Adicionar 'await' {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Adicionar 'isso.' diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf index c326ce88eb01a..9dac194c348cc 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.ru.xlf @@ -12,6 +12,11 @@ Добавить "await" {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' Добавьте "this". diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf index 65582c3806957..d6ef6e827705d 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.tr.xlf @@ -12,6 +12,11 @@ 'await' ekleyin {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' this' ekleyin. diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf index b9c86c2b80118..b0981a0000790 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hans.xlf @@ -12,6 +12,11 @@ 添加 "await" {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' 添加 "this." diff --git a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf index 27783da9c63b2..d2372c2535a2d 100644 --- a/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf +++ b/src/Analyzers/CSharp/CodeFixes/xlf/CSharpCodeFixesResources.zh-Hant.xlf @@ -12,6 +12,11 @@ 新增 'await' {Locked="await"} "await" is a C# keyword and should not be localized. + + Add parentheses + Add parentheses + + Add 'this.' 新增 'this.' diff --git a/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems b/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems index cd47cd2b43f20..241e90af866f5 100644 --- a/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems +++ b/src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems @@ -18,6 +18,7 @@ + diff --git a/src/EditorFeatures/CSharpTest/Diagnostics/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs b/src/Analyzers/CSharp/Tests/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs similarity index 97% rename from src/EditorFeatures/CSharpTest/Diagnostics/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs rename to src/Analyzers/CSharp/Tests/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs index 36592b8209e03..666cd33e06559 100644 --- a/src/EditorFeatures/CSharpTest/Diagnostics/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs +++ b/src/Analyzers/CSharp/Tests/ConditionalExpressionInStringInterpolation/CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs @@ -4,13 +4,14 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CSharp.CodeFixes.ConditionalExpressionInStringInterpolation; +using Microsoft.CodeAnalysis.CSharp.ConditionalExpressionInStringInterpolation; using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics; using Microsoft.CodeAnalysis.Test.Utilities; using Xunit; using Xunit.Abstractions; -namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.ConditionalExpressionInStringInterpolation +namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.ConditionalExpressionInStringInterpolation { [Trait(Traits.Feature, Traits.Features.CodeActionsAddParenthesesAroundConditionalExpressionInInterpolatedString)] public class CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests : AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest diff --git a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx index e21d0da67e8a3..c2e60a8dcbac9 100644 --- a/src/Features/CSharp/Portable/CSharpFeaturesResources.resx +++ b/src/Features/CSharp/Portable/CSharpFeaturesResources.resx @@ -455,9 +455,6 @@ Remove unused function - - Add parentheses - Convert to 'foreach' diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf index 136d6d69aca8a..5a1fff3715b2b 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.cs.xlf @@ -742,11 +742,6 @@ Odebrat nepoužitou funkci - - Add parentheses - Přidat závorky - - Convert to 'foreach' Převést na foreach diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf index 0b3a0b7dddd34..83328975b8b4a 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.de.xlf @@ -742,11 +742,6 @@ Nicht verwendete Funktion entfernen - - Add parentheses - Klammern hinzufügen - - Convert to 'foreach' In "foreach" konvertieren diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf index cd21cfa83df00..66ca5ceb171d2 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.es.xlf @@ -742,11 +742,6 @@ Quitar función no utilizada - - Add parentheses - Agregar paréntesis - - Convert to 'foreach' Convertir a "foreach" diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf index dc8da561d8973..9ef9b34570164 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.fr.xlf @@ -742,11 +742,6 @@ Supprimer la fonction inutilisée - - Add parentheses - Ajouter des parenthèses - - Convert to 'foreach' Convertir en 'foreach' diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf index 0f75191b1a046..1014eb119b733 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.it.xlf @@ -742,11 +742,6 @@ Rimuovi funzione non usata - - Add parentheses - Aggiungi parentesi - - Convert to 'foreach' Converti in 'foreach' diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf index 05e55d6210504..4be0aa9f8c4d4 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ja.xlf @@ -742,11 +742,6 @@ 使用されていない関数を削除します - - Add parentheses - 括弧を追加します - - Convert to 'foreach' 'foreach' に変換する diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf index ba82a13215e1b..2e3b7aced2cc6 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ko.xlf @@ -742,11 +742,6 @@ 사용하지 않는 함수 제거 - - Add parentheses - 괄호 추가 - - Convert to 'foreach' 'foreach'로 변환 diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf index e37dc5c524962..9b9488c4a1e60 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pl.xlf @@ -742,11 +742,6 @@ Usuń nieużywaną funkcję - - Add parentheses - Dodaj nawiasy - - Convert to 'foreach' Konwertuj na wyrażenie „foreach” diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf index 46e240fc65352..0cac22da1e291 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.pt-BR.xlf @@ -742,11 +742,6 @@ Remover função não utilizada - - Add parentheses - Adicionar parênteses - - Convert to 'foreach' Converter em 'foreach' diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf index 2c65fc31c496f..4bf0c0f8dfeec 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.ru.xlf @@ -742,11 +742,6 @@ Удалить неиспользуемую функцию - - Add parentheses - Добавить скобки - - Convert to 'foreach' Преобразовать в "foreach" diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf index 747f02890483b..751c0556b2772 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.tr.xlf @@ -742,11 +742,6 @@ Kullanılmayan işlevi kaldır - - Add parentheses - Parantez ekle - - Convert to 'foreach' 'foreach' deyimine dönüştür diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf index 1d4e2e9583933..693a43c8393bc 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hans.xlf @@ -742,11 +742,6 @@ 删除未使用的函数 - - Add parentheses - 添加括号 - - Convert to 'foreach' 转换为“foreach” diff --git a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf index b91dd6394222e..925b753ebdde6 100644 --- a/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf +++ b/src/Features/CSharp/Portable/xlf/CSharpFeaturesResources.zh-Hant.xlf @@ -742,11 +742,6 @@ 移除未使用的函式 - - Add parentheses - 新增括弧 - - Convert to 'foreach' 轉換為 'foreach'