Skip to content

Commit

Permalink
Switch loc message for response file
Browse files Browse the repository at this point in the history
Will support MSBuilds after dotnet/msbuild#8665.
  • Loading branch information
rainersigwald committed Apr 13, 2023
1 parent a81037e commit e89c4a3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/ResourcesGenerator/ResourceCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class ResourceCreator
"ProjectImportSkippedExpressionEvaluatedToEmpty",
"SkipTargetBecauseOutputsUpToDate",
"MetaprojectGenerated",
"DeferredResponseFile"
"PickedUpSwitchesFromAutoResponse"
};

public static Dictionary<string, string> Cultures = new Dictionary<string, string>
Expand Down
6 changes: 4 additions & 2 deletions src/StructuredLogger/Strings/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ private static void InitializeRegex()
.Replace("{3}", @"(?<File>.*) \((?<Line>\d+),(?<Column>\d+)\)$");
PropertyReassignmentRegex = new Regex(propertyReassignment, RegexOptions.Compiled | RegexOptions.Singleline);

string deferredResponseFile = "^" + GetString("DeferredResponseFile")
.Replace(@"{0}", @"(?<File>((.:)?[^:\n\r]*?))") + "$";
// MSBuild 17.6 shipped with this hardcoded to English (the first part of the regex), but it was switched to a different
// localized message in https://github.com/dotnet/msbuild/pull/8665. Support both here.
string deferredResponseFile = ("^(?:Included response file: {0}|" + GetString("PickedUpSwitchesFromAutoResponse") + ")$")
.Replace(@"{0}", @"(?<File>((.:)?[^:\n\r]*?))");
DeferredResponseFileRegex = new Regex(deferredResponseFile, RegexOptions.Compiled | RegexOptions.Singleline);

