Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/context/LocaleProvider/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import ltDayjsTranslations from "dayjs/locale/lt";
import frDayjsTranslations from "dayjs/locale/fr";
import itDayjsTranslations from "dayjs/locale/it";
import ptBRDayjsTranslations from "dayjs/locale/pt-br";
import { en, pl, de, lt, fr, it, ptBR } from "@/locales";
import esDayjsTranslations from "dayjs/locale/es";
import { en, pl, de, lt, fr, it, ptBR, es } from "@/locales";
import { LocaleType } from "./types";

export const localesData: LocaleType[] = [
Expand Down Expand Up @@ -50,6 +51,12 @@ export const localesData: LocaleType[] = [
lang: ptBR,
translateCode: "pt-BR",
dayjsTranslations: ptBRDayjsTranslations
},
{
id: "es",
lang: es,
translateCode: "es-ES",
dayjsTranslations: esDayjsTranslations
}
];

Expand Down
17 changes: 17 additions & 0 deletions src/locales/es.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export const es = {
feelingEmpty: "Me siento vacío...",
free: "Libre",
loadNext: "Siguiente",
loadPrevious: "Anterior",
over: "en",
taken: "Tomado",
topbar: {
filters: "Filtros",
next: "siguiente",
prev: "anterior",
today: "Hoy",
view: "Vista"
},
search: "Buscar",
week: "semana"
};
1 change: 1 addition & 0 deletions src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export { lt } from "./lt";
export { fr } from "./fr";
export { it } from "./it";
export { ptBR } from "./ptBR";
export { es } from "./es";
4 changes: 2 additions & 2 deletions src/types/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type ZoomLevelTuple = typeof allZoomLevel;

export type ZoomLevel = ZoomLevelTuple[number];

export type LangCodes = "en" | "pl" | "de" | "lt" | "fr" | "it" | "pt-BR";
export type LangCodes = "en" | "pl" | "de" | "lt" | "fr" | "it" | "pt-BR" | "es";

export type Config = {
zoom: ZoomLevel;
Expand All @@ -21,7 +21,7 @@ export type Config = {
*/
filterButtonState?: number;
/**
* Language code: "en" | "pl" | "de" | "lt" | "fr" | "it" | "pt-BR"
* Language code: "en" | "pl" | "de" | "lt" | "fr" | "it" | "pt-BR" | "es"
*/
lang?: LangCodes | string;
isFiltersButtonVisible?: boolean;
Expand Down