Giter Club home page Giter Club logo

adiutor's People

Contributors

doguabaris avatar jhsoby avatar kizule avatar ldwp avatar t0grul avatar translatewiki avatar useryahya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adiutor's Issues

Error: Invalid or empty translations

Looks like I made a mistake, and Adiutor isn't loading on Serbian Wikipedia for me at all.
This is happening since I've updated translations on the wiki. The cleanup of translations for the Serbian language, which I made on https://translatewiki.net will be probably committed later by @translatewiki.

This is error from the browser console:

Error fetching and processing translations: Error: Invalid or empty translations
    at css (ext.gadget.Adiutor-script-0.js:145:9)
    at runScript (startup.js:1255:7)
    at Array.<anonymous> (startup.js:1333:6)
    at flushCssBuffer (startup.js:586:28)

Old user settings should be cleaned up after migration

On frwiki, I had previously run Adiutor (version 1.2.4).

Running mw.user.options.get();, I see Adiutor has set 3 items:

  • gadget-Adiutor: a single 1 or 0 digit (not set by Adiutor, it is a MediaWiki setting).
  • userjs-adiutor: a JSON object, which is less than a kilobyte.
  • userjs-adiutor-i18-translations: a huge JSON object, which is dozens of kilobytes.

I have just run again Aditor, which meanwhile has been updated to version 1.2.5 (see notably this file update). There are 2 new items:

  • userjs-adiutor-frwiki: migrated from userjs-adiutor (same data, except adiutorVersion property).
  • userjs-adiutor-i18-fr: migrated from userjs-adiutor-i18-translations (fr property of previous item, i.e. same data minus a little metadata).

Problem is, the old items haven't been cleaned up. This is particularly a problem with userjs-adiutor-i18-translations, which is huge and included in the HTML of every pageview.

Note that there is a major issue currently: these items cannot be deleted. For now, the best we can do is to set them to empty values. See Setting global preferences and local overrides and T207448.

By the way, as I stated above, the items are included in the HTML of every pageview. For userjs-adiutor-i18-fr (which is a data cache), a much, much better option would be to use mediawiki.storage. (also, this would let it have an expiry time; currenly, once the translation cache has been set, it is only updated, executing updateTranslations(), when a new default user option is found… which is unrelated.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.