show feedback in user l1
This commit is contained in:
parent
ccae4c8704
commit
41ce213553
2 changed files with 10 additions and 3 deletions
|
|
@ -305,7 +305,11 @@ class ITChoices extends StatelessWidget {
|
|||
chosenContinuance:
|
||||
controller.currentITStep!.continuances[index].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,
|
||||
targetLang: controller.targetLangCode,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -146,8 +146,11 @@ class ITFeedbackCardView extends StatelessWidget {
|
|||
controller.res!.text,
|
||||
style: BotStyle.text(context),
|
||||
),
|
||||
// if res is not null, show a button to translate the text
|
||||
if (controller.res != null && controller.translatedFeedback == null)
|
||||
// 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 &&
|
||||
controller.widget.req.feedbackLang !=
|
||||
controller.controller.languageController.userL1?.langCode)
|
||||
Column(
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue