LinguaLibre

Difference between revisions of "Weekly updates"

m (→‎Week 9: +technical details)
Line 5: Line 5:
 
** Technical design:
 
** Technical design:
 
*** Generators are JS components intended to dynamically provide a list of words to record inside the RecordWizard;
 
*** Generators are JS components intended to dynamically provide a list of words to record inside the RecordWizard;
*** They can be registered from anywhere, including site-wide scripts like [[MediaWiki:Common.js]] or gadgets;
+
*** They should inherit the generic <code>mw.recordWizard.generator.Generator</code> class;
 +
*** They can be registered from anywhere, including site-wide scripts like [[MediaWiki:Common.js]] or gadgets, by adding it to the <code>mw.recordWizard.generator</code> object;
 
*** Each one can ask for user inputs inside a dialog box.
 
*** Each one can ask for user inputs inside a dialog box.
 
** Implemented it inside the Details step;
 
** Implemented it inside the Details step;

Revision as of 00:00, 2 March 2018

Week 9

The work on the RecordWizard continues:

  • UI research and implementation tests for the Details step;
  • Develop the concept of generator;
    • Technical design:
      • Generators are JS components intended to dynamically provide a list of words to record inside the RecordWizard;
      • They should inherit the generic mw.recordWizard.generator.Generator class;
      • They can be registered from anywhere, including site-wide scripts like MediaWiki:Common.js or gadgets, by adding it to the mw.recordWizard.generator object;
      • Each one can ask for user inputs inside a dialog box.
    • Implemented it inside the Details step;
    • Create a first generator to show of capacities, Nearby items, which fetch words from wikidata items geographically around the user.

Week 8

The work on the RecordWizard continues:

  • Implement a controller and a ui to the studio step;
  • Plug the UploadManager class and the new Upload2Commons extension to the studio;
  • Improve the step managment;
  • Improve the UX in particular through:
    • an auto-scroll
    • small voice amplitude graphs
    • keyboard controllable actions (start/stop with the spacebar, move to the next/previous word with the arrows,...);
  • Add a full warning and error handling;
  • See the last 24 commits on the RecordWizard repository.

Week 7

  • Start to develop the core of the RecordWizard:
    • Create an UploadManager;
    • Setup a step controller and a step ui parent class (inspired from what the UploadWizard does);
    • Initialize 6 empty steps: tutorial, details, license, studio, confirm, thanks.

Week 6

  • Develop another extension, Upload2Commons, to add a new module to the API, which allow a user to upload a local file to a remote wiki through OAuth:
Doc from Special:ApiHelp/upload-to-commons

action=upload-to-commons

(main | upload-to-commons)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: Upload2Commons
  • License: GPL-2.0+

Upload a local wiki file to a remote wiki using OAuth.

The file must already be uploaded on the local wiki. Several methods are available:

  • Upload from an on-wiki file, using the localfilename parameter.
  • Upload from a stashed file, using the filekey parameter.

Note that the filename, comment, tags, text and ignorewarnings parameters are the same than in action=upload.

Parameters:
localfilename

Name of a file to upload (without the "File:" namespace).

filekey

Filekey of a stashed file to upload.

filename

Target filename.

comment

Upload comment.

tags

Change tags to apply to the upload log entry and file page revision on the remote wiki.

Separate values with | or alternative.
Maximum number of values is 50 (500 for clients allowed higher limits).
text

Initial page text for new files. If not specified, the page text of the local file will be used instead.

ignorewarnings

Ignore any warnings on the remote wiki.

Type: boolean (details)
removeafterupload

Remove the stashed file if the upload succeeded (doesn't delete any already on-wiki files, see action=delete for that).

Type: boolean (details)
logtags

Set custom tags to the remoteupload log entry.

Values (separate with | or alternative): manual-remote-upload, record-wizard
token

A "csrf" token retrieved from action=query&meta=tokens

This parameter is required.
  • add a feature in the oauthclient-php library: T186739

Week 5

  • Many enhancements to LinguaRecorder:
    • Add new export methods (Wav-encoded blob, client-download, <audio> element,...);
    • Comment the code and document the whole library;
    • Create a sandbox to easily demonstrate all the features;
    • Test and add support to old browsers (Firefox 25+, Chrome 22+,... see the complete list here).
  • Present LinguaLibre during the monthly Wikimedia Foundation metrics and activities meetings

Week 4

Week 3

  • Setup the server with a fresh primary MediaWiki installation to use as a development environment, accessible at https://v2.lingualibre.fr.
  • Install the OAuthAuthentication extension to delegate the login to an other wiki. Here are the settings currently in use inside the LocalSettings.php file:
LocalSettings.php configuration
# Remove the default TemporaryPassword and LocalPassword authentication provider
# to let OAuth as the only authentication provider usable.
$wgAuthManagerAutoConfig['primaryauth'] = [];

# Activate the OAuthAuthentication extension
wfLoadExtension( 'OAuthAuthentication' );

$wgOAuthAuthenticationUrl = 'https://oauth.0x010c.fr/index.php?title=Special:OAuth';
$wgOAuthAuthenticationConsumerKey = '<consumer_key>';
$wgOAuthAuthenticationConsumerSecret = '<consumer_secret>';
$wgOAuthAuthenticationCanonicalUrl = 'https://oauth.0x010c.fr';
$wgOAuthAuthenticationRemoteName = 'OauthWiki';
$wgOAuthAuthenticationAllowLocalUsers = false;
$wgOAuthAuthenticationReplaceLoginLink = true;
  • Setup a secondary MediaWiki installation to be used by the first one as a remote authentication provider (to replace Wikimedia Commons during the development phase), accessible at https://oauth.0x010c.fr.
  • Install the Wikibase extension. Here is it's LocalSettings.php configuration:
LocalSettings.php configuration
# Activate the Wikibase Repository extension
$wgEnableWikibaseRepo = true;
$wgEnableWikibaseClient = false;
require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";

# Create a new namespace to host properties
define( 'WB_NS_PROPERTY', 102 );
define( 'WB_NS_PROPERTY_TALK', 103 );

$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';

# Store the items in the main namespace, the properties in their newly created one
$wgWBRepoSettings['entityNamespaces']['item'] = NS_MAIN;
$wgWBRepoSettings['entityNamespaces']['property'] = WB_NS_PROPERTY;

# We don't need sitelinks
$wgWBRepoSettings['siteLinkGroups'] = array();

# see https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/docs/options.wiki
$wgWBRepoSettings['formatterUrlProperty'] = 'P20';
  • Draft the datastructure and create the first property/items needed.
  • Install the timeless skin.
  • First commit to initialize the new RecordWizard extension.
  • Split the recording studio out of the LinguaLibre repository, to it's own new repo, LinguaRecorder.