☰
Laravel Localizations 乌兹别克语(uz_Latn)语言包缺失状态解析与本地化补齐指南
2026/9/28 2:20:52 网站建设 项目流程
  • 后端

【免费下载链接】lang

List of 128 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel UI.

项目地址:https://gitcode.com/gh_mirrors/la/lang
点击查看免费下载

本篇指南围绕 Laravel Localizations(laravel-lang/lang)仓库中的 docs/statuses/uz_Latn.md 展开,系统梳理乌兹别克语(拉丁字母,uz_Latn)语言包当前尚未本地化的 69 个翻译条目,逐一解释其来源模块(Laravel Framework 验证器、Laravel Passkeys、Nova、Jetstream 等)与补译时的注意点。读完本文,你将能读懂该仓库所有语言的状态报告结构,定位uz_Latn语言包各文件中的待翻译键,并基于 composer.json 与 src/Plugin.php 所展示的发布机制完成本地化补齐与校验。

仓库与语言包背景

Laravel Localizations 为 Laravel 生态提供开箱即用的多语言翻译文件。根据仓库元数据,项目覆盖 128 种语言,面向 Laravel Framework、Laravel Jetstream、Laravel Fortify、Laravel Breeze、Laravel Cashier、Laravel Nova 与 Laravel UI 等多个组件;composer.json 中的require还声明了laravel-lang/publisher: ^16.0作为发布依赖,require-dev中则包含laravel-lang/status-generator: ^2.11与phpunit/phpunit,说明本仓库的状态报告与测试均由自动化工具生成与维护(scripts.format中vendor/bin/lang sync即为同步入口)。

乌兹别克语在本仓库存在两个变体目录:locales/uz_Latn(拉丁字母)与locales/uz_Cyrl(西里尔字母),在 docs/status.md 的总览表中均以 ❗ 标记为尚有缺失。uz_Latn目录下共 5 个文件,对应三种消息格式:

  • locales/uz_Latn/json.json:前端(Vue/Inertia 组件、Nova UI)使用的 JSON 消息;
  • locales/uz_Latn/json-inline.json:内联 JSON 消息(面向lang/{locale}.json场景);
  • locales/uz_Latn/php.json:PHP 验证器消息(lang/{locale}/validation.php);
  • locales/uz_Latn/php-inline.json:PHP 内联验证消息(lang/{locale}/validation-inline.php);
  • locales/uz_Latn/_excludes.json:排除清单。

读懂状态报告:uz_Latn 当前共缺失 69 条

文档本体 以# uz_Latn为标题,直接给出结论All missed: 69,并按消息格式拆分为三个区块:json缺失 14 条、php-inline缺失 41 条、php缺失 14 条(14 + 41 + 14 = 69)。

对比语言包实际文件可以推断其判定口径:例如 locales/uz_Latn/json.json 中"Administrator users can perform any action."键虽然存在,但值仍是英文原句(未翻译成乌兹别克语),因此被状态生成器计入缺失;同样,locales/uz_Latn/php.json 中array_keys、base64等键的值也仍为英文。也就是说,"缺失" 既包括键不存在,也包括值未真正本地化——凡翻译值仍为英文原文的条目都会被统计为 missed。整体完成率可在 docs/status.md 顶部看到:全部语言本地化完成97.82%(147.1K / 150.4K),而uz_Latn属于还需补译的语言之一。

json 区块:缺失 14 条

该区块对应 locales/uz_Latn/json.json,缺失条目集中在四个主题:Jetstream/Nova 的角色与账号文案、Laravel Passkeys 通行密钥消息、Laravel Frameworkenv:encrypt环境加密命令消息、以及邮箱验证类文案。其中 Passkeys 相关条目来自 src/Plugin.php 中注册的Plugins\Passkeys\Main::class插件(对应 source/passkeys 目录),环境加密条目则来自 Framework 的php artisan env:encrypt命令输出。完整清单如下:

