feat: i18n

This commit is contained in:
Shusui MOYATANI
2023-06-17 23:42:54 +09:00
parent 1a4c9dc49b
commit b3a0bfe772
26 changed files with 555 additions and 131 deletions

View File

@@ -20,6 +20,7 @@ import {
} from '@/core/column';
import useConfig from '@/core/useConfig';
import { useRequestCommand } from '@/hooks/useCommandBus';
import { useTranslation } from '@/i18n/useTranslation';
import usePubkey from '@/nostr/usePubkey';
import ensureNonNull from '@/utils/ensureNonNull';
@@ -28,6 +29,7 @@ type AddColumnProps = {
};
const AddColumn: Component<AddColumnProps> = (props) => {
const i18n = useTranslation();
const pubkey = usePubkey();
const { saveColumn } = useConfig();
const request = useRequestCommand();
@@ -85,7 +87,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<Home />
</span>
{i18n()('column.home')}
</button>
<button
class="flex basis-1/2 flex-col items-center gap-2 py-8 sm:basis-1/4"
@@ -94,7 +96,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<Bell />
</span>
{i18n()('column.notification')}
</button>
<button
class="flex basis-1/2 flex-col items-center gap-2 py-8 sm:basis-1/4"
@@ -103,7 +105,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<GlobeAlt />
</span>
{i18n()('column.japanese')}
</button>
{/*
<button
@@ -134,7 +136,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<MagnifyingGlass />
</span>
{i18n()('column.search')}
</button>
<button
class="flex basis-1/2 flex-col items-center gap-2 py-8 sm:basis-1/4"
@@ -143,7 +145,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<User />
</span>
稿
{i18n()('column.myPosts')}
</button>
<button
class="flex basis-1/2 flex-col items-center gap-2 py-8 sm:basis-1/4"
@@ -152,7 +154,7 @@ const AddColumn: Component<AddColumnProps> = (props) => {
<span class="inline-block h-8 w-8">
<Heart />
</span>
{i18n()('column.myReactions')}
</button>
</div>
</BasicModal>