From c27292b7177dbad9ba6cead2956423b8105ce153 Mon Sep 17 00:00:00 2001 From: Sebastian Abondano Date: Wed, 31 Oct 2018 16:34:56 -0400 Subject: [PATCH] Add GraphiQL link to topnav Why: * For BlockScout users to learn about our GraphQL API. * Issue link: n/a This change addresses the need by: * Editing `_topnav.html.eex` template to include link to `/graphiql`. * Fixing `/api_docs/index.html.eex` template to use "BlockScout" instead of "Explorer". * Updates translation/gettext files. --- .../templates/api_docs/index.html.eex | 2 +- .../templates/layout/_topnav.html.eex | 20 ++++++++-- apps/block_scout_web/priv/gettext/default.pot | 39 ++++++++++++------- .../priv/gettext/en/LC_MESSAGES/default.po | 39 ++++++++++++------- 4 files changed, 65 insertions(+), 35 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex index 6c9e707011..85cd28cd5d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex @@ -4,7 +4,7 @@

API Documentation

[ <%= gettext "Base URL:" %> <%= @conn.host %>/api ] -

<%= gettext "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests." %>

+

<%= gettext "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 9dda45ecbe..dbe0afbb63 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -56,13 +56,25 @@ <%= gettext("Accounts") %> <% end %> -
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index abc6ec1a5a..9ae0e22d88 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -83,11 +83,6 @@ msgstr "" msgid "A string with the name of the module to be invoked." msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 -msgid "API" -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4 msgid "API endpoints for the %{subnetwork}" @@ -660,12 +655,12 @@ msgid "Owner Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:107 msgid "POA Core" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:106 msgid "POA Sokol" msgstr "" @@ -757,13 +752,13 @@ msgid "Responses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:83 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:90 msgid "Search" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:83 msgid "Search by address, transaction hash, or block number" msgstr "" @@ -872,11 +867,6 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/api_docs/index.html.eex:7 -msgid "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests." -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/transaction/overview.html.eex:23 msgid "This transaction is pending confirmation." @@ -1221,3 +1211,22 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:82 msgid "Loading" msgstr "" + +#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 +msgid "APIs" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 +msgid "GraphQL" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/api_docs/index.html.eex:7 +msgid "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/layout/_topnav.html.eex:73 +msgid "RPC" +msgstr "" 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 a804ee65a4..d55c8e73de 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 @@ -83,11 +83,6 @@ msgstr "" msgid "A string with the name of the module to be invoked." msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 -msgid "API" -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4 msgid "API endpoints for the %{subnetwork}" @@ -660,12 +655,12 @@ msgid "Owner Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:107 msgid "POA Core" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:106 msgid "POA Sokol" msgstr "" @@ -757,13 +752,13 @@ msgid "Responses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:83 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:90 msgid "Search" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:83 msgid "Search by address, transaction hash, or block number" msgstr "" @@ -872,11 +867,6 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/api_docs/index.html.eex:7 -msgid "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests." -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/transaction/overview.html.eex:23 msgid "This transaction is pending confirmation." @@ -1221,3 +1211,22 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:82 msgid "Loading" msgstr "" + +#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 +msgid "APIs" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 +msgid "GraphQL" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/api_docs/index.html.eex:7 +msgid "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/layout/_topnav.html.eex:73 +msgid "RPC" +msgstr ""