Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ tests = [
"imgtests.web" = [
"**/*.css",
"**/*.js",
"**/*.html"
"**/*.html",
"**/*.mo",
]

[tool.ruff]
Expand Down
Binary file added src/imgtests/web/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
176 changes: 176 additions & 0 deletions src/imgtests/web/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Translation file
# This file is distributed under the same license as the imgtests package.
# Vadim Kazakov vadimdim308@gmail.com, 2026.
#
#
msgid ""
msgstr ""
"Project-Id-Version: imgtests 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-16 13:14+0000\n"
"PO-Revision-Date: 2026-05-16 13:14+0000\n"
"Last-Translator: Vadim Kazakov vadimdim308@gmail.com\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
"(n%100>=11 && n%100<=14)? 2 : 3);\n"
#: tests_interface/templates/tests_interface/base.html:7
#: tests_interface/templates/tests_interface/index.html:4
msgid "Test Dashboard"
msgstr "Панель тестирования"

#: tests_interface/templates/tests_interface/distro_page.html:4
msgid "Tests"
msgstr "Тесты"

#: tests_interface/templates/tests_interface/distro_page.html:9
#: tests_interface/templates/tests_interface/excel_reports.html:9
#: tests_interface/templates/tests_interface/reports_list.html:9
msgid "Back to Dashboard"
msgstr "На главную страницу"

#: tests_interface/templates/tests_interface/distro_page.html:11
msgid "Tests page for"
msgstr "Страница тестов для"

#: tests_interface/templates/tests_interface/distro_page.html:24
msgid "Test Configuration"
msgstr "Конфигурация тестов"

#: tests_interface/templates/tests_interface/distro_page.html:28
msgid "Select runner:"
msgstr "Выберите runner"

#: tests_interface/templates/tests_interface/distro_page.html:30
msgid "Basic"
msgstr "Обычный"

#: tests_interface/templates/tests_interface/distro_page.html:31
msgid "Profiled"
msgstr "С профилированием"

#: tests_interface/templates/tests_interface/distro_page.html:40
msgid "Use Default Configuration"
msgstr "Использовать стандартную конфигурацию"

#: tests_interface/templates/tests_interface/distro_page.html:43
msgid "Custom Configuration"
msgstr "Пользовательская конфигурация"

#: tests_interface/templates/tests_interface/distro_page.html:49
msgid "Number of test runs:"
msgstr "Количество запусков тестов"

#: tests_interface/templates/tests_interface/distro_page.html:62
msgid "Select Test Suites and Configure Duration:"
msgstr "Выберите наборы тестов и длительность"

#: tests_interface/templates/tests_interface/distro_page.html:67
msgid "Individual Tests (optional):"
msgstr "Отдельные тесты (опционально):"

#: tests_interface/templates/tests_interface/distro_page.html:73
msgid "Save Configuration"
msgstr "Сохранить конфигурацию"

#: tests_interface/templates/tests_interface/distro_page.html:80
#: tests_interface/templates/tests_interface/index.html:20
msgid "Reset to Default"
msgstr "Восстановить конфигурацию по умолчанию"

#: tests_interface/templates/tests_interface/distro_page.html:88
msgid "Run tests"
msgstr "Запустить тесты"

#: tests_interface/templates/tests_interface/excel_reports.html:4
#: tests_interface/templates/tests_interface/excel_reports.html:11
msgid "Excel Reports"
msgstr "Отчеты Excel"

#: tests_interface/templates/tests_interface/excel_reports.html:17
msgid "Generate New Excel Report"
msgstr "Сгенерировать новый Excel-отчет"

#: tests_interface/templates/tests_interface/excel_reports.html:61
#, python-format
msgid "Size: %(report.size|filesizeformat)s"
msgstr "Размер: %(report.size|filesizeformat)s"

#: tests_interface/templates/tests_interface/excel_reports.html:65
msgid "Download"
msgstr "Скачать"

#: tests_interface/templates/tests_interface/excel_reports.html:81
#: tests_interface/templates/tests_interface/reports_list.html:153
#, python-format
msgid "Total: %(reports|length)s report(s)"
msgstr "Всего: %(reports|length)s report(s)"

#: tests_interface/templates/tests_interface/excel_reports.html:95
msgid "No Excel Reports"
msgstr "Нет Excel-отчетов"

#: tests_interface/templates/tests_interface/excel_reports.html:98
msgid "Click \"Generate New Excel Report\" to create one."
msgstr "Нажмите \"Сгенерировать новый Excel-отчет\" чтобы создать его"

#: tests_interface/templates/tests_interface/index.html:4
msgid "Home"
msgstr "Главная страница"

#: tests_interface/templates/tests_interface/index.html:9
msgid "Test Platform Dashboard"
msgstr "Панель управления тестами"

#: tests_interface/templates/tests_interface/index.html:11
msgid "Select a platform to view test results and reports"
msgstr "Выберите платформу для просмотров результатов тестов и отчетов"

#: tests_interface/templates/tests_interface/index.html:17
msgid "Add Distribution"
msgstr "Добавить дистрибутив"

#: tests_interface/templates/tests_interface/reports_list.html:4
msgid "All Reports"
msgstr "Все отчеты"

#: tests_interface/templates/tests_interface/reports_list.html:11
msgid "Test Reports"
msgstr "Отчеты о тестировании"

#: tests_interface/templates/tests_interface/reports_list.html:26
msgid "Generate Comparison Report"
msgstr "Создать сравнительный отчет"

#: tests_interface/templates/tests_interface/reports_list.html:44
msgid "Experiment 1"
msgstr "Эксперимент 1"

#: tests_interface/templates/tests_interface/reports_list.html:55
#: tests_interface/templates/tests_interface/reports_list.html:77
msgid "Select"
msgstr "Выберите"

#: tests_interface/templates/tests_interface/reports_list.html:66
msgid "Experiment 2"
msgstr "Эксперимент 2"

#: tests_interface/templates/tests_interface/reports_list.html:87
#: tests_interface/templates/tests_interface/reports_list.html:258
msgid "Generate"
msgstr "Сгенерировать"

#: tests_interface/templates/tests_interface/reports_list.html:166
msgid "No Reports Found"
msgstr "Отчеты не найдены"

#: tests_interface/templates/tests_interface/reports_list.html:168
msgid "No reports available yet. Run some tests to generate reports."
msgstr "Отчетов еще нет. Запустите тесты для их создания"

#: tests_interface/templates/tests_interface/reports_list.html:174
msgid "Run Tests"
msgstr "Запустить тесты"
13 changes: 12 additions & 1 deletion src/imgtests/web/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DjangoSettings(BaseSettings):
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
Expand All @@ -59,6 +60,7 @@ class DjangoSettings(BaseSettings):
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request",
"django.template.context_processors.i18n",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
Expand Down Expand Up @@ -95,7 +97,16 @@ class DjangoSettings(BaseSettings):
]


