i18n ranges

This commit is contained in:
Damien Elmes 2020-06-28 13:46:17 +10:00
parent 8e118bbc76
commit b78f578cd5
5 changed files with 18 additions and 8 deletions

View file

@ -84,3 +84,7 @@ statistics-counts-mature-cards = Mature
statistics-counts-suspended-cards = Suspended statistics-counts-suspended-cards = Suspended
statistics-counts-buried-cards = Buried statistics-counts-buried-cards = Buried
statistics-counts-title = Card Counts statistics-counts-title = Card Counts
statistics-range-all-time = deck life
statistics-range-deck = deck
statistics-range-collection = collection
statistics-range-search = Search

View file

@ -27,6 +27,7 @@
const month = timeSpan(i18n, 1 * MONTH); const month = timeSpan(i18n, 1 * MONTH);
const month3 = timeSpan(i18n, 3 * MONTH); const month3 = timeSpan(i18n, 3 * MONTH);
const year = timeSpan(i18n, 1 * YEAR); const year = timeSpan(i18n, 1 * YEAR);
const all = i18n.tr(i18n.TR.STATISTICS_RANGE_ALL_TIME);
</script> </script>
{#if histogramData} {#if histogramData}
@ -48,7 +49,7 @@
</label> </label>
<label> <label>
<input type="radio" bind:group={range} value={AddedRange.AllTime} /> <input type="radio" bind:group={range} value={AddedRange.AllTime} />
All time {all}
</label> </label>
</div> </div>

View file

@ -35,6 +35,7 @@
const month = timeSpan(i18n, 1 * MONTH); const month = timeSpan(i18n, 1 * MONTH);
const month3 = timeSpan(i18n, 3 * MONTH); const month3 = timeSpan(i18n, 3 * MONTH);
const year = timeSpan(i18n, 1 * YEAR); const year = timeSpan(i18n, 1 * YEAR);
const all = i18n.tr(i18n.TR.STATISTICS_RANGE_ALL_TIME);
</script> </script>
{#if histogramData} {#if histogramData}
@ -57,7 +58,7 @@
</label> </label>
<label> <label>
<input type="radio" bind:group={range} value={FutureDueRange.AllTime} /> <input type="radio" bind:group={range} value={FutureDueRange.AllTime} />
All time {all}
</label> </label>
</div> </div>

View file

@ -85,6 +85,10 @@
const month = timeSpan(i18n, 1 * MONTH); const month = timeSpan(i18n, 1 * MONTH);
const year = timeSpan(i18n, 1 * YEAR); const year = timeSpan(i18n, 1 * YEAR);
const deck = i18n.tr(i18n.TR.STATISTICS_RANGE_DECK);
const collection = i18n.tr(i18n.TR.STATISTICS_RANGE_COLLECTION);
const searchLabel = i18n.tr(i18n.TR.STATISTICS_RANGE_SEARCH);
const all = i18n.tr(i18n.TR.STATISTICS_RANGE_ALL_TIME);
</script> </script>
<div class="range-box"> <div class="range-box">
@ -93,14 +97,14 @@
<div class="range-box-inner"> <div class="range-box-inner">
<label> <label>
<input type="radio" bind:group={searchRange} value={SearchRange.Deck} /> <input type="radio" bind:group={searchRange} value={SearchRange.Deck} />
Deck {deck}
</label> </label>
<label> <label>
<input <input
type="radio" type="radio"
bind:group={searchRange} bind:group={searchRange}
value={SearchRange.Collection} /> value={SearchRange.Collection} />
Collection {collection}
</label> </label>
<input <input
@ -110,11 +114,10 @@
on:focus={() => { on:focus={() => {
searchRange = SearchRange.Custom; searchRange = SearchRange.Custom;
}} }}
placeholder="Custom search" /> placeholder={searchLabel} />
</div> </div>
<div class="range-box-inner"> <div class="range-box-inner">
Review history:
<label> <label>
<input type="radio" bind:group={revlogRange} value={RevlogRange.Month} /> <input type="radio" bind:group={revlogRange} value={RevlogRange.Month} />
{month} {month}
@ -125,7 +128,7 @@
</label> </label>
<label> <label>
<input type="radio" bind:group={revlogRange} value={RevlogRange.All} /> <input type="radio" bind:group={revlogRange} value={RevlogRange.All} />
All {all}
</label> </label>
</div> </div>
</div> </div>

View file

@ -31,6 +31,7 @@
} }
const month = timeSpan(i18n, 1 * MONTH); const month = timeSpan(i18n, 1 * MONTH);
const all = i18n.tr(i18n.TR.STATISTICS_RANGE_ALL_TIME);
</script> </script>
{#if histogramData} {#if histogramData}
@ -65,7 +66,7 @@
</label> </label>
<label> <label>
<input type="radio" bind:group={range} value={IntervalRange.All} /> <input type="radio" bind:group={range} value={IntervalRange.All} />
All {all}
</label> </label>
</div> </div>