diff --git a/src/locales/en.json b/src/locales/en.json index d204a47b..b170a960 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -205,12 +205,23 @@ "wasted": "Wasted EXP", "mora": "Mora Cost" }, + "resinTable": { + "quantity": "Quantity", + "time": "Time To Wait" + }, "resin": { - "inputCurrentResin": "Input Current Resin...", + "currentResin": "Current Resin", + "desiredResin": "Desired Resin", + "or": "or", + "inputCurrentResin": "Input current resin...", + "inputDesireResin": "Input how many resin you want to wait...", "timeFormat": "en", "calculate": "Calculate", "currentTime": "Current Time", - "fullTime": "Resin Will Be Replenished At" + "fullTime": "Will be replenished at", + "hours": "hours", + "minutes": "minutes", + "seconds": "seconds" } }, "items": { diff --git a/src/locales/id.json b/src/locales/id.json index 6e549827..92e9f9b3 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -205,12 +205,23 @@ "wasted": "Exp Terbuang", "mora": "Jumlah Mora" }, + "resinTable": { + "quantity": "Jumlah", + "time": "Waktu Menunggu" + }, "resin": { - "inputCurrentResin": "Masukkan Jumlah Resin Sekarang...", + "currentResin": "Resin Saat Ini", + "desiredResin": "Resin Yang Diinginkan", + "or": "atau", + "inputCurrentResin": "Masukkan jumlah resin sekarang...", + "inputDesireResin": "Masukkan jumlah resin yang diinginkan...", "timeFormat": "id", "calculate": "Hitung", "currentTime": "Waktu Sekarang", - "fullTime": "Resin Akan Penuh Pada" + "fullTime": "Akan terisi pada", + "hours": "jam", + "minutes": "menit", + "seconds": "detik" } }, "items": { diff --git a/src/routes/calculator/_resin.svelte b/src/routes/calculator/_resin.svelte index fddf1bb3..d9633edb 100644 --- a/src/routes/calculator/_resin.svelte +++ b/src/routes/calculator/_resin.svelte @@ -1,18 +1,36 @@
+ {$t('calculator.resin.currentResin')} +
onChange('maxResin')} type="number" min={0} max={160} bind:value={currentResin} placeholder={$t('calculator.resin.inputCurrentResin')} /> -- {$t('calculator.resin.currentTime')}: {new Intl.DateTimeFormat( - $t('calculator.resin.timeFormat'), - dateTimeOptions, - ).format($time)} +
{$t('calculator.resin.or')} {$t('calculator.resin.desiredResin')}
+ onChange('desiredResin')} + type="number" + min={1} + max={160} + bind:value={desiredResin} + placeholder={$t('calculator.resin.inputDesireResin')} + /> ++ {$t('calculator.resin.currentTime')}: + {#if $t('calculator.resin.timeFormat') === 'en'} + {currentTime.locale('en').format('dddd HH:mm:ss')} + {:else} + {currentTime.locale('id').format('dddd HH:mm:ss')} + {/if}
+ {resinOutput.resin}
+ |
+ + + + + + {originalResin.label} - {originalResin.label} - - | -
- | - {$t('calculator.resin.fullTime')}: - - {new Intl.DateTimeFormat($t('calculator.resin.timeFormat'), dateTimeOptions).format(fullTime)} - | -
{$t('calculator.resin.or')} | |
+ {resinOutput.condensed.resin}
+ |
+ + + + + + {originalResin.label} + + | +
+ {resinOutput.condensed.condensedResin}
+ |
+ + + + + + {condensedResin.label} + + | +
+ {$t('calculator.resin.fullTime')}: + {#if $t('calculator.resin.timeFormat') === 'en'} + {fullTime.locale('en').format('dddd HH:mm:ss')} ({fullTime.locale('en').fromNow()}) + {:else} + {fullTime.locale('id').format('dddd HH:mm:ss')} ({fullTime.locale('id').fromNow()}) + {/if} + | +
{$t('calculator.resinTable.quantity')} | +{$t('calculator.resinTable.time')} | +
---|---|
{step[0]} |
+ + {#if $t('calculator.resin.timeFormat') === 'en'} + {dayjs(new Date(stepTime[i + 1])) + .locale('en') + .fromNow()} + {:else} + {dayjs(new Date(stepTime[i + 1])) + .locale('id') + .fromNow()} + {/if} + | +