Added in the missing Gettext

pull/700/head
katibest 6 years ago committed by jimmay5469
parent ffbfd2942c
commit 7b1eee7399
  1. 8
      apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex
  2. 18
      apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex
  3. 20
      apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex
  4. 2
      apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex
  5. 2
      apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex
  6. 2
      apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex
  7. 2
      apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex
  8. 2
      apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex
  9. 6
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  10. 6
      apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex
  11. 6
      apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex

@ -5,17 +5,17 @@
<div class="card-body"> <div class="card-body">
<div class="icon-links float-right"> <div class="icon-links float-right">
<span data-clipboard-text="<%= @address %>"> <span data-clipboard-text="<%= @address %>">
<button type="button" class="icon-link" id="button" data-toggle="tooltip" data-placement="top" title="<%= gettext("Copy Address") %>" aria-label="Copy Address"> <button type="button" class="icon-link" id="button" data-toggle="tooltip" data-placement="top" title="<%= gettext("Copy Address") %>" aria-label="<%= gettext("Copy Address") %>">
<i class="fas fa-clone"></i> <i class="fas fa-clone"></i>
</button> </button>
</span> </span>
<span data-toggle="modal" data-target="#qrModal"> <span data-toggle="modal" data-target="#qrModal">
<button type="button" class="icon-link" data-toggle="tooltip" data-placement="top" title="<%= gettext("QR Code") %>" aria-label="Show QR Code"> <button type="button" class="icon-link" data-toggle="tooltip" data-placement="top" title="<%= gettext("QR Code") %>" aria-label="<%= gettext("Show QR Code") %>">
<i class="fas fa-qrcode"></i> <i class="fas fa-qrcode"></i>
</button> </button>
</span> </span>
</div> </div>
<h1 class="card-title"><%= address_title(@address) %> Details </h1> <h1 class="card-title"><%= address_title(@address) %> <%= gettext "Details" %> </h1>
<h3 class="<%= if BlockScoutWeb.AddressView.contract?(@address) do %>contract-address<% end %>" data-test="address_detail_hash"><%= @address.hash %></h3> <h3 class="<%= if BlockScoutWeb.AddressView.contract?(@address) do %>contract-address<% end %>" data-test="address_detail_hash"><%= @address.hash %></h3>
<div class="d-flex flex-row flex-md-column justify-content-start text-muted"> <div class="d-flex flex-row flex-md-column justify-content-start text-muted">
<span class="mr-4 mb-md-2"><span data-selector="transaction-count"><%= Cldr.Number.to_string!(@transaction_count, format: "#,###") %></span> <%= gettext "Transactions" %></span> <span class="mr-4 mb-md-2"><span data-selector="transaction-count"><%= Cldr.Number.to_string!(@transaction_count, format: "#,###") %></span> <%= gettext "Transactions" %></span>
@ -62,7 +62,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h2 class="modal-title" id="qrModalLabel"><%= gettext "QR Code" %></h2> <h2 class="modal-title" id="qrModalLabel"><%= gettext "QR Code" %></h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="<%= gettext("Close") %>">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>

