From 8e8c80b4910145f482aa8c8d9eca81d97e8b7712 Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Mon, 27 Apr 2020 23:09:34 +0100 Subject: [PATCH] fix: Allow people to input the buy price even as a first time buyer This will give us a basis for colouring. Also remove the Sunday prices from the table, to avoid confusion and questions when people ask why the Sunday price is different to the one they put in. This has the added bonus of making the table smaller, and doesn't really remove any relevant information for the future. Fixes #288 --- index.html | 1 - js/scripts.js | 5 +---- locales/ca.json | 2 +- locales/de.json | 2 +- locales/en.json | 2 +- locales/es.json | 2 +- locales/fr.json | 2 +- locales/hu.json | 2 +- locales/it.json | 2 +- locales/ja.json | 2 +- locales/ko.json | 2 +- locales/nl.json | 2 +- locales/pt-BR.json | 2 +- locales/ru.json | 2 +- locales/zh-CN.json | 2 +- locales/zh-TW.json | 2 +- 16 files changed, 15 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 7ef62bf..a93a14c 100644 --- a/index.html +++ b/index.html @@ -213,7 +213,6 @@ -
diff --git a/js/scripts.js b/js/scripts.js index ddcfe3c..35ed3d9 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -294,7 +294,7 @@ const calculateOutput = function (data, first_buy, previous_pattern) { out_line += `${displayPercentage(poss.category_total_probability)}`; } out_line += `${displayPercentage(poss.probability)}`; - for (let day of poss.prices.slice(1)) { + for (let day of poss.prices.slice(2)) { let price_class = getPriceClass(buy_price, day.max); if (day.min !== day.max) { out_line += `${day.min} ${i18next.t("output.to")} ${day.max}`; @@ -367,9 +367,6 @@ const update = function () { const first_buy = getCheckedRadio(first_buy_radios) == 'true'; const previous_pattern = parseInt(getCheckedRadio(previous_pattern_radios)); - buy_input[0].disabled = first_buy; - buy_input[0].placeholder = first_buy ? '—' : '...' - const permalink = generatePermalink(buy_price, sell_prices, first_buy, previous_pattern); if (permalink) { permalink_button.show(); diff --git a/locales/ca.json b/locales/ca.json index 6f504d4..0f36555 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -25,7 +25,7 @@ "small-spike": "Pic petit" }, "prices": { - "description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?(Si no has comprat naps abans, aquest camp estarà desactivat)", + "description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?", "open": { "am": "AM - De les 8:00 am a les 11:59 am", "pm": "PM - De les 12:00 pm a les 10:00 pm" diff --git a/locales/de.json b/locales/de.json index f1f113b..2e9831a 100644 --- a/locales/de.json +++ b/locales/de.json @@ -25,7 +25,7 @@ "small-spike": "Leicht Ansteigend" }, "prices": { - "description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel? (Wenn du zum ersten Mal Rüben kaufst, wird dieses Feld deaktiviert)", + "description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel?", "open": { "am": "Vorm. (Vormittag) - 8:00 Uhr bis 11:59 Uhr", "pm": "Nachm. (Nachmittag) - 12:00 Uhr bis 22:00 Uhr" diff --git a/locales/en.json b/locales/en.json index b057390..b1bfcfa 100644 --- a/locales/en.json +++ b/locales/en.json @@ -25,7 +25,7 @@ "small-spike": "Small Spike" }, "prices": { - "description": "What was the price of turnips this week on your island? (If this is your first time buying turnips, this field will be disabled)", + "description": "What was the price of turnips this week on your island?", "open": { "am": "AM - 8:00 am to 11:59 am", "pm": "PM - 12:00 pm to 10:00 pm" diff --git a/locales/es.json b/locales/es.json index 3fa5b15..fef9941 100644 --- a/locales/es.json +++ b/locales/es.json @@ -25,7 +25,7 @@ "small-spike": "Pico moderado" }, "prices": { - "description": "¿Cuál fue el precio de los nabos en su isla esta semana? (Si esta ha sido tu primera vez comprando nabos, este campo se desactivará)", + "description": "¿Cuál fue el precio de los nabos en su isla esta semana?", "open": { "am": "AM - De 8:00 a 11:59", "pm": "PM - De 12:00 a 22:00" diff --git a/locales/fr.json b/locales/fr.json index 487dd21..5f6892d 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -25,7 +25,7 @@ "small-spike": "Petit Pic" }, "prices": { - "description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?(Si c'est la première fois que t'en achètes, ce champ sera desactivé)", + "description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?", "open": { "am": "Matin (AM) - de 8:00 à 11:59", "pm": "Après-midi (PM) - de 12:00 à 22:00" diff --git a/locales/hu.json b/locales/hu.json index 0a9a7dc..a30fee0 100644 --- a/locales/hu.json +++ b/locales/hu.json @@ -25,7 +25,7 @@ "small-spike": "Kis kiugrás" }, "prices": { - "description": "Mennyiért vettél ezen a héten retket? (Ha most vásárolsz először, ez a mező le lesz tiltva)", + "description": "Mennyiért vettél ezen a héten retket?", "open": { "am": "Délelőtt - 08:00-tól 11:59-ig", "pm": "Délután - 12:00-től 22:00-ig" diff --git a/locales/it.json b/locales/it.json index 12f7906..86de440 100644 --- a/locales/it.json +++ b/locales/it.json @@ -26,7 +26,7 @@ "small-spike": "Piccolo picco" }, "prices": { - "description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana? (Se è la prima volta che le compri questo campo è disabilitato)", + "description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana?", "open": { "am": "Mattina - dalle 8:00 alle 11:59", "pm": "Pomeriggio - dalle 12:00 alle 22:00" diff --git a/locales/ja.json b/locales/ja.json index 074f78b..fdb59ec 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -25,7 +25,7 @@ "small-spike": "跳ね小型(4期型)" }, "prices": { - "description": "今週のカブ価は? (初めてカブを購入した場合は、この入力欄は無効にされています)", + "description": "今週のカブ価は?", "open": { "am": "午前 - AM 8:00 ~ AM 11:59", "pm": "午後 - PM 12:00 ~ PM 10:00" diff --git a/locales/ko.json b/locales/ko.json index 72b8465..40f6365 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -25,7 +25,7 @@ "small-spike": "작은 급등" }, "prices": { - "description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까? (첫 구매인 경우에는 입력란이 비활성화됩니다)", + "description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까?", "open": { "am": "오전 - 오전 8:00 ~ 오전 11:59", "pm": "오후 - 오후 12:00 ~ 오후 10:00" diff --git a/locales/nl.json b/locales/nl.json index 6376bbd..22d0771 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -25,7 +25,7 @@ "small-spike": "Kleine Piek" }, "prices": { - "description": "Wat was de prijs van knollen op je eiland deze week? (Als dit de eerste keer is dat je knollen koopt is dit veld uitgeschakeld)", + "description": "Wat was de prijs van knollen op je eiland deze week?", "open": { "am": "Voormiddag - 8:00 tot 11:59", "pm": "Namiddag - 12:00 tot 22:00" diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 6b81af8..6dd7c11 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -25,7 +25,7 @@ "small-spike": "Pequeno Pico" }, "prices": { - "description": "Qual foi o preço dos nabos esta semana em sua ilha? (Se esta é a primeira vez que compra nabos, este campo ficará desativado)", + "description": "Qual foi o preço dos nabos esta semana em sua ilha?", "open": { "am": "AM - 8:00 am até 11:59 am", "pm": "PM - 12:00 pm até 10:00 pm" diff --git a/locales/ru.json b/locales/ru.json index f0cdc19..d670a4d 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -25,7 +25,7 @@ "small-spike": "Малый скачок" }, "prices": { - "description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе? (Если Вы новичок рынка репы, данное поле будет недоступно)", + "description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе?", "open": { "am": "Утро - 8:00 - 11:59", "pm": "День - 12:00 - 22:00" diff --git a/locales/zh-CN.json b/locales/zh-CN.json index d0d85ba..3031c39 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -25,7 +25,7 @@ "small-spike": "小幅上涨(四期型)" }, "prices": { - "description": "本周你的岛上大头菜的购买价格是多少?(如果你是第一次购买大头菜,这个字段不可用)", + "description": "本周你的岛上大头菜的购买价格是多少?", "open": { "am": "上午 - 8:00 ~ 11:59", "pm": "下午 - 12:00 ~ 22:00" diff --git a/locales/zh-TW.json b/locales/zh-TW.json index aeb2dfe..518eaf3 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -25,7 +25,7 @@ "small-spike": "四期型" }, "prices": { - "description": "本週自己島上的大頭菜買價?(若這是你第一次購買大頭菜,則此欄位會被停用)", + "description": "本週自己島上的大頭菜買價?", "open": { "am": "上午 - 08:00 到 11:59", "pm": "下午 - 12:00 到 22:00"