FreeTube
FreeTube copied to clipboard
Add i18n-eslint-plugin
Add i18n-eslint-plugin
Pull Request Type
- [x] Dev enhancement
Description
It is configured to find keys that don't exist and raw text instead of translated text in vue files
Examples of new behavior
If a key doesn't exist then there will be a warning.
Ex:
If a raw text is used then there is an error (this won't apply to attributes like class where it doesn't make sense to check)
Ex:
This PR is an updated version of: https://github.com/FreeTubeApp/FreeTube/pull/4242
Desktop
- OS: Linux Mint
- OS Version: 21.3
- FreeTube version: 0.19.1 (nightly)
Instead of making every call to get the colors have the overhead of translating the color names, even if you only need the values, could you please change the colors back to the object they were in before and instead add a getColorTranslations() (feel free to pick a different name, that's just one I came up with on the spot) function that returns the translated color names. That way we will only translate the names when they are actually needed and it makes the code that only uses the values look a bit cleaner.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
Conflict resolved itself 😳