@ -62,25 +62,25 @@
<%= if smart_contract_verified?(@address) do %> <%= if smart_contract_verified?(@address) do %>
<div class="mb-4"> <div class="mb-4">
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted">Contract name:</dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Contract name:" %></dt>
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.name %></dd> <dd class="col-sm-8 col-md-10"><%= @address.smart_contract.name %></dd>
</dl> </dl>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted">Optimization enabled</dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Optimization enabled" %></dt>
<dd class="col-sm-8 col-md-10"><%= format_optimization(@address.smart_contract.optimization) %></dd> <dd class="col-sm-8 col-md-10"><%= format_optimization(@address.smart_contract.optimization) %></dd>
</dl> </dl>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted">Compiler version</dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Compiler version" %></dt>
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.compiler_version %></dd> <dd class="col-sm-8 col-md-10"><%= @address.smart_contract.compiler_version %></dd>
</dl> </dl>
</div> </div>
<hr/> <hr/>
<section> <section>
<div class="d-flex justify-content-between align-items-baseline"> <div class="d-flex justify-content-between align-items-baseline">
<h3>Contract source code</h3> <h3><%= gettext "Contract source code" %></h3>
<span class="icon-links" data-clipboard-text="<%= @address.smart_contract.contract_source_code %>"> <span class="icon-links" data-clipboard-text="<%= @address.smart_contract.contract_source_code %>">
<button type="button" class="button button-secondary button-sm" id="button" data-toggle="tooltip" data-placement="top"> <button type="button" class="button button-secondary button-sm" id="button" data-toggle="tooltip" data-placement="top">
Copy Contract Source Code <%= gettext "Copy Contract Source Code" %>
</button> </button>
</span> </span>
</div> </div>
@ -95,10 +95,10 @@
<section> <section>
<div class="d-flex justify-content-between align-items-baseline"> <div class="d-flex justify-content-between align-items-baseline">
<h3>Contract ABI</h3> <h3><%= gettext "Contract ABI" %></h3>
<span class="icon-links" data-clipboard-text="<%= format_smart_contract_abi(@address.smart_contract.abi) %>"> <span class="icon-links" data-clipboard-text="<%= format_smart_contract_abi(@address.smart_contract.abi) %>">
<button type="button" class="button button-secondary button-sm" id="button"> <button type="button" class="button button-secondary button-sm" id="button">
Copy Contract ABI <%= gettext "Copy Contract ABI" %>
</button> </button>
</span> </span>
</div> </div>
@ -115,10 +115,10 @@
<% end %> <% end %>
<section> <section>
<div class="d-flex justify-content-between align-items-baseline"> <div class="d-flex justify-content-between align-items-baseline">
<h3>Contract creation code</h3> <h3><%= gettext "Contract creation code" %></h3>
<span class="icon-links" data-clipboard-text="<%= @address.contract_code %>"> <span class="icon-links" data-clipboard-text="<%= @address.contract_code %>">
<button type="button" class="button button-secondary button-sm" id="button"> <button type="button" class="button button-secondary button-sm" id="button">
Copy Contract Creation Code <%= gettext "Copy Contract Creation Code" %>
</button> </button>
</span> </span>
</div> </div>

