@@ -267,12 +267,14 @@ const computeNeuroCognateAnalysisMutation = gql`
267267 mutation computeNeuroCognateAnalysis(
268268 $sourcePerspectiveId: LingvodocID!
269269 $perspectiveInfoList: [[LingvodocID]]!
270+ $matchTranslations: Boolean
270271 $baseLanguageId: LingvodocID
271272 $inputPairs: ObjectVal
272273 ) {
273274 neuro_cognate_analysis(
274275 source_perspective_id: $sourcePerspectiveId
275276 perspective_info_list: $perspectiveInfoList
277+ match_translations: $matchTranslations
276278 base_language_id: $baseLanguageId
277279 input_pairs: $inputPairs
278280 ) {
@@ -2407,6 +2409,7 @@ class CognateAnalysisModal extends React.Component {
24072409 await computeNeuroCognateAnalysis ( {
24082410 variables : {
24092411 inputPairs : pairs ,
2412+ matchTranslations : this . state . matchTranslationsFlag ,
24102413 sourcePerspectiveId : perspectiveId ,
24112414 baseLanguageId : this . baseLanguageId ,
24122415 perspectiveInfoList
@@ -2515,47 +2518,49 @@ class CognateAnalysisModal extends React.Component {
25152518 className = "lingvo-checkbox lingvo-checkbox_labeled"
25162519 />
25172520 </ div >
2521+ { this . props . mode !== "neuro_suggestions" && (
2522+ < >
2523+ < div style = { { paddingLeft : "34px" , paddingTop : "6px" } } >
2524+ < div className = "lingvo-radio lingvo-radio_cognate" >
2525+ < Checkbox
2526+ radio
2527+ disabled = { ! this . state . matchTranslationsFlag }
2528+ label = { this . context ( "Any three consecutive characters" ) }
2529+ name = "matchTranslationsRadioGroup"
2530+ value = "first_three"
2531+ checked = { this . state . matchTranslationsValue === "first_three" }
2532+ onChange = { ( e , { value } ) => {
2533+ this . setState ( { matchTranslationsValue : value } ) ;
2534+ } }
2535+ />
2536+ </ div >
2537+ < div className = "lingvo-radio lingvo-radio_cognate" >
2538+ < Checkbox
2539+ radio
2540+ disabled = { ! this . state . matchTranslationsFlag }
2541+ label = { this . context ( "All characters" ) }
2542+ name = "matchTranslationsRadioGroup"
2543+ value = "all"
2544+ checked = { this . state . matchTranslationsValue === "all" }
2545+ onChange = { ( e , { value } ) => {
2546+ this . setState ( { matchTranslationsValue : value } ) ;
2547+ } }
2548+ />
2549+ </ div >
2550+ </ div >
25182551
2519- < div style = { { paddingLeft : "34px" , paddingTop : "6px" } } >
2520- < div className = "lingvo-radio lingvo-radio_cognate" >
2521- < Checkbox
2522- radio
2523- disabled = { ! this . state . matchTranslationsFlag }
2524- label = { this . context ( "Any three consecutive characters" ) }
2525- name = "matchTranslationsRadioGroup"
2526- value = "first_three"
2527- checked = { this . state . matchTranslationsValue === "first_three" }
2528- onChange = { ( e , { value } ) => {
2529- this . setState ( { matchTranslationsValue : value } ) ;
2530- } }
2531- />
2532- </ div >
2533- < div className = "lingvo-radio lingvo-radio_cognate" >
2534- < Checkbox
2535- radio
2536- disabled = { ! this . state . matchTranslationsFlag }
2537- label = { this . context ( "All characters" ) }
2538- name = "matchTranslationsRadioGroup"
2539- value = "all"
2540- checked = { this . state . matchTranslationsValue === "all" }
2541- onChange = { ( e , { value } ) => {
2542- this . setState ( { matchTranslationsValue : value } ) ;
2543- } }
2544- />
2545- </ div >
2546- </ div >
2547-
2548- < div className = "lingvo-cognate-checkbox" >
2549- < Checkbox
2550- label = { this . context ( "Only for orphans (words not included in existing etymology groups)" ) }
2551- checked = { this . state . onlyOrphansFlag }
2552- onChange = { ( e , { checked } ) => {
2553- this . setState ( { onlyOrphansFlag : checked } ) ;
2554- } }
2555- className = "lingvo-checkbox lingvo-checkbox_labeled"
2556- />
2557- </ div >
2558-
2552+ < div className = "lingvo-cognate-checkbox" >
2553+ < Checkbox
2554+ label = { this . context ( "Only for orphans (words not included in existing etymology groups)" ) }
2555+ checked = { this . state . onlyOrphansFlag }
2556+ onChange = { ( e , { checked } ) => {
2557+ this . setState ( { onlyOrphansFlag : checked } ) ;
2558+ } }
2559+ className = "lingvo-checkbox lingvo-checkbox_labeled"
2560+ />
2561+ </ div >
2562+ </ >
2563+ ) }
25592564 { ! this . state . suggestion_list && this . props . user . id === undefined && (
25602565 < div className = "lingvo-message lingvo-message_error" style = { { marginTop : "14px" , marginBottom : "14px" } } >
25612566 { this . context ( "Unauthorized user" ) }
0 commit comments