Skip to content

Commit

Permalink
Added suggestion to savepagenow on url-search [closes arquivo/pwa-tec…
Browse files Browse the repository at this point in the history
  • Loading branch information
VascoRatoFCCN committed Oct 27, 2021
1 parent df26d30 commit 84fbf99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion translations/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ about:
savepagenow:
text:
pt: 'Gravar páginas'
en: 'Record pages'
en: 'SavePageNow'
5 changes: 4 additions & 1 deletion translations/page-search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ not-found:
pt: <a href="//arquivo.pt/sugerir">Sugira</a> a página para que seja arquivada
third:
en: <a href="//timetravel.mementoweb.org/">Search other web archives</a>
pt: <a href="//timetravel.mementoweb.org/">Pesquise outros arquivos web</a>
pt: <a href="//timetravel.mementoweb.org/">Pesquise outros arquivos web</a>
fourth:
en: Try using <a href="/services/savepagenow?url=${url}">SavePageNow</a> to record the missing webpage
pt: Use o <a href="/services/savepagenow?url=${url}">SavePageNow</a> para gravar a página em falta
7 changes: 5 additions & 2 deletions views/templates/body/body-not-found.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if (typeof query == 'undefined') { query = ''} %>
<% if (typeof suggestion == 'undefined') { suggestion = queryM } %>
<% if (typeof query == 'undefined') { query = ''; } %>
<% if (typeof suggestion == 'undefined') { suggestion = query; } %>
<% if (typeof searchType == 'undefined') { searchType = 'page-search'; } %>

<!-- starts pages search results: create a fetch loop here -->
Expand All @@ -18,6 +18,9 @@
<li class="fix-padding"><%- t('page-search.not-found.suggestions.'+searchType+'.first') %></li>
<li><%- t('page-search.not-found.suggestions.'+searchType+'.second') %></li>
<li><%- t('page-search.not-found.suggestions.'+searchType+'.third') %></li>
<% if (searchType == 'url-search') { %>
<li><%- t('page-search.not-found.suggestions.url-search.fourth',{url:query}) %></li>
<% } %>
</ul>
</section>
<!-- ends not-found-message -->
Expand Down

0 comments on commit 84fbf99

Please sign in to comment.