From a5c46885c8ade20a674ada43cd0fc18b9a78b58c Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Sat, 7 Sep 2019 18:07:40 +0900 Subject: [PATCH 1/5] Fix & add Japanese translations --- resources/lang/ja/helpcenter.php | 2 +- resources/lang/ja/navmenu.php | 5 +++-- resources/lang/ja/site.php | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/resources/lang/ja/helpcenter.php b/resources/lang/ja/helpcenter.php index b4da31f7..98ae53a6 100644 --- a/resources/lang/ja/helpcenter.php +++ b/resources/lang/ja/helpcenter.php @@ -10,7 +10,7 @@ return [ 'profile' => 'プロフィール', 'stories' => 'ストーリー', 'hashtags' => 'ハッシュダグ', - 'discover' => '見つける', + 'discover' => '発見', 'directMessages' => 'ダイレクトメッセージ', 'timelines' => 'タイムライン', diff --git a/resources/lang/ja/navmenu.php b/resources/lang/ja/navmenu.php index d81b076d..5160c84a 100644 --- a/resources/lang/ja/navmenu.php +++ b/resources/lang/ja/navmenu.php @@ -6,13 +6,14 @@ return [ 'home' => 'ホーム', 'local' => 'ローカル', 'network' => 'ネットワーク', - 'discover' => '見つける', + 'discover' => '発見', 'viewMyProfile' => '自分のプロフィールを見る', + 'myProfile' => 'プロフィール', 'myTimeline' => 'タイムライン', 'publicTimeline' => 'パブリックタイムライン', 'remoteFollow' => 'リモートフォロー', 'settings' => '設定', - 'admin' => '管理者', + 'admin' => '管理者設定', 'logout' => 'ログアウト', 'directMessages' => 'ダイレクトメッセージ', diff --git a/resources/lang/ja/site.php b/resources/lang/ja/site.php index 98d542e5..8f832da3 100644 --- a/resources/lang/ja/site.php +++ b/resources/lang/ja/site.php @@ -3,11 +3,13 @@ return [ 'about' => 'このサーバーについて', 'help' => 'ヘルプ', 'language' => '言語', - 'fediverse' => '分散', + 'fediverse' => 'Fediverse', 'opensource' => 'オープンソース', - 'terms' => '規約', - 'privacy' => 'プライバシー', + 'terms' => '利用規約', + 'privacy' => 'プライバシーポリシー', 'l10nWip' => '私達はローカライズサポートに取り組んでいます', - 'currentLocale' => '現在のロケール', + 'currentLocale' => '現在のロケール(言語)', 'selectLocale' => 'リストの中からロケール(言語)を選択してください', + 'contact' => 'コンタクト', + 'contact-us' => 'お問い合わせ', ]; From 8b0d0879091b7a1c49a12d7e13a55b23957fd4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Sun, 8 Sep 2019 14:46:12 +0200 Subject: [PATCH 2/5] Update navmenu lang file To translate: Commits on Aug 30, 2019 --- resources/lang/oc/navmenu.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/oc/navmenu.php b/resources/lang/oc/navmenu.php index 765c5fce..b6f32abd 100644 --- a/resources/lang/oc/navmenu.php +++ b/resources/lang/oc/navmenu.php @@ -8,6 +8,7 @@ return [ 'network' => 'Malhum', 'discover' => 'Descobrir', 'viewMyProfile' => 'Veire mon perfil', + 'myProfile' => 'Mon perfil', 'myTimeline' => 'Ma cronologia', 'publicTimeline' => 'Cronologia publica', 'remoteFollow' => 'Seguir a distància', From cfbaca78b4d45b1f7860ba79bea70f1f2abc2cac Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 8 Sep 2019 21:35:23 -0600 Subject: [PATCH 3/5] Add new migration --- ...032757_add_object_id_to_statuses_table.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 database/migrations/2019_09_09_032757_add_object_id_to_statuses_table.php diff --git a/database/migrations/2019_09_09_032757_add_object_id_to_statuses_table.php b/database/migrations/2019_09_09_032757_add_object_id_to_statuses_table.php new file mode 100644 index 00000000..3cdf9e25 --- /dev/null +++ b/database/migrations/2019_09_09_032757_add_object_id_to_statuses_table.php @@ -0,0 +1,37 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + } + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('statuses', function (Blueprint $table) { + $table->string('object_url')->nullable()->unique()->index(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('statuses', function (Blueprint $table) { + $table->dropColumn('object_url'); + }); + } +} From b20a2bc9aec228c8cd57c73f0df28bb69c7478d6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 8 Sep 2019 21:35:45 -0600 Subject: [PATCH 4/5] Update AP Helpers --- app/Util/ActivityPub/Helpers.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index 46729891..a70d828d 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -220,7 +220,7 @@ class Helpers { $id = (int) last(explode('/', $url)); return Status::findOrFail($id); } else { - $cached = Status::whereUri($url)->orWhere('url', $url)->first(); + $cached = Status::whereUri($url)->orWhere('object_url', $url)->first(); if($cached) { return $cached; } @@ -317,6 +317,7 @@ class Helpers { $status->profile_id = $profile->id; $status->url = isset($res['url']) ? $res['url'] : $url; $status->uri = isset($res['url']) ? $res['url'] : $url; + $status->object_url = isset($res['id']) ? $res['id'] : $url; $status->caption = strip_tags($res['content']); $status->rendered = Purify::clean($res['content']); $status->created_at = Carbon::parse($ts); From ea37c0ca860970b34d4ca77c32a66269ee3f680f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 8 Sep 2019 21:55:06 -0600 Subject: [PATCH 5/5] Update ap inbox --- app/Util/ActivityPub/Inbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index f7053e7b..52205bb7 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -326,7 +326,7 @@ class Inbox break; case 'Tombstone': - $status = Status::whereUri($id)->first(); + $status = Status::whereUri($id)->orWhere('object_url', $id)->first(); if(!$status) { return; }