From e825d73b9a03d9eaeb5eb0125385ddd71ae662f9 Mon Sep 17 00:00:00 2001 From: shynome Date: Sun, 18 Jul 2021 18:19:11 +0800 Subject: [PATCH 1/4] add zh-cn lang --- resources/lang/zh-cn/auth.php | 19 ++++ resources/lang/zh-cn/exception.php | 11 +++ resources/lang/zh-cn/helpcenter.php | 28 ++++++ resources/lang/zh-cn/navmenu.php | 19 ++++ resources/lang/zh-cn/notification.php | 12 +++ resources/lang/zh-cn/pagination.php | 19 ++++ resources/lang/zh-cn/passwords.php | 22 +++++ resources/lang/zh-cn/profile.php | 15 ++++ resources/lang/zh-cn/site.php | 20 +++++ resources/lang/zh-cn/timeline.php | 7 ++ resources/lang/zh-cn/validation.php | 122 ++++++++++++++++++++++++++ 11 files changed, 294 insertions(+) create mode 100644 resources/lang/zh-cn/auth.php create mode 100644 resources/lang/zh-cn/exception.php create mode 100644 resources/lang/zh-cn/helpcenter.php create mode 100644 resources/lang/zh-cn/navmenu.php create mode 100644 resources/lang/zh-cn/notification.php create mode 100644 resources/lang/zh-cn/pagination.php create mode 100644 resources/lang/zh-cn/passwords.php create mode 100644 resources/lang/zh-cn/profile.php create mode 100644 resources/lang/zh-cn/site.php create mode 100644 resources/lang/zh-cn/timeline.php create mode 100644 resources/lang/zh-cn/validation.php diff --git a/resources/lang/zh-cn/auth.php b/resources/lang/zh-cn/auth.php new file mode 100644 index 000000000..dd785d3cf --- /dev/null +++ b/resources/lang/zh-cn/auth.php @@ -0,0 +1,19 @@ + '这些凭证与我们的记录不符。', + 'throttle' => '您尝试得错误次数过多,请在 :seconds 秒后重试。', + +]; diff --git a/resources/lang/zh-cn/exception.php b/resources/lang/zh-cn/exception.php new file mode 100644 index 000000000..f754eeeaf --- /dev/null +++ b/resources/lang/zh-cn/exception.php @@ -0,0 +1,11 @@ + [ + 'invalid' => [ + 'album' => '必须包含一张照片,视频或多张照片。', + ], + ], + +]; diff --git a/resources/lang/zh-cn/helpcenter.php b/resources/lang/zh-cn/helpcenter.php new file mode 100644 index 000000000..ee85d3abe --- /dev/null +++ b/resources/lang/zh-cn/helpcenter.php @@ -0,0 +1,28 @@ + '帮助中心', + 'whatsnew' => '有什么新发现', + + 'gettingStarted' => '开始', + 'sharingMedia' => '共享媒体', + 'profile' => '主页', + 'stories' => '故事集', + 'hashtags' => '标签', + 'discover' => '发现', + 'directMessages' => '直接信息', + 'timelines' => '时间轴', + 'embed' => '嵌入', + + 'communityGuidelines' => '社区指南', + 'whatIsTheFediverse' => 'fediverse 是什么?', + 'controllingVisibility' => '控制可见性', + 'blockingAccounts' => '封锁账户', + 'safetyTips' => '安全提示', + 'reportSomething' => '报告某事', + 'dataPolicy' => '数据政策', + + 'taggingPeople' => '标签人物' + +]; diff --git a/resources/lang/zh-cn/navmenu.php b/resources/lang/zh-cn/navmenu.php new file mode 100644 index 000000000..e9221d08c --- /dev/null +++ b/resources/lang/zh-cn/navmenu.php @@ -0,0 +1,19 @@ + '搜索', + 'home' => '首页', + 'local' => '本地', + 'network' => '网络', + 'discover' => '发现', + 'viewMyProfile' => '浏览我的主页', + 'myProfile' => '我的主页', + 'myTimeline' => '我的时间线', + 'publicTimeline' => '公开的时间线', + 'remoteFollow' => '远程关注', + 'settings' => '设置', + 'admin' => '管理', + 'logout' => '退出', + 'directMessages' => '直接信息', + 'composePost' => '发表文字', +]; diff --git a/resources/lang/zh-cn/notification.php b/resources/lang/zh-cn/notification.php new file mode 100644 index 000000000..d4c1c75b7 --- /dev/null +++ b/resources/lang/zh-cn/notification.php @@ -0,0 +1,12 @@ + '喜欢你的帖子', + 'likedComment' => '喜欢你的评论', + 'startedFollowingYou' => '开始关注你', + 'commented' => '评论了你的帖子', + 'mentionedYou' => '提到你', + 'shared' => '分享了你的贴子', + +]; diff --git a/resources/lang/zh-cn/pagination.php b/resources/lang/zh-cn/pagination.php new file mode 100644 index 000000000..20ce334e6 --- /dev/null +++ b/resources/lang/zh-cn/pagination.php @@ -0,0 +1,19 @@ + '« 上一个', + 'next' => '下一个 »', + +]; diff --git a/resources/lang/zh-cn/passwords.php b/resources/lang/zh-cn/passwords.php new file mode 100644 index 000000000..d5c5b3a60 --- /dev/null +++ b/resources/lang/zh-cn/passwords.php @@ -0,0 +1,22 @@ + '密码必须至少为六个字符并与确认密码匹配。', + 'reset' => '您的密码已重置!', + 'sent' => '如果您的电子邮件地址存在于我们的数据库中,您将在几分钟后在您的电子邮件地址收到密码恢复链接。如果您没有收到此电子邮件,请检查您的垃圾邮件文件夹。', + 'token' => '此密码重置令牌无效。', + 'user' => '如果您的电子邮件地址存在于我们的数据库中,您将在几分钟后在您的电子邮件地址收到密码恢复链接。如果您没有收到此电子邮件,请检查您的垃圾邮件文件夹。', + +]; diff --git a/resources/lang/zh-cn/profile.php b/resources/lang/zh-cn/profile.php new file mode 100644 index 000000000..6639272d0 --- /dev/null +++ b/resources/lang/zh-cn/profile.php @@ -0,0 +1,15 @@ + '这个用户还没发表任何帖子', + 'emptyFollowers' => '这个用户还没有任何关注者', + 'emptyFollowing' => '此用户尚未关注任何人!', + 'emptySaved' => '您还没有保存任何帖子!', + 'savedWarning' => '仅有自己可见', + 'privateProfileWarning' => '此帐户是私有的', + 'alreadyFollow' => '已经关注 :username?', + 'loginToSeeProfile' => '查看他们的照片和视频。', + + 'status.disabled.header' => '主页不可用', + 'status.disabled.body' => '抱歉,此个人主页暂时未开放。请稍后再试。', +]; diff --git a/resources/lang/zh-cn/site.php b/resources/lang/zh-cn/site.php new file mode 100644 index 000000000..c4081a8f4 --- /dev/null +++ b/resources/lang/zh-cn/site.php @@ -0,0 +1,20 @@ + '关于', + 'help' => '帮助', + 'language' => '语言', + 'fediverse' => 'Fediverse', + 'opensource' => '开源代码', + 'terms' => '服务条款', + 'privacy' => '隐私', + 'l10nWip' => '我们仍在进行本地化支持', + 'currentLocale' => '当前语言环境', + 'selectLocale' => '选择一种支持的语言', + 'contact' => '联系', + 'contact-us' => '联系我们', + 'places' => '地点', + 'profiles' => '简介', + +]; diff --git a/resources/lang/zh-cn/timeline.php b/resources/lang/zh-cn/timeline.php new file mode 100644 index 000000000..d7b573c92 --- /dev/null +++ b/resources/lang/zh-cn/timeline.php @@ -0,0 +1,7 @@ + '您的时间线是空的', + +]; diff --git a/resources/lang/zh-cn/validation.php b/resources/lang/zh-cn/validation.php new file mode 100644 index 000000000..3ec1dfe3c --- /dev/null +++ b/resources/lang/zh-cn/validation.php @@ -0,0 +1,122 @@ + ':attribute 必须接受', + 'active_url' => ':attribute 不是有效的url。', + 'after' => ':attribute 必须是在 :date 之后的日期。', + 'after_or_equal' => ':attribute 必须是在 :date 当天或之后的日期.', + 'alpha' => ':attribute 只能包含字母', + 'alpha_dash' => ':attribute 只能包含字母、数字和破折号。', + 'alpha_num' => ':attribute 只能包含字母和数字', + 'array' => ':attribute 必须是数组', + 'before' => ':attribute 必须是在 :date 之前的日期', + 'before_or_equal' => ':attribute 必须是在 :date 当天或之前的日期', + 'between' => [ + 'numeric' => ':attribute 必须在 :min 到 :max 之间', + 'file' => ':attribute 必须在 :min 到 :max KB 之间.', + 'string' => ':attribute 必须在 :min 到 :max 个字母之间.', + 'array' => ':attribute 必须在 :min 到 :max 个元素之间', + ], + 'boolean' => ':attribute 字段必须为真或假。', + 'confirmed' => ':attribute 验证不匹配', + 'date' => ':attribute 不是有效日期', + 'date_format' => ':attribute 不符合格式 :format', + 'different' => ':attribute 和 :other 必须不同', + 'digits' => ':attribute 必须有 :digits 位', + 'digits_between' => ':attribute 必须在 :min 到 :max 位之间', + 'dimensions' => ':attribute 图片尺寸无效', + 'distinct' => ':attribute 字段有重复的值。', + 'email' => ':attribute 必须是有效的邮件地址', + 'exists' => '选择的 :attribute 无效', + 'file' => ':attribute 必须是文件。', + 'filled' => ':attribute 字段必须有值。', + 'image' => ':attribute 必须是图像。', + 'in' => '选定的 :attribute 无效。', + 'in_array' => ':attribute 字段在 :other 中不存在', + 'integer' => ':attribute 必须是整数。', + 'ip' => ':attribute 必须是有效的 IP 地址', + 'ipv4' => ':attribute 必须是有效的 IPv4 地址。', + 'ipv6' => ':attribute 必须是有效的 IPv6 地址。', + 'json' => ':attribute 必须是有效的 JSON 字符串。', + 'max' => [ + 'numeric' => ':attribute 不能大于 :max', + 'file' => ':attribute 不能大于 :max KB', + 'string' => ':attribute 不能多于 :max 个字符', + 'array' => ':attribute 不能多于 :max 个项目', + ], + 'mimes' => ':attribute 必须为该类型的文件: :values.', + 'mimetypes' => ':attribute 必须为该类型的文件: :values.', + 'min' => [ + 'numeric' => ':attribute 必须至少 :min', + 'file' => ':attribute 必须至少 :min KB', + 'string' => ':attribute 必须至少 :min 个字符', + 'array' => ':attribute 必须至少 :min 个项目', + ], + 'not_in' => '选定的 :attribute 无效。', + 'not_regex' => ':attribute 格式无效。', + 'numeric' => ':attribute 必须是数字。', + 'present' => ':attribute 字段必须存在', + 'regex' => ':attribute 格式无效。', + 'required' => ':attribute 字段是必填的。', + 'required_if' => ':attribute 字段在 :other 为 :value 时是必填的。', + 'required_unless' => ':attribute 字段是必填的,除非 :other 为 :values。', + 'required_with' => '当 :values 存在时, :attribute 字段是必填的。', + 'required_with_all' => '当 :values 存在时, :attribute 字段是必填的。', + 'required_without' => '当 :values 不存在时, :attribute 字段是必填的。', + 'required_without_all' => '当没有 :values 存在时, :attribute 字段是必填的。', + 'same' => ':attribute 和 :other 必须相同', + 'size' => [ + 'numeric' => ':attribute 必须是: :size.', + 'file' => ':attribute 必须是: :size KB.', + 'string' => ':attribute 必须是: :size 个字符', + 'array' => ':attribute 必须包含: :size 个项目', + ], + 'string' => ':attribute 必须是字符串。', + 'timezone' => ':attribute 必须是有效的区域。', + 'unique' => ':attribute 已被使用。', + 'uploaded' => ':attribute 上传失败。', + 'url' => ':attribute 格式无效。', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => '自定义消息', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; From e56da358266c6b0d8da3c7e57939359ce9cf3514 Mon Sep 17 00:00:00 2001 From: "nogafam.es Admin" Date: Tue, 27 Jul 2021 14:09:17 +0200 Subject: [PATCH 2/4] Fix PWA implementation to support standard using html link tag --- resources/views/site/index.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/site/index.blade.php b/resources/views/site/index.blade.php index 2997096f8..9457e74bc 100644 --- a/resources/views/site/index.blade.php +++ b/resources/views/site/index.blade.php @@ -20,6 +20,7 @@ + From 13f65629e13376e1d0810af394747dec05f72c8a Mon Sep 17 00:00:00 2001 From: Wv5twkFEKh54vo4tta9yu7dHa3 <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com> Date: Thu, 9 Sep 2021 14:51:38 +0200 Subject: [PATCH 3/4] Fix error 500 on image upload Without this missing import, the server threw "Class 'App\Http\Controllers\Api\UserSetting' not found" when trying to upload images. --- app/Http/Controllers/Api/ApiV1Controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 4e7ad2bb8..5f85e7226 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -21,6 +21,7 @@ use App\{ Status, StatusHashtag, User, + UserSetting, UserFilter, }; use League\Fractal; From 0fc3a1d6a5bfaae0f300e2ca79ed65fee8fd91ea Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 10 Sep 2021 21:08:04 -0600 Subject: [PATCH 4/4] Formatting --- app/Http/Controllers/Api/ApiV1Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 526adb947..b6702c696 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -21,7 +21,7 @@ use App\{ Status, StatusHashtag, User, - UserSetting, + UserSetting, UserFilter, }; use League\Fractal;