Skip to content

Commit

Permalink
[zh-cn l10n] make up updates from 'type annotation' to 'type expression'
Browse files Browse the repository at this point in the history
  • Loading branch information
NCBM committed Nov 17, 2024
1 parent f96e4f3 commit 14dfbd3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/pyright-internal/src/localization/package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"assignmentTargetExpr": "表达式不能被赋值",
"asyncNotInAsyncFunction": "异步函数之外不允许使用 \"async for/with/...\"",
"awaitIllegal": "使用 `await` 需要 Python 3.5 或更高版本",
"awaitNotAllowed": "类型注解中不能使用 `await`",
"awaitNotAllowed": "类型表达式中不能使用 `await`",
"awaitNotInAsync": "仅允许在异步函数内使用 `await`",
"backticksIllegal": "Python 3.x 中不支持使用反引号包围的表达式;请改用 repr(...)",
"baseClassCircular": "类不能继承自身",
Expand All @@ -59,7 +59,7 @@
"baseClassMethodTypeIncompatible": "方法 \"{name}\" 的定义与 \"{classType}\" 类的基类不兼容",
"baseClassUnknown": "未知类型的基类覆盖了子类的类型",
"baseClassVariableTypeIncompatible": "变量 \"{name}\" 的定义与 \"{classType}\" 类的基类不兼容",
"binaryOperationNotAllowed": "类型注解中不允许使用二元运算符",
"binaryOperationNotAllowed": "类型表达式中不允许使用二元运算符",
"bindTypeMismatch": "无法绑定方法 \"{methodName}\",因为 \"{type}\" 不能赋值给 \"{paramName}\" 参数",
"breakInExceptionGroup": "不允许在 `except*` 语句块中使用 `break`",
"breakOutsideLoop": "`break` 只能在循环中使用",
Expand All @@ -76,7 +76,7 @@
"classImplicitlyAbstract": "隐式抽象类 \"{type}\" 继承自抽象类且未实现所有抽象符号。如果确有必要,请向其基类列表中添加 `ABC` 或使用 `metaclass=ABCMeta`",
"classImplicitlyProtocol": "隐式 `Protocol` 类 \"{type}\" 继承自 `Protocol` 且未实现所有抽象符号。如果确有必要,请向其基类列表中添加 `Protocol` 或 `ABC` 或使用 `metaclass=ABCMeta`",
"classMethodClsParam": "类方法应接受 `cls` 参数",
"classNotRuntimeSubscriptable": "在 \"{name}\" 类上使用的下标将导致运行时异常,应将整个类型注解写成字符串形式",
"classNotRuntimeSubscriptable": "在 \"{name}\" 类上使用的下标将导致运行时异常,应将整个类型表达式写成字符串形式",
"classPatternBuiltInArgPositional": "当使用类本身进行模式匹配时,随后的括号内部只能接受位置参数形式的子模式",
"classPatternPositionalArgCount": "\"{type}\" 类的位置模式太多:应为 {expected} 个而非 {received} 个",
"classPatternTypeAlias": "无法在类模式中使用已特化的类型别名 \"{type}\"",
Expand Down Expand Up @@ -138,7 +138,7 @@
"deprecatedPropertySetter": "\"{name}\" 属性的 `setter` 已弃用",
"deprecatedType": "此类型自 Python {version} 起已弃用;请改用 \"{replacement}\"",
"dictExpandIllegalInComprehension": "推导式中不允许展开字典表达式",
"dictInAnnotation": "类型注解中不允许使用字典表达式",
"dictInAnnotation": "类型表达式中不允许使用字典表达式",
"dictKeyValuePairs": "字典项必须包含键值对",
"dictUnpackIsNotMapping": "字典解包运算符需要 `Mapping` 对象",
"dunderAllSymbolNotPresent": "\"{name}\" 已在 `__all__` 中声明,但未在模块中定义",
Expand Down Expand Up @@ -293,7 +293,7 @@
"lambdaReturnTypePartiallyUnknown": "该 `lambda` 的返回类型 \"{returnType}\" 部分未知",
"lambdaReturnTypeUnknown": "该 `lambda` 的返回类型未知",
"listAssignmentMismatch": "无法将 \"{type}\" 类型的表达式赋值给目标列表",
"listInAnnotation": "类型注解中不允许使用列表表达式",
"listInAnnotation": "类型表达式中不允许使用列表表达式",
"literalEmptyArgs": "`Literal` 后应有一个或多个类型参数",
"literalNamedUnicodeEscape": "`Literal` 字符串注解中不支持 `Unicode` 名称转义序列(\"\\N{...}\")",
"literalNotAllowed": "如果不传入类型参数,则 `Literal` 不能用于此上下文",
Expand Down Expand Up @@ -464,7 +464,7 @@
"staticClsSelfParam": "静态方法不应采用 `self` 或 `cls` 参数",
"stdlibModuleOverridden": "\"{path}\" 覆盖了标准库模块 \"{name}\"",
"stringNonAsciiBytes": "不允许使用含有非 ASCII 字符(以字节为单位)的字符串字面量",
"stringNotSubscriptable": "不能对着字符串形式的类型注解取下标;建议将整个注解括在引号中",
"stringNotSubscriptable": "不能对着字符串形式的类型表达式取下标;建议将整个注解括在引号中",
"stringUnsupportedEscape": "字符串字面量中有不受支持的转义序列",
"stringUnterminated": "字符串未终止",
"stubFileMissing": "找不到 \"{importName}\" 的存根文件",
Expand All @@ -479,12 +479,12 @@
"symbolIsUnbound": "\"{name}\" 未绑定",
"symbolIsUndefined": "\"{name}\" 未定义",
"symbolOverridden": "\"{name}\" 覆写了 \"{className}\" 类中的同名符号",
"ternaryNotAllowed": "类型注解中不允许使用三元表达式",
"ternaryNotAllowed": "类型表达式中不允许使用三元表达式",
"totalOrderingMissingMethod": "类必须定义 `__lt__`、`__le__`、`__gt__` 或 `__ge__` 之一才能使用 `@total_ordering`",
"trailingCommaInFromImport": "括号外不允许使用尾随逗号",
"tryWithoutExcept": "`Try` 语句必须至少有一个 `except` 或 `finally` 子句",
"tupleAssignmentMismatch": "无法将类型为 \"{type}\" 的表达式赋值给目标元组",
"tupleInAnnotation": "类型注解中不允许使用元组表达式",
"tupleInAnnotation": "类型表达式中不允许使用元组表达式",
"tupleIndexOutOfRange": "对 \"{type}\" 类型使用的索引值 \"{index}\" 超出了取值范围",
"typeAliasIllegalExpressionForm": "定义 `TypeAlias` 时使用的表达式形式无效",
"typeAliasIsRecursiveDirect": "`TypeAlias` \"{name}\" 不能在其定义中引用自身",
Expand All @@ -511,7 +511,7 @@
"typeArgsTooMany": "为 \"{name}\" 提供的类型参数太多:应有 {expected} 个,但有 {received} 个",
"typeAssignmentMismatch": "\"{sourceType}\" 类型不匹配声明的 \"{destType}\" 类型",
"typeAssignmentMismatchWildcard": "\"{name}\" 导入符号的类型为 \"{sourceType}\",与声明的 \"{destType}\" 类型不兼容",
"typeCallNotAllowed": "`type()` 调用不应用于类型注解",
"typeCallNotAllowed": "`type()` 调用不应用于类型表达式",
"typeCheckOnly": "\"{name}\" 已被 `@type_check_only` 装饰,只能在类型注解中使用",
"typeCommentDeprecated": "类型注释已弃用;请改用类型注解",
"typeExpectedClass": "此处应为类而非 \"{type}\"",
Expand Down Expand Up @@ -593,7 +593,7 @@
"unaccessedSymbol": "\"{name}\" 未使用",
"unaccessedVariable": "变量 \"{name}\" 未使用",
"unannotatedFunctionSkipped": "已跳过对未标类型的函数 \"{name}\" 的分析",
"unaryOperationNotAllowed": "类型注解中不允许使用一元运算符",
"unaryOperationNotAllowed": "类型表达式中不允许使用一元运算符",
"unexpectedAsyncToken": "`def`、`with` 或 `for` 应在 `async` 之后",
"unexpectedExprToken": "表达式末尾有错误的 `Token`",
"unexpectedIndent": "缩进有误",
Expand All @@ -619,7 +619,7 @@
"unpackExpectedTypeVarTuple": "`Unpack` 需要 `TypeVarTuple` 或元组类型参数",
"unpackExpectedTypedDict": "`Unpack` 需要 `TypedDict` 类型参数",
"unpackIllegalInComprehension": "推导式中不允许解包操作",
"unpackInAnnotation": "类型注解中不允许解包操作符",
"unpackInAnnotation": "类型表达式中不允许解包操作符",
"unpackInDict": "字典中不允许解包操作",
"unpackInSet": "集合内不允许解包操作符",
"unpackNotAllowed": "此上下文中不允许使用 `Unpack`",
Expand Down

0 comments on commit 14dfbd3

Please sign in to comment.