Translate placeholders

This commit is contained in:
Nicola Benaglia 2025-05-20 22:29:35 +02:00
parent 748a469598
commit 71475c2e77
13 changed files with 65 additions and 23 deletions

View File

@ -362,7 +362,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
})} })}
</Label> </Label>
<Input <Input
placeholder="Name" placeholder={t('core:name', {
postProcess: 'capitalizeFirstChar',
})}
value={seedName} value={seedName}
onChange={(e) => setSeedName(e.target.value)} onChange={(e) => setSeedName(e.target.value)}
/> />
@ -370,12 +372,14 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => {
<Spacer height="7px" /> <Spacer height="7px" />
<Label> <Label>
{t('auth:seed', { {t('auth:seed_phrase', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
})} })}
</Label> </Label>
<PasswordField <PasswordField
placeholder="Seed-phrase" placeholder={t('auth:seed_phrase', {
postProcess: 'capitalizeFirstChar',
})}
id="standard-adornment-password" id="standard-adornment-password"
value={seedValue} value={seedValue}
onChange={(e) => setSeedValue(e.target.value)} onChange={(e) => setSeedValue(e.target.value)}
@ -554,7 +558,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
})} })}
</Label> </Label>
<Input <Input
placeholder="Name" placeholder={t('core:name', { postProcess: 'capitalizeFirstChar' })}
value={name} value={name}
onChange={(e) => setName(e.target.value)} onChange={(e) => setName(e.target.value)}
sx={{ sx={{
@ -570,7 +574,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => {
})} })}
</Label> </Label>
<Input <Input
placeholder="Note" placeholder={t('core:note', { postProcess: 'capitalizeFirstChar' })}
value={note} value={note}
onChange={(e) => setNote(e.target.value)} onChange={(e) => setNote(e.target.value)}
inputProps={{ inputProps={{

View File

@ -292,7 +292,9 @@ export const AppPublish = ({ names, categories }) => {
</InputLabel> </InputLabel>
<CustomSelect <CustomSelect
placeholder="Select Name/App" placeholder={t('core:action.select_name_app', {
postProcess: 'capitalizeFirstChar',
})}
displayEmpty displayEmpty
value={name} value={name}
onChange={(event) => setName(event?.target.value)} onChange={(event) => setName(event?.target.value)}
@ -323,7 +325,9 @@ export const AppPublish = ({ names, categories }) => {
</InputLabel> </InputLabel>
<CustomSelect <CustomSelect
placeholder="SERVICE TYPE" placeholder={t('core:service_type', {
postProcess: 'capitalizeFirstChar',
})}
displayEmpty displayEmpty
value={appType} value={appType}
onChange={(event) => setAppType(event?.target.value)} onChange={(event) => setAppType(event?.target.value)}
@ -339,11 +343,13 @@ export const AppPublish = ({ names, categories }) => {
})} })}
</em> </em>
</CustomMenuItem> </CustomMenuItem>
<CustomMenuItem value={'APP'}> <CustomMenuItem value={'APP'}>
{t('core:app', { {t('core:app', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
})} })}
</CustomMenuItem> </CustomMenuItem>
<CustomMenuItem value={'WEBSITE'}> <CustomMenuItem value={'WEBSITE'}>
{t('core:website', { {t('core:website', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
@ -370,7 +376,7 @@ export const AppPublish = ({ names, categories }) => {
width: '100%', width: '100%',
maxWidth: '450px', maxWidth: '450px',
}} }}
placeholder="Title" placeholder={t('core:title', { postProcess: 'capitalizeFirstChar' })}
inputProps={{ inputProps={{
'aria-label': 'Title', 'aria-label': 'Title',
fontSize: '14px', fontSize: '14px',
@ -397,7 +403,9 @@ export const AppPublish = ({ names, categories }) => {
width: '100%', width: '100%',
maxWidth: '450px', maxWidth: '450px',
}} }}
placeholder="Description" placeholder={t('core:description', {
postProcess: 'capitalizeFirstChar',
})}
inputProps={{ inputProps={{
'aria-label': 'Description', 'aria-label': 'Description',
fontSize: '14px', fontSize: '14px',
@ -415,7 +423,9 @@ export const AppPublish = ({ names, categories }) => {
<CustomSelect <CustomSelect
displayEmpty displayEmpty
placeholder="Select Category" placeholder={t('core:action.select_category', {
postProcess: 'capitalizeFirstChar',
})}
value={category} value={category}
onChange={(event) => setCategory(event?.target.value)} onChange={(event) => setCategory(event?.target.value)}
> >

View File

@ -15,6 +15,7 @@ import IconClearInput from '../../assets/svgs/ClearInput.svg';
import { Spacer } from '../../common/Spacer'; import { Spacer } from '../../common/Spacer';
import { AppInfoSnippet } from './AppInfoSnippet'; import { AppInfoSnippet } from './AppInfoSnippet';
import { Virtuoso } from 'react-virtuoso'; import { Virtuoso } from 'react-virtuoso';
import { useTranslation } from 'react-i18next';
const StyledVirtuosoContainer = styled('div')({ const StyledVirtuosoContainer = styled('div')({
position: 'relative', position: 'relative',
@ -44,6 +45,7 @@ export const AppsCategoryDesktop = ({
const [searchValue, setSearchValue] = useState(''); const [searchValue, setSearchValue] = useState('');
const virtuosoRef = useRef(null); const virtuosoRef = useRef(null);
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(['auth', 'core', 'group']);
const categoryList = useMemo(() => { const categoryList = useMemo(() => {
if (category?.id === 'all') return availableQapps; if (category?.id === 'all') return availableQapps;
@ -139,7 +141,9 @@ export const AppsCategoryDesktop = ({
ml: 1, ml: 1,
paddingLeft: '12px', paddingLeft: '12px',
}} }}
placeholder="Search for apps" placeholder={t('core:action.search_apps', {
postProcess: 'capitalizeFirstChar',
})}
inputProps={{ inputProps={{
'aria-label': 'Search for apps', 'aria-label': 'Search for apps',
fontSize: '16px', fontSize: '16px',

View File

@ -415,7 +415,9 @@ export const AppsPrivate = ({ myName }) => {
{t('core:name', { postProcess: 'capitalizeFirstChar' })} {t('core:name', { postProcess: 'capitalizeFirstChar' })}
</Label> </Label>
<Input <Input
placeholder="name" placeholder={t('core:name', {
postProcess: 'capitalizeFirstChar',
})}
value={privateAppValues?.name} value={privateAppValues?.name}
onChange={(e) => onChange={(e) =>
setPrivateAppValues((prev) => { setPrivateAppValues((prev) => {

View File

@ -589,7 +589,9 @@ export const ChatDirect = ({
fontSize: '18px', fontSize: '18px',
padding: '5px', padding: '5px',
}} }}
placeholder="Name or address" placeholder={t('auth:message.generic.name_address', {
postProcess: 'capitalizeFirstChar',
})}
value={directToValue} value={directToValue}
onChange={(e) => setDirectToValue(e.target.value)} onChange={(e) => setDirectToValue(e.target.value)}
/> />

View File

@ -422,7 +422,9 @@ export const ChatOptions = ({
value={searchValue} value={searchValue}
onChange={(e) => setSearchValue(e.target.value)} onChange={(e) => setSearchValue(e.target.value)}
sx={{ ml: 1, flex: 1 }} sx={{ ml: 1, flex: 1 }}
placeholder="Search chat text" placeholder={t('core:action.search_chat_text', {
postProcess: 'capitalizeFirstChar',
})}
inputProps={{ inputProps={{
'aria-label': 'Search for apps', 'aria-label': 'Search for apps',
fontSize: '16px', fontSize: '16px',

View File

@ -187,7 +187,9 @@ export const BlockedUsersModal = () => {
}} }}
> >
<TextField <TextField
placeholder="Name or address" placeholder={t('auth:message.generic.name_address', {
postProcess: 'capitalizeFirstChar',
})}
value={value} value={value}
onChange={(e) => { onChange={(e) => {
setValue(e.target.value); setValue(e.target.value);

View File

@ -476,7 +476,9 @@ export const NewThread = ({
onChange={(e) => { onChange={(e) => {
setThreadTitle(e.target.value); setThreadTitle(e.target.value);
}} }}
placeholder="Thread Title" placeholder={t('core:thread_title', {
postProcess: 'capitalizeFirstChar',
})}
disableUnderline disableUnderline
autoComplete="off" autoComplete="off"
autoCorrect="off" autoCorrect="off"

View File

@ -92,7 +92,9 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
<Input <Input
value={value} value={value}
placeholder="Name or address" placeholder={t('auth:message.generic.name_address', {
postProcess: 'capitalizeFirstChar',
})}
onChange={(e) => setValue(e.target.value)} onChange={(e) => setValue(e.target.value)}
/> />

View File

@ -925,14 +925,18 @@ export const NotAuthenticated = ({
}} }}
> >
<Input <Input
placeholder="Url" placeholder={t('core:url', {
postProcess: 'capitalizeAll',
})}
value={url} value={url}
onChange={(e) => { onChange={(e) => {
setUrl(e.target.value); setUrl(e.target.value);
}} }}
/> />
<Input <Input
placeholder="Api key" placeholder={t('auth:apikey.key', {
postProcess: 'capitalizeFirstChar',
})}
value={customApikey} value={customApikey}
onChange={(e) => { onChange={(e) => {
setCustomApiKey(e.target.value); setCustomApiKey(e.target.value);

View File

@ -235,7 +235,9 @@ export const RegisterName = ({
autoFocus autoFocus
onChange={(e) => setRegisterNameValue(e.target.value)} onChange={(e) => setRegisterNameValue(e.target.value)}
value={registerNameValue} value={registerNameValue}
placeholder="Choose a name" placeholder={t('core:action.choose_name', {
postProcess: 'capitalizeFirstChar',
})}
/> />
{(!balance || (nameFee && balance && balance < nameFee)) && ( {(!balance || (nameFee && balance && balance < nameFee)) && (
<> <>

View File

@ -69,6 +69,7 @@
"choose_block": "choose 'block txs' or 'all' to block chat messages", "choose_block": "choose 'block txs' or 'all' to block chat messages",
"congrats_setup": "congrats, youre all set up!", "congrats_setup": "congrats, youre all set up!",
"decide_block": "decide what to block", "decide_block": "decide what to block",
"name_address": "name or address",
"no_account": "no accounts saved", "no_account": "no accounts saved",
"no_minimum_length": "there is no minimum length requirement", "no_minimum_length": "there is no minimum length requirement",
"no_secret_key_published": "no secret key published yet", "no_secret_key_published": "no secret key published yet",
@ -96,7 +97,7 @@
"note": "note", "note": "note",
"password": "password", "password": "password",
"password_confirmation": "confirm password", "password_confirmation": "confirm password",
"seed": "seed phrase", "seed_phrase": "seed phrase",
"seed_your": "your seedphrase", "seed_your": "your seedphrase",
"tips": { "tips": {
"additional_wallet": "use this option to connect additional Qortal wallets you've already made, in order to login with them afterwards. You will need access to your backup JSON file in order to do so.", "additional_wallet": "use this option to connect additional Qortal wallets you've already made, in order to login with them afterwards. You will need access to your backup JSON file in order to do so.",

View File

@ -17,6 +17,8 @@
"choose": "choose", "choose": "choose",
"choose_file": "choose file", "choose_file": "choose file",
"choose_image": "choose image", "choose_image": "choose image",
"choose_logo": "choose a logo",
"choose_name": "choose a name",
"close": "close", "close": "close",
"close_chat": "close Direct Chat", "close_chat": "close Direct Chat",
"continue": "continue", "continue": "continue",
@ -25,8 +27,6 @@
"create_apps": "create apps", "create_apps": "create apps",
"create_file": "create file", "create_file": "create file",
"create_thread": "create thread", "create_thread": "create thread",
"choose_logo": "choose a logo",
"choose_name": "choose a name",
"decline": "decline", "decline": "decline",
"decrypt": "decrypt", "decrypt": "decrypt",
"disable_enter": "disable enter", "disable_enter": "disable enter",
@ -67,6 +67,7 @@
"save_disk": "save to disk", "save_disk": "save to disk",
"search": "search", "search": "search",
"search_apps": "search for apps", "search_apps": "search for apps",
"search_chat_text": "search chat text",
"select_app_type": "select App Type", "select_app_type": "select App Type",
"select_category": "select Category", "select_category": "select Category",
"select_name_app": "select Name/App", "select_name_app": "select Name/App",
@ -289,6 +290,7 @@
"name_app": "name/App", "name_app": "name/App",
"new_post_in": "new post in {{ title }}", "new_post_in": "new post in {{ title }}",
"none": "none", "none": "none",
"note": "note",
"option": "option", "option": "option",
"option_other": "options", "option_other": "options",
"page": { "page": {
@ -311,6 +313,7 @@
"receiver": "receiver", "receiver": "receiver",
"sender": "sender", "sender": "sender",
"server": "server", "server": "server",
"service_type": "service type",
"settings": "settings", "settings": "settings",
"sort": { "sort": {
"by_member": "by member" "by_member": "by member"
@ -323,6 +326,7 @@
}, },
"thread": "thread", "thread": "thread",
"thread_other": "threads", "thread_other": "threads",
"thread_title": "thread title",
"time": { "time": {
"day_one": "{{count}} day", "day_one": "{{count}} day",
"day_other": "{{count}} days", "day_other": "{{count}} days",
@ -335,6 +339,7 @@
"title": "title", "title": "title",
"to": "to", "to": "to",
"tutorial": "tutorial", "tutorial": "tutorial",
"url": "url",
"user_lookup": "user lookup", "user_lookup": "user lookup",
"vote": "vote", "vote": "vote",
"vote_other": "{{ count }} votes", "vote_other": "{{ count }} votes",