Skip to content

Commit

Permalink
Task advanced : a last comma that should not be displayed (#5496)
Browse files Browse the repository at this point in the history
Signed-off-by: vlo-rte <valerie.longa@rte-france.com>
  • Loading branch information
vlo-rte committed Dec 1, 2023
1 parent 5d9de43 commit 31a1aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Question UserCard template', () => {
};
};
let text = view.fillTexts();
expect(text.textForBysetpos).toEqual("Translation of buildInTemplate.taskCard.the Translation of buildInTemplate.taskCard.first, ");
expect(text.textForBysetpos).toEqual("Translation of buildInTemplate.taskCard.the Translation of buildInTemplate.taskCard.first ");
expect(text.textForByWeekday).toEqual(" Translation of shared.calendar.monday");
expect(text.textForBymonthday).toEqual("Translation of buildInTemplate.taskCard.firstDayOfTheMonth<br/><br/>");
expect(text.textForBymonth).toEqual("Translation of buildInTemplate.taskCard.in Translation of shared.calendar.january");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class TaskCardTemplateView {
if (bysetpos.includes("-1")) textForBysetpos += opfab.utils.getTranslation("buildInTemplate.taskCard.last") + ", ";

if (textForBysetpos != "") {
textForBysetpos = textForBysetpos.slice(0, -1); //we delete the last comma
textForBysetpos = textForBysetpos.slice(0, -2); //we delete the last comma
textForBysetpos = opfab.utils.getTranslation("buildInTemplate.taskCard.the") + " " + textForBysetpos + " ";
}
}
Expand Down

0 comments on commit 31a1aec

Please sign in to comment.