Skip to content

Commit 8316a79

Browse files
isaacabrahamKevinRansom
authored andcommitted
Update pattern matching error message. (#5007)
* Update eror message. * Fix typo. * Fix loc strings * Update bsl
1 parent e11b320 commit 8316a79

18 files changed

+33
-33
lines changed

src/buildfromsource/FSharp.Compiler.Private/FSComp.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ type internal SR private() =
178178
/// All branches of an 'if' expression must have the same type. This expression was expected to have type '%s', but here has type '%s'.
179179
/// (Originally from ../FSComp.txt:24)
180180
static member elseBranchHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("elseBranchHasWrongType",",,,%s,,,%s,,,") a0 a1)
181-
/// All branches of a pattern match expression must have the same type. This expression was expected to have type '%s', but here has type '%s'.
181+
/// All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '%s', but this branch returned a value of type '%s'.
182182
/// (Originally from ../FSComp.txt:25)
183183
static member followingPatternMatchClauseHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("followingPatternMatchClauseHasWrongType",",,,%s,,,%s,,,") a0 a1)
184184
/// A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'.

src/fsharp/FSComp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ arrayElementHasWrongType,"All elements of an array constructor expression must h
2222
missingElseBranch,"The 'if' expression is missing an 'else' branch. The 'then' branch has type '%s'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type."
2323
ifExpression,"The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'."
2424
elseBranchHasWrongType,"All branches of an 'if' expression must have the same type. This expression was expected to have type '%s', but here has type '%s'."
25-
followingPatternMatchClauseHasWrongType,"All branches of a pattern match expression must have the same type. This expression was expected to have type '%s', but here has type '%s'."
25+
followingPatternMatchClauseHasWrongType,"All branches of a pattern match expression must return values of the same type. The first branch returned a value of type '%s', but this branch returned a value of type '%s'."
2626
patternMatchGuardIsNotBool,"A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'."
2727
commaInsteadOfSemicolonInRecord,"A ';' is used to separate field values in records. Consider replacing ',' with ';'."
2828
derefInsteadOfNot,"The '!' operator is used to dereference a ref cell. Consider using 'not expr' here."

src/fsharp/xlf/FSComp.txt.cs.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">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}.</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">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}.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.de.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">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.</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">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.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.en.xlf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="new">All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</target>
111+
<source>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}'.</source>
112+
<target state="new">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}'.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">
@@ -6994,4 +6994,4 @@
69946994
</trans-unit>
69956995
</body>
69966996
</file>
6997-
</xliff>
6997+
</xliff>

src/fsharp/xlf/FSComp.txt.es.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">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}".</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">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}".</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.fr.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">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}'.</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">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}'.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.it.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">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}'.</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">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}'.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.ja.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">パターン マッチ式のすべてのブランチは同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">パターン マッチ式のすべてのブランチは同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

src/fsharp/xlf/FSComp.txt.ko.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
<note />
109109
</trans-unit>
110110
<trans-unit id="followingPatternMatchClauseHasWrongType">
111-
<source>All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'.</source>
112-
<target state="translated">패턴 일치 식의 모든 분기는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다.</target>
111+
<source>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}'.</source>
112+
<target state="needs-review-translation">패턴 일치 식의 모든 분기는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다.</target>
113113
<note />
114114
</trans-unit>
115115
<trans-unit id="patternMatchGuardIsNotBool">

0 commit comments

Comments
 (0)