Skip to content

Commit

Permalink
feat: update about text
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Apr 21, 2024
1 parent 95cf5d0 commit 76869da
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 248 deletions.
12 changes: 11 additions & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ h3 {
}
}

.hero-emphasis {
.hero-emphasis-orange {
@apply text-transparent bg-clip-text bg-gradient-to-br;
@apply from-orange-400 to-orange-800 font-semibold;
}

.hero-emphasis-blue {
@apply text-transparent bg-clip-text bg-gradient-to-br;
@apply from-blue-400 to-blue-800 font-semibold;
}

.hero-emphasis-red {
@apply text-transparent bg-clip-text bg-gradient-to-br;
@apply from-red-400 to-red-800 font-semibold;
}
2 changes: 1 addition & 1 deletion src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const en = {
},
HOMEPAGE: {
HI: `Hey, I'm <span class="font-semibold">{name:string} {surname:string}</span>,`,
ABOUT: `I'm a Software Developer with experience on <span class="hero-emphasis">Systems Programming</span> and <span class="hero-emphasis">Web Development</span>.`,
ABOUT: `Software Developer with Web & Systems Experience. Favourite language is <span class="hero-emphasis-orange">Rust</span> but I also do <span class="hero-emphasis-blue">TypeScript</span> and <span class="hero-emphasis-red">Svelte</span>.`,
SOCIAL_LINKS: 'Social Networks',
LATEST_NOTES: 'Latest Note',
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/es/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const es = {
},
HOMEPAGE: {
HI: `Hola soy {name:string} {surname:string},`,
ABOUT: `Soy un desarrollador de software con experiencia en <span class="hero-emphasis">Programación de Sistemas</span> y <span class="hero-emphasis">Desarrollo Web</span>.`,
ABOUT: `Desarrollador de Software con experiencia en Web y Desarrollo de Sistemas. Mi lenguaje favorito es ', <span class="hero-emphasis-orange">Rust</span> Rust, pero también escribo <span class="hero-emphasis-blue">TypeScript</span> y <span class="hero-emphasis-red">Svelte</span>.`,
SOCIAL_LINKS: 'Redes Sociales',
LATEST_NOTES: 'Nota más reciente',
},
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/hu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const hu = {
},
HOMEPAGE: {
HI: 'Jó napot kívánok {surname:string} {name:string} vagyok,',
ABOUT: `Egy szoftverfejlesztő vagyok aki tapasztalattal rendelkezik <span class="hero-emphasis">Rendszerprogramozás</span> és <span class="hero-emphasis">Webfejlesztés</span> területén.`,
ABOUT: `Szoftvermérnök webes és rendszertapasztalattal. A kedvenc nyelv a ', <span class="hero-emphasis-orange">Rust</span> Rust, de én is <span class="hero-emphasis-blue">TypeScript</span> és <span class="hero-emphasis-red">Svelte</span>.`,
SOCIAL_LINKS: 'Közösségi hálók',
LATEST_NOTES: 'Legújabb jegyzet',
},
Expand Down
22 changes: 6 additions & 16 deletions src/i18n/i18n-svelte.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
/* eslint-disable */

import { initI18nSvelte } from 'typesafe-i18n/svelte';
import type {
Formatters,
Locales,
TranslationFunctions,
Translations,
} from './i18n-types';
import { loadedFormatters, loadedLocales } from './i18n-util';
import { initI18nSvelte } from 'typesafe-i18n/svelte'
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types'
import { loadedFormatters, loadedLocales } from './i18n-util'

const { locale, LL, setLocale } = initI18nSvelte<
Locales,
Translations,
TranslationFunctions,
Formatters
>(loadedLocales, loadedFormatters);
const { locale, LL, setLocale } = initI18nSvelte<Locales, Translations, TranslationFunctions, Formatters>(loadedLocales, loadedFormatters)

export { locale, LL, setLocale };
export { locale, LL, setLocale }

export default LL;
export default LL
193 changes: 96 additions & 97 deletions src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
@@ -1,108 +1,107 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
/* eslint-disable */
import type {
BaseTranslation as BaseTranslationType,
LocalizedString,
RequiredParams,
} from 'typesafe-i18n';
import type { BaseTranslation as BaseTranslationType, LocalizedString, RequiredParams } from 'typesafe-i18n'

export type BaseTranslation = BaseTranslationType;
export type BaseLocale = 'en';
export type BaseTranslation = BaseTranslationType
export type BaseLocale = 'en'

export type Locales = 'en' | 'es' | 'hu';
export type Locales =
| 'en'
| 'es'
| 'hu'

export type Translation = RootTranslation;
export type Translation = RootTranslation

export type Translations = RootTranslation;
export type Translations = RootTranslation

type RootTranslation = {
LAYOUT: {
NAV: {
/**
* H​o​m​e
*/
HOME: string;
/**
* N​o​t​e​s
*/
NOTES: string;
};
FOOTER: {
/**
* M​a​d​e​ ​w​i​t​h​ ​�​�​ ​a​n​d​ ​❤​️​ ​b​y​ ​E​s​t​e​b​a​n​ ​B​o​r​a​i​ ​©​ ​{​s​t​a​r​t​}​ ​-​ ​{​e​n​d​}
* @param {number} end
* @param {number} start
*/
COPYRGHT: RequiredParams<'end' | 'start'>;
/**
* S​o​u​r​c​e​ ​C​o​d​e
*/
SOURCE_CODE: string;
};
};
HOMEPAGE: {
/**
* H​e​y​,​ ​I​'​m​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​f​o​n​t​-​s​e​m​i​b​o​l​d​"​>​{​n​a​m​e​}​ ​{​s​u​r​n​a​m​e​}​<​/​s​p​a​n​>​,
* @param {string} name
* @param {string} surname
*/
HI: RequiredParams<'name' | 'surname'>;
/**
* I​'​m​ ​a​ ​S​o​f​t​w​a​r​e​ ​D​e​v​e​l​o​p​e​r​ ​w​i​t​h​ ​e​x​p​e​r​i​e​n​c​e​ ​o​n​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​h​e​r​o​-​e​m​p​h​a​s​i​s​"​>​S​y​s​t​e​m​s​ ​P​r​o​g​r​a​m​m​i​n​g​<​/​s​p​a​n​>​ ​a​n​d​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​h​e​r​o​-​e​m​p​h​a​s​i​s​"​>​W​e​b​ ​D​e​v​e​l​o​p​m​e​n​t​<​/​s​p​a​n​>​.
*/
ABOUT: string;
/**
* S​o​c​i​a​l​ ​N​e​t​w​o​r​k​s
*/
SOCIAL_LINKS: string;
/**
* L​a​t​e​s​t​ ​N​o​t​e
*/
LATEST_NOTES: string;
};
};
LAYOUT: {
NAV: {
/**
* H​o​m​e
*/
HOME: string
/**
* N​o​t​e​s
*/
NOTES: string
}
FOOTER: {
/**
* M​a​d​e​ ​w​i​t​h​ ​�​�​ ​a​n​d​ ​❤​️​ ​b​y​ ​E​s​t​e​b​a​n​ ​B​o​r​a​i​ ​©​ ​{​s​t​a​r​t​}​ ​-​ ​{​e​n​d​}
* @param {number} end
* @param {number} start
*/
COPYRGHT: RequiredParams<'end' | 'start'>
/**
* S​o​u​r​c​e​ ​C​o​d​e
*/
SOURCE_CODE: string
}
}
HOMEPAGE: {
/**
* H​e​y​,​ ​I​'​m​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​f​o​n​t​-​s​e​m​i​b​o​l​d​"​>​{​n​a​m​e​}​ ​{​s​u​r​n​a​m​e​}​<​/​s​p​a​n​>​,
* @param {string} name
* @param {string} surname
*/
HI: RequiredParams<'name' | 'surname'>
/**
* S​o​f​t​w​a​r​e​ ​D​e​v​e​l​o​p​e​r​ ​w​i​t​h​ ​W​e​b​ ​&​ ​S​y​s​t​e​m​s​ ​E​x​p​e​r​i​e​n​c​e​.​ ​F​a​v​o​u​r​i​t​e​ ​l​a​n​g​u​a​g​e​ ​i​s​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​h​e​r​o​-​e​m​p​h​a​s​i​s​-​o​r​a​n​g​e​"​>​R​u​s​t​<​/​s​p​a​n​>​ ​b​u​t​ ​I​ ​a​l​s​o​ ​d​o​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​h​e​r​o​-​e​m​p​h​a​s​i​s​-​b​l​u​e​"​>​T​y​p​e​S​c​r​i​p​t​<​/​s​p​a​n​>​ ​a​n​d​ ​<​s​p​a​n​ ​c​l​a​s​s​=​"​h​e​r​o​-​e​m​p​h​a​s​i​s​-​r​e​d​"​>​S​v​e​l​t​e​<​/​s​p​a​n​>​.
*/
ABOUT: string
/**
* S​o​c​i​a​l​ ​N​e​t​w​o​r​k​s
*/
SOCIAL_LINKS: string
/**
* L​a​t​e​s​t​ ​N​o​t​e
*/
LATEST_NOTES: string
}
}

export type TranslationFunctions = {
LAYOUT: {
NAV: {
/**
* Home
*/
HOME: () => LocalizedString;
/**
* Notes
*/
NOTES: () => LocalizedString;
};
FOOTER: {
/**
* Made with 🧉 and ❤️ by Esteban Borai © {start} - {end}
*/
COPYRGHT: (arg: { end: number; start: number }) => LocalizedString;
/**
* Source Code
*/
SOURCE_CODE: () => LocalizedString;
};
};
HOMEPAGE: {
/**
* Hey, I'm <span class="font-semibold">{name} {surname}</span>,
*/
HI: (arg: { name: string; surname: string }) => LocalizedString;
/**
* I'm a Software Developer with experience on <span class="hero-emphasis">Systems Programming</span> and <span class="hero-emphasis">Web Development</span>.
*/
ABOUT: () => LocalizedString;
/**
* Social Networks
*/
SOCIAL_LINKS: () => LocalizedString;
/**
* Latest Note
*/
LATEST_NOTES: () => LocalizedString;
};
};
LAYOUT: {
NAV: {
/**
* Home
*/
HOME: () => LocalizedString
/**
* Notes
*/
NOTES: () => LocalizedString
}
FOOTER: {
/**
* Made with 🧉 and ❤️ by Esteban Borai © {start} - {end}
*/
COPYRGHT: (arg: { end: number, start: number }) => LocalizedString
/**
* Source Code
*/
SOURCE_CODE: () => LocalizedString
}
}
HOMEPAGE: {
/**
* Hey, I'm <span class="font-semibold">{name} {surname}</span>,
*/
HI: (arg: { name: string, surname: string }) => LocalizedString
/**
* Software Developer with Web & Systems Experience. Favourite language is <span class="hero-emphasis-orange">Rust</span> but I also do <span class="hero-emphasis-blue">TypeScript</span> and <span class="hero-emphasis-red">Svelte</span>.
*/
ABOUT: () => LocalizedString
/**
* Social Networks
*/
SOCIAL_LINKS: () => LocalizedString
/**
* Latest Note
*/
LATEST_NOTES: () => LocalizedString
}
}

