From c5fce47d7d8b78c7728c9e95226f958b0a7f5ab5 Mon Sep 17 00:00:00 2001 From: Ricardo Chavarria Date: Tue, 4 Jun 2024 14:13:21 -0600 Subject: [PATCH] feat: translations for home and navigation - Remove version picker - Translations for home and navigation - Remove git patches for translations - Update copyTargets on update-origin.mjs - Create files for home, footer, navigation and links --- adev-es/src/app/core/constants/links.ts | 5 + .../core/layout/footer/footer.component.html | 71 ++++ .../core/layout/footer/footer.component.ts | 19 + .../navigation/navigation.component.html | 397 ++++++++++++++++++ .../src/app/features/home/home.component.html | 153 +++++++ .../git-patches/home-page-translations.patch | 85 ---- .../git-patches/navigation-translations.patch | 40 -- tools/update-origin.mjs | 7 +- 8 files changed, 651 insertions(+), 126 deletions(-) create mode 100644 adev-es/src/app/core/constants/links.ts create mode 100644 adev-es/src/app/core/layout/footer/footer.component.html create mode 100644 adev-es/src/app/core/layout/footer/footer.component.ts create mode 100644 adev-es/src/app/core/layout/navigation/navigation.component.html create mode 100644 adev-es/src/app/features/home/home.component.html delete mode 100644 tools/git-patches/home-page-translations.patch delete mode 100644 tools/git-patches/navigation-translations.patch diff --git a/adev-es/src/app/core/constants/links.ts b/adev-es/src/app/core/constants/links.ts new file mode 100644 index 0000000..0dd19ee --- /dev/null +++ b/adev-es/src/app/core/constants/links.ts @@ -0,0 +1,5 @@ +export const GITHUB = 'https://github.com/angular-hispano/angular-docs-es'; +export const X = 'https://x.com/AngularHispana'; +export const DISCORD = 'https://discord.com/invite/4cWb6SKUcb'; +export const MEDIUM = ''; +export const YOUTUBE = ''; \ No newline at end of file diff --git a/adev-es/src/app/core/layout/footer/footer.component.html b/adev-es/src/app/core/layout/footer/footer.component.html new file mode 100644 index 0000000..1fa7444 --- /dev/null +++ b/adev-es/src/app/core/layout/footer/footer.component.html @@ -0,0 +1,71 @@ + + \ No newline at end of file diff --git a/adev-es/src/app/core/layout/footer/footer.component.ts b/adev-es/src/app/core/layout/footer/footer.component.ts new file mode 100644 index 0000000..80379a1 --- /dev/null +++ b/adev-es/src/app/core/layout/footer/footer.component.ts @@ -0,0 +1,19 @@ +import {CommonModule} from '@angular/common'; +import {ChangeDetectionStrategy, Component} from '@angular/core'; +import {ExternalLink} from '@angular/docs'; +import {RouterLink} from '@angular/router'; +import {DISCORD, GITHUB, X} from './../../constants/links'; + +@Component({ + selector: 'footer[adev-footer]', + standalone: true, + imports: [CommonModule, ExternalLink, RouterLink], + templateUrl: './footer.component.html', + styleUrls: ['./footer.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class Footer { + readonly GITHUB = GITHUB; + readonly X = X; + readonly DISCORD = DISCORD; +} diff --git a/adev-es/src/app/core/layout/navigation/navigation.component.html b/adev-es/src/app/core/layout/navigation/navigation.component.html new file mode 100644 index 0000000..73f5c45 --- /dev/null +++ b/adev-es/src/app/core/layout/navigation/navigation.component.html @@ -0,0 +1,397 @@ + +
+ +
+ + +
+ + + + + @if (activeRouteItem() === DOCS_ROUTE || activeRouteItem() === REFERENCE_ROUTE) { +
+ +
+ } +
diff --git a/adev-es/src/app/features/home/home.component.html b/adev-es/src/app/features/home/home.component.html new file mode 100644 index 0000000..a71f8c8 --- /dev/null +++ b/adev-es/src/app/features/home/home.component.html @@ -0,0 +1,153 @@ +
+
+
+ +
+
+
+ +
+
+
+
+

Trabaja a cualquier escala

+

+ Angular te permite empezar poco a poco en un camino bien iluminado y + te apoya a medida que tu equipo y tus aplicaciones crecen. +

+
+
+
+
+
+
+
+
+

Amado por millones

+

+ Únete a los millones de desarrolladores de todo el mundo que + construyen con Angular en una comunidad próspera y amigable. +

+
+
+
+
+
+
+
+
+

+ Construir para todos + +

+

+ Confía en el soporte integrado de hidratación, internacionalización, + seguridad y accesibilidad de Angular para construir para todos en + todo el mundo. +

+
+
+
+ +
+
+
+
+ @defer (on viewport(buildForEveryone); prefetch on + viewport(lovedByMillions)) { + + } @loading { + Code editor + } +
+
+
+ + + +
diff --git a/tools/git-patches/home-page-translations.patch b/tools/git-patches/home-page-translations.patch deleted file mode 100644 index d158f8c..0000000 --- a/tools/git-patches/home-page-translations.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/adev/src/app/features/home/home.component.html b/adev/src/app/features/home/home.component.html -index 03bb94db37..3918a69707 100644 ---- a/adev/src/app/features/home/home.component.html -+++ b/adev/src/app/features/home/home.component.html -@@ -3,8 +3,8 @@ -
- - --

Welcome to Angular.dev — the future home for Angular!

--

Read about our beta launch

-+

Bienvenid@ a Angular.dev — la futura casa de Angular!

-+

Lea sobre nuestro lanzamiento beta

-
-
- -@@ -62,10 +62,10 @@ -
-
-
--

Works at any scale

-+

Trabaja a cualquier escala

-

-- Angular lets you start small on a well-lit path and supports you as your team and apps -- grow. -+ Angular te permite empezar poco a poco en un camino bien iluminado y te apoya a medida que tu equipo -+ y tus aplicaciones crecen. -

-
-
-@@ -75,10 +75,10 @@ -
-
-
--

Loved by millions

-+

Amado por millones

-

-- Join the millions of developers all over the world building with Angular in a thriving -- and friendly community. -+ Únete a los millones de desarrolladores de todo el mundo que construyen con Angular -+ en una comunidad próspera y amigable. -

-
-
-@@ -89,12 +89,12 @@ -
-
-

-- Build for everyone -- -+ Construir para todos -+ -

-

-- Rely on Angular's built-in hydration, internationalization, security, and accessibility -- support to build for everyone around the world. -+ Confía en el soporte integrado de hidratación, internacionalización, seguridad y accesibilidad -+ de Angular para construir para todos en todo el mundo. -

-
-
-@@ -102,10 +102,10 @@ - -
- -- - -
diff --git a/tools/git-patches/navigation-translations.patch b/tools/git-patches/navigation-translations.patch deleted file mode 100644 index ca6e0d8..0000000 --- a/tools/git-patches/navigation-translations.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/adev/src/app/core/layout/navigation/navigation.component.html b/adev/src/app/core/layout/navigation/navigation.component.html -index 2f6f5d8009..3d679c9dc0 100644 ---- a/adev/src/app/core/layout/navigation/navigation.component.html -+++ b/adev/src/app/core/layout/navigation/navigation.component.html -@@ -212,7 +212,7 @@ - d="M3.645 13.792h6.708v-1.25H3.645v1.25Zm0-3.542h6.708V9H3.645v1.25Zm-2.063 7.083a1.2 1.2 0 0 1-.875-.375 1.2 1.2 0 0 1-.375-.875V1.917a1.2 1.2 0 0 1 .375-.875 1.2 1.2 0 0 1 .875-.375h7.52l4.563 4.562v10.854a1.2 1.2 0 0 1-.375.875 1.2 1.2 0 0 1-.875.375H1.582ZM8.478 5.792V1.917H1.582v14.166h10.833V5.792H8.478Z" - /> - -- Docs -+ Documentos - - - -@@ -233,7 +233,7 @@ - d="m5.668 10-5-5 5-5 1.187 1.188L3.022 5.02l3.813 3.812L5.668 10Zm6.667 0-1.188-1.188L14.98 4.98l-3.812-3.812L12.335 0l5 5-5 5Z" - /> - -- Tutorials -+ Tutoriales - - - -@@ -269,7 +269,7 @@ - d="M3.645 13.792h6.708v-1.25H3.645v1.25Zm0-3.542h6.708V9H3.645v1.25Zm-2.063 7.083a1.2 1.2 0 0 1-.875-.375 1.2 1.2 0 0 1-.375-.875V1.917a1.2 1.2 0 0 1 .375-.875 1.2 1.2 0 0 1 .875-.375h7.52l4.563 4.562v10.854a1.2 1.2 0 0 1-.375.875 1.2 1.2 0 0 1-.875.375H1.582ZM8.478 5.792V1.917H1.582v14.166h10.833V5.792H8.478Z" - /> - -- Reference -+ Referencia - - - -@@ -440,7 +440,7 @@ -