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

🐛 fix: allow translated drafts #282

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Conversation

Smtbook
Copy link
Contributor

@Smtbook Smtbook commented Mar 1, 2024

Summary

Fix Zola build error when marking the translations of the page as drafts

Related issue

#281

Changes

Get translations of the current page by using builtin section.translations or page.translations

Accessibility

N/A

Screenshots

N/A

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@Smtbook Smtbook requested a review from welpo as a code owner March 1, 2024 05:44
@welpo
Copy link
Owner

welpo commented Mar 1, 2024

So you're telling me I wrote all of that code for… nothing? I was overengineering things?

Humbling.

Let me do some testing and I'll merge!

@welpo
Copy link
Owner

welpo commented Mar 1, 2024

Looks good to me!

Thank you for reporting and fixing the issue 🫶

@welpo welpo merged commit 9041086 into welpo:main Mar 1, 2024
3 checks passed
@welpo welpo changed the title 🐛 fix(templates): "multilingual_tags" error on drafts 🐛 fix: allow translated drafts Mar 1, 2024
@welpo welpo added the bug Something isn't working label Mar 1, 2024
@Smtbook
Copy link
Contributor Author

Smtbook commented Mar 2, 2024

So you're telling me I wrote all of that code for… nothing? I was overengineering things?

Sorry for that. I will discuss about the possible solutions further before I commit next time.

@welpo
Copy link
Owner

welpo commented Mar 2, 2024

Nothing to be sorry about!!

I was just saying I felt kind of stupid because I wrote a lot of code to do something that was possible with less code.

I'm glad you fixed it and simplified the template. I think it's the perfect solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants