scriptcat icon indicating copy to clipboard operation
scriptcat copied to clipboard

[Bug] script names in the script-list do not match the local configuration language

Open RENBOWS opened this issue 5 months ago • 6 comments

I have the English version, but the script languages are still in their original language; it would be good if they were changed to the local language. Of course, the scripts I have installed have the title in English within the code.

Image

RENBOWS avatar Jun 09 '26 20:06 RENBOWS

Can you please specify the browser & version, and ScriptCat version for our references? Thanks.

cyfung1031 avatar Jun 10 '26 01:06 cyfung1031

WebLibre Alpha 0.20 Scriptcat Stable Version 0.16.15

RENBOWS avatar Jun 10 '26 03:06 RENBOWS

@CodFrm any idea for this bug?

I cannot reproduce this in Helium. Might be only for mobile?

cyfung1031 avatar Jun 10 '26 08:06 cyfung1031

Thanks for the details.

Could you please confirm whether the affected script has localized metadata like this?

// @name         Original name
// @name:en      English name

Also, please confirm that ScriptCat Options → Settings → Language is set to English.

If ScriptCat is set to English, the script has @name:en, and the script list still shows the default @name, then this matches the fallback issue we are checking.

@cyfung1031 This might be MV2-specific. On main, i18nName() already falls back from the exact locale key to the language-only key:

export function i18nName(script: { name: string; metadata: SCMetadata }) {
  const lang = i18nLang();
  let m = script.metadata[`name:${lang}`];
  if (!m) {
    // Try matching only the language prefix.
    const langPrefix = lang.split("-")[0];
    m = script.metadata[`name:${langPrefix}`];
  }
  return m ? m[0] : script.name;
}

But MV2 currently seems to check only the exact locale key:

export function i18nName(script: { name: string; metadata: SCMetadata }) {
  const m = script.metadata[`name:${i18n.language.toLowerCase()}`];
  return m ? m[0] : script.name;
}

So scripts with only @name:en may still show the default @name on MV2 when the UI language is en-US.

CodFrm avatar Jun 10 '26 09:06 CodFrm

Ah yeah. the version is 0.16.15. I always mix up.

cyfung1031 avatar Jun 10 '26 09:06 cyfung1031

@RENBOWS Firefox MV3 version is published. Please update Firefox to latest version and install the extension.

https://addons.mozilla.org/firefox/addon/scriptcat-pre/

cyfung1031 avatar Aug 22 '26 11:08 cyfung1031