From 9f9761fe63e8cecf03e71ef20848057e658b5655 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 18 Mar 2024 15:20:56 +0100 Subject: [PATCH 1/4] Added Derivates Platforms to links section --- apps/block_scout_web/config/navigation.exs | 3 +++ .../lib/block_scout_web/templates/layout/_topnav.html.eex | 6 ++++++ .../lib/block_scout_web/views/layout_view.ex | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/apps/block_scout_web/config/navigation.exs b/apps/block_scout_web/config/navigation.exs index d8940b1cabc4..7befd77addf7 100644 --- a/apps/block_scout_web/config/navigation.exs +++ b/apps/block_scout_web/config/navigation.exs @@ -35,6 +35,9 @@ config :block_scout_web, finance_tools_list: [ %{title: "Celo Tracker", url: "https://celotracker.com/"} ], + derivates_platforms_list: [ + %{title: "ImmortalX", url: "https://www.immortalx.io/"} + ], resources: [ %{title: "Celo Vote", url: "https://celovote.com/"}, %{title: "Celo Forum", url: "https://forum.celo.org/"}, 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 b7dd615d4211..64e2e15a1e7e 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 @@ -203,6 +203,12 @@ <%= title %> <% end %> +
+

<%= gettext("Derivates Platforms") %>

+ <%= for %{url: url, title: title} <- derivates_platforms_list() do %> + <%= title %> + <% end %> +
<%= if Application.get_env(:block_scout_web, :gas_tracker)[:enabled_in_menu] == true do %> diff --git a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex index 50c05345c652..7fb912ef02df 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex @@ -218,6 +218,10 @@ defmodule BlockScoutWeb.LayoutView do list(:finance_tools_list) end + def derivates_platforms_list do + list(:derivates_platforms_list) + end + def resources_list do list(:resources) end From 6dc30f35b9c04cb2595564aee68b2ce89bc964cd Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 18 Mar 2024 15:49:26 +0100 Subject: [PATCH 2/4] Update blockscout.yml Debug translations --- .github/workflows/blockscout.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blockscout.yml b/.github/workflows/blockscout.yml index ff12358ccfab..2d82fae7473d 100644 --- a/.github/workflows/blockscout.yml +++ b/.github/workflows/blockscout.yml @@ -212,7 +212,12 @@ jobs: key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_${{ env.CACHE_VERSION }}-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" - + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 20 + if: true + with: + limit-access-to-actor: true - run: | mix gettext.extract --merge | tee stdout.txt ! grep "Wrote " stdout.txt From 275c62ea466bccc24cf66230526d07ef89466d82 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 18 Mar 2024 16:17:04 +0100 Subject: [PATCH 3/4] Updte translations --- apps/block_scout_web/priv/gettext/default.pot | 7 ++++++- .../block_scout_web/priv/gettext/en/LC_MESSAGES/default.po | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 41b1395d8172..3f34f47c60e4 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -3519,7 +3519,7 @@ msgstr "" msgid "Finance Tools" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:209 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:215 #, elixir-autogen, elixir-format msgid "Gas Tracker" msgstr "" @@ -3930,3 +3930,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "dune.com/mento-labs-eng" msgstr "" + +#: lib/block_scout_web/templates/layout/_topnav.html.eex:207 +#, elixir-autogen, elixir-format +msgid "Derivates Platforms" +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 8ff442c66dc5..1c80692d4615 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 @@ -3519,7 +3519,7 @@ msgstr "" msgid "Finance Tools" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:209 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:215 #, elixir-autogen, elixir-format, fuzzy msgid "Gas Tracker" msgstr "" @@ -3930,3 +3930,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "dune.com/mento-labs-eng" msgstr "" + +#: lib/block_scout_web/templates/layout/_topnav.html.eex:207 +#, elixir-autogen, elixir-format +msgid "Derivates Platforms" +msgstr "" From 212468f701d1add6a5f00ed58d6291e4f2862e33 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 18 Mar 2024 16:17:58 +0100 Subject: [PATCH 4/4] Remove tmate debug --- .github/workflows/blockscout.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/blockscout.yml b/.github/workflows/blockscout.yml index 2d82fae7473d..ff12358ccfab 100644 --- a/.github/workflows/blockscout.yml +++ b/.github/workflows/blockscout.yml @@ -212,12 +212,7 @@ jobs: key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_${{ env.CACHE_VERSION }}-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 20 - if: true - with: - limit-access-to-actor: true + - run: | mix gettext.extract --merge | tee stdout.txt ! grep "Wrote " stdout.txt