@@ -1834,7 +1834,6 @@ class CognateAnalysisModal extends React.Component {
18341834 const morphology = mode . includes ( "morphology" ) ;
18351835 const suggestions = mode . includes ( "suggestions" ) ;
18361836 let affix_flag = ! morphology ;
1837- let meaning_flag = ! morphology ;
18381837
18391838 for ( const column of perspective . columns ) {
18401839 const field = this . fieldDict [ id2str ( column . field_id ) ] ;
@@ -1847,25 +1846,26 @@ class CognateAnalysisModal extends React.Component {
18471846 text_flag = true ;
18481847 }
18491848
1850- if ( Object . values ( field . translations ) . some ( t =>
1851- t . toLowerCase ( ) . includes ( "affix" ) ||
1852- t . toLowerCase ( ) . includes ( "аффикс " ) ||
1853- t . toLowerCase ( ) . includes ( "morph " ) ||
1854- t . toLowerCase ( ) . includes ( "морф" ) ) ) {
1855- affix_flag = morphology || suggestions ;
1856- meaning_flag = morphology || suggestions ;
1849+ if ( morphology &&
1850+ Object . values ( field . translations ) . some ( t =>
1851+ t . toLowerCase ( ) . includes ( "affix " ) ||
1852+ t . toLowerCase ( ) . includes ( "аффикс " ) ||
1853+ t . toLowerCase ( ) . includes ( "morph" ) ||
1854+ t . toLowerCase ( ) . includes ( "морф" ) ) ) {
1855+ affix_flag = true ;
18571856 }
18581857
1859- /*
1860- if (Object.values(field.translations).some(t =>
1861- t.toLowerCase().includes("meaning") ||
1862- t.toLowerCase().includes("значение"))) {
1863- meaning_flag = morphology || suggestions;
1858+ // Skipping dictionaries for non-morphology mode
1859+ // if we met 'affix' word in field name
1860+ if ( ! morphology &&
1861+ Object . values ( field . translations ) . some ( t =>
1862+ t . toLowerCase ( ) . includes ( "affix" ) ||
1863+ t . toLowerCase ( ) . includes ( "аффикс" ) ) ) {
1864+ affix_flag = false ;
18641865 }
1865- */
18661866 }
18671867
1868- if ( group_flag && text_flag && affix_flag && meaning_flag ) {
1868+ if ( group_flag && text_flag && affix_flag ) {
18691869 this . available_list . push ( [ treePathList . concat ( [ dictionary , perspective ] ) , perspective ] ) ;
18701870 }
18711871 }
0 commit comments