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

Let translateWindowTitle use the imported i18n instance #5745

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Sep 24, 2024

Let translateWindowTitle use the imported i18n instance

Pull Request Type

  • Refactoring

Description

Finally figured out what caused the error (see screenshot) when we added import i18n from '../i18n/index' to the src/renderer/helpers/strings.js file and meant that we had to pass the vue-i18n instance in as a function parameter. Well okay I'm not sure exactly why it was happening, but moving the App.vue import below the i18n/index.js one in the src/renderer/main.js file, fixes the error message, so presumably something to do with the order that webpack resolves the imports.

Screenshots

error-message

Testing

  1. yarn dev
  2. Check that it starts without the error in the devtools
  3. Check that the window titles still get translated (e.g. try changing the locale)

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 1a049c0

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) September 24, 2024 20:31
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 24, 2024
@FreeTubeBot FreeTubeBot merged commit 008dafa into FreeTubeApp:development Sep 28, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 28, 2024
@absidue absidue deleted the import-order branch September 28, 2024 14:11
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