fix: add missing i18n for `Search` (#102)
* feat(i18n): add missing `Search` key * fix: update i18n text --------- Co-authored-by: saicaca <zephyird@gmail.com>
This commit is contained in:
parent
5cfc78ef65
commit
815692899d
|
@ -1,6 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from 'svelte'
|
||||
import {url} from "@utils/url-utils.ts"
|
||||
import { i18n } from '@i18n/translation';
|
||||
import I18nKey from '@i18n/i18nKey';
|
||||
let keywordDesktop = ''
|
||||
let keywordMobile = ''
|
||||
let result = []
|
||||
|
@ -70,7 +72,7 @@ $: search(keywordMobile, false)
|
|||
dark:bg-white/5 dark:hover:bg-white/10 dark:focus-within:bg-white/10
|
||||
">
|
||||
<slot name="search-icon"></slot>
|
||||
<input placeholder="Search" bind:value={keywordDesktop} on:focus={() => search(keywordDesktop, true)}
|
||||
<input placeholder="{i18n(I18nKey.search)}" bind:value={keywordDesktop} on:focus={() => search(keywordDesktop, true)}
|
||||
class="transition-all pl-10 text-sm bg-transparent outline-0
|
||||
h-full w-40 active:w-60 focus:w-60 text-black/50 dark:text-white/50"
|
||||
>
|
||||
|
|
|
@ -2,6 +2,7 @@ enum I18nKey {
|
|||
home = 'home',
|
||||
about = 'about',
|
||||
archive = 'archive',
|
||||
search = 'search',
|
||||
|
||||
tags = 'tags',
|
||||
categories = 'categories',
|
||||
|
|
|
@ -5,6 +5,7 @@ export const en: Translation = {
|
|||
[Key.home]: 'Home',
|
||||
[Key.about]: 'About',
|
||||
[Key.archive]: 'Archive',
|
||||
[Key.search]: 'Search',
|
||||
|
||||
[Key.tags]: 'Tags',
|
||||
[Key.categories]: 'Categories',
|
||||
|
|
|
@ -5,6 +5,7 @@ export const ja: Translation = {
|
|||
[Key.home]: 'Home',
|
||||
[Key.about]: 'About',
|
||||
[Key.archive]: 'Archive',
|
||||
[Key.search]: '検索',
|
||||
|
||||
[Key.tags]: 'タグ',
|
||||
[Key.categories]: 'カテゴリ',
|
||||
|
|
|
@ -5,6 +5,7 @@ export const zh_CN: Translation = {
|
|||
[Key.home]: '主页',
|
||||
[Key.about]: '关于',
|
||||
[Key.archive]: '归档',
|
||||
[Key.search]: '搜索',
|
||||
|
||||
[Key.tags]: '标签',
|
||||
[Key.categories]: '分类',
|
||||
|
|
|
@ -5,6 +5,7 @@ export const zh_TW: Translation = {
|
|||
[Key.home]: '首頁',
|
||||
[Key.about]: '關於',
|
||||
[Key.archive]: '彙整',
|
||||
[Key.search]: '搜尋',
|
||||
|
||||
[Key.tags]: '標籤',
|
||||
[Key.categories]: '分類',
|
||||
|
|
Loading…
Reference in New Issue