File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/components/Page/Posts Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,20 @@ import {
66 encode ,
77 type ClubsProfile ,
88} from ' @devprotocol/clubs-core'
9- import { ref } from ' vue'
9+ import { ref , onMounted } from ' vue'
1010import Profile from ' ../../Common/Profile.vue'
1111import type { Comment , CommentPrimitives } from ' ../../../types'
1212import IconSend from ' ../../../assets/images/icon-send.svg'
1313import IconTrash from ' ../../../assets/images/icon-trash.svg'
1414import { getSignature , getMessage } from ' ../../../fixtures/session'
1515import DOMPurify from ' dompurify'
1616import { marked } from ' marked'
17+ import { i18nFactory } from ' @devprotocol/clubs-core'
18+
19+ import { Strings } from ' ./i18n'
20+
21+ const i18nBase = i18nFactory (Strings )
22+ let i18n = ref <ReturnType <typeof i18nBase >>(i18nBase ([' en' ]))
1723
1824type Props = {
1925 feedId: string
@@ -201,6 +207,10 @@ const deleteComment = async (commentId: string) => {
201207 }
202208 }
203209}
210+
211+ onMounted (() => {
212+ i18n .value = i18nBase (navigator .languages )
213+ })
204214 </script >
205215
206216<template >
@@ -253,7 +263,7 @@ const deleteComment = async (commentId: string) => {
253263 class =" w-11/12 bg-transparent rounded border border-gray-400 px-2 py-2 text-base text-gray-700 focus:border-indigo-500 focus:outline-none"
254264 type =" text"
255265 v-model =" newComment"
256- placeholder =" Add your thoughts... "
266+ : placeholder =" i18n('AddYourThoughts') "
257267 :disabled =" isCommenting"
258268 />
259269 <button
Original file line number Diff line number Diff line change 11import type { ClubsI18nParts } from '@devprotocol/clubs-core'
22
33export const Strings = {
4+ AddYourThoughts : { en : 'Add your thoughts...' , ja : 'コメントを入力' } ,
45 Post : { en : 'Post' , ja : '投稿する' } ,
56 Title : { en : 'Title' , ja : '件名' } ,
67 WhatsHappening : { en : "What's happening" , ja : '本文' } ,
You can’t perform that action at this time.
0 commit comments