diff options
Diffstat (limited to 'priv')
17 files changed, 232 insertions, 25 deletions
| diff --git a/priv/gettext/it/LC_MESSAGES/errors.po b/priv/gettext/it/LC_MESSAGES/errors.po index cd0cd6c65..6a6ec058e 100644 --- a/priv/gettext/it/LC_MESSAGES/errors.po +++ b/priv/gettext/it/LC_MESSAGES/errors.po @@ -3,8 +3,8 @@ msgstr ""  "Project-Id-Version: PACKAGE VERSION\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2020-06-19 14:33+0000\n" -"PO-Revision-Date: 2020-07-09 14:40+0000\n" -"Last-Translator: Ben Is <srsbzns@cock.li>\n" +"PO-Revision-Date: 2021-03-13 09:40+0000\n" +"Last-Translator: Ben Is <spambenis@fastwebnet.it>\n"  "Language-Team: Italian <https://translate.pleroma.social/projects/pleroma/"  "pleroma/it/>\n"  "Language: it\n" @@ -45,7 +45,7 @@ msgstr "ha una voce invalida"  ## From Ecto.Changeset.validate_exclusion/3  msgid "is reserved" -msgstr "è vietato" +msgstr "è riservato"  ## From Ecto.Changeset.validate_confirmation/3  msgid "does not match confirmation" @@ -123,7 +123,7 @@ msgstr "Richiesta invalida"  #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:425  #, elixir-format  msgid "Can't delete object" -msgstr "Non puoi eliminare quest'oggetto" +msgstr "Oggetto non eliminabile"  #: lib/pleroma/web/mastodon_api/controllers/status_controller.ex:196  #, elixir-format @@ -160,12 +160,12 @@ msgstr "Non puoi pubblicare un messaggio vuoto senza allegati"  #: lib/pleroma/web/common_api/utils.ex:504  #, elixir-format  msgid "Comment must be up to %{max_size} characters" -msgstr "I commenti posso al massimo consistere di %{max_size} caratteri" +msgstr "I commenti posso al massimo contenere %{max_size} caratteri"  #: lib/pleroma/config/config_db.ex:222  #, elixir-format  msgid "Config with params %{params} not found" -msgstr "Configurazione con parametri %{max_size} non trovata" +msgstr "Configurazione con parametri %{params} non trovata"  #: lib/pleroma/web/common_api/common_api.ex:95  #, elixir-format @@ -200,7 +200,7 @@ msgstr "Non de-intestato"  #: lib/pleroma/web/common_api/common_api.ex:126  #, elixir-format  msgid "Could not unrepeat" -msgstr "Non de-ripetuto" +msgstr "Non de-condiviso"  #: lib/pleroma/web/common_api/common_api.ex:428  #: lib/pleroma/web/common_api/common_api.ex:437 @@ -310,12 +310,12 @@ msgstr "Il messaggio ha superato la lunghezza massima"  #: lib/pleroma/plugs/ensure_public_or_authenticated_plug.ex:31  #, elixir-format  msgid "This resource requires authentication." -msgstr "Accedi per leggere." +msgstr "Accedi per poter leggere."  #: lib/pleroma/plugs/rate_limiter/rate_limiter.ex:206  #, elixir-format  msgid "Throttled" -msgstr "Strozzato" +msgstr "Limitato"  #: lib/pleroma/web/common_api/common_api.ex:266  #, elixir-format @@ -347,17 +347,17 @@ msgstr "Devi aggiungere un indirizzo email valido"  #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:389  #, elixir-format  msgid "can't read inbox of %{nickname} as %{as_nickname}" -msgstr "non puoi leggere i messaggi privati di %{nickname} come %{as_nickname}" +msgstr "non puoi leggere i messaggi di %{nickname} come %{as_nickname}"  #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:472  #, elixir-format  msgid "can't update outbox of %{nickname} as %{as_nickname}" -msgstr "non puoi aggiornare gli inviati di %{nickname} come %{as_nickname}" +msgstr "non puoi inviare da %{nickname} come %{as_nickname}"  #: lib/pleroma/web/common_api/common_api.ex:388  #, elixir-format  msgid "conversation is already muted" -msgstr "la conversazione è già zittita" +msgstr "la conversazione è già silenziata"  #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:316  #: lib/pleroma/web/activity_pub/activity_pub_controller.ex:491 @@ -419,7 +419,7 @@ msgstr "Errore interno"  #: lib/pleroma/web/oauth/fallback_controller.ex:29  #, elixir-format  msgid "Invalid Username/Password" -msgstr "Nome utente/parola d'ordine invalidi" +msgstr "Nome utente/password invalidi"  #: lib/pleroma/web/twitter_api/twitter_api.ex:118  #, elixir-format @@ -455,7 +455,7 @@ msgstr "Gestore OAuth non supportato: %{provider}."  #: lib/pleroma/uploaders/uploader.ex:72  #, elixir-format  msgid "Uploader callback timeout" -msgstr "Callback caricatmento scaduta" +msgstr "Callback caricamento scaduta"  #: lib/pleroma/web/uploader_controller.ex:23  #, elixir-format @@ -496,7 +496,7 @@ msgstr "Parametro mancante: %{name}"  #: lib/pleroma/web/oauth/oauth_controller.ex:322  #, elixir-format  msgid "Password reset is required" -msgstr "Necessario reimpostare parola d'ordine" +msgstr "Necessario reimpostare password"  #: 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 @@ -540,34 +540,32 @@ msgstr ""  #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:210  #, elixir-format  msgid "Unexpected error occurred while adding file to pack." -msgstr "Errore inaspettato durante l'aggiunta del file al pacchetto." +msgstr "Errore inatteso durante l'aggiunta del file al pacchetto."  #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:138  #, elixir-format  msgid "Unexpected error occurred while creating pack." -msgstr "Errore inaspettato durante la creazione del pacchetto." +msgstr "Errore inatteso durante la creazione del pacchetto."  #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:278  #, elixir-format  msgid "Unexpected error occurred while removing file from pack." -msgstr "Errore inaspettato durante la rimozione del file dal pacchetto." +msgstr "Errore inatteso durante la rimozione del file dal pacchetto."  #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:250  #, elixir-format  msgid "Unexpected error occurred while updating file in pack." -msgstr "Errore inaspettato durante l'aggiornamento del file nel pacchetto." +msgstr "Errore inatteso durante l'aggiornamento del file nel pacchetto."  #: lib/pleroma/web/pleroma_api/controllers/emoji_api_controller.ex:179  #, elixir-format  msgid "Unexpected error occurred while updating pack metadata." -msgstr "Errore inaspettato durante l'aggiornamento dei metadati del pacchetto." +msgstr "Errore inatteso durante l'aggiornamento dei metadati del pacchetto."  #: lib/pleroma/plugs/user_is_admin_plug.ex:21  #, elixir-format  msgid "User is not an admin." -msgstr "" -"L'utente non è un amministratore." -"OAuth." +msgstr "L'utente non è un amministratore."  #: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61  #, elixir-format diff --git a/priv/repo/migrations/20190711042021_create_safe_jsonb_set.exs b/priv/repo/migrations/20190711042021_create_safe_jsonb_set.exs index 43d616705..bfac09f9e 100644 --- a/priv/repo/migrations/20190711042021_create_safe_jsonb_set.exs +++ b/priv/repo/migrations/20190711042021_create_safe_jsonb_set.exs @@ -9,7 +9,7 @@ defmodule Pleroma.Repo.Migrations.CreateSafeJsonbSet do      begin        result := jsonb_set(target, path, coalesce(new_value, 'null'::jsonb), create_missing);        if result is NULL then -        raise 'jsonb_set tried to wipe the object, please report this incindent to Pleroma bug tracker. https://git.pleroma.social/pleroma/pleroma/issues/new'; +        raise 'jsonb_set tried to wipe the object, please report this incident to Pleroma bug tracker. https://git.pleroma.social/pleroma/pleroma/issues/new';          return target;        else          return result; diff --git a/priv/repo/migrations/20201221202251_create_hashtags.exs b/priv/repo/migrations/20201221202251_create_hashtags.exs new file mode 100644 index 000000000..8d2e9ae66 --- /dev/null +++ b/priv/repo/migrations/20201221202251_create_hashtags.exs @@ -0,0 +1,13 @@ +defmodule Pleroma.Repo.Migrations.CreateHashtags do +  use Ecto.Migration + +  def change do +    create_if_not_exists table(:hashtags) do +      add(:name, :citext, null: false) + +      timestamps() +    end + +    create_if_not_exists(unique_index(:hashtags, [:name])) +  end +end diff --git a/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs b/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs new file mode 100644 index 000000000..0442c3b87 --- /dev/null +++ b/priv/repo/migrations/20201221202252_remove_data_from_hashtags.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.RemoveDataFromHashtags do +  use Ecto.Migration + +  def up do +    alter table(:hashtags) do +      remove_if_exists(:data, :map) +    end +  end + +  def down do +    alter table(:hashtags) do +      add_if_not_exists(:data, :map, default: %{}) +    end +  end +end diff --git a/priv/repo/migrations/20201221203824_create_hashtags_objects.exs b/priv/repo/migrations/20201221203824_create_hashtags_objects.exs new file mode 100644 index 000000000..581f32b3c --- /dev/null +++ b/priv/repo/migrations/20201221203824_create_hashtags_objects.exs @@ -0,0 +1,13 @@ +defmodule Pleroma.Repo.Migrations.CreateHashtagsObjects do +  use Ecto.Migration + +  def change do +    create_if_not_exists table(:hashtags_objects, primary_key: false) do +      add(:hashtag_id, references(:hashtags), null: false, primary_key: true) +      add(:object_id, references(:objects), null: false, primary_key: true) +    end + +    # Note: PK index: "hashtags_objects_pkey" PRIMARY KEY, btree (hashtag_id, object_id) +    create_if_not_exists(index(:hashtags_objects, [:object_id])) +  end +end diff --git a/priv/repo/migrations/20210105195018_create_data_migrations.exs b/priv/repo/migrations/20210105195018_create_data_migrations.exs new file mode 100644 index 000000000..5f2e8d96c --- /dev/null +++ b/priv/repo/migrations/20210105195018_create_data_migrations.exs @@ -0,0 +1,17 @@ +defmodule Pleroma.Repo.Migrations.CreateDataMigrations do +  use Ecto.Migration + +  def change do +    create_if_not_exists table(:data_migrations) do +      add(:name, :string, null: false) +      add(:state, :integer, default: 1) +      add(:feature_lock, :boolean, default: false) +      add(:params, :map, default: %{}) +      add(:data, :map, default: %{}) + +      timestamps() +    end + +    create_if_not_exists(unique_index(:data_migrations, [:name])) +  end +end diff --git a/priv/repo/migrations/20210106183301_data_migration_create_populate_hashtags_table.exs b/priv/repo/migrations/20210106183301_data_migration_create_populate_hashtags_table.exs new file mode 100644 index 000000000..cf3cf26a0 --- /dev/null +++ b/priv/repo/migrations/20210106183301_data_migration_create_populate_hashtags_table.exs @@ -0,0 +1,16 @@ +defmodule Pleroma.Repo.Migrations.DataMigrationCreatePopulateHashtagsTable do +  use Ecto.Migration + +  def up do +    dt = NaiveDateTime.utc_now() + +    execute( +      "INSERT INTO data_migrations(name, inserted_at, updated_at) " <> +        "VALUES ('populate_hashtags_table', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;" +    ) +  end + +  def down do +    execute("DELETE FROM data_migrations WHERE name = 'populate_hashtags_table';") +  end +end diff --git a/priv/repo/migrations/20210111172254_create_data_migration_failed_ids.exs b/priv/repo/migrations/20210111172254_create_data_migration_failed_ids.exs new file mode 100644 index 000000000..18afa74ac --- /dev/null +++ b/priv/repo/migrations/20210111172254_create_data_migration_failed_ids.exs @@ -0,0 +1,14 @@ +defmodule Pleroma.Repo.Migrations.CreateDataMigrationFailedIds do +  use Ecto.Migration + +  def change do +    create_if_not_exists table(:data_migration_failed_ids, primary_key: false) do +      add(:data_migration_id, references(:data_migrations), null: false, primary_key: true) +      add(:record_id, :bigint, null: false, primary_key: true) +    end + +    create_if_not_exists( +      unique_index(:data_migration_failed_ids, [:data_migration_id, :record_id]) +    ) +  end +end diff --git a/priv/repo/migrations/20210121080964_add_default_text_search_config.exs b/priv/repo/migrations/20210121080964_add_default_text_search_config.exs index 09b6cccc9..27f600b70 100644 --- a/priv/repo/migrations/20210121080964_add_default_text_search_config.exs +++ b/priv/repo/migrations/20210121080964_add_default_text_search_config.exs @@ -4,7 +4,7 @@ defmodule Pleroma.Repo.Migrations.AddDefaultTextSearchConfig do    def change do      execute("DO $$      BEGIN -    execute 'ALTER DATABASE '||current_database()||' SET default_text_search_config = ''english'' '; +    execute 'ALTER DATABASE \"'||current_database()||'\" SET default_text_search_config = ''english'' ';      END      $$;")    end diff --git a/priv/repo/migrations/20210202110641_add_pinned_objects_to_users.exs b/priv/repo/migrations/20210202110641_add_pinned_objects_to_users.exs new file mode 100644 index 000000000..644527246 --- /dev/null +++ b/priv/repo/migrations/20210202110641_add_pinned_objects_to_users.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.AddPinnedObjectsToUsers do +  use Ecto.Migration + +  def change do +    alter table(:users) do +      add(:pinned_objects, :map) +    end +  end +end diff --git a/priv/repo/migrations/20210203141144_add_featured_address_to_users.exs b/priv/repo/migrations/20210203141144_add_featured_address_to_users.exs new file mode 100644 index 000000000..0f6a21611 --- /dev/null +++ b/priv/repo/migrations/20210203141144_add_featured_address_to_users.exs @@ -0,0 +1,23 @@ +defmodule Pleroma.Repo.Migrations.AddFeaturedAddressToUsers do +  use Ecto.Migration + +  def up do +    alter table(:users) do +      add(:featured_address, :string) +    end + +    create(index(:users, [:featured_address])) + +    execute(""" + +    update users set featured_address = concat(ap_id, '/collections/featured') where local = true and featured_address is null; + +    """) +  end + +  def down do +    alter table(:users) do +      remove(:featured_address) +    end +  end +end diff --git a/priv/repo/migrations/20210205145000_move_pinned_activities_into_pinned_objects.exs b/priv/repo/migrations/20210205145000_move_pinned_activities_into_pinned_objects.exs new file mode 100644 index 000000000..9aee545e3 --- /dev/null +++ b/priv/repo/migrations/20210205145000_move_pinned_activities_into_pinned_objects.exs @@ -0,0 +1,28 @@ +defmodule Pleroma.Repo.Migrations.MovePinnedActivitiesIntoPinnedObjects do +  use Ecto.Migration + +  import Ecto.Query + +  alias Pleroma.Repo +  alias Pleroma.User + +  def up do +    from(u in User) +    |> select([u], {u.id, fragment("?.pinned_activities", u)}) +    |> Repo.stream() +    |> Stream.each(fn {user_id, pinned_activities_ids} -> +      pinned_activities = Pleroma.Activity.all_by_ids_with_object(pinned_activities_ids) + +      pins = +        Map.new(pinned_activities, fn %{object: %{data: %{"id" => object_id}}} -> +          {object_id, NaiveDateTime.utc_now()} +        end) + +      from(u in User, where: u.id == ^user_id) +      |> Repo.update_all(set: [pinned_objects: pins]) +    end) +    |> Stream.run() +  end + +  def down, do: :noop +end diff --git a/priv/repo/migrations/20210206045221_remove_pinned_activities_from_users.exs b/priv/repo/migrations/20210206045221_remove_pinned_activities_from_users.exs new file mode 100644 index 000000000..a3ee93f48 --- /dev/null +++ b/priv/repo/migrations/20210206045221_remove_pinned_activities_from_users.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.RemovePinnedActivitiesFromUsers do +  use Ecto.Migration + +  def up do +    alter table(:users) do +      remove(:pinned_activities) +    end +  end + +  def down do +    alter table(:users) do +      add(:pinned_activities, {:array, :string}, default: []) +    end +  end +end diff --git a/priv/repo/migrations/20210222183840_remove_hashtags_objects_duplicate_index.exs b/priv/repo/migrations/20210222183840_remove_hashtags_objects_duplicate_index.exs new file mode 100644 index 000000000..6c4a2dfdc --- /dev/null +++ b/priv/repo/migrations/20210222183840_remove_hashtags_objects_duplicate_index.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.RemoveHashtagsObjectsDuplicateIndex do +  use Ecto.Migration + +  @moduledoc "Removes `hashtags_objects_hashtag_id_object_id_index` index (duplicate of PK index)." + +  def up do +    drop_if_exists(unique_index(:hashtags_objects, [:hashtag_id, :object_id])) +  end + +  def down, do: nil +end diff --git a/priv/repo/migrations/20210222184616_change_hashtags_name_to_text.exs b/priv/repo/migrations/20210222184616_change_hashtags_name_to_text.exs new file mode 100644 index 000000000..8940b6ca3 --- /dev/null +++ b/priv/repo/migrations/20210222184616_change_hashtags_name_to_text.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.ChangeHashtagsNameToText do +  use Ecto.Migration + +  def up do +    alter table(:hashtags) do +      modify(:name, :text) +    end +  end + +  def down do +    alter table(:hashtags) do +      modify(:name, :citext) +    end +  end +end diff --git a/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs b/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs new file mode 100644 index 000000000..cf68f1be6 --- /dev/null +++ b/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs @@ -0,0 +1,17 @@ +defmodule Pleroma.Repo.Migrations.UserNotificationSettingsFix do +  use Ecto.Migration + +  def up do +    execute(~s(UPDATE users +    SET  +      notification_settings = '{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb WHERE notification_settings IS NULL +)) + +    execute("ALTER TABLE users +    ALTER COLUMN notification_settings SET NOT NULL") +  end + +  def down do +    :ok +  end +end diff --git a/priv/scrubbers/default.ex b/priv/scrubbers/default.ex index 7b06994de..4694a92a5 100644 --- a/priv/scrubbers/default.ex +++ b/priv/scrubbers/default.ex @@ -39,6 +39,7 @@ defmodule Pleroma.HTML.Scrubber.Default do    Meta.allow_tag_with_these_attributes(:code, [])    Meta.allow_tag_with_these_attributes(:del, [])    Meta.allow_tag_with_these_attributes(:em, []) +  Meta.allow_tag_with_these_attributes(:hr, [])    Meta.allow_tag_with_these_attributes(:i, [])    Meta.allow_tag_with_these_attributes(:li, [])    Meta.allow_tag_with_these_attributes(:ol, []) @@ -58,6 +59,8 @@ defmodule Pleroma.HTML.Scrubber.Default do    Meta.allow_tag_with_this_attribute_values(:span, "class", ["h-card"])    Meta.allow_tag_with_these_attributes(:span, []) +  Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline"]) +    @allow_inline_images Pleroma.Config.get([:markup, :allow_inline_images])    if @allow_inline_images do | 
