From 2840c9ccd2acd3a8300008581b9c41c350b216e7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 17 Apr 2023 04:17:42 +0800 Subject: [PATCH] perf(i18n): set the global default locales to "en" (#979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - avoid missing labels caused by languages ​​outside of locales - also improved the code style --- _includes/datetime.html | 28 +++-- _includes/footer.html | 46 ++++--- _includes/post-nav.html | 54 ++++---- _includes/post-sharing.html | 67 +++++----- _includes/read-time.html | 29 ++--- _includes/related-posts.html | 131 +++++++------------- _includes/search-loader.html | 23 ++-- _includes/sidebar.html | 4 + _includes/toc.html | 21 ++-- _includes/topbar.html | 75 ++++++----- _includes/trending-tags.html | 68 ++++------ _includes/update-list.html | 59 ++++----- _layouts/categories.html | 232 ++++++++++++++++------------------- _layouts/category.html | 11 +- _layouts/default.html | 59 +++++++++ _layouts/page.html | 18 +-- _layouts/post.html | 133 +++++++++----------- _layouts/tag.html | 11 +- assets/404.html | 6 + 19 files changed, 513 insertions(+), 562 deletions(-) diff --git a/_includes/datetime.html b/_includes/datetime.html index 9f954b698ef..87c03338b05 100644 --- a/_includes/datetime.html +++ b/_includes/datetime.html @@ -3,18 +3,30 @@ See: ${JS_ROOT}/utils/locale-dateime.js --> -{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} -{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} +{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | +default: '%d/%m/%Y' %} {% assign df_dayjs = +site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} diff --git a/_includes/footer.html b/_includes/footer.html index a015f469f1b..2340fbf1a90 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -2,41 +2,37 @@ diff --git a/_includes/post-nav.html b/_includes/post-nav.html index 736bec376b2..8b30c01a08f 100644 --- a/_includes/post-nav.html +++ b/_includes/post-nav.html @@ -1,34 +1,34 @@ -