Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 2.33 KB

migrate.md

File metadata and controls

38 lines (26 loc) · 2.33 KB

Migrate

Migrate from central loading of Intuition library

Make sure your project does load any PHP files from /data/project/intuition in Toolforge. These steps explain how to local your own copy Intuition. You can control which version to load and when to update. The current version installed from /data/project/intuition is 0.7.0 which is the last version of Intuition that supports PHP 5. See Help:Toolforge/Kubernetes for how to upgrade to PHP 7.

3 Steps:

  1. Create a composer.json file in the directory where you maintain your source code. It should contain the following:
{
  "require": {
    "krinkle/intuition": "0.7.0"
  }
}

If you edit source code from your own computer and have Composer installed, or if you edit source code from tools-login remotely, then you may create this file automatically by running the command composer require krinkle/[email protected].

  1. Once the above file exists on tools-login, run the composer install command in the same directory. This will download a copy of the Intuition source code to a local directory called vendor/.
  2. Remove the lines in your tool that include ToolStart.php from /data/project/intuition (for example require_once). Instead, make sure the following line is there:
require_once __DIR__ . '/vendor/autoload.php';

That is it! You are now prepared for the migration.

Migrate from central loading of messages

To move messages to your own repo, follow these steps in below order.

  1. Copy your messages directory from intuition:/language/messages/:domain to your-repo:/messages. Then commit, and push to your main branch. (example: Krinkle/mw-tool-orphantalk@d6986d07)
  2. Register your new local text domain. (example: Krinkle/mw-tool-orphantalk)
  3. Register your repo at translatewiki by sending a commit such as https://gerrit.wikimedia.org/r/237193 to Gerrit for review.
  4. Ensure l10n-bot has CR+2 rights on your repository.

That's it. Your project is now independent and will receive translatewiki.net updates directly!