From ec4ffe1802d664ccc02fa2805223b612005c249f Mon Sep 17 00:00:00 2001 From: nikitosing Date: Tue, 19 Apr 2022 22:01:49 +0300 Subject: [PATCH] Fix warnings, eslint; mix gettext --- .../assets/js/pages/api_keys.js | 2 +- ...saction_internal_transaction_controller.ex | 3 +-- .../transaction_token_transfer_controller.ex | 3 +-- .../models/add_watchlist_address.ex | 2 +- .../models/get_transaction_tags.ex | 1 - apps/block_scout_web/priv/gettext/default.pot | 23 ++++++++++++++----- .../priv/gettext/en/LC_MESSAGES/default.po | 23 ++++++++++++++----- 7 files changed, 38 insertions(+), 19 deletions(-) diff --git a/apps/block_scout_web/assets/js/pages/api_keys.js b/apps/block_scout_web/assets/js/pages/api_keys.js index d0433c020e..c57b1379cc 100644 --- a/apps/block_scout_web/assets/js/pages/api_keys.js +++ b/apps/block_scout_web/assets/js/pages/api_keys.js @@ -6,4 +6,4 @@ $('[delete-api-key]').on('click', (event) => { if (confirm('Are you sure you want to delete API key?')) { $(event.currentTarget.parentElement).find('form').trigger('submit') } -}) \ No newline at end of file +}) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex index bc1185d8ba..3341f7fb38 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex @@ -6,8 +6,7 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do import GetTransactionTags, only: [get_transaction_tags: 2] alias BlockScoutWeb.{AccessHelpers, Controller, InternalTransactionView, TransactionController} - alias Explorer.Accounts.TagTransaction - alias Explorer.{Chain, Market, Repo} + alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token alias Phoenix.View diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex index abbfcf9cf6..4cd0e49c1e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex @@ -6,8 +6,7 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do import GetTransactionTags, only: [get_transaction_tags: 2] alias BlockScoutWeb.{AccessHelpers, Controller, TransactionController, TransactionTokenTransferView} - alias Explorer.Accounts.TagTransaction - alias Explorer.{Chain, Market, Repo} + alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token alias Phoenix.View diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex index 04b6b164d6..93eaba1ba0 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex @@ -9,7 +9,7 @@ defmodule AddWatchlistAddress do call(watchlist, params) """ - alias Explorer.Accounts.Notify.ForbiddenAddress + alias Explorer.Accounts.Notifier.ForbiddenAddress alias Explorer.Accounts.{Watchlist, WatchlistAddress} alias Explorer.Chain.Address alias Explorer.Repo diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex index 446e4cb6a4..0bec387cab 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex @@ -6,7 +6,6 @@ defmodule GetTransactionTags do # import Ecto.Query, only: [from: 2] alias Explorer.Accounts.TagTransaction - alias Explorer.Chain.Hash alias Explorer.Repo def get_transaction_tags(transaction_hash, %{id: identity_id}) do diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index d3f83464aa..a0e6b0dde3 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -141,7 +141,7 @@ msgstr "" msgid "Add" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:38 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:45 #, elixir-autogen, elixir-format msgid "Add API key" msgstr "" @@ -713,6 +713,11 @@ msgstr "" msgid "Create" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "Create an API key to use with your RPC и EthRPC API requests." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:26 #, elixir-autogen, elixir-format msgid "Create2" @@ -900,7 +905,7 @@ msgstr "" msgid "Easy Cowboy! This block does not exist yet!" msgstr "" -#: lib/block_scout_web/templates/account/api_key/row.html.eex:12 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:16 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" @@ -1271,6 +1276,12 @@ msgstr "" msgid "Last Balance Update" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Learn more" +msgstr "" + #: lib/block_scout_web/templates/layout/app.html.eex:45 #, elixir-autogen, elixir-format msgid "Less than" @@ -1464,7 +1475,7 @@ msgid "N/A bytes" msgstr "" #: lib/block_scout_web/templates/account/api_key/form.html.eex:19 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:22 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:4 @@ -1730,7 +1741,7 @@ msgstr "" msgid "Records" msgstr "" -#: lib/block_scout_web/templates/account/api_key/row.html.eex:9 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:13 #, elixir-autogen, elixir-format msgid "Remove" msgstr "" @@ -2708,9 +2719,9 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:14 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 #, elixir-autogen, elixir-format -msgid "You don't have API keys yet" +msgid "You can create 3 API keys per account." msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:111 diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 53d903f8e0..2c5a6e313a 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -141,7 +141,7 @@ msgstr "" msgid "Add" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:38 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:45 #, elixir-autogen, elixir-format msgid "Add API key" msgstr "" @@ -713,6 +713,11 @@ msgstr "" msgid "Create" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "Create an API key to use with your RPC и EthRPC API requests." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:26 #, elixir-autogen, elixir-format msgid "Create2" @@ -900,7 +905,7 @@ msgstr "" msgid "Easy Cowboy! This block does not exist yet!" msgstr "" -#: lib/block_scout_web/templates/account/api_key/row.html.eex:12 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:16 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" @@ -1271,6 +1276,12 @@ msgstr "" msgid "Last Balance Update" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Learn more" +msgstr "" + #: lib/block_scout_web/templates/layout/app.html.eex:45 #, elixir-autogen, elixir-format msgid "Less than" @@ -1464,7 +1475,7 @@ msgid "N/A bytes" msgstr "" #: lib/block_scout_web/templates/account/api_key/form.html.eex:19 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:22 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:4 @@ -1730,7 +1741,7 @@ msgstr "" msgid "Records" msgstr "" -#: lib/block_scout_web/templates/account/api_key/row.html.eex:9 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:13 #, elixir-autogen, elixir-format msgid "Remove" msgstr "" @@ -2708,9 +2719,9 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:14 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 #, elixir-autogen, elixir-format -msgid "You don't have API keys yet" +msgid "You can create 3 API keys per account." msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:111