From 6a0f59a1ad0906db9f37c8a236eea6bc0b20405b Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Sun, 4 Apr 2021 03:08:50 +0800 Subject: [PATCH 1/2] Update homepage --- src/locales/en.json | 8 +++++- src/routes/_index/item.svelte | 52 +++++++++++++++++++---------------- src/routes/_index/wish.svelte | 2 +- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 2f35af51..940d6be7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -35,7 +35,8 @@ }, "items": { "title": "Farmable Today", - "detail": "Items" + "detail": "Items", + "sunday": "Sunday can farm all items 😁" }, "calculator": { "title": "🧮 Calculate Character and Weapons ascension material and talent book! All the calculations can be added to the Todo list, it will show you how much resin you need too!", @@ -455,5 +456,10 @@ ], "kofi": "Support me on Ko-fi", "trakteer": "Support me on Trakteer" + }, + "reminder": { + "title": "Reminder Notification", + "notSupported": "Your browser does not support push notification, please try other browser!", + "blocked": "Notification is blocked, the reminder notification will not work! Please enable it on your browser." } } \ No newline at end of file diff --git a/src/routes/_index/item.svelte b/src/routes/_index/item.svelte index 577b238f..fe4a9d3e 100644 --- a/src/routes/_index/item.svelte +++ b/src/routes/_index/item.svelte @@ -56,34 +56,38 @@

{$t('home.items.title')}

- - {#each Object.entries(characterItems) as [id, characters]} + {#if today === 'sunday'} +
{$t('home.items.sunday')}
+ {:else} +
+ {#each Object.entries(characterItems) as [id, characters]} + + + + + {/each} - - - {/each} - - - -
+ {id} + + {#each characters as char} + {char} + {/each} +
- {id} - - {#each characters as char} - {char} + + {#each Object.entries(weaponItems) as [id, _]} +
+ {id} +
{/each}
- {#each Object.entries(weaponItems) as [id, _]} -
- {id} -
- {/each} -
+ + {/if} {$t('home.wish.latest')}

-
+
Date: Sun, 4 Apr 2021 03:24:21 +0800 Subject: [PATCH 2/2] Add russian language selector --- src/components/Sidebar/Sidebar.svelte | 1 + src/i18n.js | 2 ++ src/locales/ru.json | 2 +- static/images/locales/ru.svg | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 static/images/locales/ru.svg diff --git a/src/components/Sidebar/Sidebar.svelte b/src/components/Sidebar/Sidebar.svelte index 99fd8ba5..6d5f9522 100644 --- a/src/components/Sidebar/Sidebar.svelte +++ b/src/components/Sidebar/Sidebar.svelte @@ -22,6 +22,7 @@ const languages = [ { id: 'en', label: 'English' }, { id: 'id', label: 'Indonesia' }, + { id: 'ru', label: 'Русский' }, ]; $: currentLocale = languages.find((e) => e.id === $locale.substring(0, 2)) || { id: 'en', label: 'English' }; $: locales = languages.filter((e) => e.id !== currentLocale.id); diff --git a/src/i18n.js b/src/i18n.js index 07ee0390..b3d590e8 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -2,6 +2,7 @@ import { addMessages, init, getLocaleFromNavigator, locale as $locale } from 'sv import en from './locales/en.json'; import id from './locales/id.json'; +import ru from './locales/ru.json'; const INIT_OPTIONS = { fallbackLocale: 'en', @@ -23,6 +24,7 @@ $locale.subscribe((value) => { addMessages('en', en); addMessages('en-US', en); addMessages('id', id); +addMessages('ru', ru); export function startClient() { const savedLocale = localStorage.getItem('locale'); diff --git a/src/locales/ru.json b/src/locales/ru.json index 2f93ada9..1f3f833d 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -126,7 +126,7 @@ "для доп. информации). Вы можете отключить отправку ваших молитв, тогда вся ваша история молитв будет сохраняться на вашем устройстве (или на вашем Google Drive, если вы включили синхронизацию)." ], "q6": "Я выполнил все шаги, но у меня ошибка API!", - "a6": "Убедитесь, что вы скопировлись весь текст (удерживайте и нажмите «Выбрать все» для мобильных устройств); возможно, вы пропустили часть ссылки которая нужна для работы импорта", + "a6": "Убедитесь, что вы скопировлись весь текст (удерживайте и нажмите «Выбрать все» для мобильных устройств); возможно, вы пропустили часть ссылки которая нужна для работы импорта" }, "guide": { "pc": [ diff --git a/static/images/locales/ru.svg b/static/images/locales/ru.svg new file mode 100644 index 00000000..b73efdb0 --- /dev/null +++ b/static/images/locales/ru.svg @@ -0,0 +1,17 @@ + + + + + + + image/svg+xml + + + + + + + + + +