Clean up many unused strings
Clean up many unused strings
Pull Request Type
- [x] Cleanup
Description
This pull request removes many of the unused strings in FreeTube's locale files, I left in ones that I thought we might use in the future such as app menu translations and Prompt to Skip for Sponsor Block. The removed strings can be divided into two groups, strings that no longer exist in the en-US file but hadn't been removed from other locale files and the second group are strings that did exist in en-US but are no longer used for one reason or another.
The unused strings were found by adding '@intlify/vue-i18n/no-unused-keys': ['error', { src: './src/renderer', }] to the rules object in the YAML section of the ESLint config and then manually checked (many thanks to VS Code's find in files functionality).
The size of the dist/static/locales folder after running yarn pack:renderer:
- Current development branch commit (976727aadd04c2aed1a840ba73da4db199f7293f):
627 KB - In 0.21.3:
606 KB - With this pull request:
587 KB
The removed strings:
Unused
-
User Playlists.Playlist Message-> We have support for multiple playlists now -
User Playlists.Your saved videos are empty. ...-> We replaced the saved videos list with proper playlists support. -
Toggle Theatre Mode-> Replaced byVideo.Player.Theatre ModeandVideo.Player.Exit Theatre Mode -
Playlist.Videos-> Replaced byGlobal.Counts.Video Count -
Playlist.Views-> Replaced byGlobal.Counts.View Count -
Playlist.Views-> Replaced byGlobal.Counts.View Count -
Settings.Data Settings.Check for Legacy Subscriptions-> The subscriptions import automatically detects the type based on the file extension and contents -
Settings.Expand All Settings Sections-> Associated setting was removed in #5029 -
Subscriptions have not yet been implemented-> FreeTube has had subscriptions for a long time now -
Hashtags have not yet been implemented, try again later-> FreeTube has supported hashtags for a few releases now -
Channels.Unsubscribe-> Replaced byChannel.Unsubscribe -
Channels.Unsubscribed-> Replaced byChannel.Channel has been removed from your subscriptions -
Settings.Subscription Settings.Manage Subscriptions-> The code using it was removed in #2372 but even before then it was unused because the code using it has av-if="false"on it, so it was never displayed.
Unused and not in en-US
-
About.Check out our Firefox extension!-> FreeTube doesn't have its own browser extension anymore -
About.This software is FOSS and released under the GNU Affero General Public License v3.0..-> Replaced byAbout.Licensed under theandAbout.AGPLv3 -
About.Thank you very much to the People and Projects that make FreeTube possible!-> Replaced byAbout.FreeTube is made possible byandAbout.these people and projects -
About.Looking for help? Check out our Wiki page.-> Replaced byAbout.Help,About.FreeTube Wiki,About.FAQandAbout.Discussions -
About.Want to chat? Join our Element / Matrix Server . Please check the rules before joining.-> Replaced byAbout.Chat on Matrix,About.Please read the,About.room rules -
About.If you enjoy using FreeTube, consider donating via Liberapay or through our Bitcoin address.-> Replaced byAbout.Donate -
About.Found a bug? Want to suggest a feature? Want to help out? Check out our GitHub page. Pull requests are welcome. -
About.Latest FreeTube News -
About.View License -
About.Translate via Weblate-> Replaced byAbout.Translate -
About.Channel Rules-> Replaced byAbout.Please read theandAbout.room rules -
About.Licensed under the AGPLv3-> Replaced byAbout.Licensed under theandAbout.AGPLv3 -
About.License-> Replaced byAbout.Licensed under theandAbout.AGPLv3 -
About.Wiki-> Replaced byAbout.FreeTube Wiki -
About.Useful Links -
About.Release Notes-> Replaced byAbout.Downloads / Changelog -
About.Report an Issue-> Replaced byAbout.Report a problem -
About.Source Code-> Replaced byAbout.Source code -
About.Contact -
Channel.Subscriber-> Replaced byGlobal.Counts.Subscriber Count -
Channel.Subscribers-> Replaced byGlobal.Counts.Subscriber Count -
User Playlists.SinglePlaylistView.Toast.Quick bookmark disabled-> Unused since #5058 -
User Playlists.Disable Quick Bookmark-> Unused since #5058 -
User Playlists.Are you sure you want to remove all watched videos from this playlist? This cannot be undone-> Replaced byUser Playlists.Are you sure you want to remove {playlistItemCount} watched videos from this playlist? This cannot be undone -
Settings.Advanced Settings.*-> The entire section is not in en-US anymore -
Settings.Subscription Settings.Import Subscriptions-> Subscription importing was moved to the data settings which has its own string -
Settings.Subscription Settings.How do I import my subscriptions?-> Subscription importing was moved to the data settings which has its own string -
Settings.Subscription Settings.Export Subscriptions-> Subscription exporting was moved to the data settings which has its own string -
Settings.Subscription Settings.Subscriptions Export Format.*-> The entire section is not in en-US anymore -
Settings.Data Settings.Import FreeTube -
Settings.Data Settings.Import YouTube -
Settings.Data Settings.Import NewPipe -
Settings.Player Settings.Remember History-> Was moved to the privacy settings which has its own string -
Settings.General Settings.Invidious Instance (Default is https://invidious.snopyta.org) -
Settings.General Settings.External Player -
Settings.General Settings.External Player Executable -
Settings.Distraction Free Settings.Blur Thumbnails-> Replaced bySettings.General Settings.Thumbnail Preference.Blur -
Profile.{count} selected
Desktop
- OS: Windows
- OS Version: 10
- FreeTube version: 976727aadd04c2aed1a840ba73da4db199f7293f
LGTM, will approve if/when you give the green light. Two q's:
- What's the recommended hygiene for this going forward — if you deprecate a label in a PR, remove all instances of it in locale files as well? Fine by me, although it would increase the number of re-approvals needed due to merge conflicts
- If yes to 1, are we going to be enforcing
@intlify/vue-i18n/no-unused-keysto make this easier for authors but withignoresentries for the "useful in future" labels?
- Ideally if you remove the last usage of a string you would clean it up too, that's what I've tried to do in my pull requests.
- I'm not sure on the one hand that definitely seems like the right approach but unfortunately due to the way weblate works, when someone creates a new locale, weblate creates a new file with all possible strings and sets them to empty strings (you can see it with Breton which was added in the last 24 hours). So I would be concerned that pull requests would start get flagged because of changes on the development branch, so if we do add it we probably want to set it to a warning, so that it doesn't block unrelated pull requests from getting merged but you still get warned about it while committing and in the editor.
That is reasonable. They do have an experiment enableFix option that should hopefully make the removal of unused keys automatic. If it works well, we may be able to set it as a warning and not need to devote any bandwidth to it ever again.