From dede794d5171791a83ce527e6c30cb8900f2f455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B2=88=E5=94=81?= <52o@qq52o.cn>
Date: Fri, 9 Dec 2022 12:22:41 +0800
Subject: [PATCH] Chinese translation of PHP 8.2 release page (#734)
---
releases/8.2/common.php | 1 +
releases/8.2/languages/zh.php | 54 +++++++++++++++++++++++++++++++++++
releases/8.2/zh.php | 5 ++++
3 files changed, 60 insertions(+)
create mode 100644 releases/8.2/languages/zh.php
create mode 100644 releases/8.2/zh.php
diff --git a/releases/8.2/common.php b/releases/8.2/common.php
index b788fb9bd..c1e9038d5 100644
--- a/releases/8.2/common.php
+++ b/releases/8.2/common.php
@@ -43,6 +43,7 @@ function language_chooser(string $currentLang): void {
'en' => 'English',
'ru' => 'Russian',
'ja' => '日本語',
+ 'zh' => '简体中文',
];
// Print out the form with all the options
diff --git a/releases/8.2/languages/zh.php b/releases/8.2/languages/zh.php
new file mode 100644
index 000000000..fc0a4d3b9
--- /dev/null
+++ b/releases/8.2/languages/zh.php
@@ -0,0 +1,54 @@
+ 'PHP 8.2 是 PHP 语言的一个主版本更新。它包含了只读类、null、false 和 true 作为独立的类型、废弃动态属性、性能改进等。',
+ 'documentation' => '文档',
+ 'main_title' => '已发布!',
+ 'main_subtitle' => 'PHP 8.2 是 PHP 语言的一个主版本更新。
它包含了只读类、null、false 和 true 作为独立的类型、废弃动态属性、性能改进等。',
+ 'upgrade_now' => '更新到 PHP 8.2 !',
+ 'readonly_classes_title' => '只读类',
+ 'dnf_types_title' => '析取范式 (DNF) 类型',
+ 'dnf_types_description' => 'DNF 类型允许我们组合 union 和 intersection类型,遵循一个严格规则:组合并集和交集类型时,交集类型必须用括号进行分组。',
+ 'null_false_true_types_title' => '允许 null、false 和 true 作为独立类型',
+ 'random_title' => '新的“随机”扩展',
+ 'random_description' => '
“随机”扩展为随机数生成提供了一个新的面向对象的API。这个面向对象的API提供了几个类(“引擎”),提供对现代算法的访问,这些算法在对象中存储其状态,以允许多个独立的可播种序列,而不是依赖于使用 Mersenne Twister 算法的全局种子随机数发生器(RNG)。
+\Random\Randomizer 类提供了一个高级接口来使用引擎的随机性来生成随机整数、随机排列数组或字符串、选择随机数组键等。
动态属性的创建已被弃用,以帮助避免错误和拼写错误,除非该类通过使用 #[\AllowDynamicProperties] 属性来选择。stdClass 允许动态属性。
__get/__set 魔术方法的使用不受此更改的影响。
mysqli_execute_query 函数和 mysqli::execute_query 方法。',
+ 'new_attributes' => '新增 #[\AllowDynamicProperties] 和 #[\SensitiveParameter] 属性。',
+ 'new_zip' => '新增 ZipArchive::getStreamIndex、ZipArchive::getStreamName 和 ZipArchive::clearError 方法。',
+ 'new_reflection' => '新增 ReflectionFunction::isAnonymous 和 ReflectionMethod::hasPrototype 方法。',
+ 'new_functions' => '新增 curl_upkeep、memory_reset_peak_usage、ini_parse_quantity、libxml_get_external_entity_loader、sodium_crypto_stream_xchacha20_xor_ic 和 openssl_cipher_key_length 方法。',
+
+ 'bc_title' => '弃用和向后不兼容',
+ 'bc_string_interpolation' => '弃用 ${} 字符串插值。',
+ 'bc_utf8' => '弃用 utf8_encode 和 utf8_decode 函数。',
+ 'bc_datetime' => 'DateTime::createFromImmutable 和 DateTimeImmutable::createFromMutable 方法暂定返回类型为 static。',
+ 'bc_odbc' => 'ODBC 和 PDO_ODBC 扩展转义用户名和密码。',
+ 'bc_str_locale_sensitive' => 'strtolower 和 strtoupper 函数不再对语言环境敏感。',
+ 'bc_spl_enforces_signature' => 'SplFileObject::getCsvControl、SplFileObject::fflush、SplFileObject::ftell、SplFileObject::fgetc 和 SplFileObject::fpassthru 方法强制执行它们的签名。',
+ 'bc_spl_false' => 'SplFileObject::hasChildren 方法暂定返回类型为 false。',
+ 'bc_spl_null' => 'SplFileObject::getChildren 方法暂定返回类型为 null。',
+ 'bc_spl_deprecated' => '内置方法 SplFileInfo::_bad_state_ex 已被废弃。',
+
+ 'footer_title' => '更好的性能、更好的语法、改进类型安全。',
+ 'footer_content' => '+ 请访问 下载 页面下载 PHP 8.1 源代码。 + 在 PHP for Windows 站点中可找到 Windows 二进制文件。 + ChangeLog 中有变更历史记录清单。 +
++ PHP 手册中有 迁移指南。 + 请参考它描述的新功能详细清单、向后不兼容的变化。 +
', +]; diff --git a/releases/8.2/zh.php b/releases/8.2/zh.php new file mode 100644 index 000000000..7b8b06518 --- /dev/null +++ b/releases/8.2/zh.php @@ -0,0 +1,5 @@ +