diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index b11f7c3e..b55377d6 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -1639,7 +1639,7 @@ row.wrap.sb .col { content:attr(title); } .user-id[title]:hover:after { - content:"Double tap to highlight" attr(data-count); + content: attr(title-mobile); } [title]:hover:before { content: ''; diff --git a/gulp/res/js/hideimages.js b/gulp/res/js/hideimages.js index 483c4723..36dce43b 100644 --- a/gulp/res/js/hideimages.js +++ b/gulp/res/js/hideimages.js @@ -1,4 +1,4 @@ -/* globals setLocalStorage */ +/* globals __ setLocalStorage */ let imageSources = new Set(JSON.parse(localStorage.getItem('hiddenimages'))); let imageSourcesList; @@ -8,7 +8,7 @@ const toggleSource = (source, state) => { const images = document.querySelectorAll(`img.file-thumb[src="${source}"], img.catalog-thumb[src="${source}"]`); images.forEach(i => i.classList[state?'add':'remove']('vh')); const buttons = document.querySelectorAll(`a.hide-image[data-src="${source}"]`); - buttons.forEach(b => b.textContent = state ? 'Show' : 'Hide'); + buttons.forEach(b => b.textContent = state ? __('Show') : __('Hide')); }; toggleAllHidden(true); diff --git a/gulp/res/js/threadstat.js b/gulp/res/js/threadstat.js index a70d9333..efe5758a 100644 --- a/gulp/res/js/threadstat.js +++ b/gulp/res/js/threadstat.js @@ -16,7 +16,8 @@ window.addEventListener('DOMContentLoaded', () => { if (updateId && updateId !== idString) { continue; } const count = idMap.get(idString); idElems[i].setAttribute('data-count', ` (${count})`); - idElems[i].setAttribute('title', `Double click to highlight (${count})`); + idElems[i].setAttribute('title', __n('Double click to highlight (%s)', count)); + idElems[i].setAttribute('title-mobile', __n('Double tap to highlight (%s)', count)); } }; diff --git a/locales/en.json b/locales/en.json index dafbd53e..f366b274 100644 --- a/locales/en.json +++ b/locales/en.json @@ -80,6 +80,12 @@ "Catalog": "Catalog", "Creation Date": "Creation Date", "Draw": "Draw", + "Double click to highlight (%s)": { + "other": "Double click to highlight (%s)" + }, + "Double tap to highlight (%s)": { + "other": "Double tap to highlight (%s)" + }, "Edit": "Edit", "Email": "Email", "Files": { @@ -128,6 +134,8 @@ "Reply Count": "Reply Count", "Reports": "Reports", "Roles": "Roles", + "Reverse": "Reverse", + "Reverse Image Search": "Reverse Image Search", "Select/Drop/Paste files": { "one": "Select/Drop/Paste file", "other": "Select/Drop/Paste files" @@ -137,6 +145,7 @@ "Show Post Actions": "Show Post Actions", "Sort By": "Sort By", "Spoiler": "Spoiler", + "Spoiler File": "Spoiler File", "Strip Filename": "Strip Filename", "Subject": "Subject", "Submit": "Submit", diff --git a/locales/pt.json b/locales/pt.json index 2ad9e064..b8db90d8 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -80,6 +80,12 @@ "Catalog": "Catálogo", "Creation Date": "Criação", "Draw": "Desenhar", + "Double click to highlight (%s)": { + "other": "Carrega duas vezes para ver (%s)" + }, + "Double tap to highlight (%s)": { + "other": "Carrega duas vezes para mostrar todos (%s)" + }, "Edit": "Editar", "Email": "Opção", "Files": { @@ -128,6 +134,8 @@ "Reply Count": "Respostas", "Reports": "Denúncias", "Roles": "Permissões", + "Reverse": "Reversa", + "Reverse Image Search": "Procura reversa de imagem", "Select/Drop/Paste files": { "one": "Seleciona/Arrasta/Cola ficheiro", "other": "Seleciona/Arrasta/Cola ficheiros" @@ -137,6 +145,7 @@ "Show Post Actions": "Denunciar/Moderar", "Sort By": "Ordenar", "Spoiler": "Spoiler", + "Spoiler File": "Spoiler Ficheiro", "Strip Filename": "Limpar Nome", "Subject": "Assunto", "Submit": "Enviar", diff --git a/views/mixins/post.pug b/views/mixins/post.pug index 7a27f7c7..f4d293eb 100644 --- a/views/mixins/post.pug +++ b/views/mixins/post.pug @@ -93,7 +93,7 @@ mixin post(post, truncate, manage=false, globalmanage=false, ban=false, overboar - const type = file.mimetype.split('/')[0] span.post-file-info span - a.filename(href='/file/'+file.filename title='Download '+file.originalFilename download=file.originalFilename) #{post.spoiler || file.spoiler ? 'Spoiler File' : file.originalFilename} + a.filename(href='/file/'+file.filename title='Download '+file.originalFilename download=file.originalFilename) #{post.spoiler || file.spoiler ? __('Spoiler File') : file.originalFilename} br if globalmanage && file.phash != null span #{file.phash} @@ -101,7 +101,7 @@ mixin post(post, truncate, manage=false, globalmanage=false, ban=false, overboar if !file.attachment && !(post.spoiler || file.spoiler) span.jsonly b [ - a.dummy-link.hide-image.noselect(data-src=`/file/${file.hasThumb ? 'thumb/'+file.hash+file.thumbextension : file.filename}`) Hide + a.dummy-link.hide-image.noselect(data-src=`/file/${file.hasThumb ? 'thumb/'+file.hash+file.thumbextension : file.filename}`) #{__('Hide')} b ] span | (#{file.sizeString} @@ -113,7 +113,7 @@ mixin post(post, truncate, manage=false, globalmanage=false, ban=false, overboar if type === 'image' if (board && board.settings.reverseImageSearchLinks === true) || (overboard && overboardReverseLinks === true) || manage || globalmanage | - span: a(href=`${reverseImageLinksURL.replace('%s', encodeURIComponent(meta.url+'/file/'+file.filename))}` rel='nofollow' referrerpolicy='same-origin' title='Reverse Image Search' target='_blank') Reverse + span: a(href=`${reverseImageLinksURL.replace('%s', encodeURIComponent(meta.url+'/file/'+file.filename))}` rel='nofollow' referrerpolicy='same-origin' title=__('Reverse Image Search') target='_blank') #{__('Reverse')} if file.originalFilename.endsWith('-tegaki.png') - const matchingReplayFile = post.files.find(f => f.originalFilename.slice(0, -4) === file.originalFilename.slice(0,-3)); if matchingReplayFile !== undefined