Key当前值(英文)
Administrator users can perform any action.Administrator users can perform any action.
Invalid credential format.Invalid credential format.
Passkey not recognized. It may have been removed from your account.Passkey not recognized. It may have been removed from your account.
Passkey registration session expired. Please try again.Passkey registration session expired. Please try again.
Passkey verification session expired. Please try again.Passkey verification session expired. Please try again.
Reset your passwordReset your password
The existing encrypted environment file is not in readable format. Use --force to overwrite it.The existing encrypted environment file is not in readable format. Use --force to overwrite it.
The existing encryption key is required to update the encrypted environment file.The existing encryption key is required to update the encrypted environment file.
Unable to register passkey. Please try again.Unable to register passkey. Please try again.
Unable to register this passkey.Unable to register this passkey.
Unable to sign in with this account.Unable to sign in with this account.
Unable to verify passkey. Please try again.Unable to verify passkey. Please try again.
Unable to write the encrypted environment file.Unable to write the encrypted environment file.
Verify your email addressVerify your email address

php-inline 区块:缺失 41 条

该区块对应 locales/uz_Latn/php-inline.json,绝大多数是 Laravel Framework 11 起陆续加入的新验证规则消息:array_keys、ascii、base64、can、contains、decimal、doesnt_*、encoding、extensions、hex_color、in_array_keys、list、lowercase、max_digits、min_digits、missing*、present*、prohibited*、required_array_keys、required_if_accepted、required_if_declined、ulid、uppercase等,外加 Laravel 密码强度校验的password.*系列(letters/mixed/numbers/symbols/uncompromised,对应Password::min()->letters()等规则)。完整清单如下:

Key当前值(英文)
accepted_ifThis field must be accepted when :other is :value.
any_ofThis field is invalid.
array_keysThis field must only contain the following keys: :values.
asciiThis field must only contain single-byte alphanumeric characters and symbols.
base64This field must be a valid Base64 string.
canThis field contains an unauthorized value.
containsThis field is missing a required value.
decimalThis field must have :decimal decimal places.
doesnt_containThis field must not contain any of the following: :values.
doesnt_end_withThis field must not end with one of the following: :values.
doesnt_start_withThis field must not start with one of the following: :values.
encodingThis field must be encoded in :encoding.
extensionsThis field must have one of the following extensions: :values.
hex_colorThis field must be a valid hexadecimal color.
in_array_keysThis field must contain at least one of the following keys: :values.
listThis field must be a list.
lowercaseThis field must be lowercase.
max_digitsThis field must not have more than :max digits.
min_digitsThis field must have at least :min digits.
missingThis field must be missing.
missing_ifThis field must be missing when :other is :value.
missing_unlessThis field must be missing unless :other is :value.
missing_withThis field must be missing when :values is present.
missing_with_allThis field must be missing when :values are present.
password.lettersThis field must contain at least one letter.
password.mixedThis field must contain at least one uppercase and one lowercase letter.
password.numbersThis field must contain at least one number.
password.symbolsThis field must contain at least one symbol.
password.uncompromisedThe given field has appeared in a data leak. Please choose a different field.
present_ifThis field must be present when :other is :value.
present_unlessThis field must be present unless :other is :value.
present_withThis field must be present when :values is present.
present_with_allThis field must be present when :values are present.
prohibited_if_acceptedThis field is prohibited when :other is accepted.
prohibited_if_declinedThis field is prohibited when :other is declined.
prohibitsThis field prohibits :other from being present.
required_array_keysThis field must contain entries for: :values.
required_if_acceptedThis field is required when :other is accepted.
required_if_declinedThis field is required when :other is declined.
ulidThis field must be a valid ULID.
uppercaseThis field must be uppercase.

php 区块:缺失 14 条

该区块对应 locales/uz_Latn/php.json,与 php-inline 高度重叠(同一批新验证规则),区别仅在消息模板使用了:attribute占位符而非 "This field" 表述,属于validation.php的传统格式。完整清单如下:

