Giter VIP home page Giter VIP logo

touhoupatchcenter's People

Contributors

brliron avatar dalekcraft2 avatar dankrank avatar dependabot[bot] avatar nmlgc avatar rosenrose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

touhoupatchcenter's Issues

getNamespaceBaseLanguage should be replaced with getPageLanguage

Similar code exists in our Translate fork, but upstream now uses getPageLanguage, so it makes more sense to just set up a PageContentLanguage hook in our LocalSettings like so:

$wgHooks['PageContentLanguage'][] = function( Title $title, &$pageLang, $userLang ) {
    global $wgLanguageCode;
    $pageLang = Language::factory( $title->getNamespace() !== NS_MAIN ? $wgLanguageCode : 'ja' );
}

Should probably not run this hook when Translate's own hook is activated (in_array( $namespace, $wgTranslateMessageNamespaces );)

Remove legacy wiki-side generation after moving to Github

We moved base_tsa from MediaWiki to Github 9 years ago, yet we still have way too much stuff that this move made obsolete. Things like https://browse.thpatch.net/lang_ja/th185.js , https://browse.thpatch.net/lang_ja/th14.v1.00b.js , or the entirety of https://browse.thpatch.net/base_tsa/ don't have any reason to exist anymore. Most of them are also terribly outdated, which means they're quite likely to break things if they're used.

We should work on removing them. For each file (or section of a file), it can be done in 3 steps:

  • Replace the MediaWiki page (or part of the MediaWiki page) generating them with the "moved to Github" template.
  • Remove the file on the server, and set it to null in files.js.
  • Remove the generation code in this repo if it isn't needed anymore.

Sometimes, you won't have to do all 3 steps. For example, lang_ja/th185.js doesn't have the "replace the MediaWiki page" step because we still want our nice-looking header on the wiki, we just want it to not generate any patch file. Or lang_ja/th14.v1.00b.js doesn't have the "remove the generation code" step because that code is also used by the skipgame patch, which is still hosted on MediaWiki (we could move it to Github, but that's another question).

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.