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

Make edit links multilingual-aware #639

Merged
merged 1 commit into from
May 2, 2024
Merged

Make edit links multilingual-aware #639

merged 1 commit into from
May 2, 2024

Conversation

cjyabraham
Copy link
Contributor

Fixes #637

Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
Copy link

netlify bot commented Apr 29, 2024

Deploy Preview for tag-app-delivery ready!

Name Link
🔨 Latest commit d77484e
🔍 Latest deploy log https://app.netlify.com/sites/tag-app-delivery/deploys/662f89bbeb2bc7000872c1b5
😎 Deploy Preview https://deploy-preview-639--tag-app-delivery.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@abangser abangser left a comment

Choose a reason for hiding this comment

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

Thanks @cjyabraham for the super quick fix! I think this works if the page exists. Unfortunately that is not always the case 😢

The newest solution for keeping overhead on language support low has been to auto copy english to the language directories only on deploy (#611). That means that the page may appear to exist in the browser, but not exist in GH.

Example would be that editing this page gets a 404 in GH whereas editing this page works great now!

Would there be a way to indicate that being the case with a marker of some sort? Since we are generating, we can add another label or something if that helps?

@lianmakesthings
Copy link
Collaborator

lianmakesthings commented Apr 29, 2024

The problem is, the duplicated page itself doesn't know it's duplicated. I didn't want to make it too complex, that's why the duplication happens during build, and not before.
I'm thinking about what the expected behaviour should be for those cases. The issue happens, when I'm on a non-default language page that has been duplicated. So if I'm clicking edit, do I want to add a translation or do I want to edit the English page? I'd argue both are likely expectations, so it's tough to say what the fix should be.

But I think this PR will already fix a most of the cases, so I propose to merge this one first and continue this discussion in #637

@lianmakesthings lianmakesthings merged commit 394cfe2 into main May 2, 2024
6 checks passed
@lianmakesthings lianmakesthings deleted the edit-link branch May 2, 2024 15:38
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.

"Edit this page" links no longer working
3 participants