@@ -267,12 +267,14 @@ const computeNeuroCognateAnalysisMutation = gql`
267
267
mutation computeNeuroCognateAnalysis(
268
268
$sourcePerspectiveId: LingvodocID!
269
269
$perspectiveInfoList: [[LingvodocID]]!
270
+ $matchTranslations: Boolean
270
271
$baseLanguageId: LingvodocID
271
272
$inputPairs: ObjectVal
272
273
) {
273
274
neuro_cognate_analysis(
274
275
source_perspective_id: $sourcePerspectiveId
275
276
perspective_info_list: $perspectiveInfoList
277
+ match_translations: $matchTranslations
276
278
base_language_id: $baseLanguageId
277
279
input_pairs: $inputPairs
278
280
) {
@@ -2407,6 +2409,7 @@ class CognateAnalysisModal extends React.Component {
2407
2409
await computeNeuroCognateAnalysis ( {
2408
2410
variables : {
2409
2411
inputPairs : pairs ,
2412
+ matchTranslations : this . state . matchTranslationsFlag ,
2410
2413
sourcePerspectiveId : perspectiveId ,
2411
2414
baseLanguageId : this . baseLanguageId ,
2412
2415
perspectiveInfoList
@@ -2515,47 +2518,49 @@ class CognateAnalysisModal extends React.Component {
2515
2518
className = "lingvo-checkbox lingvo-checkbox_labeled"
2516
2519
/>
2517
2520
</ 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 >
2518
2551
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
+ ) }
2559
2564
{ ! this . state . suggestion_list && this . props . user . id === undefined && (
2560
2565
< div className = "lingvo-message lingvo-message_error" style = { { marginTop : "14px" , marginBottom : "14px" } } >
2561
2566
{ this . context ( "Unauthorized user" ) }
0 commit comments