Skip to content

Commit

Permalink
feat(theme): improve i18n config
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jul 9, 2022
1 parent 434e4df commit 58e2a5d
Show file tree
Hide file tree
Showing 26 changed files with 161 additions and 194 deletions.
91 changes: 29 additions & 62 deletions docs/theme/src/config/theme/i18n.md
Expand Up @@ -18,29 +18,29 @@ export interface HopeThemeLocaleData {
*/
lang: string;

/**
* Outlook
*/
outlookLocales: {
/**
* Theme Color
*
* 主题色
*/
themeColor: string;

/**
* Theme mode
*
* 夜间模式
*/
darkmode: string;

/**
* Fullscreen text
*
* 全屏文字
*/
fullscreen: string;
};

/**
* Blog
*/
blogLocales: {
/** 文章文字 */
article: string;
Expand All @@ -66,39 +66,34 @@ export interface HopeThemeLocaleData {
encrypt: string;
};

/**
* Pagination
*/
paginationLocales: {
/**
* Previous page button label text
*
* 上一页文字
*/
prev: string;

/**
* Next page button label text
*
* 下一页文字
*/
next: string;

/**
* Navigation hint label text
*
* 跳转提示文字
*/
navigate: string;

/**
* Navigation button label text
*
* 跳转按钮文字
*/
action: string;

/**
* Error text when invalid page number, `$page` will be replaced by total page number automatically
* Error text when invalid page number
*
* 页码错误文字,其中 `$page` 会自动替换为当前的总页数
* @description `$page` will be replaced by total page number automatically
*/
errorText: string;
};
Expand All @@ -108,12 +103,18 @@ export interface HopeThemeLocaleData {
*/
encryptLocales: {
/**
* Encrypt title
* Aria label for encrypt icon
*/
title: string;
iconLabel: string;

/**
* Password placeholder
*/
placeholder: string;

/**
* Whether remember password
*/
remember: string;

/**
Expand All @@ -122,126 +123,92 @@ export interface HopeThemeLocaleData {
errorHint: string;
};

/**
* Navbar
*/
navbarLocales: {
/**
* Navbar language selection config
*
* Text of the language selection dropdown
*/
selectLangText: string;

/**
* Navbar language selection config
*
* Aria label of of the language selection dropdown
*/
selectLangAriaLabel: string;

/**
* Navbar language selection config
*
* Language name of current locale
*
* Displayed inside the language selection dropdown
*/
langName: string;
};

/**
* Page locate config
* Page meta
*/
metaLocales: {
/**
* Author label text
*
* 作者文字
*/
author: string;

/**
* Writing date label text
*
* 写作日期文字
*/
date: string;

/**
* Label text marked as original
*
* 标记原创的文字
*/
origin: string;

/**
* Page views label text
*
* 访问量文字
*/
views: string;

/**
* Tag label text
*
* 标签文字
*/
tag: string;

/**
* Category label text
*
* 分类文字
*/
category: string;

/**
* Expect reading time label text
*
* 期望阅读时间文字
*/
readingTime: string;

/**
* Words label Text
*
* 文章字数
*/
words: string;

/**
* Table of contents
*
* 此页内容
*/
toc: string;

/**
* Page nav - previous link
* Previous link
*/
prev: string;

/**
* Page nav - next link
* Next link
*/
next: string;

/**
* Page meta - last updated config
*
* The text to replace the default "Last Updated"
* last updated text
*/
lastUpdated: string;

/**
* Page meta - contributors config
*
* The text to replace the default "Contributors"
* Contributors text
*/
contributors: string;

/**
* Page meta - contributors config
*
* The text to replace the default "Edit this page"
* Edit link text
*/
editLink: string;
};
Expand All @@ -263,7 +230,7 @@ export interface HopeThemeLocaleData {
back: string;

/**
* sr-only message in `<ExternalLinkIcon>`
* screen reader only message in `<ExternalLinkIcon>`
*/
openInNewWindow: string;
};
Expand Down

0 comments on commit 58e2a5d

Please sign in to comment.