Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive i18n of @name and @description #3089

Closed
esperecyan opened this issue Oct 4, 2020 · 1 comment · Fixed by #3090
Closed

Revive i18n of @name and @description #3089

esperecyan opened this issue Oct 4, 2020 · 1 comment · Fixed by #3090
Milestone

Comments

@esperecyan
Copy link
Contributor

I would like to see the localization feature that existed in Greasemonkey 3.x implemented.

https://wiki.greasespot.net/Metadata_Block#.40name
https://wiki.greasespot.net/Metadata_Block#.40description

As of Greasemonkey 2.2: can be localized for multiple languages, for example:

// @name       Example Script
// @name:cs    Uživatelské skripty
// @name:es-MX Ejemplo Script 
// @name:ru    Пользовательские скрипты

Add a colon and the locale code, which is the ISO 639 language code and optionally a hyphen and ISO 3166 country code, when disambiguation is necessary. When the user's browser is configured with the matching primary language, that value will be displayed instead.

It has been already implemented in Violentmonkey and Tampermonkey, as well as in the repository “Greasy Fork”.
https://violentmonkey.github.io/api/metadata-block/
https://greasyfork.org/help/meta-keys

@arantius
Copy link
Collaborator

arantius commented Oct 4, 2020

This should be straightforward, the values are parsed out and saved ( https://github.com/greasemonkey/greasemonkey/blob/master/src/parse-user-script.js#L121 ). They're just never read. Pull requests welcome; please make sure to add unit tests as well (localization is very hard to test by hand).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants