mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
ui: problemconfig: add i18n
This commit is contained in:
8 files changed
+63
-41
No files matched your search
@@ -4,6 +4,7 @@ import { TestCaseConfig } from 'hydrooj';
|
||||
import { omit } from 'lodash';
|
||||
import React from 'react';
|
||||
import { useDrag } from 'react-dnd';
|
||||
import { i18n } from 'vj/utils';
|
||||
|
||||
interface TestcaseNodeProps {
|
||||
c: TestCaseConfig;
|
||||
@@ -28,12 +29,12 @@ export function TestcaseNode(props: TestcaseNodeProps) {
|
||||
data-selected={selected}
|
||||
content={
|
||||
<Menu>
|
||||
<MenuItem icon="drawer-left" text="Move to subtask" >
|
||||
<MenuItem icon="drawer-left" text={i18n('Move to subtask')} >
|
||||
{subtaskIds.filter((i) => i !== subtaskId).map((i) => (
|
||||
<MenuItem key={i} text={`Subtask ${i}`} />
|
||||
<MenuItem key={i} text={i18n('Subtask {0}', i)} />
|
||||
))}
|
||||
{subtaskIds.length <= 1 && (
|
||||
<MenuItem icon="disable" disabled text="No target available" />
|
||||
<MenuItem icon="disable" disabled text={i18n('No target available')} />
|
||||
)}
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
Reference in new issue
Block a user