Skip to content

Commit

Permalink
check all translations for Affix
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Mar 26, 2024
1 parent 6255ab2 commit 37e4a6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/Perspective/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const toolsQuery = gql`
edit_check: role_check(subject: "perspective", action: "edit")
columns {
field {
english_translation: translation(locale_id: 2)
translations
}
}
}
Expand Down Expand Up @@ -948,7 +948,8 @@ const Tools = ({
}
} = data;

const isMorphology = ({ field: { english_translation: field_name } }) => field_name.toLowerCase().includes("affix");
const isMorphology = ({ field: { translations: tt } }) =>
Object.values(tt).some(t => t.toLowerCase().includes("affix") || 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 37e4a6f

Please sign in to comment.