hacks to fix (misaligned (rtl text

To fix this properly the string concatenation should probably be
broken into separate i18n strings and placed in Fluent

https://forums.ankiweb.net/t/anki-2-1-29-beta/1220/8
This commit is contained in:
Damien Elmes 2020-07-22 15:15:52 +10:00
parent 9f3eebfa80
commit 2049f17469
2 changed files with 2 additions and 2 deletions

View file

@ -166,7 +166,7 @@ export function renderButtons(
kind = i18n.tr(i18n.TR.STATISTICS_COUNTS_MATURE_CARDS); kind = i18n.tr(i18n.TR.STATISTICS_COUNTS_MATURE_CARDS);
break; break;
} }
return `${kind} (${totalCorrect(d).percent}%)`; return `${kind} \u200e(${totalCorrect(d).percent}%)`;
}) as any) }) as any)
.tickSizeOuter(0) .tickSizeOuter(0)
); );

View file

@ -117,7 +117,7 @@ export function prepareIntervalData(
// const day = dayLabel(i18n, bin.x0!, bin.x1!); // const day = dayLabel(i18n, bin.x0!, bin.x1!);
const interval = intervalLabel(i18n, bin.x0!, bin.x1!, bin.length); const interval = intervalLabel(i18n, bin.x0!, bin.x1!, bin.length);
const total = i18n.tr(i18n.TR.STATISTICS_RUNNING_TOTAL); const total = i18n.tr(i18n.TR.STATISTICS_RUNNING_TOTAL);
return `${interval}<br>${total}: ${percent.toFixed(1)}%`; return `${interval}<br>${total}: \u200e${percent.toFixed(1)}%`;
} }
return { scale, bins, total, hoverText, colourScale, showArea: true }; return { scale, bins, total, hoverText, colourScale, showArea: true };