Skip to content

music.html: add multilingual content and translate YouTube section#176

Merged
DavidKRK merged 7 commits intogh-pagesfrom
copilot/add-languages-to-music-page
Apr 15, 2026
Merged

music.html: add multilingual content and translate YouTube section#176
DavidKRK merged 7 commits intogh-pagesfrom
copilot/add-languages-to-music-page

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

  • Add translated description paragraphs for each language section (fr, en, es, eu, ar, uk)
  • Add id="youtube-title-text" to YouTube section heading <span> and id="youtube-section-title" support for auto-injected headings
  • Add youtube_title key to each language in the langContent object
  • Update switchLanguage() to also update the YouTube section heading (youtube-title-text and youtube-section-title)
  • Fix Arabic RTL: switchLanguage() now sets document.documentElement.lang and document.documentElement.dir
  • Fix language switcher not working: main.js was using classList.toggle() + inline style.display which set display:none inline on all .lang-content elements, overriding CSS class-based visibility on every page. Fixed to use proper classList.add/remove with no inline styles.
  • Resolve merge conflicts to unblock PR merge:
    • index.html: incorporated responsive.css link and owl image div alongside the language selector
    • .github/workflows/social-media-post.yml: aligned with base branch version to resolve add/add conflict
    • music.html: aligned YouTube span ID (youtube-title-text) and key (youtube_title) with changes already on gh-pages (PR fix: translate YouTube section heading on language switch in music.html #175)

…ions and YouTube heading

Agent-Logs-Url: https://github.com/DavidKRK/DavidKRK.github.io/sessions/2ed874a1-db1e-42ff-b88e-b11e778937f0

Co-authored-by: DavidKRK <136035295+DavidKRK@users.noreply.github.com>
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@DavidKRK DavidKRK marked this pull request as ready for review April 15, 2026 15:04
Copilot AI review requested due to automatic review settings April 15, 2026 15:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the usability of the music.html language switcher by adding real per-language page descriptions and making the YouTube section heading translatable via switchLanguage().

Changes:

  • Added descriptive paragraphs to each .lang-content block for fr/en/es/eu/ar/uk.
  • Wrapped the YouTube section heading text in a dedicated element so it can be updated dynamically.
  • Extended the langContent translation map with a youtube_heading key for all languages and updated switchLanguage() accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread music.html Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavidKRK DavidKRK self-requested a review April 15, 2026 15:18
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot @openai-code-agent @anthropic-code-agent regardez si tout est OK, si des erreurs veuillez les corriger

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

@copilot @openai-code-agent @anthropic-code-agent regardez si tout est OK, si des erreurs veuillez les corriger

Tout a été vérifié. Un bug a été corrigé (commit 4d7c86f) : lors du passage en arabe, le titre et le bouton YouTube (qui sont en dehors des blocs .lang-content) restaient en LTR. switchLanguage() met maintenant aussi à jour document.documentElement.lang et document.documentElement.dir (rtl pour l'arabe, ltr pour les autres langues), ce qui corrige l'affichage et améliore l'accessibilité pour les lecteurs d'écran.

Copilot AI requested a review from DavidKRK April 15, 2026 15:22
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J approuve

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#178)

* fix: set html lang and dir attributes on language switch for correct RTL rendering

Agent-Logs-Url: https://github.com/DavidKRK/DavidKRK.github.io/sessions/045fb7ca-e251-419b-bd87-0c85b16cfc2e

Co-authored-by: DavidKRK <136035295+DavidKRK@users.noreply.github.com>

* Update music.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DavidKRK <136035295+DavidKRK@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DavidKRK
Copy link
Copy Markdown
Owner

@copilot vérifie pourquoi ça marche pas

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

@copilot vérifie pourquoi ça marche pas

Le bug était dans assets/js/main.js (commit a75f2ec). Ce fichier avait son propre gestionnaire de langue qui utilisait classList.toggle() et des styles inline (element.style.display = 'none'). Les styles inline ont une priorité plus haute que les classes CSS, donc ils écrasaient les règles .lang-content { display: none } / .lang-content.active { display: block } sur toutes les pages.

Résultat : quand on cliquait sur une langue, main.js posait display:none en inline sur tous les blocs, empêchant le switchLanguage() de la page d'en afficher le bon.

Correction : main.js utilise maintenant classList.add/remove (pas de styles inline), cohérent avec le switchLanguage() de chaque page.

Copilot AI requested a review from DavidKRK April 15, 2026 15:42
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je suis OK

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread assets/js/main.js
@DavidKRK DavidKRK self-requested a review April 15, 2026 15:51
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot je n arrive pas à Merge Peux-tu m'aider

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

@copilot je n arrive pas à Merge Peux-tu m'aider

Les conflits qui bloquaient le merge ont été résolus (commit 606214c) :

  • index.html : conflit entre notre sélecteur de langue et les changements de master (ajout de responsive.css + image david_krk_owl.jpg). Les deux sont maintenant présents.
  • .github/workflows/social-media-post.yml : conflit "add/add" (deux versions différentes du même fichier). Aligné avec la version de master.

Le PR devrait maintenant pouvoir être mergé sans conflit.

Copilot AI requested a review from DavidKRK April 15, 2026 16:03
Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot si c'est ok vas y

@DavidKRK
Copy link
Copy Markdown
Owner

Je peux pas Merger @copilot @anthropic-code-agent @anthropic-code-agent

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 15, 2026

@copilot si c'est ok vas y

Le PR est prêt à être mergé. Tous les conflits ont été résolus — vous pouvez maintenant cliquer sur Merge pull request dans GitHub.

Je peux pas Merger @copilot @anthropic-code-agent @anthropic-code-agent

Le dernier conflit a été résolu (commit 904fd1a). Il y avait un conflit dans music.html avec le PR #175 déjà mergé sur gh-pages : l'ID du <span> YouTube était différent (youtube-section-title vs youtube-title-text). J'ai aligné notre branche sur la convention de gh-pages (id="youtube-title-text", clé youtube_title).

Le merge devrait maintenant fonctionner depuis l'interface GitHub (Merge pull request).

Copy link
Copy Markdown
Owner

@DavidKRK DavidKRK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@DavidKRK DavidKRK merged commit ffb6a40 into gh-pages Apr 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants