Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Jan 7, 2024
1 parent ace708d commit 6af1d24
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/screens/deck-or-folder-choose/deck-or-folder-choose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { css } from "@emotion/css";
import { Choice } from "./choice.tsx";
import { screenStore } from "../../store/screen-store.ts";
import { useBackButton } from "../../lib/telegram/use-back-button.tsx";
import { t } from "../../translations/t.ts";

export const DeckOrFolderChoose = observer(() => {
useBackButton(() => {
Expand All @@ -20,7 +21,7 @@ export const DeckOrFolderChoose = observer(() => {
gap: 12,
})}
>
<h3>Choose what to create</h3>
<h3>{t("choose_what_to_create")}</h3>
<div
className={css({
display: "flex",
Expand All @@ -30,16 +31,16 @@ export const DeckOrFolderChoose = observer(() => {
>
<Choice
icon={"mdi mdi-cards-outline mdi-36px"}
title={"Deck"}
description={"A collection of cards"}
title={t("deck")}
description={t("deck_description")}
onClick={() => {
screenStore.go({ type: "deckForm" });
}}
/>
<Choice
icon={"mdi mdi-folder-open-outline mdi-36px"}
title={"Folder"}
description={"A collection of decks"}
title={t("folder")}
description={t("folder_description")}
onClick={() => {
screenStore.go({ type: "folderForm" });
}}
Expand Down
20 changes: 20 additions & 0 deletions src/translations/t.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { getUserLanguage } from "./get-user-language.ts";

const en = {
my_decks: "My decks",
choose_what_to_create: "Choose what to create",
deck: "Deck",
deck_description: "A collection of cards",
folder: "Folder",
folder_description: "A collection of decks",
decks: "Decks",
edit_folder: "Edit folder",
add_folder: "Add folder",
Expand Down Expand Up @@ -123,6 +128,11 @@ const en = {
type Translation = typeof en;

const ru: Translation = {
choose_what_to_create: "Выберите что создать",
deck: "Колода",
deck_description: "Коллекция карточек",
folder: "Папка",
folder_description: "Коллекция колод",
review_folder: "Повторить папку",
add_deck_to_folder: "Добавить колоду в папку",
add_folder: "Добавить папку",
Expand Down Expand Up @@ -242,6 +252,11 @@ const ru: Translation = {

const es: Translation = {
review_folder: "Repasar carpeta",
folder_description: "Una colección de mazos",
folder: "Carpeta",
deck_description: "Una colección de tarjetas",
deck: "Mazo",
choose_what_to_create: "Elige qué crear",
edit_folder: "Editar carpeta",
add_folder: "Añadir carpeta",
add_deck_to_folder: "Añadir mazo a la carpeta",
Expand Down Expand Up @@ -364,6 +379,11 @@ const es: Translation = {

const ptBr: Translation = {
review_folder: "Revisar pasta",
choose_what_to_create: "Escolha o que criar",
deck: "Baralho",
deck_description: "Uma coleção de cartões",
folder: "Pasta",
folder_description: "Uma coleção de baralhos",
no_decks_to_add: "Não há mais baralhos para adicionar",
add_deck_to_folder: "Adicionar baralho à pasta",
add_folder: "Adicionar pasta",
Expand Down

0 comments on commit 6af1d24

Please sign in to comment.