Skip to content

Commit

Permalink
handling morph* fields
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Nov 22, 2024
1 parent c81dff2 commit 5a54ee0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/CognateAnalysisModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1714,8 +1714,10 @@ class CognateAnalysisModal extends React.Component {
}

if (Object.values(field.translations).some(t =>
t.toLowerCase() === "affix" ||
t.toLowerCase() === "аффикс" )) {
t.toLowerCase().includes("affix") ||
t.toLowerCase().includes("аффикс") ||
t.toLowerCase().includes("morph") ||
t.toLowerCase().includes("морф"))) {
affix_flag = morphology || suggestions;
meaning_flag = morphology || suggestions;
}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Perspective/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ const Tools = ({
} = data;

const isMorphology = ({ field: { translations: tt } }) =>
Object.values(tt).some(t => t.toLowerCase().includes("affix") || t.toLowerCase().includes("аффикс"));
Object.values(tt).some(t => t.toLowerCase().includes("affix") ||
t.toLowerCase().includes("аффикс") ||
t.toLowerCase().includes("morph") ||
t.toLowerCase().includes("морф"));
const glottMode = columns.some(isMorphology) ? "morphology" : "swadesh";
const glottMenu = columns.some(isMorphology) ? "Morphology distance" : "Glottochronology (Swadesh-Starostin)";
const published = english_status === "Published" || english_status === "Limited access";
Expand Down

0 comments on commit 5a54ee0

Please sign in to comment.