export type Formatters = {};
export type Formatters = {}
38 changes: 16 additions & 22 deletions src/i18n/i18n-util.async.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
/* eslint-disable */

import { initFormatters } from './formatters';
import type { Locales, Translations } from './i18n-types';
import { loadedFormatters, loadedLocales, locales } from './i18n-util';
import { initFormatters } from './formatters'
import type { Locales, Translations } from './i18n-types'
import { loadedFormatters, loadedLocales, locales } from './i18n-util'

const localeTranslationLoaders = {
en: () => import('./en'),
es: () => import('./es'),
hu: () => import('./hu'),
};
en: () => import('./en'),
es: () => import('./es'),
hu: () => import('./hu'),
}

const updateDictionary = (
locale: Locales,
dictionary: Partial<Translations>,
): Translations =>
(loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary });
const updateDictionary = (locale: Locales, dictionary: Partial<Translations>): Translations =>
loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary }

export const importLocaleAsync = async (
locale: Locales,
): Promise<Translations> =>
(await localeTranslationLoaders[locale]()).default as unknown as Translations;
export const importLocaleAsync = async (locale: Locales): Promise<Translations> =>
(await localeTranslationLoaders[locale]()).default as unknown as Translations

export const loadLocaleAsync = async (locale: Locales): Promise<void> => {
updateDictionary(locale, await importLocaleAsync(locale));
loadFormatters(locale);
};
updateDictionary(locale, await importLocaleAsync(locale))
loadFormatters(locale)
}