LANGUAGE_CODE = "en-us"
LANGUAGE_CODE = "en"

LANGUAGES = [
("en", "English"),
("ru", "Русский"),
]

LOCALE_PATHS = [
BASE_DIR / "locale",
]

TIME_ZONE = "UTC"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!DOCTYPE html>
<html lang="en">
{% load i18n %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Test Dashboard{% endblock %}</title>
<title>{% block title %}{% translate "Test Dashboard" %}{% endblock %}</title>
{% load static %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{% extends 'tests_interface/base.html' %}
{% load i18n %}

{% block title %}{{distro.display_name}} Tests{% endblock %}
{% block title %}{{distro.display_name}} {% translate "Tests" %}{% endblock %}

{% block content %}
<div class="card">
<div class="header-with-back">
<a href="{% url 'index' %}" class="back-button">Back to Dashboard</a>
<a href="{% url 'index' %}" class="back-button">{% translate "Back to Dashboard" %}</a>
<div class="page-title">
<h1>Tests page for {{ distro.display_name }}</h1>
<h1>{% translate "Tests page for" %} {{ distro.display_name }}</h1>
</div>
</div>

Expand All @@ -20,64 +21,63 @@ <h1>Tests page for {{ distro.display_name }}</h1>
border-radius: 5px;
"
>
<h3>Test Configuration</h3>
<h3>{% translate "Test Configuration" %}</h3>
<div id="configStatus" style="color: green; margin-bottom: 10px"></div>

<div class="config-controls">
<label>Select runner:
<label>{% translate "Select runner:" %}
<select name="RunnerSelect" id="configTestingMode">
<option value="default">Basic</option>
<option value="profiled">Profiled</option>
<option value="default">{% translate "Basic" %}</option>
<option value="profiled">{% translate "Profiled" %}</option>
</select>
</label>
</div>

<div style="margin-top: 15px; padding: 10px; border: 1px solid #ddd; border-radius: 5px;">
<label style="margin-right: 20px;">
Number of test runs:
<input type="number"
id="testRunsCount"
name="test_runs_count"
min="1"
max="100"
value="1"
style="width: 80px; padding: 5px; margin-left: 10px;">
</label>
</div>

<div id="basicTestConfig">
<div class="config-controls" style="margin-top: 10px">
<label style="margin-right: 20px">
<input type="radio" name="configMode" value="default" checked />
Use Default Configuration
{% translate "Use Default Configuration" %}
</label>
<label style="margin-right: 20px">
<input type="radio" name="configMode" value="custom" /> Custom
Configuration
<input type="radio" name="configMode" value="custom" /> {% translate "Custom Configuration" %}
</label>
</div>

<div style="margin-top: 15px; padding: 10px; border: 1px solid #ddd; border-radius: 5px;">
<label style="margin-right: 20px;">
{% translate "Number of test runs:" %}
<input type="number"
id="testRunsCount"
name="test_runs_count"
min="1"
max="100"
value="1"
style="width: 80px; padding: 5px; margin-left: 10px;">
</label>
</div>

<div id="customConfigPanel" style="display: none; margin-top: 15px">
<div class="suites-selection">
<h4>Select Test Suites and Configure Duration:</h4>
<h4>{% translate "Select Test Suites and Configure Duration:" %}</h4>
<div id="suitesCheckboxes"></div>
</div>

<div class="tests-selection" style="margin-top: 15px">
<h4>Individual Tests (optional):</h4>
<h4>{% translate "Individual Tests (optional):" %}</h4>
<div id="testsSelection"></div>
</div>

<div style="margin-top: 15px">
<button id="saveConfigBtn" class="btn">
Save Configuration
{% translate "Save Configuration" %}
</button>
<button
id="resetConfigBtn"
class="btn"
style="margin-left: 10px"
>
Reset to Default
{% translate "Reset to Default" %}
</button>
</div>
</div>
Expand Down Expand Up @@ -132,7 +132,7 @@ <h4>Subsystems</h4>
</div>

<div class="placeholder">
<button id="runTestsBtn" class="btn">Run tests</button>
<button id="runTestsBtn" class="btn">{% translate "Run tests" %}</button>
<div
id="outputContainer"
style="
Expand Down
Loading
Loading