小编Mit*_*tch的帖子

如何搜索应用程序 React.js 中的所有硬编码文本?

我需要使用 React i18n 搜索并移动文件 .json 以实现国际化。硬编码文本和手动制作太长而且不确定。我想使用自动解决方案。

举例来说:在我检查之前

function NotFoundPage(props) {
    const { t } = useTranslation("notFoundPage");
return (
    <Result
        status="404"
        title="404"
        subTitle="Sorry, the page you visited does not exist."
        extra={
            <Button
                type="primary"
                style={{ margin: "auto" }}
                onClick={() => props.history.push("/")}
            >
                Back to Projects
            </Button>
        }
    />
);
Run Code Online (Sandbox Code Playgroud)

}

经过我的检查

function NotFoundPage(props) {
    const { t } = useTranslation("notFoundPage");
    return (
        <Result
            status="404"
            title="404"
            subTitle={t("Sorry, the page you visited does not exist.")}
            extra={
                <Button
                    type="primary"
                    style={{ margin: "auto" }}
                    onClick={() => …
Run Code Online (Sandbox Code Playgroud)

reactjs

1
推荐指数
1
解决办法
1609
查看次数

C语言中的通用指针和C ++语言中的通用指针之间有什么区别?

对于我的考试,我必须解释void *C和C ++中通用指针()的区别。它们是两件事,但是我找不到它们之间的区别。

c c++

-1
推荐指数
1
解决办法
152
查看次数

标签 统计

c ×1

c++ ×1

reactjs ×1