export const loadAllLocalesAsync = (): Promise<void[]> =>
Promise.all(locales.map(loadLocaleAsync));
export const loadAllLocalesAsync = (): Promise<void[]> => Promise.all(locales.map(loadLocaleAsync))

export const loadFormatters = (locale: Locales): void =>
void (loadedFormatters[locale] = initFormatters(locale));
void (loadedFormatters[locale] = initFormatters(locale))
32 changes: 16 additions & 16 deletions src/i18n/i18n-util.sync.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
/* eslint-disable */

import { initFormatters } from './formatters';
import type { Locales, Translations } from './i18n-types';
import { loadedFormatters, loadedLocales, locales } from './i18n-util';
import { initFormatters } from './formatters'
import type { Locales, Translations } from './i18n-types'
import { loadedFormatters, loadedLocales, locales } from './i18n-util'

import en from './en';
import es from './es';
import hu from './hu';
import en from './en'
import es from './es'
import hu from './hu'

const localeTranslations = {
en,
es,
hu,
};
en,
es,
hu,
}

export const loadLocale = (locale: Locales): void => {
if (loadedLocales[locale]) return;
if (loadedLocales[locale]) return

loadedLocales[locale] = localeTranslations[locale] as unknown as Translations;
loadFormatters(locale);
};
loadedLocales[locale] = localeTranslations[locale] as unknown as Translations
loadFormatters(locale)
}

export const loadAllLocales = (): void => locales.forEach(loadLocale);
export const loadAllLocales = (): void => locales.forEach(loadLocale)

export const loadFormatters = (locale: Locales): void =>
void (loadedFormatters[locale] = initFormatters(locale));
void (loadedFormatters[locale] = initFormatters(locale))
Loading

0 comments on commit 76869da

Please sign in to comment.