Skip to content

Instantly share code, notes, and snippets.

@SilasRodrigues19
Last active February 15, 2025 06:24
Show Gist options
  • Save SilasRodrigues19/3235be7af8818c2c92f7171e81fdc084 to your computer and use it in GitHub Desktop.
Save SilasRodrigues19/3235be7af8818c2c92f7171e81fdc084 to your computer and use it in GitHub Desktop.

Revisions

  1. SilasRodrigues19 revised this gist Mar 15, 2023. 1 changed file with 12 additions and 22 deletions.
    34 changes: 12 additions & 22 deletions script.ts
    Original file line number Diff line number Diff line change
    @@ -1,25 +1,15 @@
    interface TranslationKeys {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    }

    type Translations = {
    pt: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    en: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    es: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    pt: TranslationKeys,
    en: TranslationKeys,
    es: TranslationKeys
    };

    let translations: Translations = {
    @@ -44,4 +34,4 @@ let translations: Translations = {
    portfolio: 'XXX',
    contact: 'XXXX',
    },
    };
    };
  2. SilasRodrigues19 created this gist Mar 15, 2023.
    47 changes: 47 additions & 0 deletions script.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    type Translations = {
    pt: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    en: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    es: {
    home: string;
    about: string;
    services: string;
    portfolio: string;
    contact: string;
    };
    };

    let translations: Translations = {
    pt: {
    home: 'Início',
    about: 'Sobre',
    services: 'Serviços',
    portfolio: 'Portfólio',
    contact: 'Contato',
    },
    en: {
    home: 'YYYY',
    about: 'YYY',
    services: 'YYY',
    portfolio: 'YYY',
    contact: 'YY',
    },
    es: {
    home: 'XXXX',
    about: 'XXXX',
    services: 'XXXX',
    portfolio: 'XXX',
    contact: 'XXXX',
    },
    };