Page MenuHomePhabricator

figure out if we're still using internationalization/localization
Closed, ResolvedPublic

Description

Right now by visiting https://refill.toolforge.org/ng, I see no obvious way to change languages. However, there is a /messages/ directory in the repo containing translatewiki.net translations that are updated every week.

poke around the .vue code and see if it uses any of the localization messages in the /messages/ directory

i have a hypothesis that only the old front end used that and that it's no longer used anymore, but would like to confirm. (we deleted a non-vue "old" frontend a couple years ago to simplify things)

Once that is done, decide how to proceed:

  • do nothing?
  • add code to the front end to use the translations?
  • stop the localization bot, uninstall Intuition, and stop using translations?

More info:

Event Timeline

I asked AI and it thinks that...

  1. there is no way to change languages in the UI, and
  2. you can set the cookie TsIntuition_userlang to something such as es (espanol - Spanish) to change the language.

I tested and verified # 2. Internationalization does work if you set that cookie.

image.png (810×2 px, 95 KB)

image.png (992×2 px, 126 KB)

A global search for refill.toolforge.org to examine if there's anything like ?lang=es URL query strings turns up the following interesting query strings:

https://refill.toolforge.org//api.php?action=i18n&callback=jQuery37109915773898646144_1753709
https://refill.toolforge.org//index.php]. 17 août 2021 à 18:16 (CEST) :::::Concernant CodexBot
https://refill.toolforge.org/?wiki=zh&page=Wikipedia:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A0%88/%E6
https://refill.toolforge.org/ng/result.php", params: { defaults: "y", wiki: "zh", page:
https://refill.toolforge.org/ng/result.php?' + 'page=' + encodeURIComponent(mw.config
https://refill.toolforge.org/ng/result.php?defaults=y&wiki=pt&page=" + encodeURIComponent(mw.config
https://refill.toolforge.org/ng/result.php?defaults=y&wiki=zh&page={{urlencode:{{{1|{{SUBPAGENAMEE}}}}}}}
https://refill.toolforge.org/ng/result.php?page=" + mw.config.get("wgPageName") +
https://refill.toolforge.org/ng/result.php?page=" + mw.config.get('wgPageName') + "&defaults=y"
https://refill.toolforge.org/ng/result.php?page=" + mw.config.get('wgPageName') + "&defaults=y&wiki=fr"
https://refill.toolforge.org/ng/result.php?page=" + title
https://refill.toolforge.org/ng/result.php?page="+mw.config.get('wgPageName')+"&wiki=en&metho
https://refill.toolforge.org/ng/result.php?page=".concat(config.page.encodedName, "&defaults=y&wiki=")
https://refill.toolforge.org/ng/result.php?page=' + encodeURIComponent( mw.config.get( 'wgPageName'
https://refill.toolforge.org/ng/result.php?page=Battle+of+Bakhmut&wiki=en&method-wiki=Fix+page&noaccessdate=on
https://refill.toolforge.org/ng/result.php?page=eo:{{FULLPAGENAMEE}}&defaults=y reFill]}} povus
https://refill.toolforge.org/ng/result.php?page=Ross_W._Duffin&defaults=y reFill]
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y reFill]
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y reFill]
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y ரீபில்] ([[பயனர்:Zhaofeng
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y&nowatch=y&wiki=el
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y&wiki=pt <span title="Formatar
https://refill.toolforge.org/ng/result.php?page={{FULLPAGENAMEE}}&defaults=y&wiki=vi reFill].
https://refill.toolforge.org/ng/result.php?wiki='+mw.config.get('wgContentLanguage')+'&page='
https://refill.toolforge.org/ng/result.php?wiki=en&page=' + encodeURIComponent( mw.config.get(
https://refill.toolforge.org/ng/result/fixWikipage/39731799-b1ba-4933-ac96-e54b35044c61 This]
https://refill.toolforge.org/ng/result/fixWikipage/58ebf412-3af7-4577-94a4-2143ca785ba3 裸露的參考文獻],不符FA的要求「2
https://refill.toolforge.org/ng/result/fixWikipage/77196d37-b516-4195-8e09-d0bfc3ea830a here]
https://refill.toolforge.org/ng/result/fixWikipage/7847d9b2-fdd6-4912-ace2-c897a442626c. I will
https://refill.toolforge.org/ng/result/fixWikipage/cf719a9c-9c74-4081-adf1-8e9a99320a73 Rocky
https://refill.toolforge.org/result.php?page=" + escape( mw.config.get('wgPageName') ), 'Reflinks'
https://refill.toolforge.org/result.php?page=Draft:Adam_Maraana&defaults=y
https://refill.toolforge.org/result.php?page={{FULLPAGENAMEE}}&defaults=y reFill]<!--
https://refill.toolforge.org/result.php?page={{FULLPAGENAMEE}}&defaults=y reFill]<!-- -->{{

I don't see anything in there like ?lang=. I see ?wiki=, but I tested that and changing that does not change the language.

I also went in the UI and went to the preferences, and there's no language picker in there.

So with all that in mind, I think we'll want to keep the internationalization (since it's mostly working). So the next step is...

Acceptance Criteria

  • add a Vue component that is a language picker, probably in the preferences panel. it needs to load a list of languages in a dropdown menu. when the user saves, it needs to set the cookie, then either change the language in a Vue-ish manner by changing a variable somewhere and everything automatically updates, or simply refresh the page for the user
  • maybe we should also auto-detect the user's browser language, and set that as the default on first visit (i.e. if no cookie is set, set a cookie to that language)
Novem_Linguae claimed this task.

We completed "figure out if we're still using internationalization/localization", so marking this as resolved. I filed a follow up task for adding a languages dropdown to preferences: T422772: add a language picker to preferences