Discussions » Greasy Fork Feedback

[i18n] Is it possible to write a "default" additional info for languages that do not have translations yet?

§
Posted: 2023-11-15

For example, I have wrote an additional info for en, zh-CN, zh-TW and fr, and I'd like to display english additional info to other lauguages users. How can I do that?
My default language is zh-CN, and I found that if I put anything in the additional info field without language specified, it will be treated as zh-CN. Is there any way to write a "default" additional info?

§
Posted: 2023-11-16

The default additional info for languages you haven't provided one for will be the additional info of the default language of the script.

The only way around this would be to put English text in as the additional info for the other languages.

§
Posted: 2023-11-16
Edited: 2023-11-16

Thanks for your reply. So, is there any way to change the default language of a already-published script?

§
Posted: 2023-11-17

Yes, from the update page.

§
Posted: 2024-02-14

I've tried to change the default language of my already-published script(439699) from the update page(like the picture below), but I still cannot figure out how to do that. What should I do in detail, to change the default language of the script?

§
Posted: 2024-02-14

Oh, I've just found that I can change the default language of the script in the admin page, but after I changed the default language to english, the english additional info is not shown as a default additional info to other language users that I've not written additional info in their language. How can I display english additional info to them?

§
Posted: 2024-02-14

Sorry, it's actually on the Admin page.

§
Posted: 2024-02-15

Now I've changed the default language of the script to English, so it is expected that english additional info should be shown when no additional info in user's language available. For example, I've not provided Japanese additional info, so english additional info should be shown to Japanese users, but when I visited the script info page in Japanese language, there's no additional info shown. What should I do to show english info to other language users?

§
Posted: 2024-02-16

The first additional info input on the update page should be the one used when no other one matches. It's possible it's gotten confused by you changing the default locales. I suggest clearing out the additional infos, saving, then adding them back. Ensure you don't put English in there twice - it just be in the first textbox.

§
Posted: 2024-02-19

Thanks very much for your patient reply. I followed your suggestion (clearing out, saving, then adding them back) and finally made it.

Besides, I found a small bug(of gf update page) during my attempts. If I click the "Add a localized additional info" button, a new additional info field will be added into page by ajax and js DOM manipulation, providing ability to add a new localized additional info. But the ajax-returned HTML code's name attributes are the same as the first additional info field's name attributes, they are all named script_version[additional_info][0][xxx]. Therefore, adding a new localized additional info will replace the old value of the first additional info, and also caused some weird behaviors in page.

§
Posted: 2024-02-27

@JasonBarnabe Is this a bug or something only occurs in my browser?

Post reply

Sign in to post a reply.