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

Add action to create or open translation file dynamically #863

Closed
wants to merge 1 commit into from

Conversation

wottpal
Copy link
Contributor

@wottpal wottpal commented Oct 7, 2024

Closes #850.

Changes

  • Adds new command to create or open translation file (depending on whether it exists or not)
  • Replaces behavior of i18n button in file action/top bar but keeps the frontMatter.i18n.create command for backwards
  • Tested in my personal project(s)

Screenshot

CleanShot 2024-10-07 at 07 59 58@2x

Minor Issue

This is unrelated to my new command/action as it already happens with frontMatter.i18n.create: I get the commandsI18nCreateErrorNoContentFolder error quite often. But always if it happens, I can just press the button a few more times and then it works again. Do you have any idea how to resolve this, @estruyf?

CleanShot 2024-10-07 at 08 11 04@2x

@wottpal wottpal changed the title feat: Add action to create or open translation file dynamically Add action to create or open translation file dynamically Oct 7, 2024
estruyf added a commit that referenced this pull request Oct 7, 2024
@estruyf
Copy link
Owner

estruyf commented Oct 7, 2024

Thanks @wottpal 🙏

I found the issue with the commandsI18nCreateErrorNoContentFolder as well. It was related to the page folder cache, which can get cleared, and if you try to fetch the page folders at that moment, none exist. I have changed this behavior to fetch it from the cache, and if it's empty, try to fetch it on the fly.

@estruyf estruyf closed this Oct 7, 2024
@estruyf
Copy link
Owner

estruyf commented Oct 7, 2024

I manually merged it to the beta branch, and it is now testable in the latest beta version.

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.

Enhancement: Extend the i18n/language button
2 participants