FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Fix some template strings in locale files, add script to find problematic values

Open ChunkyProgrammer opened this issue 6 months ago • 1 comments

Pull Request Type

  • [x] Bugfix

Description

I ended up updating some code that I wrote for Invidious to find locales that use incorrect template strings/are missing template strings. https://github.com/iv-org/invidious/issues/1951#issuecomment-1947659377

This should make finding issues with other locales a lot easier

Ideally we would upstream some of this functionality into vue-i18n-eslint

Screenshots

image

Testing

  • yarn run checkforbadtemplates should create a locale-errors.json file at the root of the project as well as log the errors to the console. I didn't fix every issue as some of them aren't that straightforward without knowing the language that is being translated.

Desktop

  • OS: Fedora Linux
  • OS Version: 42
  • FreeTube version: latest nightly

ChunkyProgrammer avatar Jun 05 '25 21:06 ChunkyProgrammer

Wondering if duplicate variables can/should be ignored e.g.

  • This setting is overridden by the app-wide "{appWideSetting}" setting, in the "{subsection}" section of the "{settingsSection}"
  • 此设置被应用级的 "{appWideSetting}" 设置所覆盖,"{appWideSetting}" 位于 "{subsection}" 部分,该部分在 "{settingsSection}" 中 {appWideSetting} repeated twice but valid (I can read this locale image

PikachuEXE avatar Jun 18 '25 00:06 PikachuEXE