Skip to content

Commit

Permalink
Messages and correct refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 29, 2023
1 parent b414ecb commit eb57964
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
9 changes: 2 additions & 7 deletions src/pages/CorpImport/ColumnMapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ import { openCreateFieldModal } from "ducks/fields";
import TranslationContext from "Layout/TranslationContext";

function valueColor(value) {
if (value === "base") {
if (value === "base")
return "green";
}

if (value === "secondary") {
else
return "yellow";
}

return null;
}

function FieldButton({ text, onClick, isSelected }) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/CorpImport/Linker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Columns({ blob, index, onUpdateColumn, onToggleColumn, onDelete }) {
const column = index ? "sentence" : "base sentence";
const idStr = `${index}:${column}`;

useEffect(() => { onUpdateColumn(idStr, value, null); }, []);
useEffect(() => { onUpdateColumn(idStr, value, null); }, [idStr]);

return (
<div className="blob">
Expand Down
12 changes: 6 additions & 6 deletions src/pages/CorpImport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ class Info extends React.Component {
<Step link active={step === "COLUMNS"} onClick={this.onStepClick("COLUMNS")}>
<Step.Content>
<Step.Title>{this.context("Columns Mapping")}</Step.Title>
<Step.Description>{this.context("Map linked columns to LingvoDoc types")}</Step.Description>
<Step.Description>{this.context("Map columns to LingvoDoc types")}</Step.Description>
</Step.Content>
</Step>

<Step link active={step === "LANGUAGES"} onClick={this.onStepClick("LANGUAGES")}>
<Step.Content>
<Step.Title>{this.context("Language Selection")}</Step.Title>
<Step.Description>{this.context("Map dictionaries to LingvoDoc languages")}</Step.Description>
<Step.Description>{this.context("Map dictionary to LingvoDoc language")}</Step.Description>
</Step.Content>
</Step>

Expand Down Expand Up @@ -230,7 +230,7 @@ class Info extends React.Component {
<Message.Header>{this.context("Conversion is in progress...")}</Message.Header>
<Message.Content>
{this.context(
"Your dictionaries are scheduled for conversion. Please, check tasks tab for conversion status."
"Your dictionary is scheduled for conversion. Please, check tasks tab for conversion status."
)}
</Message.Content>
</Message>
Expand All @@ -249,7 +249,7 @@ class Info extends React.Component {
<Message style={{ margin: 0, textAlign: "center" }}>
<Message.Content>
{this.context(
"Please select parent language and specify at least one translation for each Starling dictionary."
"Please select parent language and specify at least one translation for the dictionary."
)}
</Message.Content>
</Message>
Expand All @@ -264,11 +264,11 @@ class Info extends React.Component {
</Button>
) : step === "ROLES" ? (
<Message style={{ margin: 0, textAlign: "center" }}>
<Message.Content>{this.context("Please use at least one Starling column.")}</Message.Content>
<Message.Content>{this.context("Choose at least two parent corpora.")}</Message.Content>
</Message>
) : step === "COLUMNS" ? (
<Message style={{ margin: 0, textAlign: "center" }}>
<Message.Content>{this.context("Please map all Starling columns to Lingvodoc types.")}</Message.Content>
<Message.Content>{this.context("Please map all the columns to Lingvodoc types.")}</Message.Content>
</Message>
) : null}
</div>
Expand Down

0 comments on commit eb57964

Please sign in to comment.