FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Add i18n-eslint-plugin

Open ChunkyProgrammer opened this issue 1 year ago • 6 comments

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: image

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: image image

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)

ChunkyProgrammer avatar Mar 13 '24 23:03 ChunkyProgrammer

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.

absidue avatar Mar 16 '24 17:03 absidue

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 25 '24 12:03 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Mar 25 '24 14:03 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 25 '24 21:03 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Mar 26 '24 21:03 github-actions[bot]

Conflict resolved itself 😳

ChunkyProgrammer avatar Mar 27 '24 00:03 ChunkyProgrammer