@ -2,26 +2,26 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h1 class="card-title">New Smart Contract</h1> <h1 class="card-title"><%= gettext "New Smart Contract" %></h1>
<%= form_for @changeset, <%= form_for @changeset,
address_verify_contract_path(@conn, :create, @conn.params["address_id"]), address_verify_contract_path(@conn, :create, @conn.params["address_id"]),
fn f -> %> fn f -> %>
<div class="form-group"> <div class="form-group">
<%= label f, :address_hash, "Contract Address" %> <%= label f, :address_hash, gettext("Contract Address") %>
<%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %> <%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %>
<%= error_tag f, :address_hash, id: "contract-address-help-block", class: "text-danger" %> <%= error_tag f, :address_hash, id: "contract-address-help-block", class: "text-danger" %>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= label f, :name, "Contract Name" %> <%= label f, :name, gettext("Contract Name") %>
<%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %> <%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %>
<%= error_tag f, :name, id: "contract-name-help-block", class: "text-danger" %> <%= error_tag f, :name, id: "contract-name-help-block", class: "text-danger" %>
</div> </div>
<div class="form-group mb-4"> <div class="form-group mb-4">
<%= label f, :compiler_version, "Compiler" %> <%= label f, :compiler_version, gettext("Compiler") %>
<%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %> <%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %>
<%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %> <%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %>
</div> </div>
@ -31,19 +31,19 @@
<div class="form-check mb-2"> <div class="form-check mb-2">
<%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> <%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= label :smart_contract_optimization, :false, "No", class: "form-check-label" %> <%= label :smart_contract_optimization, :false, gettext("No"), class: "form-check-label" %>
</div> </div>
<div class="form-check"> <div class="form-check">
<%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> <%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= label :smart_contract_optimization, :true, "Yes", class: "form-check-label" %> <%= label :smart_contract_optimization, :true, gettext("Yes"), class: "form-check-label" %>
</div> </div>
<%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger" %> <%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger" %>
</div> </div>
<div class="form-group mb-4"> <div class="form-group mb-4">
<%= label f, :contract_source_code, "Enter the Solidity Contract Code below" %> <%= label f, :contract_source_code, gettext("Enter the Solidity Contract Code below") %>
<%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %> <%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %>
<%= error_tag f, :contract_source_code, id: "contract-source-code-help-block", class: "text-danger", "data-test": "contract-source-code-error" %> <%= error_tag f, :contract_source_code, id: "contract-source-code-help-block", class: "text-danger", "data-test": "contract-source-code-error" %>
</div> </div>
@ -56,10 +56,10 @@
class="d-none px-4 position-absolute button button-primary button-sm mr-2"> class="d-none px-4 position-absolute button button-primary button-sm mr-2">
<i class="fa fa-spinner fa-spin"></i> <%= gettext("loading.....") %> <i class="fa fa-spinner fa-spin"></i> <%= gettext("loading.....") %>
</button> </button>
<%= submit "Verify and publish", class: "button button-primary button-sm mr-2", "data-loading": "animation" %> <%= submit gettext("Verify and publish"), class: "button button-primary button-sm mr-2", "data-loading": "animation" %>
<%= reset "Reset", class: "button button-secondary button-sm mr-2" %> <%= reset gettext("Reset"), class: "button button-secondary button-sm mr-2" %>
<%= link( <%= link(
"Cancel", gettext("Cancel"),
to: address_contract_path(@conn, :index, @conn.params["address_id"]), to: address_contract_path(@conn, :index, @conn.params["address_id"]),
class: "button button-sm") %> class: "button button-sm") %>
<% end %> <% end %>

@ -56,7 +56,7 @@
<!-- MOBILE DROPDOWN NAV --> <!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none"> <ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center"> <li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Internal Transactions</a> <a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Internal Transactions") %></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<%= link( <%= link(
gettext("Transactions"), gettext("Transactions"),