Key当前值(英文)
array_keysThe :attribute field must only contain the following keys: :values.
base64The :attribute field must be a valid Base64 string.
encodingThe :attribute field must be encoded in :encoding.
password.uncompromisedThe given :attribute has appeared in a data leak. Please choose a different :attribute.
present_ifThe :attribute field must be present when :other is :value.
present_unlessThe :attribute field must be present unless :other is :value.
present_withThe :attribute field must be present when :values is present.
present_with_allThe :attribute field must be present when :values are present.
prohibited_if_acceptedThe :attribute field is prohibited when :other is accepted.
prohibited_if_declinedThe :attribute field is prohibited when :other is declined.
prohibitsThe :attribute field prohibits :other from being present.
required_array_keysThe :attribute field must contain entries for: :values.
required_if_acceptedThe :attribute field is required when :other is accepted.
required_if_declinedThe :attribute field is required when :other is declined.

补译要点:占位符与双变体一致性

补齐uz_Latn时需遵守两条硬性约束,二者都可以从仓库现有翻译文件得到印证:

  1. 保留全部占位符。json与php-inline使用:other、:value、:values、:min、:max、:decimal、:encoding、:count等占位符,php使用:attribute(属性名)与:other/:values(关联字段)。参考已翻译条目,例如 locales/uz_Latn/php.json 中accepted_if译为:other :value bo‘lsa, :attribute qabul qilinishi kerak.,即占位符必须原样保留、仅替换文案本身。乌兹别克语拉丁字母正写法(如oʻ/gʻ的撇号字形)也应与同文件既有条目保持一致。

  2. 维持与已翻译条目的语义一致性。缺失条目并非全新概念,多数与现有已翻译条目同族,例如required_if(已译为:Other maydoni :value ga teng bo‘lsa, :attribute maydoni to‘ldirilishi shart.)可作为required_if_accepted、required_if_declined的句式模板;present(已译为:Attribute maydoni ko‘rsatilishi kerak.)可作为present_*系列的基础。password.letters/number/symbols则与 locales/uz_Latn/json-inline.json 中已翻译的The :attribute must contain at least one letter.等条目互为表里,可统一措辞。

  3. 双变体一致性提醒。仓库同时维护uz_Latn与uz_Cyrl两个变体,补译拉丁字母版本时,建议对照西里尔字母版本(locales/uz_Cyrl)核对术语选择,避免同一概念在两种正写法下表述分裂。

如何安装、校验与贡献

  • 安装与使用:本包通过 Composer 分发,包名为laravel-lang/lang(见 composer.json 的name字段,要求 PHP^8.2并依赖laravel-lang/publisher: ^16.0)。项目通过extra.laravel.providers自动注册LaravelLang\Lang\ServiceProvider,配合发布器可将locales/uz_Latn下的翻译发布到应用lang/目录;由于uz_Latn仍有缺失,建议应用侧以发布后的语言包为基座,在lang/uz_Latn/中覆盖补齐上述 69 个键值。
  • 校验与回归:仓库自带测试基座 tests/PluginTest.php(继承LaravelLang\StatusGeneratorTests\TestCase),可运行composer test(即vendor/bin/phpunit --colors=always)验证插件与语言包结构完整性;composer format(vendor/bin/lang sync)则用于同步上游翻译与状态报告。
  • 查看其他语言:全部语言的状态报告集中在 docs/statuses 目录,总览见 docs/status.md;与uz_Latn同属突厥语系、可作翻译参考的有tr(土耳其语)、az(阿塞拜疆语)、kk(哈萨克语)等语言包。

结语

uz_Latn的 69 条缺失并非零散遗漏,而是高度集中于 Laravel 近几个版本新增的验证规则(present_*、prohibited_*、array_keys、base64、ulid等)、Passkeys 通行密钥模块以及env:encrypt命令文案。理解 docs/statuses/uz_Latn.md 的区块划分与判定口径后,即可按 json → php-inline → php 的顺序,参照同族已翻译条目与 locales/uz_Latn 既有文风快速补齐,并通过composer test回归验证,最终使该语言在 docs/status.md 总览中由 ❗ 转为 ✔。

  • 后端

【免费下载链接】lang

List of 128 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel UI.

项目地址:https://gitcode.com/gh_mirrors/la/lang
点击查看免费下载

相关推荐

上一篇:5分钟快速上手Open XML SDK:从零开始的Office文档编程终极指南
下一篇:2023年必学终端UI框架:SwiftTUI入门到精通教程

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询