Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n and transition #10948

Closed
1 task
TheElegantCoding opened this issue May 3, 2024 · 2 comments
Closed
1 task

i18n and transition #10948

TheElegantCoding opened this issue May 3, 2024 · 2 comments
Labels
needs triage Issue needs to be triaged

Comments

@TheElegantCoding
Copy link

Astro Info

Astro                    v4.7.0
Node                     v20.10.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/sitemap
                         @astrojs/partytown

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I don't know if this is a bug, but i have a footer that needs to have transition:persist, it is needed to maintain other code working and i set up the i18n, on the page

unfortunately, if i have an anchor like this, the Astro.url.pathname will only work the first time the page open if i switch from the "/" to "/about-us", the href will be "/en" and not "/en/about-us"

<footer transition:persist>
     <a
        href={changeLanguage('en', Astro.url.pathname)}
        class='footer__dropdown-button'
     >Ingles</a>
</footer>

this is an idea, but it doesn't work and i don't see anyone think of that, but as i see transition:persist={false} is not possible to do, maybe could be a feature to can change the child elements inside a transition:persist to not persist some elements

<footer transition:persist>
     <a
        href={changeLanguage('en', Astro.url.pathname)}
        class='footer__dropdown-button'
       transition:persist={false}
     >Ingles</a>
</footer>

otherwise, the only solution i see here is to use javascript and change the anchor to a button, and then dynamic change the redirect that made

What's the expected result?

Link to Minimal Reproducible Example

I will provide one if needed

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label May 3, 2024
@ematipico
Copy link
Member

This is more a request for help, than a report of a bug. I can't see the real bug, and the absence of expectations and reproduction doesn't help.

I suggest you to seek help on Discord

@ematipico ematipico closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2024
@TheElegantCoding
Copy link
Author

Thanks, sorry for post as a bug, i will search in discord more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants