From b5a83d9e8b39b05432ce087dbc08afc42b2c7029 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 2 Oct 2019 13:25:35 -0600 Subject: [PATCH 1/5] Update authorize view --- resources/views/vendor/passport/authorize.blade.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/views/vendor/passport/authorize.blade.php b/resources/views/vendor/passport/authorize.blade.php index 7eeae354..2e7ec165 100644 --- a/resources/views/vendor/passport/authorize.blade.php +++ b/resources/views/vendor/passport/authorize.blade.php @@ -44,13 +44,13 @@
-
+
Authorization Request
-

{{ $client->name }} is requesting permission to access your account.

+

{{ $client->name }} is requesting permission to access your {{request()->user()->username}} account.

@if (count($scopes) > 0) @@ -85,6 +85,11 @@
+
+

Click here to log out of this account.

+
From e940c8093151d5de16a80d76bf5df3834d6680bb Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 3 Oct 2019 08:54:52 +0800 Subject: [PATCH 2/5] Add more zh-TW translations. --- .../vendor/backup/zh-TW/notifications.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 resources/lang/vendor/backup/zh-TW/notifications.php diff --git a/resources/lang/vendor/backup/zh-TW/notifications.php b/resources/lang/vendor/backup/zh-TW/notifications.php new file mode 100644 index 00000000..a8aa7e47 --- /dev/null +++ b/resources/lang/vendor/backup/zh-TW/notifications.php @@ -0,0 +1,35 @@ + '例外訊息: :message', + 'exception_trace' => '例外追蹤: :trace', + 'exception_message_title' => '例外訊息', + 'exception_trace_title' => '例外追蹤', + + 'backup_failed_subject' => '備份 :application_name 失敗', + 'backup_failed_body' => '重要:備份 :application_name 時遇到錯誤', + + 'backup_successful_subject' => '成功備份 :application_name', + 'backup_successful_subject_title' => '成功的新備份!', + 'backup_successful_body' => '好消息, :application_name 的新備份成功地在名為 :disk_name 的磁碟上建立完成了。', + + 'cleanup_failed_subject' => '清理 :application_name 的備份失敗。', + 'cleanup_failed_body' => '清理 :application_name 的備份時遇到錯誤。', + + 'cleanup_successful_subject' => '清理 :application_name 的備份成功', + 'cleanup_successful_subject_title' => '清除備份成功!', + 'cleanup_successful_body' => '清除在名為 :disk_name 的磁碟上的 :application_name 備份成功了。', + + 'healthy_backup_found_subject' => ':application_name 在磁碟 :disk_name 上的備份是健康的', + 'healthy_backup_found_subject_title' => ':application_name 的備份是健康的', + 'healthy_backup_found_body' => ':application_name 的備份看起來是健康的。幹得好!', + + 'unhealthy_backup_found_subject' => '重要::application_name 的備份有問題', + 'unhealthy_backup_found_subject_title' => '重要::application_name 的備份有問題。 :problem', + 'unhealthy_backup_found_body' => ':application_name 在磁碟 :disk_name 上的備份是有問題的的。', + 'unhealthy_backup_found_not_reachable' => '備份目的地不可用。 :error', + 'unhealthy_backup_found_empty' => '完全沒有此應用程式的備份。', + 'unhealthy_backup_found_old' => '在 :date 製作的最新備份太舊了。', + 'unhealthy_backup_found_unknown' => '抱歉,無法確定確切的原因。', + 'unhealthy_backup_found_full' => '備份使用太多儲存空間了。目前的使用量為 :disk_usage ,這已經高於允許使用的限制 :disk_limit 了。', +]; From 683fb7e308c46631d5404d6616429d63b75fd2bf Mon Sep 17 00:00:00 2001 From: okpierre <1679025+okpierre@users.noreply.github.com> Date: Fri, 4 Oct 2019 16:42:21 -0400 Subject: [PATCH 3/5] Create site.php for NL translations for NL --- resources/lang/nl/site.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 resources/lang/nl/site.php diff --git a/resources/lang/nl/site.php b/resources/lang/nl/site.php new file mode 100644 index 00000000..de13d2f1 --- /dev/null +++ b/resources/lang/nl/site.php @@ -0,0 +1,16 @@ + 'Over ons', + 'help' => 'Ondersteuning', + 'language' => 'Taal', + 'fediverse' => 'Fediverse', + 'opensource' => 'Open Source', + 'terms' => 'Voorwaarden', + 'privacy' => 'Privacy', + 'l10nWip' => 'We werken nog steeds aan ondersteuning voor lokalisatie', + 'currentLocale' => 'Huidige landinstelling', + 'selectLocale' => 'Selecteer een van de ondersteunde talen', + 'contact' => 'Contact', + 'contact-us' => 'Neem contact op', + 'places' => 'Places', +]; From f89852c321ae12ee0da1d8914ce126b6c7416fd9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 4 Oct 2019 20:27:29 -0600 Subject: [PATCH 4/5] Update StatusTransformer, Fixes #1760 --- app/Transformer/Api/Mastodon/v1/StatusTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php index 7a5d1cbf..6ca61a51 100644 --- a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php +++ b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php @@ -24,7 +24,7 @@ class StatusTransformer extends Fractal\TransformerAbstract 'in_reply_to_id' => $status->in_reply_to_id, 'in_reply_to_account_id' => $status->in_reply_to_profile_id, 'reblog' => null, - 'content' => $status->rendered ?? $status->caption, + 'content' => $status->rendered ?? $status->caption ?? '', 'created_at' => $status->created_at->toJSON(), 'emojis' => [], 'replies_count' => 0, From fdac53eb7707fe24b8472952c69633fa44614551 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 4 Oct 2019 20:32:13 -0600 Subject: [PATCH 5/5] Update LikeController --- app/Http/Controllers/LikeController.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/LikeController.php b/app/Http/Controllers/LikeController.php index 08e0a421..139ecb5d 100644 --- a/app/Http/Controllers/LikeController.php +++ b/app/Http/Controllers/LikeController.php @@ -33,20 +33,16 @@ class LikeController extends Controller $like = Like::whereProfileId($profile->id)->whereStatusId($status->id)->firstOrFail(); $like->forceDelete(); $count--; - if($count >= 0) { - $status->likes_count = $count; - $status->save(); - } + $status->likes_count = $count; + $status->save(); } else { $like = new Like(); $like->profile_id = $profile->id; $like->status_id = $status->id; $like->save(); $count++; - if($count >= 0) { - $status->likes_count = $count; - $status->save(); - } + $status->likes_count = $count; + $status->save(); LikePipeline::dispatch($like); }