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:
- 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]
.
- Once the above file exists on
tools-login
, run thecomposer install
command in the same directory. This will download a copy of the Intuition source code to a local directory calledvendor/
. - Remove the lines in your tool that include
ToolStart.php
from/data/project/intuition
(for examplerequire_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.
To move messages to your own repo, follow these steps in below order.
- Copy your messages directory from
intuition:/language/messages/:domain
toyour-repo:/messages
. Then commit, and push to your main branch. (example: Krinkle/mw-tool-orphantalk@d6986d07) - Register your new local text domain. (example: Krinkle/mw-tool-orphantalk)
- Register your repo at translatewiki by sending a commit such as https://gerrit.wikimedia.org/r/237193 to Gerrit for review.
- 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!