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

Remove empty translation strings at build time #3361

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Mar 26, 2023

Remove empty translation strings at build time

Pull Request Type

  • Bugfix

Related issue

closes #3359

Description

vue-i18n doesn't fallback to en-US if a translation contains an empty string, it does correctly fallback if the translation doesn't exist at all.
Some language files have a lot of empty strings, unfortunately weblate seems to have added those empty strings, so if we remove them in the files, it's possible that weblate will just add them back. Instead I decided to remove them at build time, that way even if weblate adds more empty strings in the future, we won't be affected by it.

Testing

Set the FreeTube language to español (Argentina)/es_AR, instead of loads of things being unlabelled, they should have the en-US strings.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 94f21f2

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 26, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 26, 2023 11:16
@FreeTubeBot FreeTubeBot merged commit 30e9c0c into FreeTubeApp:development Apr 1, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 1, 2023
@absidue absidue deleted the remove-empty-localisations branch April 1, 2023 14:59
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Apr 4, 2023
…tom-builds/current

* feature/watch-page/playlist-scroll-to-current: (25 commits)
  ! Fix window being scrolled when playlist is out of initial view
  * Update watch view playlist component to auto scroll to current video
  Bump @babel/preset-env from 7.20.2 to 7.21.4 (FreeTubeApp#3389)
  Fix trending & search result list rendered items not updated without workaround (FreeTubeApp#3342)
  Translated using Weblate (Italian)
  Translated using Weblate (Japanese)
  Fix adaptive format picked by video JS sometimes not showing up in quality selector (FreeTubeApp#3350)
  Translated using Weblate (Italian)
  Remove empty translation strings at build time (FreeTubeApp#3361)
  Prevent `channelInstance` from being `null` in community tab fallback (FreeTubeApp#3346)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Tigrinya)
  Translated using Weblate (Odia)
  Added translation using Weblate (Tigrinya)
  Added translation using Weblate (Tigre)
  Import from YouTube history using JSON export (FreeTubeApp#2958)
  Translated using Weblate (Odia)
  ...

# Conflicts:
#	src/renderer/views/Watch/Watch.js
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.

[Bug]: Empty string in translation shows empty fields in UI
5 participants