Skip to content

Commit

Permalink
🌐 refactor: improve "Last updated on" format (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo authored Jun 28, 2024
1 parent d689c15 commit 3bb2dbc
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion i18n/ar.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ two_words = "كلمتين" # Two words.
few_words = "$NUMBER كلمات" # 3 to 10 words.
many_words = "$NUMBER كلمة" # 11 or more words.

last_updated_on = "آخر تحديث كان في"
last_updated_on = "تم التحديث في $DATE"
see_changes = "الإطلاع على التغييرات"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/ca.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER mins de lectura"
zero_words = "Cap paraula"
one_words = "$NUMBER paraula"
many_words = "$NUMBER paraules"
last_updated_on = "Última actualizació el"
last_updated_on = "Actualitzat el $DATE"
see_changes = "Veure canvis"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ many_min_read = "$NUMBER Min. Lesezeit"
zero_words = "Keine Wörter"
one_words = "$NUMBER Wort"
many_words = "$NUMBER Wörter"
last_updated_on = "Zuletzt aktualisiert am"
last_updated_on = "Aktualisiert am $DATE"
see_changes = "Änderungen anzeigen"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER min read"
zero_words = "No words"
one_words = "$NUMBER word"
many_words = "$NUMBER words"
last_updated_on = "Last updated on"
last_updated_on = "Updated on $DATE"
see_changes = "See changes"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER mins de lectura"
zero_words = "Cero palabras"
one_words = "$NUMBER palabra"
many_words = "$NUMBER palabras"
last_updated_on = "Última actualización el"
last_updated_on = "Actualizado el $DATE"
see_changes = "Ver cambios"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/fa.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ many_min_read = "خواندن $NUMBER دقیقه"
zero_words = "هیچ کلمه‌ای"
one_words = "$NUMBER کلمه"
many_words = "$NUMBER کلمه"
last_updated_on = "آخرین به‌روزرسانی در"
last_updated_on = "آخرین به‌روزرسانی در $DATE"
see_changes = "مشاهده تغییرات"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER min de lecture"
zero_words = "aucun mot"
one_words = "$NUMBER mot"
many_words = "$NUMBER mots"
last_updated_on = "Dernière mise à jour le"
last_updated_on = "Mis à jour le $DATE"
see_changes = "Voir les modifications"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/hi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ many_min_read = "$NUMBER मिनट पठन समय"
zero_words = "कोई शब्द नहीं"
one_words = "$NUMBER शब्द"
many_words = "$NUMBER शब्द"
last_updated_on = "आखिरी अपडेट"
last_updated_on = "$DATE को अपडेट किया गया"
see_changes = "बदलाव देखें"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER min di lettura"
zero_words = "Nessuna parola"
one_words = "$NUMBER parola"
many_words = "$NUMBER parole"
last_updated_on = "Ultimo aggiornamento il"
last_updated_on = "Aggiornato il $DATE"
see_changes = "Vedi modifiche"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/ja.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ many_min_read = "$NUMBER 分の読了時間"
zero_words = "単語数ゼロ"
one_words = "$NUMBER 単語"
many_words = "$NUMBER 単語"
last_updated_on = "最終更新日"
last_updated_on = "$DATE に更新"
see_changes = "変更を見る"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/ko.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ many_min_read = "$NUMBER 분 읽기"
zero_words = "단어 없음"
one_words = "$NUMBER 단어"
many_words = "$NUMBER 단어"
last_updated_on = "최근 업데이트"
last_updated_on = "$DATE에 업데이트됨"
see_changes = "변경사항 보기"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/nl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER minuten lezen"
zero_words = "Geen woorden"
one_words = "$NUMBER woord"
many_words = "$NUMBER woorden"
last_updated_on = "Laatst geupdate op"
last_updated_on = "Bijgewerkt op $DATE"
see_changes = "Zie wijzigingen"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/pt-PT.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER mins de leitura"
zero_words = "Nenhuma palavra"
one_words = "$NUMBER palavra"
many_words = "$NUMBER palavras"
last_updated_on = "Última atualização em"
last_updated_on = "Atualizado em $DATE"
see_changes = "Ver alterações"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/ru.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ zero_words = "Нет слов"
one_words = "$NUMBER слово"
few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14
many_words = "$NUMBER слов" # 5-9, 0, 11-14, and others
last_updated_on = "Последнее обновление"
last_updated_on = "Обновлено $DATE"
see_changes = "Смотреть изменения"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/uk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ zero_words = "Без слів"
one_words = "$NUMBER слово"
few_words = "$NUMBER слова" # 2, 3, 4 but not 12-14
many_words = "$NUMBER слів" # 5-9, 0, 11-14, and others
last_updated_on = "Останнє оновлення"
last_updated_on = "Оновлено $DATE"
see_changes = "Переглянути зміни"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-Hans.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER 分钟阅读"
zero_words = "没有字"
one_words = "$NUMBER 字"
many_words = "$NUMBER 字"
last_updated_on = "最后更新于"
last_updated_on = "更新于 $DATE"
see_changes = "修改纪录"

# Post body.
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-Hant.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ many_min_read = "$NUMBER 分鐘閱讀"
zero_words = "沒有字"
one_words = "$NUMBER 字"
many_words = "$NUMBER 字"
last_updated_on = "最後更新於"
last_updated_on = "更新於 $DATE"
see_changes = "修改紀錄"

# Post body.
Expand Down
5 changes: 4 additions & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ <h1 class="article-title">

{#- Last updated on -#}
{% if page.updated %}
</ul><ul class="meta last-updated"><li>{{ macros_translate::translate(key="last_updated_on", default="Last updated on", language_strings=language_strings) }} {{ macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) }}</li>
{%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%}
{%- set formatted_date = macros_format_date::format_date(date=page.updated, short=true, language_strings=language_strings) -%}
{%- set updated_str = last_updated_str | replace(from="$DATE", to=formatted_date) -%}
</ul><ul class="meta last-updated"><li>{{ updated_str }}</li>
{# Show link to remote changes if enabled #}
{% if config.extra.remote_repository_url and macros_settings::evaluate_setting_priority(setting="show_remote_changes", page=page, default_global_value=true) == "true" %}
{%- if previous_visible -%}{{ separator }}&nbsp;{%- endif -%}
Expand Down

0 comments on commit 3bb2dbc

Please sign in to comment.