@ -65,7 +65,7 @@
<!-- MOBILE DROPDOWN NAV --> <!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none"> <ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center"> <li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Tokens</a> <a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext "Tokens" %></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<%= link( <%= link(

@ -56,7 +56,7 @@
<!-- MOBILE DROPDOWN NAV --> <!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none"> <ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center"> <li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Transactions</a> <a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext "Transactions" %></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<%= link( <%= link(
gettext("Transactions"), gettext("Transactions"),

@ -2,7 +2,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h1>Blocks</h1> <h1><%= gettext "Blocks" %></h1>
<span data-selector="blocks-list"> <span data-selector="blocks-list">
<%= for block <- @blocks do %> <%= for block <- @blocks do %>

@ -20,7 +20,7 @@
<!-- MOBILE DROPDOWN NAV --> <!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none"> <ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center"> <li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Transactions</a> <a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext "Transactions" %></a>
<div class="dropdown-menu"> <div class="dropdown-menu">
<%= link( <%= link(
gettext("Transactions"), gettext("Transactions"),

@ -3,7 +3,7 @@
<%= link to: chain_path(@conn, :show), class: "navbar-brand", "data-test": "header_logo" do %> <%= link to: chain_path(@conn, :show), class: "navbar-brand", "data-test": "header_logo" do %>
<img class="navbar-logo" src="<%= Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:logo] %>" /> <img class="navbar-logo" src="<%= Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:logo] %>" />
<% end %> <% end %>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="<%= gettext("Toggle navigation") %>">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
@ -26,12 +26,12 @@
</ul> </ul>
<%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %> <%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %>
<div class="input-group"> <div class="input-group">
<%= search_input f, :q, class: 'form-control mr-auto', placeholder: gettext("Search by address, transaction hash, or block number"), "aria-describedby": "search-icon", "aria-label": "Search", "data-test": "search_input" %> <%= search_input f, :q, class: 'form-control mr-auto', placeholder: gettext("Search by address, transaction hash, or block number"), "aria-describedby": "search-icon", "aria-label": gettext("Search"), "data-test": "search_input" %>
<div class="input-group-append"> <div class="input-group-append">
<button class="input-group-text" id="search-icon"><i class="fas fa-search"></i></button> <button class="input-group-text" id="search-icon"><i class="fas fa-search"></i></button>
</div> </div>
</div> </div>
<button class="btn btn-outline-success my-2 my-sm-0 sr-only" type="submit">Search</button> <button class="btn btn-outline-success my-2 my-sm-0 sr-only" type="submit"><%= gettext "Search" %></button>
<% end %> <% end %>
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item dropdown"> <li class="nav-item dropdown">

@ -5,12 +5,12 @@
<div class="card-body"> <div class="card-body">
<div class="icon-links float-right"> <div class="icon-links float-right">
<span data-clipboard-text="<%= @token.contract_address_hash %>"> <span data-clipboard-text="<%= @token.contract_address_hash %>">
<button type="button" class="icon-link" id="button" data-toggle="tooltip" data-placement="top" title="<%= gettext("Copy Address") %>" aria-label="Copy Address"> <button type="button" class="icon-link" id="button" data-toggle="tooltip" data-placement="top" title="<%= gettext("Copy Address") %>" aria-label="<%= gettext("Copy Address") %>">
<i class="fas fa-clone"></i> <i class="fas fa-clone"></i>
</button> </button>
</span> </span>
<span data-toggle="modal" data-target="#qrModal"> <span data-toggle="modal" data-target="#qrModal">
<button type="button" class="icon-link" data-toggle="tooltip" data-placement="top" title="<%= gettext("QR Code") %>" aria-label="Show QR Code"> <button type="button" class="icon-link" data-toggle="tooltip" data-placement="top" title="<%= gettext("QR Code") %>" aria-label="<%= gettext("QR Code") %>">
<i class="fas fa-qrcode"></i> <i class="fas fa-qrcode"></i>
</button> </button>
</span> </span>
@ -69,7 +69,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h2 class="modal-title" id="qrModalLabel"><%= gettext "QR Code" %></h2> <h2 class="modal-title" id="qrModalLabel"><%= gettext "QR Code" %></h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="<%= gettext("Close") %>">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>

@ -67,7 +67,7 @@
<%= for log <- @logs do %> <%= for log <- @logs do %>
<div data-test="transaction_log" class="tile tile-muted"> <div data-test="transaction_log" class="tile tile-muted">
<dl class="row"> <dl class="row">
<dt class="col-md-1"> Address </dt> <dt class="col-md-1"> <%= gettext "Address" %> </dt>
<dd class="col-md-11"> <dd class="col-md-11">
<h3 class=""> <h3 class="">
<%= link( <%= link(
@ -78,7 +78,7 @@
) %> ) %>
</h3> </h3>
</dd> </dd>
<dt class="col-md-1"> Topics </dt> <dt class="col-md-1"><%= gettext "Topics" %></dt>
<dd class="col-md-11"> <dd class="col-md-11">
<%= unless is_nil(log.first_topic) do %> <%= unless is_nil(log.first_topic) do %>
<div class="text-dark"> <div class="text-dark">
@ -100,7 +100,7 @@
<% end %> <% end %>
</dd> </dd>
<dt class="col-md-1"> <dt class="col-md-1">
Data <%= gettext "Data" %>
</dt> </dt>
<dd class="col-md-11"> <dd class="col-md-11">
<%= unless is_nil(log.data) do %> <%= unless is_nil(log.data) do %>

Loading…
Cancel
Save