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 translations fix #598

Merged
merged 45 commits into from
Sep 25, 2024
Merged

Chinese translations fix #598

merged 45 commits into from
Sep 25, 2024

Conversation

sena-nana
Copy link
Contributor

This is about fixing the Chinese translation. pyright's original Chinese translation had a lot of holes in it, so it's been tweaked in this PR.

The people involved in the translation are not professional localizers, so it's basically a work in progress according to our personal habits.

Most of the translations were done by NCBM and GreyElaina.I just completed the documentation.Thanks for their help.

This comment has been minimized.

@NCBM
Copy link
Contributor

NCBM commented Aug 27, 2024

After that, we will continue to follow up on the changes of the translated text, and after a certain number of changes of the translated text have accumulated, we will initiate a new Pull Request to submit new translated texts.

@DetachHead
Copy link
Owner

thanks! i want to merge this soon but might get someone else to review it first

@NCBM
Copy link
Contributor

NCBM commented Aug 27, 2024

There will be some text improvements over the next while, we'll let you know when we're ready, after all, the workflows are time-consuming.

This comment has been minimized.

This comment has been minimized.

@DetachHead
Copy link
Owner

ready to merge when you are, just let me know 🚀

This comment has been minimized.

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 "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> (Unknown | Mul | Pow | Order | Expr | Add | None)" (reportUnknownVariableType)
+     Type of "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:22 - error: Type of "simplify" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:22 - error: Type of "simplify" is partially unknown
+     Type of "simplify" is "Unknown | ((**kwargs: Unknown) -> Unknown)" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/ode/subscheck.py:385:37 - error: "simplify" is not a known attribute of "None" (reportOptionalMemberAccess)
-     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
-     Type of "_" is "Unknown | Literal[False]" (reportUnknownVariableType)
+     Type of "_" is "Unknown | Any | Literal[False]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:501:5 - error: Type of "eqs" is partially unknown
-     Type of "eqs" is "list[Unknown]" (reportUnknownVariableType)
-     Argument type is "Unknown | _NotImplementedType" (reportUnknownArgumentType)
+     Argument type is "Unknown | Any | _NotImplementedType" (reportUnknownArgumentType)
-     Type of "eqs" is "list[Unknown]" (reportUnknownVariableType)
+     Type of "eqs" is "list[Unknown | Any]" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:505:16 - error: Argument type is unknown
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:505:16 - error: Argument type is partially unknown
-     Argument corresponds to parameter "iterable" in function "__init__" (reportUnknownArgumentType)
+     Argument corresponds to parameter "iterable" in function "__init__"
+     Argument type is "Unknown | Any" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:717:18 - error: Argument type is unknown
-     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1768:5 - error: Type of "eqs" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1768:5 - error: Type of "eqs" is partially unknown
+     Type of "eqs" is "Unknown | Any" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1769:18 - error: Argument type is unknown
-     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/tests/test_solvers.py:1770:18 - error: Argument type is unknown
-     Argument corresponds to parameter "f" in function "solve" (reportUnknownArgumentType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Moment | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Moment | Any)" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv_interface.py:50:12 - error: Return type, "Moment | Any | Unknown", is partially unknown (reportUnknownVariableType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (CentralMoment | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (CentralMoment | Any)" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv_interface.py:243:12 - error: Return type, "CentralMoment | Any | Unknown", is partially unknown (reportUnknownVariableType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Probability | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Probability | Any)" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Relational | Unequality | Lambda | int | None)) | Any | Unknown" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Relational | Unequality | Lambda | int | None)) | Any" (reportUnknownMemberType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Expectation | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Expectation | Any)" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> (Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | Self@Expectation | None)) | Any | Unknown" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> (Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | Self@Expectation | None)) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:434:9 - error: Return type, "Self@Variance | Any | Unknown", is partially unknown (reportUnknownParameterType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Variance | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Variance | Any)" (reportUnknownMemberType)
-     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Variance | Any | Unknown)) | Any | Unknown" (reportUnknownMemberType)
+     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Variance | Any)) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:435:16 - error: Return type, "Self@Variance | Any | Unknown", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:442:9 - error: Return type, "Self@Variance | Any | Unknown", is partially unknown (reportUnknownParameterType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Variance | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Variance | Any)" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> Self@Variance) | Any | Unknown" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Self@Variance) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:443:16 - error: Return type, "Self@Variance | Any | Unknown", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:573:9 - error: Return type, "Self@Covariance | Any | Unknown", is partially unknown (reportUnknownParameterType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Covariance | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Covariance | Any)" (reportUnknownMemberType)
-     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Covariance | Any | Unknown)) | Any | Unknown" (reportUnknownMemberType)
+     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Covariance | Any)) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:574:16 - error: Return type, "Self@Covariance | Any | Unknown", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:581:9 - error: Return type, "Self@Covariance | Any | Unknown", is partially unknown (reportUnknownParameterType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Covariance | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Covariance | Any)" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> Self@Covariance) | Any | Unknown" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Self@Covariance) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:582:16 - error: Return type, "Self@Covariance | Any | Unknown", is partially unknown (reportUnknownVariableType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Moment | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Moment | Any)" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> Unknown) | Any | Unknown" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Unknown) | Any" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_probability.py:636:9 - error: Return type, "Self@Moment | Any | Unknown", is partially unknown (reportUnknownParameterType)
-     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Moment | Any | Unknown)" (reportUnknownMemberType)
+     Type of "rewrite" is "(..., deep: bool = True) -> (Self@Moment | Any)" (reportUnknownMemberType)
-     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Moment | Any | Unknown)) | Any | Unknown" (reportUnknownMemberType)
+     Type of "rewrite" is "((..., deep: bool = True) -> (Self@Moment | Any)) | Any" (reportUnknownMemberType)

... (truncated 157 lines) ...

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:23:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:23:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:24:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:24:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:26:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:26:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:27:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:27:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:28:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:28:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:29:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:29:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:30:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:30:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:31:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vite/package.py:31:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:51:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:51:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:52:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:52:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:53:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:53:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:54:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:54:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:55:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:55:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:58:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vizglow/package.py:58:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmatch/package.py:18:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmatch/package.py:18:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmc/package.py:26:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmc/package.py:26:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmc/package.py:30:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmc/package.py:30:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmd/package.py:34:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmd/package.py:34:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmd/package.py:35:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
+   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmd/package.py:35:5 - error: Result of call expression is of type "((pkg: PackageBase) -> None)" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)
-   /tmp/mypy_primer/projects/spack/var/spack/repos/builtin/packages/vmd/package.py:36:5 - error: Result of call expression is of type "(pkg: PackageBase) -> None" and is not used; assign to variable "_" if this is intentional (reportUnusedCallResult)

... (truncated 3881 lines) ...

@NCBM
Copy link
Contributor

NCBM commented Sep 24, 2024

OK. We are generally ready now.

@DetachHead DetachHead merged commit 1b257ae into DetachHead:main Sep 25, 2024
15 checks passed
@DetachHead
Copy link
Owner

thanks!

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.

4 participants