Skip to content

Commit

Permalink
“文章时效性”提示多语言适配
Browse files Browse the repository at this point in the history
  • Loading branch information
fancunshuo committed Jan 15, 2024
1 parent 18db64b commit 6004f93
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 4 deletions.
3 changes: 3 additions & 0 deletions languages/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: 'Vorheriger'
next_post: 'Nächster'
updated: 'Geändert am %s'
outdate:
title: 'Rechtzeitigkeitserinnerung für Artikel'
content: 'Dies ist ein Artikel, der vor %s Tagen veröffentlicht wurde, und einige Informationen könnten sich geändert haben.'
meta:
wordcount: '%s wörter'
min2read: '%s minuten'
Expand Down
3 changes: 3 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: 'Previous'
next_post: 'Next'
updated: 'Last updated on %s'
outdate:
title: 'Timeliness reminder for articles'
content: 'This is an article published %s days ago, and some information may have changed. Please pay attention to discernment.'
meta:
wordcount: '%s words'
min2read: '%s mins'
Expand Down
3 changes: 3 additions & 0 deletions languages/eo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: 'Antaŭa afiŝo'
next_post: 'Sekva afiŝo'
updated: 'Aktualizita: %s'
outdate:
title: '@ info: whatsthis'
content: 'Tio estas artiklo publikigita antaŭ la %s tagoj, kaj kelkaj informoj eble ŝan ĝiĝis. Bonvolu atenti la malprudentecon.'
meta:
wordcount: '%s vortoj'
min2read: '%s minutoj'
Expand Down
3 changes: 3 additions & 0 deletions languages/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: 'Anterior'
next_post: 'Siguiente'
updated: 'Última actualización el %s'
outdate:
title: 'Consejos de puntualidad del artículo'
content: 'Este es un artículo publicado hace %s días, y parte de la información puede haber cambiado, preste atención a la selección.'
meta:
wordcount: '%s palabras'
min2read: '%s minutos'
Expand Down
3 changes: 3 additions & 0 deletions languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: '前の記事'
next_post: '次の記事'
updated: '最終更新日:%s'
outdate:
title: '記事の有効性のヒント'
content: 'これは%sに掲載される前の記事で、一部の情報が変更されている可能性がありますので、識別に注意してください。'
meta:
wordcount: '%s 単語'
min2read: '%s 分'
Expand Down
3 changes: 3 additions & 0 deletions languages/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: 'Предыдущий'
next_post: 'Следующий'
updated: 'Последнее обновление %s'
outdate:
title: 'Настройка статьи'
content: 'Это статья, опубликованная %s ранее, часть информации может измениться, обратите внимание на скрининг.'
meta:
wordcount: '%s слов'
min2read: '%s минут'
Expand Down
3 changes: 3 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最后更新于 %s'
outdate:
title: '文章时效性提示'
content: '这是一篇发布于%s天前的文章,部分信息可能已发生改变,请注意甄别。'
meta:
wordcount: '%s 字'
min2read: '%s 分钟'
Expand Down
3 changes: 3 additions & 0 deletions languages/zh-HK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最後更新於:%s'
outdate:
title: '文章時效性提示'
content: '這是一篇發佈於%s天前的文章,部分資訊可能已發生改變,請注意甄別。'
meta:
wordcount: '%s 字'
min2read: '%s 分鐘'
Expand Down
3 changes: 3 additions & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最後更新於:%s'
outdate:
title: '文章時效性提示'
content: '這是一篇發佈於%s天前的文章,部分資訊可能已發生改變,請注意甄別。'
meta:
wordcount: '%s 字'
min2read: '%s 分鐘'
Expand Down
8 changes: 4 additions & 4 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ page.banner_mask_alpha = page.banner_mask_alpha || theme.post.banner_mask_alpha
<% if (theme.post.outdate.enable) { %>
<% if (interval > theme.post.outdate.warning_day * 3600 * 24 * 1000 && interval < theme.post.outdate.error_day * 3600 * 24 * 1000) { %>
<div class="note note-warning">
<h5>文章时效性提示</h5>
<p>这是一篇发布于 <%- parseInt(interval / 86400000) %> 天前的文章,部分信息可能已发生改变,请注意甄别。</p>
<h5><%- __('post.outdate.title') %></h5>
<p><%- __('post.outdate.content', parseInt(interval / 86400000)) %></p>
</div>
<% } else if(interval > theme.post.outdate.error_day * 3600 * 24 * 1000) { %>
<div class="note note-danger">
<h5>文章时效性提示</h5>
<p>这是一篇发布于 <%- parseInt(interval / 86400000) %> 天前的文章,部分信息可能已发生改变,请注意甄别。</p>
<h5><%- __('post.outdate.title') %></h5>
<p><%- __('post.outdate.content', parseInt(interval / 86400000)) %></p>
</div>
<% } %>
<% } %>
Expand Down

0 comments on commit 6004f93

Please sign in to comment.