From ae3b0b4c0d67753696f46c5a01ecdecb10104a4e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 13 May 2020 13:08:10 +0200 Subject: [PATCH 01/25] Fix digest mix task on OTP releases This is based on #2191, credit belongs to @rinpatch. --- lib/mix/tasks/pleroma/digest.ex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/mix/tasks/pleroma/digest.ex b/lib/mix/tasks/pleroma/digest.ex index 7d09e70c5..3595f912d 100644 --- a/lib/mix/tasks/pleroma/digest.ex +++ b/lib/mix/tasks/pleroma/digest.ex @@ -1,5 +1,6 @@ defmodule Mix.Tasks.Pleroma.Digest do use Mix.Task + import Mix.Pleroma @shortdoc "Manages digest emails" @moduledoc File.read!("docs/administration/CLI_tasks/digest.md") @@ -22,12 +23,10 @@ defmodule Mix.Tasks.Pleroma.Digest do with %Swoosh.Email{} = email <- Pleroma.Emails.UserEmail.digest_email(patched_user) do {:ok, _} = Pleroma.Emails.Mailer.deliver(email) - Mix.shell().info("Digest email have been sent to #{nickname} (#{user.email})") + shell_info("Digest email have been sent to #{nickname} (#{user.email})") else _ -> - Mix.shell().info( - "Cound't find any mentions for #{nickname} since #{last_digest_emailed_at}" - ) + shell_info("Cound't find any mentions for #{nickname} since #{last_digest_emailed_at}") end end end From 3525400eb2c8c9fd7ac0cac7c3e3f2cd0e340274 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 15:57:39 -0500 Subject: [PATCH 02/25] Sync FE static/config.json --- priv/static/static/config.json | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/priv/static/static/config.json b/priv/static/static/config.json index c82678699..727dde73b 100644 --- a/priv/static/static/config.json +++ b/priv/static/static/config.json @@ -1,23 +1,28 @@ { - "theme": "pleroma-dark", - "background": "/static/aurora_borealis.jpg", - "logo": "/static/logo.png", - "logoMask": true, - "logoMargin": ".1em", - "redirectRootNoLogin": "/main/all", - "redirectRootLogin": "/main/friends", - "showInstanceSpecificPanel": false, - "collapseMessageWithSubject": false, - "scopeCopy": true, - "subjectLineBehavior": "email", - "postContentType": "text/plain", "alwaysShowSubjectInput": true, + "background": "/static/aurora_borealis.jpg", + "collapseMessageWithSubject": false, + "disableChat": false, + "greentext": false, + "hideFilteredStatuses": false, + "hideMutedPosts": false, "hidePostStats": false, + "hideSitename": false, "hideUserStats": false, "loginMethod": "password", - "webPushNotifications": false, + "logo": "/static/logo.png", + "logoMargin": ".1em", + "logoMask": true, + "minimalScopesMode": false, "noAttachmentLinks": false, "nsfwCensorImage": "", + "postContentType": "text/plain", + "redirectRootLogin": "/main/friends", + "redirectRootNoLogin": "/main/all", + "scopeCopy": true, "showFeaturesPanel": true, - "minimalScopesMode": false + "showInstanceSpecificPanel": false, + "subjectLineBehavior": "email", + "theme": "pleroma-dark", + "webPushNotifications": false } From 1b9358116246a6c4c5fcfce0b15b11f2c92d1e07 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:03:42 -0500 Subject: [PATCH 03/25] Synchronize suggestions with all available static/config.json settings --- config/description.exs | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/config/description.exs b/config/description.exs index 36ec3d40a..65353efc3 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1105,24 +1105,32 @@ config :pleroma, :config_description, [ description: "Settings for Pleroma FE", suggestions: [ %{ - theme: "pleroma-dark", - logo: "/static/logo.png", - background: "/images/city.jpg", - redirectRootNoLogin: "/main/all", - redirectRootLogin: "/main/friends", - showInstanceSpecificPanel: true, - scopeOptionsEnabled: false, - formattingOptionsEnabled: false, - collapseMessageWithSubject: false, - hidePostStats: false, - hideUserStats: false, - scopeCopy: true, - subjectLineBehavior: "email", alwaysShowSubjectInput: true, - logoMask: false, + background: "/static/aurora_borealis.jpg", + collapseMessageWithSubject: false, + disableChat: false, + greentext: false, + hideFilteredStatuses: false, + hideMutedPosts: false, + hidePostStats: false, + hideSitename: false, + hideUserStats: false, + loginMethod: "password", + logo: "/static/logo.png", logoMargin: ".1em", - stickers: false, - enableEmojiPicker: false + logoMask: true, + minimalScopesMode: false, + noAttachmentLinks: false, + nsfwCensorImage: "", + postContentType: "text/plain", + redirectRootLogin: "/main/friends", + redirectRootNoLogin: "/main/all", + scopeCopy: true, + showFeaturesPanel: true, + showInstanceSpecificPanel: false, + subjectLineBehavior: "email", + theme: "pleroma-dark", + webPushNotifications: false } ], children: [ From 1e48aee50e91e0e81887d4a2a482aa03691f1a6b Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:18:26 -0500 Subject: [PATCH 04/25] Alpha sort FE config descriptions --- config/description.exs | 134 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/config/description.exs b/config/description.exs index 65353efc3..2119ed177 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1135,10 +1135,50 @@ config :pleroma, :config_description, [ ], children: [ %{ - key: :theme, + key: :alwaysShowSubjectInput, + label: "Always show subject input", + type: :boolean, + description: "When disabled, auto-hide the subject field if it's empty" + }, + %{ + key: :background, type: :string, - description: "Which theme to use, they are defined in styles.json", - suggestions: ["pleroma-dark"] + description: + "URL of the background, unless viewing a user profile with a background that is set", + suggestions: ["/images/city.jpg"] + }, + %{ + key: :collapseMessageWithSubject, + label: "Collapse message with subject", + type: :boolean, + description: + "When a message has a subject (aka Content Warning), collapse it by default" + }, + %{ + key: :enableEmojiPicker, + label: "Emoji picker", + type: :boolean, + description: "Enables emoji picker." + }, + %{ + key: :formattingOptionsEnabled, + label: "Formatting options enabled", + type: :boolean, + description: + "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" + }, + %{ + key: :hidePostStats, + label: "Hide post stats", + type: :boolean, + description: "Hide notices statistics (repeats, favorites, ...)" + }, + %{ + key: :hideUserStats, + label: "Hide user stats", + type: :boolean, + description: + "Hide profile statistics (posts, posts per day, followers, followings, ...)" }, %{ key: :logo, @@ -1147,11 +1187,21 @@ config :pleroma, :config_description, [ suggestions: ["/static/logo.png"] }, %{ - key: :background, + key: :logoMargin, + label: "Logo margin", type: :string, description: - "URL of the background, unless viewing a user profile with a background that is set", - suggestions: ["/images/city.jpg"] + "Allows you to adjust vertical margins between logo boundary and navbar borders. " <> + "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", + suggestions: [".1em"] + }, + %{ + key: :logoMask, + label: "Logo mask", + type: :boolean, + description: + "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> + "If you want a colorful logo you must disable logoMask." }, %{ key: :redirectRootNoLogin, @@ -1170,10 +1220,10 @@ config :pleroma, :config_description, [ suggestions: ["/main/friends"] }, %{ - key: :showInstanceSpecificPanel, - label: "Show instance specific panel", + key: :scopeCopy, + label: "Scope copy", type: :boolean, - description: "Whenether to show the instance's specific panel" + description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, %{ key: :scopeOptionsEnabled, @@ -1182,37 +1232,15 @@ config :pleroma, :config_description, [ description: "Enable setting a notice visibility and subject/CW when posting" }, %{ - key: :formattingOptionsEnabled, - label: "Formatting options enabled", + key: :showInstanceSpecificPanel, + label: "Show instance specific panel", type: :boolean, - description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" + description: "Whenether to show the instance's specific panel" }, %{ - key: :collapseMessageWithSubject, - label: "Collapse message with subject", + key: :stickers, type: :boolean, - description: - "When a message has a subject (aka Content Warning), collapse it by default" - }, - %{ - key: :hidePostStats, - label: "Hide post stats", - type: :boolean, - description: "Hide notices statistics (repeats, favorites, ...)" - }, - %{ - key: :hideUserStats, - label: "Hide user stats", - type: :boolean, - description: - "Hide profile statistics (posts, posts per day, followers, followings, ...)" - }, - %{ - key: :scopeCopy, - label: "Scope copy", - type: :boolean, - description: "Copy the scope (private/unlisted/public) in replies to posts by default" + description: "Enables stickers." }, %{ key: :subjectLineBehavior, @@ -1225,38 +1253,10 @@ config :pleroma, :config_description, [ suggestions: ["email", "masto", "noop"] }, %{ - key: :alwaysShowSubjectInput, - label: "Always show subject input", - type: :boolean, - description: "When disabled, auto-hide the subject field if it's empty" - }, - %{ - key: :logoMask, - label: "Logo mask", - type: :boolean, - description: - "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> - "If you want a colorful logo you must disable logoMask." - }, - %{ - key: :logoMargin, - label: "Logo margin", + key: :theme, type: :string, - description: - "Allows you to adjust vertical margins between logo boundary and navbar borders. " <> - "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.", - suggestions: [".1em"] - }, - %{ - key: :stickers, - type: :boolean, - description: "Enables stickers." - }, - %{ - key: :enableEmojiPicker, - label: "Emoji picker", - type: :boolean, - description: "Enables emoji picker." + description: "Which theme to use, they are defined in styles.json", + suggestions: ["pleroma-dark"] } ] }, From e2c80e62f1234165ba296beeac20d8e8bd6fc295 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:19:17 -0500 Subject: [PATCH 05/25] Stickers setting does not exist --- config/description.exs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/description.exs b/config/description.exs index 2119ed177..8d22c6f48 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1237,11 +1237,6 @@ config :pleroma, :config_description, [ type: :boolean, description: "Whenether to show the instance's specific panel" }, - %{ - key: :stickers, - type: :boolean, - description: "Enables stickers." - }, %{ key: :subjectLineBehavior, label: "Subject line behavior", From 2e28b501323e3656e04f7f7672f753272679a5ef Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:23:42 -0500 Subject: [PATCH 06/25] scopeOptionsEnabled has been replaced with minimalScopesMode --- config/description.exs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/description.exs b/config/description.exs index 8d22c6f48..c2e309cd4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1203,6 +1203,13 @@ config :pleroma, :config_description, [ "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <> "If you want a colorful logo you must disable logoMask." }, + %{ + key: :minimalScopesMode, + label: "Minimal scopes mode", + type: :boolean, + description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> + "Also prevents replying to a DM with a public post from PleromaFE." + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", @@ -1225,12 +1232,6 @@ config :pleroma, :config_description, [ type: :boolean, description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, - %{ - key: :scopeOptionsEnabled, - label: "Scope options enabled", - type: :boolean, - description: "Enable setting a notice visibility and subject/CW when posting" - }, %{ key: :showInstanceSpecificPanel, label: "Show instance specific panel", From 4aad764c1d2ccd90b697e38ce2044ae4ccdb7dea Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:24:37 -0500 Subject: [PATCH 07/25] enableEmojiPicker is not a setting --- config/description.exs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/description.exs b/config/description.exs index c2e309cd4..8f050ae8a 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1154,12 +1154,6 @@ config :pleroma, :config_description, [ description: "When a message has a subject (aka Content Warning), collapse it by default" }, - %{ - key: :enableEmojiPicker, - label: "Emoji picker", - type: :boolean, - description: "Enables emoji picker." - }, %{ key: :formattingOptionsEnabled, label: "Formatting options enabled", From 2420d7f4394f1a447221c74270b593fcf3956f41 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:26:49 -0500 Subject: [PATCH 08/25] Spelling/grammar --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/description.exs b/config/description.exs index 8f050ae8a..5e097aec2 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1230,7 +1230,7 @@ config :pleroma, :config_description, [ key: :showInstanceSpecificPanel, label: "Show instance specific panel", type: :boolean, - description: "Whenether to show the instance's specific panel" + description: "Whether to show the instance's custom panel" }, %{ key: :subjectLineBehavior, @@ -1245,7 +1245,7 @@ config :pleroma, :config_description, [ %{ key: :theme, type: :string, - description: "Which theme to use, they are defined in styles.json", + description: "Which theme to use. Available themes are defined in styles.json", suggestions: ["pleroma-dark"] } ] From 4bdde143f99d0a5cef6a15475b5e4591994ca546 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:30:24 -0500 Subject: [PATCH 09/25] Add disableChat option --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 5e097aec2..2870a6591 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1154,6 +1154,12 @@ config :pleroma, :config_description, [ description: "When a message has a subject (aka Content Warning), collapse it by default" }, + %{ + key: :disableChat, + label: "PleromaFE Chat", + type: :boolean, + description: "Disables PleromaFE Chat component" + }, %{ key: :formattingOptionsEnabled, label: "Formatting options enabled", From 38fb5eaf6adf97ca9158bf5d0df1225b9c1778de Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:31:15 -0500 Subject: [PATCH 10/25] formattingOptionsEnabled no longer exists --- config/description.exs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/description.exs b/config/description.exs index 2870a6591..b4c598cb4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1160,13 +1160,6 @@ config :pleroma, :config_description, [ type: :boolean, description: "Disables PleromaFE Chat component" }, - %{ - key: :formattingOptionsEnabled, - label: "Formatting options enabled", - type: :boolean, - description: - "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`" - }, %{ key: :hidePostStats, label: "Hide post stats", From 7f00698c3bc94058185ea76b54dbf7b3d5a0f483 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:32:38 -0500 Subject: [PATCH 11/25] Add greentext option --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index b4c598cb4..82e888188 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1160,6 +1160,12 @@ config :pleroma, :config_description, [ type: :boolean, description: "Disables PleromaFE Chat component" }, + %{ + key: :greentext, + label: "Greentext", + type: :boolean, + description: "Enables green text on lines prefixed with the > character." + }, %{ key: :hidePostStats, label: "Hide post stats", From c86cdb76a787ca0ee65702004e829473861148f6 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:35:12 -0500 Subject: [PATCH 12/25] Add hideFilteredStatuses and hideMutedPosts settings --- config/description.exs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/description.exs b/config/description.exs index 82e888188..9cd43ae37 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1166,6 +1166,18 @@ config :pleroma, :config_description, [ type: :boolean, description: "Enables green text on lines prefixed with the > character." }, + %{ + key: :hideFilteredStatuses, + label: "Hide Filtered Statuses", + type: :boolean, + description: "Hides filtered statuses from timelines." + }, + %{ + key: :hideMutedPosts, + label: "Hide Muted Posts", + type: :boolean, + description: "Hides muted statuses from timelines." + }, %{ key: :hidePostStats, label: "Hide post stats", From 923ab78807d16595e4dfc4f2a4a18f249ab88cd0 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:36:33 -0500 Subject: [PATCH 13/25] Add missing hideSitename setting --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 9cd43ae37..f353378ac 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1184,6 +1184,12 @@ config :pleroma, :config_description, [ type: :boolean, description: "Hide notices statistics (repeats, favorites, ...)" }, + %{ + key: :hideSitename, + label: "Hide Sitename", + type: :boolean, + description: "Hides instance name from PleromaFE banner." + }, %{ key: :hideUserStats, label: "Hide user stats", From 52a95a0265eae8c20f284690cdc97c5a6699b1d8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:40:04 -0500 Subject: [PATCH 14/25] Add missing nsfwCensorImage option --- config/description.exs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/description.exs b/config/description.exs index f353378ac..00f32859c 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1227,6 +1227,13 @@ config :pleroma, :config_description, [ description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> "Also prevents replying to a DM with a public post from PleromaFE." }, + %{ + key: :nsfwCensorImage, + label: "NSFW Censor Image", + type: :string, + description: "URL of the image to use for hiding NSFW media attachments in the timeline.", + suggestions: ["/static/img/nsfw.png"] + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", From 5131149056de4501f717084275f4be667f7a463a Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:45:16 -0500 Subject: [PATCH 15/25] add postContentType setting --- config/description.exs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/description.exs b/config/description.exs index 00f32859c..80c4ac96d 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1234,6 +1234,13 @@ config :pleroma, :config_description, [ description: "URL of the image to use for hiding NSFW media attachments in the timeline.", suggestions: ["/static/img/nsfw.png"] }, + %{ + key: :postContentType, + label: "Post Content Type", + type: {:dropdown, :atom}, + description: "Default post formatting option.", + suggestions: [text/plain, text/html, text/markdown, text/bbcode] + }, %{ key: :redirectRootNoLogin, label: "Redirect root no login", From 0c82a967ec6c67a32328dba1a4d47e6092137fc7 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:49:56 -0500 Subject: [PATCH 16/25] Add missing showFeaturesPanel setting --- config/description.exs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/description.exs b/config/description.exs index 80c4ac96d..ca02d2261 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1263,6 +1263,12 @@ config :pleroma, :config_description, [ type: :boolean, description: "Copy the scope (private/unlisted/public) in replies to posts by default" }, + %{ + key: :showFeaturesPanel, + label: "Show instance features panel", + type: :boolean, + description: "Enables panel displaying functionality of the instance." + }, %{ key: :showInstanceSpecificPanel, label: "Show instance specific panel", From 2560a4aa560ce9179baa25f22a94ba9755d09bd5 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:51:23 -0500 Subject: [PATCH 17/25] Formatting --- config/description.exs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/description.exs b/config/description.exs index ca02d2261..8ba1cf369 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1224,14 +1224,16 @@ config :pleroma, :config_description, [ key: :minimalScopesMode, label: "Minimal scopes mode", type: :boolean, - description: "Limit scope selection to Direct, User default, and Scope of post replying to. " <> + description: + "Limit scope selection to Direct, User default, and Scope of post replying to. " <> "Also prevents replying to a DM with a public post from PleromaFE." }, %{ key: :nsfwCensorImage, label: "NSFW Censor Image", type: :string, - description: "URL of the image to use for hiding NSFW media attachments in the timeline.", + description: + "URL of the image to use for hiding NSFW media attachments in the timeline.", suggestions: ["/static/img/nsfw.png"] }, %{ @@ -1239,7 +1241,7 @@ config :pleroma, :config_description, [ label: "Post Content Type", type: {:dropdown, :atom}, description: "Default post formatting option.", - suggestions: [text/plain, text/html, text/markdown, text/bbcode] + suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"] }, %{ key: :redirectRootNoLogin, From 6f53d8815e5e0af9563fbe280bfbd873a06ba06d Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 16:57:33 -0500 Subject: [PATCH 18/25] Clarify where the Features panel is --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index 8ba1cf369..7d7f4e93b 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1269,7 +1269,7 @@ config :pleroma, :config_description, [ key: :showFeaturesPanel, label: "Show instance features panel", type: :boolean, - description: "Enables panel displaying functionality of the instance." + description: "Enables panel displaying functionality of the instance on the About page." }, %{ key: :showInstanceSpecificPanel, From 54b482418694b8c41984235ea85078fe00572cdc Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 13 May 2020 17:07:14 -0500 Subject: [PATCH 19/25] Lint --- config/description.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index 7d7f4e93b..a800d7823 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1269,7 +1269,8 @@ config :pleroma, :config_description, [ key: :showFeaturesPanel, label: "Show instance features panel", type: :boolean, - description: "Enables panel displaying functionality of the instance on the About page." + description: + "Enables panel displaying functionality of the instance on the About page." }, %{ key: :showInstanceSpecificPanel, From c2e57f2981304ab2159461fb79d6500ec8c7a547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sidor?= Date: Wed, 13 May 2020 16:37:17 +0000 Subject: [PATCH 20/25] Added translation using Weblate (Polish) --- priv/gettext/pl/LC_MESSAGES/errors.po | 584 ++++++++++++++++++++++++++ 1 file changed, 584 insertions(+) create mode 100644 priv/gettext/pl/LC_MESSAGES/errors.po diff --git a/priv/gettext/pl/LC_MESSAGES/errors.po b/priv/gettext/pl/LC_MESSAGES/errors.po new file mode 100644 index 000000000..a0afeff44 --- /dev/null +++ b/priv/gettext/pl/LC_MESSAGES/errors.po @@ -0,0 +1,584 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-13 16:37+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Translate Toolkit 2.5.1\n" + +## This file is a PO Template file. +## +## `msgid`s here are often extracted from source code. +## Add new translations manually only if they're dynamic +## translations that can't be statically extracted. +## +## Run `mix gettext.extract` to bring this file up to +## date. Leave `msgstr`s empty as changing them here as no +## effect: edit them in PO (`.po`) files instead. +## From Ecto.Changeset.cast/4 +msgid "can't be blank" +msgstr "" + +## From Ecto.Changeset.unique_constraint/3 +msgid "has already been taken" +msgstr "" + +## From Ecto.Changeset.put_change/3 +msgid "is invalid" +msgstr "" + +## From Ecto.Changeset.validate_format/3 +msgid "has invalid format" +msgstr "" + +## From Ecto.Changeset.validate_subset/3 +msgid "has an invalid entry" +msgstr "" + +## From Ecto.Changeset.validate_exclusion/3 +msgid "is reserved" +msgstr "" + +## From Ecto.Changeset.validate_confirmation/3 +msgid "does not match confirmation" +msgstr "" + +## From Ecto.Changeset.no_assoc_constraint/3 +msgid "is still associated with this entry" +msgstr "" + +msgid "are still associated with this entry" +msgstr "" + +## From Ecto.Changeset.validate_length/3 +msgid "should be %{count} character(s)" +msgid_plural "should be %{count} character(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "should have %{count} item(s)" +msgid_plural "should have %{count} item(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "should be at least %{count} character(s)" +msgid_plural "should be at least %{count} character(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "should have at least %{count} item(s)" +msgid_plural "should have at least %{count} item(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "should be at most %{count} character(s)" +msgid_plural "should be at most %{count} character(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "should have at most %{count} item(s)" +msgid_plural "should have at most %{count} item(s)" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +## From Ecto.Changeset.validate_number/3 +msgid "must be less than %{number}" +msgstr "" + +msgid "must be greater than %{number}" +msgstr "" + +msgid "must be less than or equal to %{number}" +msgstr "" + +msgid "must be greater than or equal to %{number}" +msgstr "" + +msgid "must be equal to %{number}" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:421 +#, elixir-format +msgid "Account not found" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:249 +#, elixir-format +msgid "Already voted" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:360 +#, elixir-format +msgid "Bad request" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:425 +#, elixir-format +msgid "Can't delete object" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/status_controller.ex:196 +#, elixir-format +msgid "Can't delete this post" +msgstr "" + +#: lib/pleroma/web/controller_helper.ex:95 +#: lib/pleroma/web/controller_helper.ex:101 +#, elixir-format +msgid "Can't display this activity" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:227 +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:254 +#, elixir-format +msgid "Can't find user" +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:114 +#, elixir-format +msgid "Can't get favorites" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:437 +#, elixir-format +msgid "Can't like object" +msgstr "" + +#: lib/pleroma/web/common_api/utils.ex:556 +#, elixir-format +msgid "Cannot post an empty status without attachments" +msgstr "" + +#: lib/pleroma/web/common_api/utils.ex:504 +#, elixir-format +msgid "Comment must be up to %{max_size} characters" +msgstr "" + +#: lib/pleroma/config/config_db.ex:222 +#, elixir-format +msgid "Config with params %{params} not found" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:95 +#, elixir-format +msgid "Could not delete" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:141 +#, elixir-format +msgid "Could not favorite" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:370 +#, elixir-format +msgid "Could not pin" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:112 +#, elixir-format +msgid "Could not repeat" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:188 +#, elixir-format +msgid "Could not unfavorite" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:380 +#, elixir-format +msgid "Could not unpin" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:126 +#, elixir-format +msgid "Could not unrepeat" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:428 +#: lib/pleroma/web/common_api/common_api.ex:437 +#, elixir-format +msgid "Could not update state" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:202 +#, elixir-format +msgid "Error." +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:106 +#, elixir-format +msgid "Invalid CAPTCHA" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:117 +#: lib/pleroma/web/oauth/oauth_controller.ex:569 +#, elixir-format +msgid "Invalid credentials" +msgstr "" + +#: lib/pleroma/plugs/ensure_authenticated_plug.ex:38 +#, elixir-format +msgid "Invalid credentials." +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:265 +#, elixir-format +msgid "Invalid indices" +msgstr "" + +#: lib/pleroma/web/admin_api/admin_api_controller.ex:1147 +#, elixir-format +msgid "Invalid parameters" +msgstr "" + +#: lib/pleroma/web/common_api/utils.ex:411 +#, elixir-format +msgid "Invalid password." +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:187 +#, elixir-format +msgid "Invalid request" +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:109 +#, elixir-format +msgid "Kocaptcha service unavailable" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:113 +#, elixir-format +msgid "Missing parameters" +msgstr "" + +#: lib/pleroma/web/common_api/utils.ex:540 +#, elixir-format +msgid "No such conversation" +msgstr "" + +#: lib/pleroma/web/admin_api/admin_api_controller.ex:439 +#: lib/pleroma/web/admin_api/admin_api_controller.ex:465 lib/pleroma/web/admin_api/admin_api_controller.ex:507 +#, elixir-format +msgid "No such permission_group" +msgstr "" + +#: lib/pleroma/plugs/uploaded_media.ex:74 +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:485 lib/pleroma/web/admin_api/admin_api_controller.ex:1135 +#: lib/pleroma/web/feed/user_controller.ex:73 lib/pleroma/web/ostatus/ostatus_controller.ex:143 +#, elixir-format +msgid "Not found" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:241 +#, elixir-format +msgid "Poll's author can't vote" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20 +#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:37 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:49 +#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:50 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:290 +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71 +#, elixir-format +msgid "Record not found" +msgstr "" + +#: lib/pleroma/web/admin_api/admin_api_controller.ex:1153 +#: lib/pleroma/web/feed/user_controller.ex:79 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:32 +#: lib/pleroma/web/ostatus/ostatus_controller.ex:149 +#, elixir-format +msgid "Something went wrong" +msgstr "" + +#: lib/pleroma/web/common_api/activity_draft.ex:107 +#, elixir-format +msgid "The message visibility must be direct" +msgstr "" + +#: lib/pleroma/web/common_api/utils.ex:566 +#, elixir-format +msgid "The status is over the character limit" +msgstr "" + +#: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31 +#, elixir-format +msgid "This resource requires authentication." +msgstr "" + +#: lib/pleroma/plugs/rate_limiter/rate_limiter.ex:206 +#, elixir-format +msgid "Throttled" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:266 +#, elixir-format +msgid "Too many choices" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:442 +#, elixir-format +msgid "Unhandled activity type" +msgstr "" + +#: lib/pleroma/web/admin_api/admin_api_controller.ex:536 +#, elixir-format +msgid "You can't revoke your own admin status." +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:218 +#: lib/pleroma/web/oauth/oauth_controller.ex:309 +#, elixir-format +msgid "Your account is currently disabled" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:180 +#: lib/pleroma/web/oauth/oauth_controller.ex:332 +#, elixir-format +msgid "Your login is missing a confirmed e-mail address" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:389 +#, elixir-format +msgid "can't read inbox of %{nickname} as %{as_nickname}" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:472 +#, elixir-format +msgid "can't update outbox of %{nickname} as %{as_nickname}" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:388 +#, elixir-format +msgid "conversation is already muted" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:316 +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:491 +#, elixir-format +msgid "error" +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:29 +#, elixir-format +msgid "mascots can only be images" +msgstr "" + +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:60 +#, elixir-format +msgid "not found" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:395 +#, elixir-format +msgid "Bad OAuth request." +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:115 +#, elixir-format +msgid "CAPTCHA already used" +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:112 +#, elixir-format +msgid "CAPTCHA expired" +msgstr "" + +#: lib/pleroma/plugs/uploaded_media.ex:55 +#, elixir-format +msgid "Failed" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:411 +#, elixir-format +msgid "Failed to authenticate: %{message}." +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:442 +#, elixir-format +msgid "Failed to set up user account." +msgstr "" + +#: lib/pleroma/plugs/oauth_scopes_plug.ex:38 +#, elixir-format +msgid "Insufficient permissions: %{permissions}." +msgstr "" + +#: lib/pleroma/plugs/uploaded_media.ex:94 +#, elixir-format +msgid "Internal Error" +msgstr "" + +#: lib/pleroma/web/oauth/fallback_controller.ex:22 +#: lib/pleroma/web/oauth/fallback_controller.ex:29 +#, elixir-format +msgid "Invalid Username/Password" +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:118 +#, elixir-format +msgid "Invalid answer data" +msgstr "" + +#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:128 +#, elixir-format +msgid "Nodeinfo schema version not handled" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:169 +#, elixir-format +msgid "This action is outside the authorized scopes" +msgstr "" + +#: lib/pleroma/web/oauth/fallback_controller.ex:14 +#, elixir-format +msgid "Unknown error, please check the details and try again." +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:116 +#: lib/pleroma/web/oauth/oauth_controller.ex:155 +#, elixir-format +msgid "Unlisted redirect_uri." +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:391 +#, elixir-format +msgid "Unsupported OAuth provider: %{provider}." +msgstr "" + +#: lib/pleroma/uploaders/uploader.ex:72 +#, elixir-format +msgid "Uploader callback timeout" +msgstr "" + +#: lib/pleroma/web/uploader_controller.ex:23 +#, elixir-format +msgid "bad request" +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:103 +#, elixir-format +msgid "CAPTCHA Error" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:200 +#, elixir-format +msgid "Could not add reaction emoji" +msgstr "" + +#: lib/pleroma/web/common_api/common_api.ex:211 +#, elixir-format +msgid "Could not remove reaction emoji" +msgstr "" + +#: lib/pleroma/web/twitter_api/twitter_api.ex:129 +#, elixir-format +msgid "Invalid CAPTCHA (Missing parameter: %{name})" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:92 +#, elixir-format +msgid "List not found" +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:124 +#, elixir-format +msgid "Missing parameter: %{name}" +msgstr "" + +#: lib/pleroma/web/oauth/oauth_controller.ex:207 +#: lib/pleroma/web/oauth/oauth_controller.ex:322 +#, elixir-format +msgid "Password reset is required" +msgstr "" + +#: lib/pleroma/tests/auth_test_controller.ex:9 +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:6 lib/pleroma/web/admin_api/admin_api_controller.ex:6 +#: lib/pleroma/web/controller_helper.ex:6 lib/pleroma/web/fallback_redirect_controller.ex:6 +#: lib/pleroma/web/feed/tag_controller.ex:6 lib/pleroma/web/feed/user_controller.ex:6 +#: lib/pleroma/web/mailer/subscription_controller.ex:2 lib/pleroma/web/masto_fe_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/app_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/auth_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/custom_emoji_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/filter_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/follow_request_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/instance_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/marker_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex:14 lib/pleroma/web/mastodon_api/controllers/media_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/notification_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/report_controller.ex:8 lib/pleroma/web/mastodon_api/controllers/scheduled_activity_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/search_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:7 lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:6 lib/pleroma/web/media_proxy/media_proxy_controller.ex:6 +#: lib/pleroma/web/mongooseim/mongoose_im_controller.ex:6 lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:6 +#: lib/pleroma/web/oauth/fallback_controller.ex:6 lib/pleroma/web/oauth/mfa_controller.ex:10 +#: lib/pleroma/web/oauth/oauth_controller.ex:6 lib/pleroma/web/ostatus/ostatus_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:2 +#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller.ex:7 lib/pleroma/web/static_fe/static_fe_controller.ex:6 +#: lib/pleroma/web/twitter_api/controllers/password_controller.ex:10 lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex:6 +#: lib/pleroma/web/twitter_api/controllers/util_controller.ex:6 lib/pleroma/web/twitter_api/twitter_api_controller.ex:6 +#: lib/pleroma/web/uploader_controller.ex:6 lib/pleroma/web/web_finger/web_finger_controller.ex:6 +#, elixir-format +msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped." +msgstr "" + +#: lib/pleroma/plugs/ensure_authenticated_plug.ex:28 +#, elixir-format +msgid "Two-factor authentication enabled, you must use a access token." +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:210 +#, elixir-format +msgid "Unexpected error occurred while adding file to pack." +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:138 +#, elixir-format +msgid "Unexpected error occurred while creating pack." +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:278 +#, elixir-format +msgid "Unexpected error occurred while removing file from pack." +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:250 +#, elixir-format +msgid "Unexpected error occurred while updating file in pack." +msgstr "" + +#: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:179 +#, elixir-format +msgid "Unexpected error occurred while updating pack metadata." +msgstr "" + +#: lib/pleroma/plugs/user_is_admin_plug.ex:40 +#, elixir-format +msgid "User is not an admin or OAuth admin scope is not granted." +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61 +#, elixir-format +msgid "Web push subscription is disabled on this Pleroma instance" +msgstr "" + +#: lib/pleroma/web/admin_api/admin_api_controller.ex:502 +#, elixir-format +msgid "You can't revoke your own admin/moderator status." +msgstr "" + +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:105 +#, elixir-format +msgid "authorization required for timeline view" +msgstr "" From 08f5e49395ada741feb086a874d2212dd83a721c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sidor?= Date: Wed, 13 May 2020 16:49:25 +0000 Subject: [PATCH 21/25] Translated using Weblate (Polish) Currently translated at 55.6% (59 of 106 strings) Translation: Pleroma/Pleroma backend Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma/pl/ --- priv/gettext/pl/LC_MESSAGES/errors.po | 129 +++++++++++++------------- 1 file changed, 66 insertions(+), 63 deletions(-) diff --git a/priv/gettext/pl/LC_MESSAGES/errors.po b/priv/gettext/pl/LC_MESSAGES/errors.po index a0afeff44..fae8ef82a 100644 --- a/priv/gettext/pl/LC_MESSAGES/errors.po +++ b/priv/gettext/pl/LC_MESSAGES/errors.po @@ -3,14 +3,17 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-13 16:37+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"PO-Revision-Date: 2020-05-13 18:57+0000\n" +"Last-Translator: Michał Sidor \n" +"Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Translate Toolkit 2.5.1\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.0.4\n" ## This file is a PO Template file. ## @@ -112,39 +115,39 @@ msgstr "" #: lib/pleroma/web/common_api/common_api.ex:421 #, elixir-format msgid "Account not found" -msgstr "" +msgstr "Nie znaleziono konta" #: lib/pleroma/web/common_api/common_api.ex:249 #, elixir-format msgid "Already voted" -msgstr "" +msgstr "Już zagłosowano" #: lib/pleroma/web/oauth/oauth_controller.ex:360 #, elixir-format msgid "Bad request" -msgstr "" +msgstr "Nieprawidłowe żądanie" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:425 #, elixir-format msgid "Can't delete object" -msgstr "" +msgstr "Nie można usunąć obiektu" #: lib/pleroma/web/mastodon_api/controllers/status_controller.ex:196 #, elixir-format msgid "Can't delete this post" -msgstr "" +msgstr "Nie udało się usunąć tego statusu" #: lib/pleroma/web/controller_helper.ex:95 #: lib/pleroma/web/controller_helper.ex:101 #, elixir-format msgid "Can't display this activity" -msgstr "" +msgstr "Nie można wyświetlić tej aktywności" #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:227 #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:254 #, elixir-format msgid "Can't find user" -msgstr "" +msgstr "Nie znaleziono użytkownika" #: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:114 #, elixir-format @@ -154,17 +157,17 @@ msgstr "" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:437 #, elixir-format msgid "Can't like object" -msgstr "" +msgstr "Nie udało się polubić obiektu" #: lib/pleroma/web/common_api/utils.ex:556 #, elixir-format msgid "Cannot post an empty status without attachments" -msgstr "" +msgstr "Nie można opublikować pustego statusu bez załączników" #: lib/pleroma/web/common_api/utils.ex:504 #, elixir-format msgid "Comment must be up to %{max_size} characters" -msgstr "" +msgstr "Komentarz może mieć co najwyżej %{max_size} znaków" #: lib/pleroma/config/config_db.ex:222 #, elixir-format @@ -174,37 +177,37 @@ msgstr "" #: lib/pleroma/web/common_api/common_api.ex:95 #, elixir-format msgid "Could not delete" -msgstr "" +msgstr "Nie udało się usunąć" #: lib/pleroma/web/common_api/common_api.ex:141 #, elixir-format msgid "Could not favorite" -msgstr "" +msgstr "Nie udało się dodać do ulubionych" #: lib/pleroma/web/common_api/common_api.ex:370 #, elixir-format msgid "Could not pin" -msgstr "" +msgstr "Nie udało się przypiąć" #: lib/pleroma/web/common_api/common_api.ex:112 #, elixir-format msgid "Could not repeat" -msgstr "" +msgstr "Nie udało się powtórzyć" #: lib/pleroma/web/common_api/common_api.ex:188 #, elixir-format msgid "Could not unfavorite" -msgstr "" +msgstr "Nie udało się usunąć z ulubionych" #: lib/pleroma/web/common_api/common_api.ex:380 #, elixir-format msgid "Could not unpin" -msgstr "" +msgstr "Nie udało się odpiąć" #: lib/pleroma/web/common_api/common_api.ex:126 #, elixir-format msgid "Could not unrepeat" -msgstr "" +msgstr "Nie udało się cofnąć powtórzenia" #: lib/pleroma/web/common_api/common_api.ex:428 #: lib/pleroma/web/common_api/common_api.ex:437 @@ -246,45 +249,45 @@ msgstr "" #: lib/pleroma/web/common_api/utils.ex:411 #, elixir-format msgid "Invalid password." -msgstr "" +msgstr "Nieprawidłowe hasło." #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:187 #, elixir-format msgid "Invalid request" -msgstr "" +msgstr "Nieprawidłowe żądanie" #: lib/pleroma/web/twitter_api/twitter_api.ex:109 #, elixir-format msgid "Kocaptcha service unavailable" -msgstr "" +msgstr "Usługa Kocaptcha niedostępna" #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:113 #, elixir-format msgid "Missing parameters" -msgstr "" +msgstr "Brakujące parametry" #: lib/pleroma/web/common_api/utils.ex:540 #, elixir-format msgid "No such conversation" -msgstr "" +msgstr "Nie ma takiej rozmowy" #: lib/pleroma/web/admin_api/admin_api_controller.ex:439 #: lib/pleroma/web/admin_api/admin_api_controller.ex:465 lib/pleroma/web/admin_api/admin_api_controller.ex:507 #, elixir-format msgid "No such permission_group" -msgstr "" +msgstr "Nie ma takiej grupy uprawnień" #: lib/pleroma/plugs/uploaded_media.ex:74 #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:485 lib/pleroma/web/admin_api/admin_api_controller.ex:1135 #: lib/pleroma/web/feed/user_controller.ex:73 lib/pleroma/web/ostatus/ostatus_controller.ex:143 #, elixir-format msgid "Not found" -msgstr "" +msgstr "Nie znaleziono" #: lib/pleroma/web/common_api/common_api.ex:241 #, elixir-format msgid "Poll's author can't vote" -msgstr "" +msgstr "Autor ankiety nie może głosować" #: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20 #: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:37 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:49 @@ -292,7 +295,7 @@ msgstr "" #: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71 #, elixir-format msgid "Record not found" -msgstr "" +msgstr "Nie znaleziono rekordu" #: lib/pleroma/web/admin_api/admin_api_controller.ex:1153 #: lib/pleroma/web/feed/user_controller.ex:79 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:32 @@ -309,7 +312,7 @@ msgstr "" #: lib/pleroma/web/common_api/utils.ex:566 #, elixir-format msgid "The status is over the character limit" -msgstr "" +msgstr "Ten status przekracza limit znaków" #: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31 #, elixir-format @@ -329,18 +332,18 @@ msgstr "" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:442 #, elixir-format msgid "Unhandled activity type" -msgstr "" +msgstr "Nieobsługiwany typ aktywności" #: lib/pleroma/web/admin_api/admin_api_controller.ex:536 #, elixir-format msgid "You can't revoke your own admin status." -msgstr "" +msgstr "Nie możesz odebrać samemu sobie statusu administratora." #: lib/pleroma/web/oauth/oauth_controller.ex:218 #: lib/pleroma/web/oauth/oauth_controller.ex:309 #, elixir-format msgid "Your account is currently disabled" -msgstr "" +msgstr "Twoje konto jest obecnie nieaktywne" #: lib/pleroma/web/oauth/oauth_controller.ex:180 #: lib/pleroma/web/oauth/oauth_controller.ex:332 @@ -361,43 +364,43 @@ msgstr "" #: lib/pleroma/web/common_api/common_api.ex:388 #, elixir-format msgid "conversation is already muted" -msgstr "" +msgstr "rozmowa jest już wyciszona" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:316 #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:491 #, elixir-format msgid "error" -msgstr "" +msgstr "błąd" #: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:29 #, elixir-format msgid "mascots can only be images" -msgstr "" +msgstr "maskotki muszą być obrazkami" #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:60 #, elixir-format msgid "not found" -msgstr "" +msgstr "nie znaleziono" #: lib/pleroma/web/oauth/oauth_controller.ex:395 #, elixir-format msgid "Bad OAuth request." -msgstr "" +msgstr "Niepoprawne żądanie OAuth." #: lib/pleroma/web/twitter_api/twitter_api.ex:115 #, elixir-format msgid "CAPTCHA already used" -msgstr "" +msgstr "Zużyta CAPTCHA" #: lib/pleroma/web/twitter_api/twitter_api.ex:112 #, elixir-format msgid "CAPTCHA expired" -msgstr "" +msgstr "CAPTCHA wygasła" #: lib/pleroma/plugs/uploaded_media.ex:55 #, elixir-format msgid "Failed" -msgstr "" +msgstr "Nie udało się" #: lib/pleroma/web/oauth/oauth_controller.ex:411 #, elixir-format @@ -412,18 +415,18 @@ msgstr "" #: lib/pleroma/plugs/oauth_scopes_plug.ex:38 #, elixir-format msgid "Insufficient permissions: %{permissions}." -msgstr "" +msgstr "Niewystarczające uprawnienia: %{permissions}." #: lib/pleroma/plugs/uploaded_media.ex:94 #, elixir-format msgid "Internal Error" -msgstr "" +msgstr "Błąd wewnętrzny" #: lib/pleroma/web/oauth/fallback_controller.ex:22 #: lib/pleroma/web/oauth/fallback_controller.ex:29 #, elixir-format msgid "Invalid Username/Password" -msgstr "" +msgstr "Nieprawidłowa nazwa użytkownika lub hasło" #: lib/pleroma/web/twitter_api/twitter_api.ex:118 #, elixir-format @@ -433,7 +436,7 @@ msgstr "" #: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:128 #, elixir-format msgid "Nodeinfo schema version not handled" -msgstr "" +msgstr "Nieobsługiwana wersja schematu Nodeinfo" #: lib/pleroma/web/oauth/oauth_controller.ex:169 #, elixir-format @@ -443,7 +446,7 @@ msgstr "" #: lib/pleroma/web/oauth/fallback_controller.ex:14 #, elixir-format msgid "Unknown error, please check the details and try again." -msgstr "" +msgstr "Nieznany błąd, sprawdź szczegóły i spróbuj ponownie." #: lib/pleroma/web/oauth/oauth_controller.ex:116 #: lib/pleroma/web/oauth/oauth_controller.ex:155 @@ -454,7 +457,7 @@ msgstr "" #: lib/pleroma/web/oauth/oauth_controller.ex:391 #, elixir-format msgid "Unsupported OAuth provider: %{provider}." -msgstr "" +msgstr "Nieobsługiwany dostawca OAuth: %{provider}." #: lib/pleroma/uploaders/uploader.ex:72 #, elixir-format @@ -464,12 +467,12 @@ msgstr "" #: lib/pleroma/web/uploader_controller.ex:23 #, elixir-format msgid "bad request" -msgstr "" +msgstr "nieprawidłowe żądanie" #: lib/pleroma/web/twitter_api/twitter_api.ex:103 #, elixir-format msgid "CAPTCHA Error" -msgstr "" +msgstr "Błąd CAPTCHA" #: lib/pleroma/web/common_api/common_api.ex:200 #, elixir-format @@ -484,23 +487,23 @@ msgstr "" #: lib/pleroma/web/twitter_api/twitter_api.ex:129 #, elixir-format msgid "Invalid CAPTCHA (Missing parameter: %{name})" -msgstr "" +msgstr "Nieprawidłowa CAPTCHA (Brakujący parametr: %{name})" #: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:92 #, elixir-format msgid "List not found" -msgstr "" +msgstr "Nie znaleziono listy" #: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:124 #, elixir-format msgid "Missing parameter: %{name}" -msgstr "" +msgstr "Brakujący parametr: %{name}" #: lib/pleroma/web/oauth/oauth_controller.ex:207 #: lib/pleroma/web/oauth/oauth_controller.ex:322 #, elixir-format msgid "Password reset is required" -msgstr "" +msgstr "Wymagany reset hasła" #: lib/pleroma/tests/auth_test_controller.ex:9 #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:6 lib/pleroma/web/admin_api/admin_api_controller.ex:6 @@ -536,32 +539,32 @@ msgstr "" #: lib/pleroma/plugs/ensure_authenticated_plug.ex:28 #, elixir-format msgid "Two-factor authentication enabled, you must use a access token." -msgstr "" +msgstr "Uwierzytelnienie dwuskładnikowe jest włączone, musisz użyć tokenu." #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:210 #, elixir-format msgid "Unexpected error occurred while adding file to pack." -msgstr "" +msgstr "Nieoczekiwany błąd podczas dodawania pliku do paczki." #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:138 #, elixir-format msgid "Unexpected error occurred while creating pack." -msgstr "" +msgstr "Nieoczekiwany błąd podczas tworzenia paczki." #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:278 #, elixir-format msgid "Unexpected error occurred while removing file from pack." -msgstr "" +msgstr "Nieoczekiwany błąd podczas usuwania pliku z paczki." #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:250 #, elixir-format msgid "Unexpected error occurred while updating file in pack." -msgstr "" +msgstr "Nieoczekiwany błąd podczas zmieniania pliku w paczce." #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:179 #, elixir-format msgid "Unexpected error occurred while updating pack metadata." -msgstr "" +msgstr "Nieoczekiwany błąd podczas zmieniania metadanych paczki." #: lib/pleroma/plugs/user_is_admin_plug.ex:40 #, elixir-format @@ -571,14 +574,14 @@ msgstr "" #: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61 #, elixir-format msgid "Web push subscription is disabled on this Pleroma instance" -msgstr "" +msgstr "Powiadomienia web push są wyłączone na tej instancji Pleromy" #: lib/pleroma/web/admin_api/admin_api_controller.ex:502 #, elixir-format msgid "You can't revoke your own admin/moderator status." -msgstr "" +msgstr "Nie możesz odebrać samemu sobie statusu administratora/moderatora." #: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:105 #, elixir-format msgid "authorization required for timeline view" -msgstr "" +msgstr "logowanie wymagane do przeglądania osi czasu" From 0d074751b57f24d8489f559a535e6f98ab9ed4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sidor?= Date: Thu, 14 May 2020 11:19:12 +0000 Subject: [PATCH 22/25] Translated using Weblate (Polish) Currently translated at 61.3% (65 of 106 strings) Translation: Pleroma/Pleroma backend Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma/pl/ --- priv/gettext/pl/LC_MESSAGES/errors.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/priv/gettext/pl/LC_MESSAGES/errors.po b/priv/gettext/pl/LC_MESSAGES/errors.po index fae8ef82a..af9e214c6 100644 --- a/priv/gettext/pl/LC_MESSAGES/errors.po +++ b/priv/gettext/pl/LC_MESSAGES/errors.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-13 16:37+0000\n" -"PO-Revision-Date: 2020-05-13 18:57+0000\n" +"PO-Revision-Date: 2020-05-14 14:37+0000\n" "Last-Translator: Michał Sidor \n" "Language-Team: Polish \n" @@ -26,23 +26,23 @@ msgstr "" ## effect: edit them in PO (`.po`) files instead. ## From Ecto.Changeset.cast/4 msgid "can't be blank" -msgstr "" +msgstr "nie może być pusty" ## From Ecto.Changeset.unique_constraint/3 msgid "has already been taken" -msgstr "" +msgstr "jest już zajęty" ## From Ecto.Changeset.put_change/3 msgid "is invalid" -msgstr "" +msgstr "jest nieprawidłowy" ## From Ecto.Changeset.validate_format/3 msgid "has invalid format" -msgstr "" +msgstr "ma niepoprawny format" ## From Ecto.Changeset.validate_subset/3 msgid "has an invalid entry" -msgstr "" +msgstr "ma niepoprawny wpis" ## From Ecto.Changeset.validate_exclusion/3 msgid "is reserved" @@ -302,7 +302,7 @@ msgstr "Nie znaleziono rekordu" #: lib/pleroma/web/ostatus/ostatus_controller.ex:149 #, elixir-format msgid "Something went wrong" -msgstr "" +msgstr "Coś się zepsuło" #: lib/pleroma/web/common_api/activity_draft.ex:107 #, elixir-format From e090191d03b21020a75c1ef91a200c3e4807c2d1 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 15 May 2020 14:55:41 +0400 Subject: [PATCH 23/25] [OpenAPI] Mark all not required request fields as nullable --- .../api_spec/operations/account_operation.ex | 54 ++++++++++++++++--- .../web/api_spec/operations/app_operation.ex | 6 ++- .../api_spec/operations/filter_operation.ex | 6 ++- .../api_spec/operations/marker_operation.ex | 6 ++- .../operations/pleroma_account_operation.ex | 2 + .../api_spec/operations/report_operation.ex | 3 ++ .../api_spec/operations/status_operation.ex | 26 ++++++++- .../operations/subscription_operation.ex | 54 ++++++++++++++++--- 8 files changed, 134 insertions(+), 23 deletions(-) diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index 70069d6f9..988bab882 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -367,15 +367,18 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do title: "AccountCreateRequest", description: "POST body for creating an account", type: :object, + required: [:username, :password, :agreement], properties: %{ reason: %Schema{ type: :string, + nullable: true, description: "Text that will be reviewed by moderators if registrations require manual approval" }, username: %Schema{type: :string, description: "The desired username for the account"}, email: %Schema{ type: :string, + nullable: true, description: "The email address to be used for login. Required when `account_activation_required` is enabled.", format: :email @@ -392,23 +395,33 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do }, locale: %Schema{ type: :string, + nullable: true, description: "The language of the confirmation email that will be sent" }, # Pleroma-specific properties: - fullname: %Schema{type: :string, description: "Full name"}, - bio: %Schema{type: :string, description: "Bio", default: ""}, + fullname: %Schema{type: :string, nullable: true, description: "Full name"}, + bio: %Schema{type: :string, description: "Bio", nullable: true, default: ""}, captcha_solution: %Schema{ type: :string, + nullable: true, description: "Provider-specific captcha solution" }, - captcha_token: %Schema{type: :string, description: "Provider-specific captcha token"}, - captcha_answer_data: %Schema{type: :string, description: "Provider-specific captcha data"}, + captcha_token: %Schema{ + type: :string, + nullable: true, + description: "Provider-specific captcha token" + }, + captcha_answer_data: %Schema{ + type: :string, + nullable: true, + description: "Provider-specific captcha data" + }, token: %Schema{ type: :string, + nullable: true, description: "Invite token required when the registrations aren't public" } }, - required: [:username, :password, :agreement], example: %{ "username" => "cofe", "email" => "cofe@example.com", @@ -447,28 +460,34 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do properties: %{ bot: %Schema{ type: :boolean, + nullable: true, description: "Whether the account has a bot flag." }, display_name: %Schema{ type: :string, + nullable: true, description: "The display name to use for the profile." }, note: %Schema{type: :string, description: "The account bio."}, avatar: %Schema{ type: :string, + nullable: true, description: "Avatar image encoded using multipart/form-data", format: :binary }, header: %Schema{ type: :string, + nullable: true, description: "Header image encoded using multipart/form-data", format: :binary }, locked: %Schema{ type: :boolean, + nullable: true, description: "Whether manual approval of follow requests is required." }, fields_attributes: %Schema{ + nullable: true, oneOf: [ %Schema{type: :array, items: attribute_field()}, %Schema{type: :object, additionalProperties: %Schema{type: attribute_field()}} @@ -488,47 +507,65 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do # Pleroma-specific fields no_rich_text: %Schema{ type: :boolean, + nullable: true, description: "html tags are stripped from all statuses requested from the API" }, - hide_followers: %Schema{type: :boolean, description: "user's followers will be hidden"}, - hide_follows: %Schema{type: :boolean, description: "user's follows will be hidden"}, + hide_followers: %Schema{ + type: :boolean, + nullable: true, + description: "user's followers will be hidden" + }, + hide_follows: %Schema{ + type: :boolean, + nullable: true, + description: "user's follows will be hidden" + }, hide_followers_count: %Schema{ type: :boolean, + nullable: true, description: "user's follower count will be hidden" }, hide_follows_count: %Schema{ type: :boolean, + nullable: true, description: "user's follow count will be hidden" }, hide_favorites: %Schema{ type: :boolean, + nullable: true, description: "user's favorites timeline will be hidden" }, show_role: %Schema{ type: :boolean, + nullable: true, description: "user's role (e.g admin, moderator) will be exposed to anyone in the API" }, default_scope: VisibilityScope, pleroma_settings_store: %Schema{ type: :object, + nullable: true, description: "Opaque user settings to be saved on the backend." }, skip_thread_containment: %Schema{ type: :boolean, + nullable: true, description: "Skip filtering out broken threads" }, allow_following_move: %Schema{ type: :boolean, + nullable: true, description: "Allows automatically follow moved following accounts" }, pleroma_background_image: %Schema{ type: :string, + nullable: true, description: "Sets the background image of the user.", format: :binary }, discoverable: %Schema{ type: :boolean, + nullable: true, description: "Discovery of this account in search results and other services is allowed." }, @@ -624,7 +661,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do description: "POST body for muting an account", type: :object, properties: %{ - uri: %Schema{type: :string, format: :uri} + uri: %Schema{type: :string, nullable: true, format: :uri} }, required: [:uri] } @@ -638,6 +675,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do properties: %{ notifications: %Schema{ type: :boolean, + nullable: true, description: "Mute notifications in addition to statuses? Defaults to true.", default: true } diff --git a/lib/pleroma/web/api_spec/operations/app_operation.ex b/lib/pleroma/web/api_spec/operations/app_operation.ex index f6ccd073f..ae01cbbec 100644 --- a/lib/pleroma/web/api_spec/operations/app_operation.ex +++ b/lib/pleroma/web/api_spec/operations/app_operation.ex @@ -105,7 +105,11 @@ defmodule Pleroma.Web.ApiSpec.AppOperation do description: "Space separated list of scopes", default: "read" }, - website: %Schema{type: :string, description: "A URL to the homepage of your app"} + website: %Schema{ + type: :string, + nullable: true, + description: "A URL to the homepage of your app" + } }, required: [:client_name, :redirect_uris], example: %{ diff --git a/lib/pleroma/web/api_spec/operations/filter_operation.ex b/lib/pleroma/web/api_spec/operations/filter_operation.ex index 53e57b46b..7310c1c4d 100644 --- a/lib/pleroma/web/api_spec/operations/filter_operation.ex +++ b/lib/pleroma/web/api_spec/operations/filter_operation.ex @@ -199,12 +199,14 @@ defmodule Pleroma.Web.ApiSpec.FilterOperation do "Array of enumerable strings `home`, `notifications`, `public`, `thread`. At least one context must be specified." }, irreversible: %Schema{ - type: :bolean, + type: :boolean, + nullable: true, description: "Should the server irreversibly drop matching entities from home and notifications?" }, whole_word: %Schema{ - type: :bolean, + type: :boolean, + nullable: true, description: "Consider word boundaries?", default: true } diff --git a/lib/pleroma/web/api_spec/operations/marker_operation.ex b/lib/pleroma/web/api_spec/operations/marker_operation.ex index 06620492a..714ef1f99 100644 --- a/lib/pleroma/web/api_spec/operations/marker_operation.ex +++ b/lib/pleroma/web/api_spec/operations/marker_operation.ex @@ -110,14 +110,16 @@ defmodule Pleroma.Web.ApiSpec.MarkerOperation do properties: %{ notifications: %Schema{ type: :object, + nullable: true, properties: %{ - last_read_id: %Schema{type: :string} + last_read_id: %Schema{nullable: true, type: :string} } }, home: %Schema{ type: :object, + nullable: true, properties: %{ - last_read_id: %Schema{type: :string} + last_read_id: %Schema{nullable: true, type: :string} } } }, diff --git a/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex b/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex index 435991037..90922c064 100644 --- a/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/pleroma_account_operation.ex @@ -143,6 +143,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do type: :object, properties: %{ img: %Schema{ + nullable: true, type: :string, format: :binary, description: "Image encoded using `multipart/form-data` or an empty string to clear" @@ -158,6 +159,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do properties: %{ banner: %Schema{ type: :string, + nullable: true, format: :binary, description: "Image encoded using `multipart/form-data` or an empty string to clear" } diff --git a/lib/pleroma/web/api_spec/operations/report_operation.ex b/lib/pleroma/web/api_spec/operations/report_operation.ex index da4d50703..882177c96 100644 --- a/lib/pleroma/web/api_spec/operations/report_operation.ex +++ b/lib/pleroma/web/api_spec/operations/report_operation.ex @@ -37,15 +37,18 @@ defmodule Pleroma.Web.ApiSpec.ReportOperation do account_id: %Schema{type: :string, description: "ID of the account to report"}, status_ids: %Schema{ type: :array, + nullable: true, items: %Schema{type: :string}, description: "Array of Statuses to attach to the report, for context" }, comment: %Schema{ type: :string, + nullable: true, description: "Reason for the report" }, forward: %Schema{ type: :boolean, + nullable: true, default: false, description: "If the account is remote, should the report be forwarded to the remote admin?" diff --git a/lib/pleroma/web/api_spec/operations/status_operation.ex b/lib/pleroma/web/api_spec/operations/status_operation.ex index 561db3bce..fc2909d8c 100644 --- a/lib/pleroma/web/api_spec/operations/status_operation.ex +++ b/lib/pleroma/web/api_spec/operations/status_operation.ex @@ -371,15 +371,18 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do properties: %{ status: %Schema{ type: :string, + nullable: true, description: "Text content of the status. If `media_ids` is provided, this becomes optional. Attaching a `poll` is optional while `status` is provided." }, media_ids: %Schema{ + nullable: true, type: :array, items: %Schema{type: :string}, description: "Array of Attachment ids to be attached as media." }, poll: %Schema{ + nullable: true, type: :object, required: [:options], properties: %{ @@ -390,26 +393,35 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do }, expires_in: %Schema{ type: :integer, + nullable: true, description: "Duration the poll should be open, in seconds. Must be provided with `poll[options]`" }, - multiple: %Schema{type: :boolean, description: "Allow multiple choices?"}, + multiple: %Schema{ + type: :boolean, + nullable: true, + description: "Allow multiple choices?" + }, hide_totals: %Schema{ type: :boolean, + nullable: true, description: "Hide vote counts until the poll ends?" } } }, in_reply_to_id: %Schema{ + nullable: true, allOf: [FlakeID], description: "ID of the status being replied to, if status is a reply" }, sensitive: %Schema{ type: :boolean, + nullable: true, description: "Mark status and attached media as sensitive?" }, spoiler_text: %Schema{ type: :string, + nullable: true, description: "Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field." }, @@ -420,25 +432,33 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do description: "ISO 8601 Datetime at which to schedule a status. Providing this paramter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future." }, - language: %Schema{type: :string, description: "ISO 639 language code for this status."}, + language: %Schema{ + type: :string, + nullable: true, + description: "ISO 639 language code for this status." + }, # Pleroma-specific properties: preview: %Schema{ type: :boolean, + nullable: true, description: "If set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example" }, content_type: %Schema{ type: :string, + nullable: true, description: "The MIME type of the status, it is transformed into HTML by the backend. You can get the list of the supported MIME types with the nodeinfo endpoint." }, to: %Schema{ type: :array, + nullable: true, items: %Schema{type: :string}, description: "A list of nicknames (like `lain@soykaf.club` or `lain` on the local server) that will be used to determine who is going to be addressed by this post. Using this will disable the implicit addressing by mentioned names in the `status` body, only the people in the `to` list will be addressed. The normal rules for for post visibility are not affected by this and will still apply" }, visibility: %Schema{ + nullable: true, anyOf: [ VisibilityScope, %Schema{type: :string, description: "`list:LIST_ID`", example: "LIST:123"} @@ -447,11 +467,13 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do "Visibility of the posted status. Besides standard MastoAPI values (`direct`, `private`, `unlisted` or `public`) it can be used to address a List by setting it to `list:LIST_ID`" }, expires_in: %Schema{ + nullable: true, type: :integer, description: "The number of seconds the posted activity should expire in. When a posted activity expires it will be deleted from the server, and a delete request for it will be federated. This needs to be longer than an hour." }, in_reply_to_conversation_id: %Schema{ + nullable: true, type: :string, description: "Will reply to a given conversation, addressing only the people who are part of the recipient set of that conversation. Sets the visibility to `direct`." diff --git a/lib/pleroma/web/api_spec/operations/subscription_operation.ex b/lib/pleroma/web/api_spec/operations/subscription_operation.ex index 663b8fa11..cf6dcb068 100644 --- a/lib/pleroma/web/api_spec/operations/subscription_operation.ex +++ b/lib/pleroma/web/api_spec/operations/subscription_operation.ex @@ -109,19 +109,38 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do required: [:endpoint, :keys] }, data: %Schema{ + nullable: true, type: :object, properties: %{ alerts: %Schema{ + nullable: true, type: :object, properties: %{ - follow: %Schema{type: :boolean, description: "Receive follow notifications?"}, + follow: %Schema{ + type: :boolean, + nullable: true, + description: "Receive follow notifications?" + }, favourite: %Schema{ type: :boolean, + nullable: true, description: "Receive favourite notifications?" }, - reblog: %Schema{type: :boolean, description: "Receive reblog notifications?"}, - mention: %Schema{type: :boolean, description: "Receive mention notifications?"}, - poll: %Schema{type: :boolean, description: "Receive poll notifications?"} + reblog: %Schema{ + type: :boolean, + nullable: true, + description: "Receive reblog notifications?" + }, + mention: %Schema{ + type: :boolean, + nullable: true, + description: "Receive mention notifications?" + }, + poll: %Schema{ + type: :boolean, + nullable: true, + description: "Receive poll notifications?" + } } } } @@ -154,19 +173,38 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do type: :object, properties: %{ data: %Schema{ + nullable: true, type: :object, properties: %{ alerts: %Schema{ + nullable: true, type: :object, properties: %{ - follow: %Schema{type: :boolean, description: "Receive follow notifications?"}, + follow: %Schema{ + type: :boolean, + nullable: true, + description: "Receive follow notifications?" + }, favourite: %Schema{ type: :boolean, + nullable: true, description: "Receive favourite notifications?" }, - reblog: %Schema{type: :boolean, description: "Receive reblog notifications?"}, - mention: %Schema{type: :boolean, description: "Receive mention notifications?"}, - poll: %Schema{type: :boolean, description: "Receive poll notifications?"} + reblog: %Schema{ + type: :boolean, + nullable: true, + description: "Receive reblog notifications?" + }, + mention: %Schema{ + type: :boolean, + nullable: true, + description: "Receive mention notifications?" + }, + poll: %Schema{ + type: :boolean, + nullable: true, + description: "Receive poll notifications?" + } } } } From 3c29f4f957dbfa4bf7b914ecc1680bfa71bb7621 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 15 May 2020 16:16:02 +0300 Subject: [PATCH 24/25] returning partial chain --- lib/pleroma/config/config_db.ex | 11 +++++++++++ test/config/config_db_test.exs | 8 ++++++++ test/web/admin_api/admin_api_controller_test.exs | 3 +++ 3 files changed, 22 insertions(+) diff --git a/lib/pleroma/config/config_db.ex b/lib/pleroma/config/config_db.ex index 4097ee5b7..2b43d4c36 100644 --- a/lib/pleroma/config/config_db.ex +++ b/lib/pleroma/config/config_db.ex @@ -278,6 +278,8 @@ defmodule Pleroma.ConfigDB do } end + defp do_convert({:partial_chain, entity}), do: %{"tuple" => [":partial_chain", inspect(entity)]} + defp do_convert(entity) when is_tuple(entity) do value = entity @@ -321,6 +323,15 @@ defmodule Pleroma.ConfigDB do {:proxy_url, {do_transform_string(type), parse_host(host), port}} end + defp do_transform(%{"tuple" => [":partial_chain", entity]}) do + {partial_chain, []} = + entity + |> String.replace(~r/[^\w|^{:,[|^,|^[|^\]^}|^\/|^\.|^"]^\s/, "") + |> Code.eval_string() + + {:partial_chain, partial_chain} + end + defp do_transform(%{"tuple" => entity}) do Enum.reduce(entity, {}, fn val, acc -> Tuple.append(acc, do_transform(val)) end) end diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs index a8e947365..336de7359 100644 --- a/test/config/config_db_test.exs +++ b/test/config/config_db_test.exs @@ -476,6 +476,14 @@ defmodule Pleroma.ConfigDBTest do assert ConfigDB.from_binary(binary) == [key: "value"] end + test "keyword with partial_chain key" do + binary = + ConfigDB.transform([%{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]}]) + + assert binary == :erlang.term_to_binary(partial_chain: &:hackney_connect.partial_chain/1) + assert ConfigDB.from_binary(binary) == [partial_chain: &:hackney_connect.partial_chain/1] + end + test "keyword" do binary = ConfigDB.transform([ diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 9b7120712..370d876d0 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -2509,6 +2509,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do %{"tuple" => [":seconds_valid", 60]}, %{"tuple" => [":path", ""]}, %{"tuple" => [":key1", nil]}, + %{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]}, %{"tuple" => [":regex1", "~r/https:\/\/example.com/"]}, %{"tuple" => [":regex2", "~r/https:\/\/example.com/u"]}, %{"tuple" => [":regex3", "~r/https:\/\/example.com/i"]}, @@ -2532,6 +2533,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do %{"tuple" => [":seconds_valid", 60]}, %{"tuple" => [":path", ""]}, %{"tuple" => [":key1", nil]}, + %{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]}, %{"tuple" => [":regex1", "~r/https:\\/\\/example.com/"]}, %{"tuple" => [":regex2", "~r/https:\\/\\/example.com/u"]}, %{"tuple" => [":regex3", "~r/https:\\/\\/example.com/i"]}, @@ -2544,6 +2546,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do ":seconds_valid", ":path", ":key1", + ":partial_chain", ":regex1", ":regex2", ":regex3", From 2dcb26a6e52b18c62aaa1ef464d94685732496ab Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 16 May 2020 12:28:24 +0200 Subject: [PATCH 25/25] CommonAPI: Unblock a user even if we don't have an activity. --- lib/pleroma/web/common_api/common_api.ex | 13 ++++++++++++- test/web/common_api/common_api_test.exs | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 601caeb46..7c94f16b6 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -25,10 +25,21 @@ defmodule Pleroma.Web.CommonAPI do require Logger def unblock(blocker, blocked) do - with %Activity{} = block <- Utils.fetch_latest_block(blocker, blocked), + with {_, %Activity{} = block} <- {:fetch_block, Utils.fetch_latest_block(blocker, blocked)}, {:ok, unblock_data, _} <- Builder.undo(blocker, block), {:ok, unblock, _} <- Pipeline.common_pipeline(unblock_data, local: true) do {:ok, unblock} + else + {:fetch_block, nil} -> + if User.blocks?(blocker, blocked) do + User.unblock(blocker, blocked) + {:ok, :no_activity} + else + {:error, :not_blocking} + end + + e -> + e end end diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 26e41c313..fd8299013 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -23,6 +23,18 @@ defmodule Pleroma.Web.CommonAPITest do setup do: clear_config([:instance, :limit]) setup do: clear_config([:instance, :max_pinned_statuses]) + describe "unblocking" do + test "it works even without an existing block activity" do + blocked = insert(:user) + blocker = insert(:user) + User.block(blocker, blocked) + + assert User.blocks?(blocker, blocked) + assert {:ok, :no_activity} == CommonAPI.unblock(blocker, blocked) + refute User.blocks?(blocker, blocked) + end + end + describe "deletion" do test "it works with pruned objects" do user = insert(:user)