MetaprojectGenerated = GetString("MetaprojectGenerated");
Expand Down
26 changes: 13 additions & 13 deletions src/StructuredLogger/Strings/Strings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"en-US": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Some command line switches were read from the auto-response file \"{0}\". To disable this file, use the \"-noAutoResponse\" switch.",
"MetaprojectGenerated": "Metaproject \"{0}\" generated.",
"OutputItemParameterMessagePrefix": "Output Item(s): ",
"General.ProjectUndefineProperties": "Removing Properties for project \"{0}\":",
Expand Down Expand Up @@ -54,7 +54,7 @@
"Copy.FileComment": "Copying file from \"{0}\" to \"{1}\"."
},
"de-DE": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Einige Befehlszeilenschalter wurden aus der automatischen Antwortdatei \"{0}\" gelesen. Verwenden Sie den Schalter \"-noAutoResponse\", um diese Datei zu deaktivieren.",
"MetaprojectGenerated": "Das Metaprojekt \"{0}\" wurde generiert.",
"OutputItemParameterMessagePrefix": "Ausgegebene Elemente: ",
"General.ProjectUndefineProperties": "Eigenschaften für Projekt \"{0}\" werden entfernt:",
Expand Down Expand Up @@ -108,7 +108,7 @@
"Copy.FileComment": "Die Datei wird von \"{0}\" in \"{1}\" kopiert."
},
"it-IT": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Alcune opzioni della riga di comando sono state lette dal file di risposta automatica \"{0}\". Per disabilitare questo file, usare l'opzione \"-noAutoResponse\".",
"MetaprojectGenerated": "Il metaprogetto \"{0}\" è stato generato.",
"OutputItemParameterMessagePrefix": "Elementi di output: ",
"General.ProjectUndefineProperties": "Rimozione delle proprietà per il progetto \"{0}\":",
Expand Down Expand Up @@ -162,7 +162,7 @@
"Copy.FileComment": "Copia del file da \"{0}\" a \"{1}\"."
},
"es-ES": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Algunos modificadores de la línea de comandos se leyeron del archivo de respuesta automática \"{0}\". Para deshabilitar este archivo, use el modificador \"-noAutoResponse\".",
"MetaprojectGenerated": "Se generó el metaproyecto \"{0}\".",
"OutputItemParameterMessagePrefix": "Elementos de salida: ",
"General.ProjectUndefineProperties": "Quitando propiedades del proyecto \"{0}\":",
Expand Down Expand Up @@ -216,7 +216,7 @@
"Copy.FileComment": "Copiando el archivo de \"{0}\" en \"{1}\"."
},
"fr-FR": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Certains commutateurs de ligne de commande sont issus du fichier réponse automatique \"{0}\". Ajoutez le commutateur \"-noAutoResponse\" pour le désactiver.",
"MetaprojectGenerated": "Le métaprojet \"{0}\" a été généré.",
"OutputItemParameterMessagePrefix": "Élément(s) en sortie : ",
"General.ProjectUndefineProperties": "Suppression des propriétés du projet \"{0}\" :",
Expand Down Expand Up @@ -270,7 +270,7 @@
"Copy.FileComment": "Copie du fichier de \"{0}\" vers \"{1}\"."
},
"cs-CZ": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Některé přepínače příkazového řádku byly načteny ze souboru automatických odpovědí {0}. Pokud chcete tento soubor zakázat, použijte přepínač -noAutoResponse.",
"MetaprojectGenerated": "Metaprojekt {0} byl vygenerován.",
"OutputItemParameterMessagePrefix": "Výstupní položky: ",
"General.ProjectUndefineProperties": "Odstraňování vlastností projektu {0}:",
Expand Down Expand Up @@ -324,7 +324,7 @@
"Copy.FileComment": "Probíhá kopírování souboru z umístění {0} do umístění {1}."
},
"ja-JP": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "コマンド ラインの一部のスイッチは自動応答ファイル \"{0}\" から読み取られたものです。このファイルを無効にするには、\"-noAutoResponse\" スイッチをご使用ください。",
"MetaprojectGenerated": "メタプロジェクト \"{0}\" が生成されました。",
"OutputItemParameterMessagePrefix": "出力項目: ",
"General.ProjectUndefineProperties": "プロジェクト \"{0}\" のプロパティの削除:",
Expand Down Expand Up @@ -378,7 +378,7 @@
"Copy.FileComment": "\"{0}\" から \"{1}\" へファイルをコピーしています。"
},
"ko-KR": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "자동 지시 파일 \"{0}\"에서 일부 명령줄 스위치를 읽어왔습니다. 이 파일을 사용하지 않도록 설정하려면 \"-noAutoResponse\" 스위치를 사용하세요.",
"MetaprojectGenerated": "메타프로젝트 \"{0}\"이(가) 생성되었습니다.",
"OutputItemParameterMessagePrefix": "출력 항목: ",
"General.ProjectUndefineProperties": "\"{0}\" 프로젝트에 대한 속성 제거:",
Expand Down Expand Up @@ -432,7 +432,7 @@
"Copy.FileComment": "\"{0}\"에서 \"{1}\"(으)로 파일을 복사하고 있습니다."
},
"ru-RU": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Некоторые параметры командной строки были считаны из файла автоматического ответа \"{0}\". Чтобы отключить этот файл, используйте параметр \"-noAutoResponse\".",
"MetaprojectGenerated": "Создан метапроект \"{0}\".",
"OutputItemParameterMessagePrefix": "Выходных элементов: ",
"General.ProjectUndefineProperties": "Удаление свойств для проекта \"{0}\":",
Expand Down Expand Up @@ -486,7 +486,7 @@
"Copy.FileComment": "Копирование файла из \"{0}\" в \"{1}\"."
},
"pl-PL": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Odczytano pewne przełączniki wiersza polecenia z pliku autoodpowiedzi „{0}”. Aby wyłączyć ten plik, użyj przełącznika „-noAutoResponse”.",
"MetaprojectGenerated": "Wygenerowano metaprojekt „{0}”.",
"OutputItemParameterMessagePrefix": "Elementy wyjściowe: ",
"General.ProjectUndefineProperties": "Usuwanie właściwości projektu {0}:",
Expand Down Expand Up @@ -540,7 +540,7 @@
"Copy.FileComment": "Kopiowanie pliku z „{0}” do „{1}”."
},
"pt-BR": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Algumas opções de linha de comando foram lidas do arquivo de resposta automática \"{0}\". Para desabilitar esse arquivo, use a opção \"-noAutoResponse\".",
"MetaprojectGenerated": "Metaprojeto \"{0}\" gerado.",
"OutputItemParameterMessagePrefix": "Itens de Saída(s): ",
"General.ProjectUndefineProperties": "Removendo Propriedades do projeto \"{0}\":",
Expand Down Expand Up @@ -594,7 +594,7 @@
"Copy.FileComment": "Copiando o arquivo de \"{0}\" para \"{1}\"."
},
"tr-TR": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "Bazı komut satırı anahtarları \"{0}\" otomatik yanıt dosyasından okundu. Bu dosyayı devre dışı bırakmak için \"-noAutoResponse\" anahtarını kullanın.",
"MetaprojectGenerated": "\"{0}\" meta projesi oluşturuldu.",
"OutputItemParameterMessagePrefix": "Çıkış Öğeleri: ",
"General.ProjectUndefineProperties": "\"{0}\" projesinin Özellikleri kaldırılıyor:",
Expand Down Expand Up @@ -648,7 +648,7 @@
"Copy.FileComment": "Dosya \"{0}\" konumundan \"{1}\" konumuna kopyalanıyor."
},
"zh-Hans": {
"DeferredResponseFile": "Included response file: {0}",
"PickedUpSwitchesFromAutoResponse": "将从自动响应文件“{0}”中读取某些命令行开关。若要禁用此文件,请使用“-noAutoResponse”开关。",
"MetaprojectGenerated": "已生成元项目“{0}”。",
"OutputItemParameterMessagePrefix": "输出项: ",
"General.ProjectUndefineProperties": "移除项目“{0}”的属性:",
Expand Down

0 comments on commit e89c4a3

Please sign in to comment.