英文:
How to seach text not translate in VSCode?
问题
<Button>{t('Save')}</Button>
<ContentWrapper title="Connection" headerAction={<Button size="small">{t('Add')}</Button>}>
<div>{t('Connection')}</div>
</ContentWrapper>
英文:
I'm added i18next React for old project. So many text not can be translate. How can I search all of them in VSCode?
Some case:
<Button className="w-full" onClick={onClick}>
Save
<Button>
<Button
type="primary"
onClick={onCLick}
className="ml-2"
>
Save
</Button>
<Button>Save</Button>
<ContentWrapper title="Connection" headerAction={<Button size="small">Add</Button>}>
<div>{`Connection`}</div>
</ContentWrapper>
<p className="mt-2 text-center">
Drag and drop files here or <span className="text-blue-500">{t('browse')}</span>
</p>
<div>
{mediaRecorder?.state === 'recording' ? (
<Button onClick={handleStop}>{t('Stop')}</Button>
) : (
<Button onClick={handleStart}>Start</Button>
)}
</div>
Translated:
<Button>{t('Save')}</Button>
<ContentWrapper title="Connection" headerAction={<Button size="small">{t('Add')}</Button>}>
<div>{t('Connection')}</div>
</ContentWrapper>
答案1
得分: 1
以下是您要求的翻译结果:
Find:
(<Button[\s\S\n]*?>[\n\s]*)(\w+)([\n\s]*</Button>)
Replace:
$1{t('$2')}$3
英文:
Find:
(<Button[\s\S\n]*?>[\n\s]*)(\w+)([\n\s]*</Button>)
Replace:
$1{t('$2')}$3
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论