Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese (Simplified) localization update (2024.11) #879

Merged
merged 10 commits into from
Nov 19, 2024

Conversation

NCBM
Copy link
Contributor

@NCBM NCBM commented Nov 15, 2024

This PR will be a draft until we are ready.

@NCBM NCBM changed the title Chinese (Simplified) localization update (202411) Chinese (Simplified) localization update (2024.11) Nov 15, 2024

This comment has been minimized.

@NCBM
Copy link
Contributor Author

NCBM commented Nov 17, 2024

it seems that mypy_primer is easy to fail recently.

@NCBM NCBM marked this pull request as ready for review November 17, 2024 14:53
@DetachHead
Copy link
Owner

yeah just ignore that. it's tracked in #563

@NCBM
Copy link
Contributor Author

NCBM commented Nov 18, 2024

I have a bold idea that I'm not sure if it is fine to avoid/skip running the primer CI when merely non-English localization files are modified. If the primer only helps comparing functionalities of type checking, non-English localization files rarely (or maybe never) affect the functionality. Of course it is also possible to involve non-English texts in the primer if essential.

@DetachHead
Copy link
Owner

good idea. i raised #890

ignore those failures, i broke the primer when i converted the project to uv but it should be fixed now

@NCBM
Copy link
Contributor Author

NCBM commented Nov 18, 2024

Then this PR is currently generally ready, or I can wait for next sync with pyright or new l10n messages since there are still some days to enter the December.

@DetachHead
Copy link
Owner

thanks, will try to get around to reviewing this before this week's release on wednesday

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
-     Type of "n" is "Unknown | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | One | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | NegativeOne | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Zero | EvalfMixin* | Any | NaN | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Integer | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Rational | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | ComplexInfinity | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Half | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Expr | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float))" (reportUnknownMemberType)
+     Type of "n" is "Unknown | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | One | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | NegativeOne | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Zero | EvalfMixin* | Any | NaN | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Integer | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Rational | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | ComplexInfinity | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Half | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float)) | Any | ((n: int = 15, subs: Unknown | None = None, maxn: int = 100, chop: bool = False, strict: bool = False, quad: Unknown | None = None, verbose: bool = False) -> (Unknown | Expr | EvalfMixin* | Any | NaN | Zero | Infinity | NegativeInfinity | Float))" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solveset.py:506:20 - warning: Argument type is unknown
-     Argument corresponds to parameter "args" in function "__new__" (reportUnknownArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solveset.py:706:26 - warning: Argument type is Any
+     Argument corresponds to parameter "f" in function "solveset_real" (reportAny)
-     Type of "number" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Expr" (reportUnknownVariableType)
+     Type of "number" is "Unknown | One | NegativeOne | Zero | Integer | Rational | NaN | ComplexInfinity | Half | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solveset.py:2793:21 - warning: Argument type is Any
+     Argument corresponds to parameter "f" in function "solveset" (reportAny)
-     Type of "eq" is "_NotImplementedType | GreaterThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
+     Type of "eq" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solveset.py:3411:13 - warning: Argument type is Any
+     Argument corresponds to parameter "lhs" in function "__new__" (reportAny)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solveset.py:3513:5 - warning: Type of "e" is partially unknown
-     Type of "e" is "ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half | Unknown | Expr" (reportUnknownVariableType)
-     Type of "ans" is "set[tuple[Any | Unknown, Any] | tuple[Unknown, Any]]" (reportUnknownVariableType)
+     Type of "ans" is "set[tuple[Any, Any] | tuple[Unknown, Any]]" (reportUnknownVariableType)
-     Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Zero | One | Self@Expr | tuple[Unknown, ...] | Sum | Order | NaN | Piecewise | Basic | Equality | Relational | Unequality | ComplexInfinity | Expr | Float | Half | Infinity | Integer | Lambda | NegativeInfinity | NegativeOne | Number | Rational | int | None)" (reportUnknownVariableType)
+     Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Zero | One | Self@Expr | tuple[Unknown, ...] | Sum | Order | NaN | Piecewise | Basic | Equality | ComplexInfinity | Expr | Half | Infinity | Integer | Lambda | NegativeInfinity | NegativeOne | Number | Rational | int | None)" (reportUnknownVariableType)
-     Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+     Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
-     Type of "H" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
+     Type of "H" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
-     Type of "covariance" is "(X: Unknown, Y: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (CrossCovarianceMatrix | Covariance | Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+     Type of "covariance" is "(X: Unknown, Y: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (CrossCovarianceMatrix | Covariance | Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
-     Type of "entropy" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
+     Type of "entropy" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Zero | NaN | Piecewise | Equality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
-     Type of "correlation" is "(X: Unknown, Y: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (Unknown | Expr | Any | ComplexInfinity | Rational | NaN | One | NegativeOne | Zero | Integer | Half)" (reportUnknownVariableType)

... (truncated 3995 lines) ...

@DetachHead DetachHead merged commit 78c71d4 into DetachHead:main Nov 19, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants