show feedback in user l1

pull/1384/head
William Jordan-Cooley 1 year ago committed by ggurdin
parent ccae4c8704
commit 41ce213553
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -305,7 +305,11 @@ class ITChoices extends StatelessWidget {
chosenContinuance: chosenContinuance:
controller.currentITStep!.continuances[index].text, controller.currentITStep!.continuances[index].text,
bestContinuance: controller.currentITStep!.best.text, bestContinuance: controller.currentITStep!.best.text,
feedbackLang: controller.targetLangCode, // TODO: we want this to eventually switch between target and source lang,
// based on the learner's proficiency - maybe with the words involved in the translation
// maybe overall. For now, we'll just use the source lang.
feedbackLang: controller.choreographer.l1Lang?.langCode ??
controller.sourceLangCode,
sourceTextLang: controller.sourceLangCode, sourceTextLang: controller.sourceLangCode,
targetLang: controller.targetLangCode, targetLang: controller.targetLangCode,
), ),

@ -146,8 +146,11 @@ class ITFeedbackCardView extends StatelessWidget {
controller.res!.text, controller.res!.text,
style: BotStyle.text(context), style: BotStyle.text(context),
), ),
// if res is not null, show a button to translate the text // if res is not null and feedback not in the userL1, show a button to translate the text
if (controller.res != null && controller.translatedFeedback == null) if (controller.res != null &&
controller.translatedFeedback == null &&
controller.widget.req.feedbackLang !=
controller.controller.languageController.userL1?.langCode)
Column( Column(
children: [ children: [
const SizedBox(height: 10), const SizedBox(height: 10),

Loading…
Cancel
Save