diff --git a/src/fsharp/CheckFormatStrings.fs b/src/fsharp/CheckFormatStrings.fs index 405a5feb038..4d532904a16 100644 --- a/src/fsharp/CheckFormatStrings.fs +++ b/src/fsharp/CheckFormatStrings.fs @@ -10,6 +10,7 @@ open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.ConstraintSolver +open Microsoft.FSharp.Compiler.NameResolution type FormatItem = Simple of TType | FuncAndVal @@ -47,27 +48,21 @@ let newInfo ()= addZeros = false precision = false} -let parseFormatStringInternal (m:range) (g: TcGlobals) (source: string option) fmt bty cty = +let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringCheckContext option) fmt bty cty = // Offset is used to adjust ranges depending on whether input string is regular, verbatim or triple-quote. // We construct a new 'fmt' string since the current 'fmt' string doesn't distinguish between "\n" and escaped "\\n". let (offset, fmt) = - match source with - | Some source -> - let source = source.Replace("\r\n", "\n").Replace("\r", "\n") - let positions = - source.Split('\n') - |> Seq.map (fun s -> String.length s + 1) - |> Seq.scan (+) 0 - |> Seq.toArray - let length = source.Length - if m.EndLine < positions.Length then - let startIndex = positions.[m.StartLine-1] + m.StartColumn - let endIndex = positions.[m.EndLine-1] + m.EndColumn - 1 - if startIndex < length-3 && source.[startIndex..startIndex+2] = "\"\"\"" then - (3, source.[startIndex+3..endIndex-3]) - elif startIndex < length-2 && source.[startIndex..startIndex+1] = "@\"" then - (2, source.[startIndex+2..endIndex-1]) - else (1, source.[startIndex+1..endIndex-1]) + match context with + | Some context -> + let length = context.NormalizedSource.Length + if m.EndLine < context.LineEndPositions.Length then + let startIndex = context.LineEndPositions.[m.StartLine-1] + m.StartColumn + let endIndex = context.LineEndPositions.[m.EndLine-1] + m.EndColumn - 1 + if startIndex < length-3 && context.NormalizedSource.[startIndex..startIndex+2] = "\"\"\"" then + (3, context.NormalizedSource.[startIndex+3..endIndex-3]) + elif startIndex < length-2 && context.NormalizedSource.[startIndex..startIndex+1] = "@\"" then + (2, context.NormalizedSource.[startIndex+2..endIndex-1]) + else (1, context.NormalizedSource.[startIndex+1..endIndex-1]) else (1, fmt) | None -> (1, fmt) @@ -292,8 +287,8 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (source: string option) f let results = parseLoop [] (0, 0, m.StartColumn) results, Seq.toList specifierLocations -let ParseFormatString m g source fmt bty cty dty = - let argtys, specifierLocations = parseFormatStringInternal m g source fmt bty cty +let ParseFormatString m g formatStringCheckContext fmt bty cty dty = + let argtys, specifierLocations = parseFormatStringInternal m g formatStringCheckContext fmt bty cty let aty = List.foldBack (-->) argtys dty let ety = mkRefTupledTy g argtys (aty, ety), specifierLocations diff --git a/src/fsharp/CheckFormatStrings.fsi b/src/fsharp/CheckFormatStrings.fsi index 0ec978bbecb..2b6d8d4f020 100644 --- a/src/fsharp/CheckFormatStrings.fsi +++ b/src/fsharp/CheckFormatStrings.fsi @@ -8,9 +8,10 @@ module internal Microsoft.FSharp.Compiler.CheckFormatStrings open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals -val ParseFormatString : Range.range -> TcGlobals -> source: string option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> (TType * TType) * (Range.range * int) list +val ParseFormatString : Range.range -> TcGlobals -> formatStringCheckContext: FormatStringCheckContext option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> (TType * TType) * (Range.range * int) list val TryCountFormatStringArguments : m:Range.range -> g:TcGlobals -> fmt:string -> bty:TType -> cty:TType -> int option diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index a53b1f0a939..c1fa63a6238 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -1246,6 +1246,10 @@ type OpenDeclaration = AppliedScope = appliedScope IsOwnNamespace = isOwnNamespace } +type FormatStringCheckContext = + { NormalizedSource: string + LineEndPositions: int[] } + /// An abstract type for reporting the results of name resolution and type checking. type ITypecheckResultsSink = abstract NotifyEnvWithScope : range * NameResolutionEnv * AccessorDomain -> unit @@ -1254,6 +1258,7 @@ type ITypecheckResultsSink = abstract NotifyFormatSpecifierLocation : range * int -> unit abstract NotifyOpenDeclaration : OpenDeclaration -> unit abstract CurrentSource : string option + abstract FormatStringCheckContext : FormatStringCheckContext option let (|ValRefOfProp|_|) (pi : PropInfo) = pi.ArbitraryValRef let (|ValRefOfMeth|_|) (mi : MethInfo) = mi.ArbitraryValRef @@ -1497,7 +1502,6 @@ type TcSymbolUses(g, capturedNameResolutions : ResizeArray() @@ -1521,6 +1525,18 @@ type TcResultsSinkImpl(g, ?source: string) = let capturedOpenDeclarations = ResizeArray() let allowedRange (m:range) = not m.IsSynthetic + let formatStringCheckContext = + lazy + source |> Option.map (fun source -> + let source = source.Replace("\r\n", "\n").Replace("\r", "\n") + let positions = + source.Split('\n') + |> Seq.map (fun s -> String.length s + 1) + |> Seq.scan (+) 0 + |> Seq.toArray + { NormalizedSource = source + LineEndPositions = positions }) + member this.GetResolutions() = TcResolutions(capturedEnvs, capturedExprTypings, capturedNameResolutions, capturedMethodGroupResolutions) @@ -1574,7 +1590,8 @@ type TcResultsSinkImpl(g, ?source: string) = capturedOpenDeclarations.Add(openDeclaration) member sink.CurrentSource = source - + + member sink.FormatStringCheckContext = formatStringCheckContext.Value /// An abstract type for reporting the results of name resolution and type checking, and which allows /// temporary suspension and/or redirection of reporting. diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index 7af7a278c23..8a1ae97f009 100755 --- a/src/fsharp/NameResolution.fsi +++ b/src/fsharp/NameResolution.fsi @@ -341,6 +341,13 @@ type internal OpenDeclaration = /// Create a new instance of OpenDeclaration. static member Create : longId: Ident list * modules: ModuleOrNamespaceRef list * appliedScope: range * isOwnNamespace: bool -> OpenDeclaration +/// Line-end normalized source text and an array of line end positions, used for format string parsing +type FormatStringCheckContext = + { /// Line-end normalized source text + NormalizedSource: string + /// Array of line end positions + LineEndPositions: int[] } + /// An abstract type for reporting the results of name resolution and type checking type ITypecheckResultsSink = @@ -362,6 +369,9 @@ type ITypecheckResultsSink = /// Get the current source abstract CurrentSource : string option + /// Cached line-end normalized source text and an array of line end positions, used for format string parsing + abstract FormatStringCheckContext : FormatStringCheckContext option + /// An implementation of ITypecheckResultsSink to collect information during type checking type internal TcResultsSinkImpl = diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index a7d1d25d98c..0b37e10c5b8 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -1840,7 +1840,8 @@ let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv = member this.NotifyExprHasType(_, _, _, _, _, _) = assert false // no expr typings in MakeSimpleVals member this.NotifyFormatSpecifierLocation(_, _) = () member this.NotifyOpenDeclaration(_) = () - member this.CurrentSource = None } + member this.CurrentSource = None + member this.FormatStringCheckContext = None } use _h = WithNewTypecheckResultsSink(sink, cenv.tcSink) MakeSimpleVals cenv env names @@ -6785,10 +6786,10 @@ and TcConstStringExpr cenv overallTy env m tpenv s = let ty' = mkPrintfFormatTy cenv.g aty bty cty dty ety if (not (isObjTy cenv.g overallTy) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy ty') then // Parse the format string to work out the phantom types - let source = match cenv.tcSink.CurrentSink with None -> None | Some sink -> sink.CurrentSource + let formatStringCheckContext = match cenv.tcSink.CurrentSink with None -> None | Some sink -> sink.FormatStringCheckContext let normalizedString = (s.Replace("\r\n", "\n").Replace("\r", "\n")) - let (aty', ety'), specifierLocations = (try CheckFormatStrings.ParseFormatString m cenv.g source normalizedString bty cty dty with Failure s -> error (Error(FSComp.SR.tcUnableToParseFormatString(s), m))) + let (aty', ety'), specifierLocations = (try CheckFormatStrings.ParseFormatString m cenv.g formatStringCheckContext normalizedString bty cty dty with Failure s -> error (Error(FSComp.SR.tcUnableToParseFormatString(s), m))) match cenv.tcSink.CurrentSink with | None -> () diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index ceb6d658d5b..ec52dea9110 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Všechny větve výrazu porovnání vzorů musí mít stejný typ. Očekávalo se, že tento výraz bude mít typ {0}, ale tady je typu {1}. + Všechny větve výrazu porovnání vzorů musí vracet hodnoty stejného typu. První větev vrátila hodnotu typu {0}, ale tato větev vrátila hodnotu typu {1}. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Třída {0} definovala verzi {1}, ale tato hodnota není platná a ignoruje se. + Atribut {0} určoval verzi {1}, ale tato hodnota není platná a ignoruje se. @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Používá se ve výrazech výpočtu k přímému porovnání vzorů s výsledkem jiného výrazu výpočtu. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 957653a606f..e7c78ef5129 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Alle Branches eines Musterabgleichsausdrucks müssen den gleichen Typ aufweisen. Es wurde erwartet, dass dieser Ausdruck den Typ "{0}" aufweist, hier liegt aber der Typ "{1}" vor. + Alle Branches eines Musterübereinstimmungsausdrucks müssen Werte des gleichen Typs zurückgeben. Der erste Branch hat einen Wert vom Typ "{0}" zurückgegeben, aber dieser Branch gab einen Wert vom Typ "{1}" zurück. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Ein {0} gab Version '{1}' an, dieser Wert ist jedoch ungültig und wurde ignoriert. + Das Attribut "{0}" hat Version "{1}" angegeben, dieser Wert ist jedoch ungültig und wurde ignoriert. @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Wird in Berechnungsausdrücken zur Musterübereinstimmung direkt über dem Ergebnis eines anderen Berechnungsausdrucks verwendet. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 8187e6b689e..7bbd4bb17d0 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Todas las ramas de una expresión de coincidencia de patrones deben tener el mismo tipo. Se esperaba que esta expresión tuviera el tipo "{0}", pero aquí tiene el tipo "{1}". + Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}". @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Un {0} ha especificado la versión "{1}", pero este valor no es válido y se ha omitido + El atributo {0} ha especificado la versión "{1}", pero este valor no es válido y se ha omitido @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Se utiliza en expresiones de cálculo para hacer coincidir patrones directamente sobre el resultado de otra expresión de cálculo. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 75960009914..ddae2f8794f 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Toutes les branches d'une expression comportant des critères spéciaux doivent avoir le même type. Cette expression était censée avoir le type '{0}', mais elle a ici le type '{1}'. + Toutes les branches d'une expression comportant des critères spéciaux doivent retourner des valeurs du même type. La première branche a retourné une valeur de type '{0}', mais cette branche a retourné une valeur de type '{1}'. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Un {0} a spécifié la version '{1}', mais cette valeur n'est pas valide et a été ignorée + L'attribut {0} a spécifié la version '{1}', mais cette valeur est non valide et a été ignorée @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Permet dans les expressions de calcul d'appliquer directement des critères spéciaux au résultat d'une autre expression de calcul. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index 220d7a72a91..e96e4c4371d 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Il tipo di tutti i rami di un'espressione di criteri di ricerca deve essere lo stesso. Il tipo previsto di questa espressione è '{0}', ma quello effettivo è '{1}'. + Tutti i rami di un'espressione di criteri di ricerca devono restituire valori dello stesso tipo. Il primo ramo ha restituito un valore di tipo '{0}', ma questo ramo ha restituito un valore di tipo '{1}'. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Un oggetto {0} ha specificato la versione '{1}', ma questo valore non è valido ed è stato ignorato + L'attributo {0} ha specificato la versione '{1}', ma questo valore non è valido ed è stato ignorato @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Usata nelle espressioni di calcolo per includere direttamente nei criteri di ricerca il risultato di un'altra espressione di calcolo. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 20af7a16081..44753c75ae9 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - パターン マッチ式のすべてのブランチは同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。 + パターン マッチ式のすべてのブランチは、同じ型の値を返す必要があります。最初のブランチが返した値の型は '{0}' ですが、このブランチが返した値の型は '{1}' です。 @@ -209,7 +209,7 @@ Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' - マネージ リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。 + マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。 @@ -354,7 +354,7 @@ Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). - F# でコンパイルした DLL '{0}' のメタデータの読み取り/書き込み中にエラーが発生しました。旧バージョンの F# コンパイラーでコンパイルした DLL ですか? (エラー: '{1}') + F# でコンパイルした DLL '{0}' のメタデータの読み取り/書き込み中にエラーが発生しました。旧バージョンの F# コンパイラでコンパイルした DLL ですか? (エラー: '{1}') @@ -1149,7 +1149,7 @@ The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - この演算子は F# コンパイラーが直接処理するようになったため、演算子の意味を再定義することはできません + この演算子は F# コンパイラが直接処理するようになったため、演算子の意味を再定義することはできません @@ -2969,12 +2969,12 @@ The member '{0}' does not correspond to any abstract or virtual method available to override or implement. - メンバー '{0}' は、無視または実装に使用できるどの抽象メソッドまたは仮想メソッドにも対応していません。 + メンバー '{0}' は、オーバーライドまたは実装に使用できるどの抽象メソッドまたは仮想メソッドにも対応していません。 The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. - 型 {0} にメンバー '{1}' が含まれていますが、このメンバーは無視または実装に使用できる仮想メソッドでも抽象メソッドでもありません。 + 型 {0} にメンバー '{1}' が含まれていますが、このメンバーはオーバーライドまたは実装に使用できる仮想メソッドでも抽象メソッドでもありません。 @@ -3404,7 +3404,7 @@ This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} - この無視では、対応する抽象メンバーに対して異なる数の引数を使用しています。次の抽象メンバーが見つかりました: {0} + このオーバーライドでは、対応する抽象メンバーに対して異なる数の引数を使用しています。次の抽象メンバーが見つかりました: {0} @@ -3434,7 +3434,7 @@ This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. - この新しいメンバーは抽象メンバー '{0}' を隠ぺいしています。メンバーの名前を変更するか、代わりに 'override' を使用してください。 + この新しいメンバーは抽象メンバー '{0}' を隠ぺいします。メンバーの名前を変更するか、代わりに 'override' を使用してください。 @@ -4024,7 +4024,7 @@ Compiler error: unexpected unrealized value - コンパイラー エラー: 予期しない認識されない値 + コンパイラ エラー: 予期しない認識されない値 @@ -4199,7 +4199,7 @@ Embed the specified managed resource - 指定したマネージ リソースを埋め込みます + 指定したマネージド リソースを埋め込みます @@ -4279,7 +4279,7 @@ @@ -4369,12 +4369,12 @@ The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - コマンド ライン オプション '--cliroot' は使用されなくなりました。代わりに mscorlib.dll の特定のコピーに対する明示的な参照を使用してください。 + コマンド ライン オプション '--cliroot' は非推奨になりました。代わりに mscorlib.dll の特定のコピーに対する明示的な参照を使用してください。 Use to override where the compiler looks for mscorlib.dll and framework components - コンパイラーが mscorlib.dll およびフレームワーク コンポーネントを検索する場所をオーバーライドするために使用します + コンパイラが mscorlib.dll およびフレームワーク コンポーネントを検索する場所をオーバーライドするために使用します @@ -4434,17 +4434,17 @@ The command-line option '{0}' has been deprecated - コマンド ライン オプション '{0}' は使用されなくなりました + コマンド ライン オプション '{0}' は非推奨になりました The command-line option '{0}' has been deprecated. Use '{1}' instead. - コマンド ライン オプション '{0}' は使用されなくなりました。代わりに '{1}' を使用してください。 + コマンド ライン オプション '{0}' は非推奨になりました。代わりに '{1}' を使用してください。 The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. - コマンド ライン オプション '{0}' は使用されなくなりました。HTML ドキュメントの生成は、F# Power Pack のツール FsHtmlDoc.exe で実行できるようになりました。 + コマンド ライン オプション '{0}' は非推奨になりました。HTML ドキュメントの生成は、F# Power Pack のツール FsHtmlDoc.exe で実行できるようになりました。 @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - {0} がバージョン '{1}' を指定しましたが、この値は無効なため無視されました + 属性 {0} にバージョン '{1}' を指定しましたが、この値は無効なため無視されました @@ -5459,12 +5459,12 @@ Static linking may not include a mixed managed/unmanaged DLL - 静的リンクでは、混合マネージ/アンマネージ DLL がインクルードされない可能性があります + 静的リンクでは、混合マネージド/アンマネージド DLL がインクルードされない可能性があります Ignoring mixed managed/unmanaged assembly '{0}' during static linking - 静的リンク中に混合マネージ/アンマネージ アセンブリ '{0}' を無視しています + 静的リンク中に混合マネージド/アンマネージド アセンブリ '{0}' を無視しています @@ -5529,7 +5529,7 @@ Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. - .resx ファイル ({0}) をソース ファイルとしてコンパイラに渡す処理は使用できなくなりました。resgen.exe を使用して、.resx ファイルを .resources ファイルに変換し、--resource オプションで渡してください。MSBuild を使用する場合は、.fsproj プロジェクト ファイル内の <EmbeddedResource> 項目を使用して、この変換を実行できます。 + .resx ファイル ({0}) をソース ファイルとしてコンパイラに渡す処理は非推奨です。resgen.exe を使用して、.resx ファイルを .resources ファイルに変換し、--resource オプションで渡してください。MSBuild を使用する場合は、.fsproj プロジェクト ファイル内の <EmbeddedResource> 項目を使用して、この変換を実行できます。 @@ -5809,7 +5809,7 @@ Cannot override inherited member '{0}' because it is sealed - 継承されたメンバー '{0}' はシールドであるため、オーバーライドできません + 継承されたメンバー '{0}' はシールされているため、オーバーライドできません @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + 別のコンピュテーション式の結果に対して直接パターン マッチを適用するコンピュテーション式の中で使用します。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index 5b84f48e066..b965bf784aa 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - 패턴 일치 식의 모든 분기는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다. + 패턴 일치 식의 모든 분기는 동일한 형식의 값을 반환해야 합니다. 첫 번째 분기는 '{0}' 형식의 값을 반환했지만 이 분기는 '{1}' 형식의 값을 반환했습니다. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - AssemblyVersionAttribute에 {0} 버전 '{1}'이(가) 지정되었지만 이 값이 잘못되어 무시되었습니다. + 특성 {0}이(가) 버전 '{1}'을(를) 지정했지만, 이 값이 잘못되어 무시되었습니다. @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + 다른 계산 식의 결과에 대해 직접적으로 패턴 일치에 대한 계산 식에 사용됩니다. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 7b58742f3ef..99fc7c35be3 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Wszystkie gałęzie wyrażenia dopasowania do wzorca muszą mieć ten sam typ. Oczekiwano, że to wyrażenie będzie miało typ „{0}”, ale tutaj ma typ „{1}”. + Wszystkie gałęzie wyrażenia dopasowania do wzorca muszą zwracać wartości tego samego typu. Pierwsza gałąź zwróciła wartość typu „{0}”, ale ta gałąź zwróciła wartość typu „{1}” @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Element {0} określił wersję „{1}”, ale ta wartość jest nieprawidłowa i została zignorowana + Atrybut {0} określił wersję „{1}”, ale ta wartość jest nieprawidłowa i została zignorowana @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Używane w wyrażeniach obliczenia do dopasowania do wzorca bezpośrednio w wyniku innego wyrażenia obliczenia. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index a7f4e1c2525..fd1acb897e2 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Todas as ramificações de uma expressão de correspondência de padrões devem ter o mesmo tipo. Essa expressão deveria ter o tipo '{0}', mas aqui tem o tipo '{1}'. + Todos os branches de uma expressão correspondente ao padrão precisam retornar valores do mesmo tipo. O primeiro branch retornou um valor do tipo '{0}', mas este branch retornou um valor do tipo '{1}'. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - Um {0} especificou a versão '{1}', mas esse valor é inválido e foi ignorado + O atributo {0} especificou a versão '{1}', mas esse valor é inválido e foi ignorado @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Usado em expressões de computação para corresponder ao padrão diretamente sobre o resultado de outra expressão de computação. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index d8cbe9424cd..20d19269250 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Все ветви выражения сопоставления шаблона должны иметь один и тот же тип. В этом выражении ожидалось использование типа "{0}", но используется тип "{1}". + Все ветви выражения сопоставления шаблонов должны возвращать значения одного типа. Первая ветвь возвратила значение типа "{0}", а эта ветвь — типа "{1}". @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - В {0} была указана версия "{1}", однако это значение является недопустимым и было проигнорировано + В атрибуте {0} указана версия "{1}", однако это значение недопустимо и было проигнорировано @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Используется в выражениях вычислений для сопоставления шаблонов непосредственно с результатом другого выражения вычислений. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index 211cead74d3..4928a97395e 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - Bir pattern match ifadesinin tüm dalları aynı türe sahip olmalıdır. Bu ifadenin '{0}' türünde olması bekleniyordu ancak burada '{1}' türünde. + Bir desen eşleştirme ifadesinin tüm dalları aynı türdeki değerleri döndürmelidir. Birinci dal '{0}' türünde bir değer döndürdü ancak bu dal '{1}' türünde bir değer döndürdü. @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - {0} ile sürüm '{1}' belirtildi, ancak bu değer geçersiz ve yok sayıldı + {0} özniteliğinde '{1}' sürümü belirtildi, ancak bu değer geçersiz olduğundan yoksayıldı @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + Başka bir hesaplama ifadesinin sonucu üzerinde doğrudan desen eşleştirmesi için hesaplama ifadelerinde kullanılır. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index f61822ca96b..551a8922f64 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - 模式匹配表达式的所有分支必须具有同一类型。此表达式的类型应为“{0}”,但此处类型为“{1}”。 + 模式匹配表达式的所有分支必须返回相同类型的值。第一个分支返回“{0}”类型的值,但此分支返回“{1}”类型的值。 @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - {0} 指定的版本“{1}”,但此值无效,已被忽略 + 属性 {0} 指定版本“{1}”,但此值无效,已被忽略 @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + 在计算表达式中用于直接对另一个计算表达式的结果进行模式匹配。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index e6f85883d15..d78bfa8ff9b 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -109,7 +109,7 @@ All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '{0}', but this branch returned a value of type '{1}'. - 模式比對運算式的所有分支都必須是同一種類型。此運算式應具備類型 '{0}',但卻是類型 '{1}'。 + 模式比對運算式的所有分支,都必須傳回相同類型的值。第一個分支傳回了類型 '{0}' 的值,但此分支卻傳回了類型 '{1}' 的值。 @@ -5434,7 +5434,7 @@ The attribute {0} specified version '{1}', but this value is invalid and has been ignored - {0} 指定的版本 '{1}',但是此值無效,已被忽略。 + 屬性 {0} 指定了版本 '{1}',但該值無效,所以已忽略。 @@ -6979,7 +6979,7 @@ Used in computation expressions to pattern match directly over the result of another computation expression. - Used in computation expressions to pattern match directly over the result of another computation expression. + 用於計算運算式中,直接對另一個計算運算式的結果進行模式比對。