Skip to content

Mdwiki-TD/Translation-Dashboard

Repository files navigation

Ask DeepWiki

WikiProjectMed Translation Dashboard

The WikiProjectMed Translation Dashboard is a web-based platform designed to facilitate the translation of medical articles from mdwiki.org into various Wikipedia languages. It streamlines the identification of untranslated articles, integrates with MediaWiki's Content Translation tool, and tracks translation progress through a leaderboard system.


📋 Table of Contents


Features

  • Article Identification: Detects medical articles present on mdwiki.org but missing in target languages.
  • Translation Facilitation: Integrates with MediaWiki's Content Translation tool for seamless translation.
  • Progress Tracking: Monitors translation progress and contributions via a dynamic leaderboard.
  • Coordinator Tools: Provides tools for translation coordinators to manage and oversee translation activities.

System Architecture

The dashboard employs a modular architecture, ensuring a clear separation between presentation, business logic, and data access layers. Built primarily using PHP, it interacts with MediaWiki APIs, SPARQL queries, and a custom database to perform its functions.

Key Components:

  • Header System: Manages navigation, authentication, and styling across all pages.
  • Translation System: Handles translation requests and redirects to the MediaWiki Content Translation tool.
  • Results System: Displays articles needing translation based on user-selected parameters.
  • Leaderboard System: Tracks and displays translation statistics by user, language, and campaign.

Installation and Configuration

Prerequisites

  • PHP 7.4 or higher
  • MySQL/MariaDB 10.3 or higher
  • Apache/Nginx web server
  • Composer for dependency management
  • Git for version control

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/WikiProjectMed/Translation-Dashboard.git
    cd Translation-Dashboard
  2. Install Dependencies:

    composer install
  3. Database Setup:

    • Create a new MySQL database.
    • Import the schema from td.sql.
    • Configure database connection parameters in the configuration files.
  4. Configure Settings:

    • Adjust settings in the database tables, such as settings, translate_type, and categories.
  5. Authentication Setup:

    • Ensure the /auth/ directory exists with the necessary files.
    • Set up user credentials in the authentication database.

Core Components

Entry Points

  • Main Interface (index.php): Allows users to select languages and categories for translation.
  • Missing Articles (missing.php): Displays articles missing in different languages.
  • Translation Redirect (translate.php): Redirects translation requests to the translation system.
  • Leaderboard (leaderboard.php): Shows statistics about translations and translators.

Header System

Implemented in header.php, this component:

  • Manages user authentication status.
  • Generates navigation menus.
  • Controls access to coordinator tools.
  • Handles theme selection and session initialization.

Styling

The dashboard uses Bootstrap 5 combined with custom CSS for responsive and accessible design.


Translation Workflow

  1. Initiation:

    • Users select an article to translate from the Results System.
    • A request is sent to translate.php with parameters like article title, target language, category, campaign, and translation type.
  2. Processing:

    • translate.php redirects the request to translate_med/index.php.
    • The system checks user authentication, validates parameters, and records the translation attempt in the database.
  3. Redirection:

    • Users are redirected to the MediaWiki Content Translation interface to begin translating.

Data Layer

The dashboard's data layer supports retrieving data from both the database and MediaWiki APIs, ensuring flexibility and continued operation even if one source is unavailable.

Key Tables:

  • settings: Stores core system settings.
  • translate_type: Defines translation types.
  • categories: Maps categories and campaigns.
  • views: Tracks view statistics by language.

Leaderboard System

The leaderboard tracks and displays translation statistics, offering insights into:

  • User Contributions: Number of translations completed by each user.
  • Language Statistics: Translations per language.
  • Campaign Progress: Translations completed within specific campaigns.

Visual representations help in monitoring translation progress and recognizing active contributors.


Coordinator Tools

The Coordinator Tools module is a specialized component within the WikiProjectMed Translation Dashboard, designed to empower translation coordinators with administrative capabilities for managing translation projects, monitoring activities, and performing maintenance tasks.

End points

Page Routes

Endpoint Method Description
/ GET Main dashboard — search for missing translations by campaign and language
/leaderboard.php GET Leaderboard — translation stats per user, language, and campaign
/leaderboard.php?get=users&user={user} GET User-specific translation statistics
/leaderboard.php?get=langs&langcode={code} GET Language-specific translation statistics
/leaderboard.php?camps=1 GET Campaign and article statistics tables
/leaderboard.php?graph=1 GET Translation timeline graph (server-rendered)
/leaderboard.php?graph_api=1 GET Translation timeline graph (API-driven JS)
/missing.php GET Missing articles — top languages by missing article count
/sitelinks.php GET Wikidata sitelinks report
/translate.php GET Redirect to Content Translation tool
/x.php GET AJAX-based leaderboard using DataTables
/auth.php GET Redirect to authentication
/coordinator.php GET Redirect to coordinator tools
/404.php GET 404 error page

API Endpoints

All API calls use /api.php with a get= query parameter to indicate the operation.

About

This tool looks for Wikidata items that have a page on mdwiki.org but not in another wikipedia language.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors