From 91308ae56757436ac7b7443d8f41c02778ad9825 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 24 May 2022 23:47:24 +0800 Subject: [PATCH] refactor: decouple the `Archives` from `404` page (#576) Resolves #576 --- _data/locales/en.yml | 3 - _data/locales/es-ES.yml | 3 - _data/locales/fr-FR.yml | 153 ++++++++++++++++++++-------------------- _data/locales/id-ID.yml | 3 - _data/locales/ko-KR.yml | 3 - _data/locales/my-MM.yml | 3 - _data/locales/pt-BR.yml | 3 - _data/locales/ru-RU.yml | 3 - _data/locales/uk-UA.yml | 3 - _data/locales/vi-VN.yml | 5 +- _data/locales/zh-CN.yml | 3 - assets/404.html | 15 ---- 12 files changed, 76 insertions(+), 124 deletions(-) diff --git a/_data/locales/en.yml b/_data/locales/en.yml index 1221776..c4d5c79 100644 --- a/_data/locales/en.yml +++ b/_data/locales/en.yml @@ -44,9 +44,6 @@ meta: Powered by :PLATFORM with :THEME theme. not_found: statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. - hint_template: :HEAD_BAK to try finding it again, or search for it on the :ARCHIVES_PAGE. - head_back: Head back Home - archives_page: Archives page # ----- Posts related labels ----- diff --git a/_data/locales/es-ES.yml b/_data/locales/es-ES.yml index af0566a..a1e66ab 100644 --- a/_data/locales/es-ES.yml +++ b/_data/locales/es-ES.yml @@ -44,9 +44,6 @@ meta: Hecho con :PLATFORM usando el tema :THEME. not_found: statment: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe. - hint_template: :HEAD_BAK para intentar de nuevo, o búscala en la :ARCHIVES_PAGE. - head_back: Vuelve a inicio - archives_page: Página de archivo # ----- Posts related labels ----- diff --git a/_data/locales/fr-FR.yml b/_data/locales/fr-FR.yml index 414a75e..8b3cfb1 100644 --- a/_data/locales/fr-FR.yml +++ b/_data/locales/fr-FR.yml @@ -1,78 +1,75 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Post - category: Catégorie - tag: Tag - -# The tabs of sidebar -tabs: - # format: : - home: Accueil - categories: Catégories - tags: Tags - archives: Archives - about: A propos de - -# the text displayed in the search bar & search results -search: - hint: recherche - cancel: Annuler - no_results: Oups ! Aucun résultat trouvé. - -panel: - lastmod: Récemment mis à jour - trending_tags: Tags tendance - toc: Contenu - -copyright: - # Shown at the bottom of the post - license: - template: Cet article est sous licence :LICENSE_NAME par l'auteur. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Certains droits réservés. - verbose: >- - Sauf mention contraire, les articles de ce site sont publiés sous licence - sous la licence Creative Commons Attribution 4.0 International (CC BY 4.0) par l'auteur. - -meta: Propulsé par :PLATFORM avec le thème :THEME - -not_found: - statment: Désolé, nous avons égaré cette URL ou elle pointe vers quelque chose qui n'existe pas. - hint_template: :HEAD_BAK pour essayer de la retrouver, ou recherchez-la dans :ARCHIVES_PAGE. - head_back: Retourner à l'accueil - archives_page: Page d'archives - -# ----- Posts related labels ----- - -post: - written_by: Par - posted: Posté - updated: Mis à jour - words: mots - pageview_measure: vues - read_time: - unit: min - prompt: lire - relate_posts: Autres lectures - share: Partager - button: - next: Plus récent - previous: Plus ancien - copy_code: - succeed: Copié ! - share_link: - title: Copier le lien - succeed: Lien copié avec succès ! - # pinned prompt of posts list on homepage - pin_prompt: Épinglé - -# categories page -categories: - category_measure: catégories - post_measure: posts +# The layout text of site + +# ----- Commons label ----- + +layout: + post: Post + category: Catégorie + tag: Tag + +# The tabs of sidebar +tabs: + # format: : + home: Accueil + categories: Catégories + tags: Tags + archives: Archives + about: A propos de + +# the text displayed in the search bar & search results +search: + hint: recherche + cancel: Annuler + no_results: Oups ! Aucun résultat trouvé. + +panel: + lastmod: Récemment mis à jour + trending_tags: Tags tendance + toc: Contenu + +copyright: + # Shown at the bottom of the post + license: + template: Cet article est sous licence :LICENSE_NAME par l'auteur. + name: CC BY 4.0 + link: https://creativecommons.org/licenses/by/4.0/ + + # Displayed in the footer + brief: Certains droits réservés. + verbose: >- + Sauf mention contraire, les articles de ce site sont publiés sous licence + sous la licence Creative Commons Attribution 4.0 International (CC BY 4.0) par l'auteur. + +meta: Propulsé par :PLATFORM avec le thème :THEME + +not_found: + statment: Désolé, nous avons égaré cette URL ou elle pointe vers quelque chose qui n'existe pas. + +# ----- Posts related labels ----- + +post: + written_by: Par + posted: Posté + updated: Mis à jour + words: mots + pageview_measure: vues + read_time: + unit: min + prompt: lire + relate_posts: Autres lectures + share: Partager + button: + next: Plus récent + previous: Plus ancien + copy_code: + succeed: Copié ! + share_link: + title: Copier le lien + succeed: Lien copié avec succès ! + # pinned prompt of posts list on homepage + pin_prompt: Épinglé + +# categories page +categories: + category_measure: catégories + post_measure: posts diff --git a/_data/locales/id-ID.yml b/_data/locales/id-ID.yml index 37ad8ea..5a03406 100644 --- a/_data/locales/id-ID.yml +++ b/_data/locales/id-ID.yml @@ -44,9 +44,6 @@ meta: Didukung oleh :PLATFORM dengan tema :THEME. not_found: statment: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada. - hint_template: :HEAD_BAK untuk mencoba mencari kembali, atau cari di :ARCHIVES_PAGE. - head_back: Kembali ke Beranda - archives_page: Halaman Arsip # ----- Posts related labels ----- diff --git a/_data/locales/ko-KR.yml b/_data/locales/ko-KR.yml index 4bfd318..3580f14 100644 --- a/_data/locales/ko-KR.yml +++ b/_data/locales/ko-KR.yml @@ -44,9 +44,6 @@ meta: Powered by :PLATFORM with :THEME theme. not_found: statment: 해당 URL은 존재하지 않습니다. - hint_template: :HEAD_BAK을 눌러 다시 찾거나 :ARCHIVES_PAGE에서 검색해 주세요. - head_back: 홈으로 돌아가기 - archives_page: 아카이브 페이지 # ----- Posts related labels ----- diff --git a/_data/locales/my-MM.yml b/_data/locales/my-MM.yml index 6ad9e28..177d7db 100644 --- a/_data/locales/my-MM.yml +++ b/_data/locales/my-MM.yml @@ -44,9 +44,6 @@ meta: Powered by :PLATFORM with :THEME theme. not_found: statment: ဝမ်းနည်းပါသည်၊ ကျွန်ုပ်တို့သည် အဆိုပါ URL ကို မှားယွင်းစွာ နေရာချထားခြင်း သို့မဟုတ် ၎င်းသည် မရှိသောအရာကို ညွှန်ပြနေပါသည်။ - hint_template: ၎င်းကို ထပ်မံရှာဖွေရန် :HEAD_BAK , သို့မဟုတ် :ARCHIVES_PAGE တွင်ရှာပါ။ - head_back: အဓိကစာမျက်နှာသို့ပြန်သွားပါ။ - archives_page: မှတ်တမ်း​တိုက် စာမျက်နှာ။ # ----- Posts related labels ----- diff --git a/_data/locales/pt-BR.yml b/_data/locales/pt-BR.yml index b71f7f3..cec7bf6 100644 --- a/_data/locales/pt-BR.yml +++ b/_data/locales/pt-BR.yml @@ -44,9 +44,6 @@ meta: Feito com :PLATFORM usando o tema :THEME. not_found: statment: Desculpe, a página não foi encontrada. - hint_template: :HEAD_BAK para tentar encontrar novamente, ou procure na :ARCHIVES_PAGE. - head_back: Vá para a página inicial - archives_page: Página de arquivos # ----- Posts related labels ----- diff --git a/_data/locales/ru-RU.yml b/_data/locales/ru-RU.yml index 1a538fe..5e09211 100644 --- a/_data/locales/ru-RU.yml +++ b/_data/locales/ru-RU.yml @@ -44,9 +44,6 @@ meta: Powered by :PLATFORM with :THEME theme. not_found: statment: Извините, эта ссылка указывает на ресурс который не существует. - hint_template: :HEAD_BAK чтобы снова осуществить поиск, или поищите :ARCHIVES_PAGE. - head_back: Вернитесь на домашнюю страницу - archives_page: архиве # ----- Posts related labels ----- diff --git a/_data/locales/uk-UA.yml b/_data/locales/uk-UA.yml index c06faaf..566e25b 100644 --- a/_data/locales/uk-UA.yml +++ b/_data/locales/uk-UA.yml @@ -44,9 +44,6 @@ meta: Powered by :PLATFORM with :THEME theme. not_found: statment: Вибачте, це посилання вказує на ресурс, що не існує. - hint_template: :HEAD_BAK аби здійснити пошук, або пошукайте в :ARCHIVES_PAGE. - head_back: Поверніться на домашню сторінку - archives_page: архіві # ----- Posts related labels ----- diff --git a/_data/locales/vi-VN.yml b/_data/locales/vi-VN.yml index 2f8b675..200baea 100644 --- a/_data/locales/vi-VN.yml +++ b/_data/locales/vi-VN.yml @@ -42,9 +42,6 @@ meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME. not_found: statment: Xin lỗi, chúng tôi đã đặt nhầm URL hoặc đường dẫn trỏ đến một trang nào đó không tồn tại. - hint_template: :HEAD_BAK để thử lại, hoặc tìm kiếm trong :ARCHIVES_PAGE. - head_back: Quay về Trang chủ - archives_page: trang Lưu trữ # ----- Posts related labels ----- @@ -73,4 +70,4 @@ post: # categories page categories: category_measure: danh mục - post_measure: bài viết \ No newline at end of file + post_measure: bài viết diff --git a/_data/locales/zh-CN.yml b/_data/locales/zh-CN.yml index 880a47e..cbdaa20 100644 --- a/_data/locales/zh-CN.yml +++ b/_data/locales/zh-CN.yml @@ -43,9 +43,6 @@ meta: 本站由 :PLATFORM 生成,采用 :THEME 主题。 not_found: statment: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。 - hint_template: :HEAD_BAK尝试再次查找它,或在:ARCHIVES_PAGE上搜索它。 - head_back: 返回主页 - archives_page: 归档页面 # ----- Posts related labels ----- diff --git a/assets/404.html b/assets/404.html index 1608517..55f8f9d 100644 --- a/assets/404.html +++ b/assets/404.html @@ -12,20 +12,5 @@ redirect_from: {% include lang.html %}
- - {%- capture _head_back -%} - {{ site.data.locales[lang].not_found.head_back }} - {%- endcapture -%} - - {%- capture _archives_page -%} - {{ site.data.locales[lang].not_found.archives_page }} - {%- endcapture -%} -

{{site.data.locales[lang].not_found.statment }}

- -

{{ site.data.locales[lang].not_found.hint_template - | replace: ':HEAD_BAK', _head_back - | replace: ':ARCHIVES_PAGE', _archives_page }} -

-