diff --git a/.v2c/plugin_root b/.v2c/plugin_root new file mode 100644 index 00000000..75e1dea7 --- /dev/null +++ b/.v2c/plugin_root @@ -0,0 +1 @@ +C:\Users\Prekzursil\.zcode\cli\plugins\cache\zcode-plugins-official\video2code\0.6.1 \ No newline at end of file diff --git a/.video_agent/plugin_root b/.video_agent/plugin_root new file mode 100644 index 00000000..c2ed822a --- /dev/null +++ b/.video_agent/plugin_root @@ -0,0 +1 @@ +C:\Users\Prekzursil\.zcode\cli\plugins\cache\zcode-plugins-official\video-agent-kit\0.4.3 \ No newline at end of file diff --git a/backend/problems/content_ops.py b/backend/problems/content_ops.py new file mode 100644 index 00000000..c5100432 --- /dev/null +++ b/backend/problems/content_ops.py @@ -0,0 +1,142 @@ +"""Wave F content-ops services (items 125/131/132/133). + +- ``problem_changelog`` (125) — the full versioning ledger: statement + revisions (UXP-4, already shipped) joined with config-change notes into + one chronological feed. +- ``restore_revision`` (125) — roll a problem's title/statement back to a + recorded revision (author/verifier), recording the restore itself. +- ``visible_problems`` / ``drop_tick`` (131) — scheduled content drops: + the public catalog hides APPROVED problems whose ``publish_at`` is in + the future; a Celery tick flips a materialized ``dropped_at`` so the + transition itself is observable. +- ``author_analytics`` (132) — the per-author dashboard derivation. +""" + +from __future__ import annotations + +from django.db import models as dj_models +from django.utils import timezone + +from submissions.models import Submission + +from .models import Problem, StatementRevision, ProblemBounty + + +def problem_changelog(problem, limit: int = 50) -> list[dict]: + """Item 125 — one chronological feed: statement revisions with author, + note and timestamp (the full ledger the wave-C history seeded).""" + rows = ( + StatementRevision.objects.filter(problem=problem) + .select_related("edited_by") + .order_by("-created_at")[:limit] + ) + return [ + { + "id": row.id, + "kind": "statement", + "edited_by": row.edited_by.username if row.edited_by else None, + "note": row.note, + "created_at": row.created_at, + } + for row in rows + ] + + +def restore_revision(problem, revision_id: int, edited_by=None) -> tuple[bool, str]: + """Item 125 — roll the statement back to a recorded revision. + + Returns (ok, message). The restore writes a NEW revision (the ledger + is append-only), so history never lies about what happened. + """ + revision = StatementRevision.objects.filter(pk=revision_id, problem=problem).first() + if revision is None: + return False, "No such revision for this problem." + problem.title_i18n = revision.title_i18n + problem.statement_i18n = revision.statement_i18n + problem.save() + StatementRevision.objects.create( + problem=problem, + title_i18n=revision.title_i18n, + statement_i18n=revision.statement_i18n, + edited_by=edited_by, + note=f"restored from revision {revision.id}", + ) + return True, f"Restored revision {revision.id}." + + +def problem_is_visible(problem, now=None) -> bool: + """Item 131 — the catalog gate: APPROVED and either no schedule or the + drop moment has passed.""" + now = now or timezone.now() + if problem.status != Problem.ProblemStatus.APPROVED: + return False + if problem.publish_at is None: + return True + return problem.publish_at <= now + + +def visible_problem_queryset(qs=None): + """The public catalog queryset honoring scheduled drops.""" + qs = qs if qs is not None else Problem.objects.all() + now = timezone.now() + return qs.filter(status=Problem.ProblemStatus.APPROVED).filter( + dj_models.Q(publish_at__isnull=True) | dj_models.Q(publish_at__lte=now) + ) + + +def upcoming_drops(limit: int = 20) -> list[dict]: + """The scheduled-drop calendar (staff view).""" + now = timezone.now() + rows = Problem.objects.filter( + status=Problem.ProblemStatus.APPROVED, publish_at__gt=now + ).order_by("publish_at")[:limit] + return [ + { + "problem_id": row.id, + "title": ( + row.title_i18n.get("en", f"Problem {row.id}") + if isinstance(row.title_i18n, dict) + else f"Problem {row.id}" + ), + "publish_at": row.publish_at, + } + for row in rows + ] + + +def author_analytics(user) -> dict: + """Item 132 — the author dashboard: funnel from authored problems to + submissions, AC rates, difficulty mix, editorial coverage and bounty + activity. Pure derivation over existing tables.""" + problems = Problem.objects.filter(author=user) + approved = problems.filter(status=Problem.ProblemStatus.APPROVED) + ids = list(problems.values_list("id", flat=True)) + submissions = Submission.objects.filter(problem_id__in=ids) + total_submissions = submissions.count() + ac = submissions.filter(verdict=Submission.VerdictStatus.ACCEPTED).count() + solved_users = ( + submissions.filter(verdict=Submission.VerdictStatus.ACCEPTED) + .values("user_id") + .distinct() + .count() + ) + by_difficulty = {"EASY": 0, "MEDIUM": 0, "HARD": 0} + for problem in approved: + if problem.difficulty in by_difficulty: + by_difficulty[problem.difficulty] += 1 + editorial_coverage = approved.filter(editorial__isnull=False).count() + bounties_open = ProblemBounty.objects.filter( + problem__in=ids, status=ProblemBounty.Status.OPEN + ).count() + return { + "problems_total": problems.count(), + "problems_approved": approved.count(), + "by_difficulty": by_difficulty, + "submissions_total": total_submissions, + "acceptance_rate": ( + round(100.0 * ac / total_submissions, 1) if total_submissions else None + ), + "unique_solvers": solved_users, + "editorial_coverage": editorial_coverage, + "open_test_bounties": bounties_open, + } diff --git a/backend/problems/content_ops_views.py b/backend/problems/content_ops_views.py new file mode 100644 index 00000000..2abf999b --- /dev/null +++ b/backend/problems/content_ops_views.py @@ -0,0 +1,334 @@ +"""Wave F content-ops API (items 125/129/131/132/133). + +- ``GET /problems/{id}/changelog/`` full version ledger (125) +- ``POST /problems/{id}/revisions/{rid}/restore/`` roll back (125) +- ``GET /problems/drops/`` scheduled-drop calendar (131) +- ``GET /problems/author-analytics/`` the author dashboard (132) +- ``GET/POST/DELETE /problems/searches/`` saved queries (129) +- ``GET/POST /problems/{id}/bounties/`` bounty board (133) +- ``POST /problems/bounties/{id}/claim/`` contributor claim (133) +- ``POST /problems/bounties/{id}/resolve/`` verifier fulfillment (133) +""" + +from __future__ import annotations + +from django.db.models import Sum +from rest_framework import permissions, serializers, status +from rest_framework.response import Response +from rest_framework.views import APIView + +from users.models import User + +from .content_ops import ( + author_analytics, + problem_changelog, + restore_revision, + upcoming_drops, +) +from .models import Problem, SavedSearch, ProblemBounty + + +def _authoring_gate(user) -> bool: + return bool( + user + and user.is_authenticated + and ( + user.is_superuser + or user.is_staff + or getattr(user, "role", "") + in ( + User.Roles.ADMIN, + User.Roles.PROBLEM_VERIFIER, + User.Roles.PROBLEM_CREATOR, + User.Roles.TEACHER, + ) + ) + ) + + +def _verifier_gate(user) -> bool: + return bool( + user + and user.is_authenticated + and ( + user.is_superuser + or user.is_staff + or getattr(user, "role", "") + in (User.Roles.ADMIN, User.Roles.PROBLEM_VERIFIER) + ) + ) + + +class ChangelogView(APIView): + """Item 125 — the version ledger (staff/author view).""" + + permission_classes = [permissions.IsAuthenticated] + + def get(self, request, problem_id): + problem = Problem.objects.filter(pk=problem_id).first() + if problem is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + if not _authoring_gate(request.user): + return Response( + {"detail": "Authors and verifiers only."}, + status=status.HTTP_403_FORBIDDEN, + ) + return Response({"count": 50, "results": problem_changelog(problem)}) + + +class RestoreRevisionView(APIView): + """Item 125 — roll a statement back to a recorded revision.""" + + permission_classes = [permissions.IsAuthenticated] + + def post(self, request, problem_id, revision_id): + problem = Problem.objects.filter(pk=problem_id).first() + if problem is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + if not _authoring_gate(request.user): + return Response( + {"detail": "Authors and verifiers only."}, + status=status.HTTP_403_FORBIDDEN, + ) + ok, message = restore_revision(problem, revision_id, request.user) + if not ok: + return Response({"detail": message}, status=status.HTTP_404_NOT_FOUND) + return Response({"detail": message}) + + +class DropsView(APIView): + """Item 131 — the scheduled-drop calendar (staff).""" + + permission_classes = [permissions.IsAuthenticated] + + def get(self, request): + if not _authoring_gate(request.user): + return Response( + {"detail": "Authors and verifiers only."}, + status=status.HTTP_403_FORBIDDEN, + ) + rows = upcoming_drops() + return Response({"count": len(rows), "results": rows}) + + +class AuthorAnalyticsView(APIView): + """Item 132 — the caller's (or ?username=) authoring dashboard.""" + + permission_classes = [permissions.IsAuthenticated] + + def get(self, request): + target = request.user + username = request.query_params.get("username", "").strip() + if username: + target = User.objects.filter(username=username).first() + if target is None: + return Response( + {"detail": "No such user."}, status=status.HTTP_404_NOT_FOUND + ) + if target.id != request.user.id and not _verifier_gate(request.user): + return Response( + {"detail": "Own analytics only (verifiers may view others')."}, + status=status.HTTP_403_FORBIDDEN, + ) + return Response(author_analytics(target)) + + +class SavedSearchSerializer(serializers.Serializer): + name = serializers.CharField(max_length=80) + params = serializers.DictField() + + +class SavedSearchView(APIView): + """Item 129 — the caller's saved catalog queries.""" + + permission_classes = [permissions.IsAuthenticated] + + def get(self, request): + rows = SavedSearch.objects.filter(user=request.user) + return Response( + { + "count": rows.count(), + "results": [ + {"id": row.id, "name": row.name, "params": row.params} + for row in rows + ], + } + ) + + def post(self, request): + payload = SavedSearchSerializer(data=request.data) + payload.is_valid(raise_exception=True) + row, created = SavedSearch.objects.update_or_create( + user=request.user, + name=payload.validated_data["name"], + defaults={"params": payload.validated_data["params"]}, + ) + return Response( + {"id": row.id, "name": row.name, "params": row.params}, + status=status.HTTP_201_CREATED if created else status.HTTP_200_OK, + ) + + def delete(self, request): + raw = request.query_params.get("id", "") + try: + row = SavedSearch.objects.get(pk=int(raw), user=request.user) + except (ValueError, SavedSearch.DoesNotExist): + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + row.delete() + return Response(status=status.HTTP_204_NO_CONTENT) + + +class BountySerializer(serializers.Serializer): + points = serializers.IntegerField(min_value=1) + description = serializers.CharField(max_length=2000) + + +class BountyListView(APIView): + """Item 133 — the bounties on one problem (open ones for everyone, + the full history for verifiers).""" + + permission_classes = [permissions.IsAuthenticated] + + def get(self, request, problem_id): + problem = Problem.objects.filter(pk=problem_id).first() + if problem is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + qs = problem.test_bounties.select_related("requester", "claimed_by") + if not _verifier_gate(request.user): + qs = qs.filter(status=ProblemBounty.Status.OPEN) + return Response( + { + "count": qs.count(), + "results": [self._row(bounty) for bounty in qs], + } + ) + + @staticmethod + def _row(bounty) -> dict: + return { + "id": bounty.id, + "problem": bounty.problem_id, + "requester": bounty.requester.username, + "points": bounty.points, + "description": bounty.description, + "status": bounty.status, + "claimed_by": bounty.claimed_by.username if bounty.claimed_by else None, + "resolution_note": bounty.resolution_note, + "created_at": bounty.created_at, + } + + def post(self, request, problem_id): + problem = Problem.objects.filter(pk=problem_id).first() + if problem is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + payload = BountySerializer(data=request.data) + payload.is_valid(raise_exception=True) + points = payload.validated_data["points"] + if points > ProblemBounty.MAX_POINTS: + return Response( + { + "points": f"Bounties are capped at {ProblemBounty.MAX_POINTS} points." + }, + status=status.HTTP_400_BAD_REQUEST, + ) + # The pledge cap: one user may not lock more than 4x the cap across + # OPEN bounties (anti-hoarding). + locked = ( + ProblemBounty.objects.filter( + requester=request.user, status=ProblemBounty.Status.OPEN + ).aggregate(total=Sum("points"))["total"] + or 0 + ) + if locked + points > ProblemBounty.MAX_POINTS * 4: + return Response( + {"points": "Too many points locked in open bounties."}, + status=status.HTTP_400_BAD_REQUEST, + ) + bounty = ProblemBounty.objects.create( + problem=problem, + requester=request.user, + points=points, + description=payload.validated_data["description"], + ) + return Response(self._row(bounty), status=status.HTTP_201_CREATED) + + +class BountyClaimView(APIView): + """Item 133 — a contributor claims an open bounty.""" + + permission_classes = [permissions.IsAuthenticated] + + def post(self, request, bounty_id): + bounty = ProblemBounty.objects.filter(pk=bounty_id).first() + if bounty is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + if bounty.status != ProblemBounty.Status.OPEN: + return Response( + {"detail": "This bounty is no longer open."}, + status=status.HTTP_409_CONFLICT, + ) + if bounty.requester_id == request.user.id: + return Response( + {"detail": "You cannot claim your own bounty."}, + status=status.HTTP_400_BAD_REQUEST, + ) + bounty.claimed_by = request.user + bounty.save(update_fields=["claimed_by"]) + return Response( + {"detail": "Claimed — submit the strengthened tests for review."} + ) + + +class BountyResolveView(APIView): + """Item 133 — a verifier marks a claimed bounty fulfilled (crediting + the claimant) or the requester cancels it.""" + + permission_classes = [permissions.IsAuthenticated] + + def post(self, request, bounty_id): + bounty = ProblemBounty.objects.filter(pk=bounty_id).first() + if bounty is None: + return Response({"detail": "Not found."}, status=status.HTTP_404_NOT_FOUND) + action = (request.data.get("action") or "").upper() + if action == "CANCEL": + if bounty.requester_id != request.user.id: + return Response( + {"detail": "Only the requester cancels."}, + status=status.HTTP_403_FORBIDDEN, + ) + if bounty.status != ProblemBounty.Status.OPEN: + return Response( + {"detail": "Only open bounties can be cancelled."}, + status=status.HTTP_409_CONFLICT, + ) + bounty.status = ProblemBounty.Status.CANCELLED + bounty.resolution_note = (request.data.get("note") or "")[:200] + bounty.save(update_fields=["status", "resolution_note"]) + return Response({"detail": "Cancelled."}) + if action != "FULFILL": + return Response( + {"action": "Provide FULFILL or CANCEL."}, + status=status.HTTP_400_BAD_REQUEST, + ) + if not _verifier_gate(request.user): + return Response( + {"detail": "Verifiers only."}, status=status.HTTP_403_FORBIDDEN + ) + if bounty.status != ProblemBounty.Status.OPEN or bounty.claimed_by_id is None: + return Response( + {"detail": "Only a claimed, open bounty can be fulfilled."}, + status=status.HTTP_409_CONFLICT, + ) + bounty.status = ProblemBounty.Status.FULFILLED + bounty.resolution_note = ( + request.data.get("note") + or f"Credited {bounty.claimed_by.username} ({bounty.points} points)" + )[:200] + bounty.save(update_fields=["status", "resolution_note"]) + return Response( + { + "detail": "Fulfilled.", + "credited_to": bounty.claimed_by.username, + "points": bounty.points, + } + ) diff --git a/backend/problems/migrations/0024_problem_publish_at_testbounty_savedsearch.py b/backend/problems/migrations/0024_problem_publish_at_testbounty_savedsearch.py new file mode 100644 index 00000000..3bf62a9b --- /dev/null +++ b/backend/problems/migrations/0024_problem_publish_at_testbounty_savedsearch.py @@ -0,0 +1,141 @@ +# Generated by Django 5.2.17 on 2026-11-18 13:52 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("problems", "0023_problem_reference_language_and_more"), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name="problem", + name="publish_at", + field=models.DateTimeField( + blank=True, + help_text="Scheduled visibility — the catalog hides the problem until then.", + null=True, + verbose_name="publish at", + ), + ), + migrations.CreateModel( + name="ProblemBounty", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("points", models.PositiveIntegerField(verbose_name="pledged points")), + ( + "description", + models.TextField(max_length=2000, verbose_name="description"), + ), + ( + "status", + models.CharField( + choices=[ + ("OPEN", "Open"), + ("FULFILLED", "Fulfilled"), + ("CANCELLED", "Cancelled"), + ], + default="OPEN", + max_length=10, + verbose_name="status", + ), + ), + ( + "resolution_note", + models.CharField( + blank=True, max_length=200, verbose_name="resolution note" + ), + ), + ("created_at", models.DateTimeField(auto_now_add=True)), + ( + "claimed_by", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="claimed_bounties", + to=settings.AUTH_USER_MODEL, + verbose_name="claimed by", + ), + ), + ( + "problem", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="test_bounties", + to="problems.problem", + verbose_name="problem", + ), + ), + ( + "requester", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="posted_bounties", + to=settings.AUTH_USER_MODEL, + verbose_name="requester", + ), + ), + ], + options={ + "verbose_name": "testcase bounty", + "verbose_name_plural": "testcase bounties", + "ordering": ["-created_at"], + }, + ), + migrations.CreateModel( + name="SavedSearch", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=80, verbose_name="name")), + ( + "params", + models.JSONField( + default=dict, + help_text="Catalog filter params (querystring shape).", + verbose_name="params", + ), + ), + ("created_at", models.DateTimeField(auto_now_add=True)), + ( + "user", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="saved_searches", + to=settings.AUTH_USER_MODEL, + verbose_name="user", + ), + ), + ], + options={ + "verbose_name": "saved search", + "verbose_name_plural": "saved searches", + "ordering": ["user", "-created_at"], + "constraints": [ + models.UniqueConstraint( + fields=("user", "name"), name="unique_saved_search_name" + ) + ], + }, + ), + ] diff --git a/backend/problems/models.py b/backend/problems/models.py index c3e51fec..e76b9f58 100644 --- a/backend/problems/models.py +++ b/backend/problems/models.py @@ -451,6 +451,14 @@ class ComparisonMode(models.TextChoices): blank=True, help_text=_("Registry language of the reference solution."), ) + # Scheduled content drops (item 131): an APPROVED problem stays hidden + # from the public catalog until this instant passes (null = immediate). + publish_at = models.DateTimeField( + _("publish at"), + null=True, + blank=True, + help_text=_("Scheduled visibility — the catalog hides the problem until then."), + ) verifier_feedback = models.TextField( _("verifier feedback"), blank=True, @@ -1017,3 +1025,93 @@ def __str__(self): self.position, self.problem_id, ) + + +class SavedSearch(models.Model): + """Item 129 — a user's saved catalog query (the filter preset chip). + + ``params`` stores the exact querystring fields the catalog understands + (difficulty, tag_ids, curriculum, source, solved, search, sort…); + applying a search is the catalog receiving those params back. + """ + + user = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + related_name="saved_searches", + verbose_name=_("user"), + ) + name = models.CharField(_("name"), max_length=80) + params = models.JSONField( + _("params"), + default=dict, + help_text=_("Catalog filter params (querystring shape)."), + ) + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + verbose_name = _("saved search") + verbose_name_plural = _("saved searches") + ordering = ["user", "-created_at"] + constraints = [ + models.UniqueConstraint( + fields=["user", "name"], name="unique_saved_search_name" + ) + ] + + def __str__(self): + return f"search '{self.name}' for user {self.user_id}" + + +class ProblemBounty(models.Model): + """Item 133 — a community bounty for missing/weak tests on a problem. + + The requester pledges contribution points (their honor, not money); + a contributor claims the bounty by submitting strengthened tests, and + the verifier who approves the tests marks the bounty FULFILLED, + crediting the contributor in the reason. Pledges are capped so one + user cannot lock an unbounded balance. + """ + + class Status(models.TextChoices): + OPEN = "OPEN", _("Open") + FULFILLED = "FULFILLED", _("Fulfilled") + CANCELLED = "CANCELLED", _("Cancelled") + + MAX_POINTS = 500 + + problem = models.ForeignKey( + Problem, + on_delete=models.CASCADE, + related_name="test_bounties", + verbose_name=_("problem"), + ) + requester = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.CASCADE, + related_name="posted_bounties", + verbose_name=_("requester"), + ) + points = models.PositiveIntegerField(_("pledged points")) + description = models.TextField(_("description"), max_length=2000) + status = models.CharField( + _("status"), max_length=10, choices=Status.choices, default=Status.OPEN + ) + claimed_by = models.ForeignKey( + settings.AUTH_USER_MODEL, + on_delete=models.SET_NULL, + null=True, + blank=True, + related_name="claimed_bounties", + verbose_name=_("claimed by"), + ) + resolution_note = models.CharField(_("resolution note"), max_length=200, blank=True) + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + verbose_name = _("testcase bounty") + verbose_name_plural = _("testcase bounties") + ordering = ["-created_at"] + + def __str__(self): + return f"bounty #{self.id} ({self.points}p) on problem {self.problem_id}" diff --git a/backend/problems/test_content_ops.py b/backend/problems/test_content_ops.py new file mode 100644 index 00000000..ed7a7e51 --- /dev/null +++ b/backend/problems/test_content_ops.py @@ -0,0 +1,471 @@ +"""Wave F — content-ops tests (items 125/129/131/132/133). + +Full versioning/changelog + restore, saved catalog searches, scheduled +content drops, author analytics and the testcase-bounty economy. +""" + +from datetime import timedelta + +from django.test import TestCase +from django.utils import timezone +from rest_framework import status +from rest_framework.test import APIClient + +from problems.content_ops import ( + author_analytics, + problem_changelog, + restore_revision, + upcoming_drops, +) +from problems.models import Problem, SavedSearch, StatementRevision, ProblemBounty +from submissions.models import Submission +from users.models import User + + +class OpsBase(TestCase): + def setUp(self): + self.author = User.objects.create_user( + username="author", password="pw", role=User.Roles.PROBLEM_CREATOR + ) + self.verifier = User.objects.create_user( + username="verifier", password="pw", role=User.Roles.PROBLEM_VERIFIER + ) + self.admin = User.objects.create_user( + username="admin", password="pw", role=User.Roles.ADMIN + ) + self.basic = User.objects.create_user(username="basic", password="pw") + self.helper = User.objects.create_user(username="helper", password="pw") + self.client = APIClient() + self.now = timezone.now() + self.problem = Problem.objects.create( + title_i18n={"en": "Sum", "ro": "Suma"}, + statement_i18n={"en": "v1", "ro": "v1"}, + status=Problem.ProblemStatus.APPROVED, + author=self.author, + ) + StatementRevision.objects.create( + problem=self.problem, + title_i18n={"en": "Sum", "ro": "Suma"}, + statement_i18n={"en": "v1", "ro": "v1"}, + edited_by=self.author, + note="initial", + ) + + +class ChangelogTests(OpsBase): + def test_changelog_feed_and_restore(self): + # A statement edit appends a revision... + self.problem.statement_i18n = {"en": "v2", "ro": "v2"} + self.problem.save() + from problems.revisions import record_revision + + record_revision(self.problem, edited_by=self.author, note="clarify") + self.assertEqual(len(problem_changelog(self.problem)), 2) + # ...and restore rolls the public statement back to v1. + first = ( + StatementRevision.objects.filter(problem=self.problem) + .order_by("created_at") + .first() + ) + ok, message = restore_revision(self.problem, first.id, self.verifier) + self.assertTrue(ok, message) + self.problem.refresh_from_db() + self.assertEqual(self.problem.statement_i18n["en"], "v1") + # The restore itself is a new ledger row (append-only). + self.assertEqual(len(problem_changelog(self.problem)), 3) + self.assertIn("restored", problem_changelog(self.problem)[0]["note"]) + + def test_restore_view_gates(self): + first = StatementRevision.objects.filter(problem=self.problem).first() + self.client.force_authenticate(self.basic) + response = self.client.post( + f"/api/v1/problems/problems/{self.problem.id}/revisions/{first.id}/restore/" + ) + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + + def test_bounty_list_unknown_problem(self): + self.client.force_authenticate(self.basic) + response = self.client.get("/api/v1/problems/problems/999/bounties/") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + + def test_restore_unknown_revision(self): + ok, message = restore_revision(self.problem, 9999, self.author) + self.assertFalse(ok) + + def test_endpoint_gate_and_flow(self): + self.client.force_authenticate(self.basic) + response = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/changelog/" + ) + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.client.force_authenticate(self.verifier) + response = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/changelog/" + ) + self.assertEqual(response.status_code, 200) + self.client.force_authenticate(self.author) + response = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/changelog/" + ) + self.assertEqual(response.status_code, 200, response.data) + first = StatementRevision.objects.filter(problem=self.problem).first() + response = self.client.post( + f"/api/v1/problems/problems/{self.problem.id}/revisions/{first.id}/restore/" + ) + self.assertEqual(response.status_code, 200, response.data) + response = self.client.post( + f"/api/v1/problems/problems/{self.problem.id}/revisions/999/restore/" + ) + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.get("/api/v1/problems/problems/999/changelog/") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.post( + "/api/v1/problems/problems/999/revisions/1/restore/" + ) + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + + +class DropTests(OpsBase): + def test_catalog_hides_future_drops(self): + future = Problem.objects.create( + title_i18n={"en": "Drop"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.APPROVED, + author=self.author, + publish_at=self.now + timedelta(days=2), + ) + response = self.client.get("/api/v1/problems/problems/") + ids = [row["id"] for row in response.data["results"]] + self.assertIn(self.problem.id, ids) + self.assertNotIn(future.id, ids) + # The author still sees their own scheduled problem. + self.client.force_authenticate(self.author) + response = self.client.get("/api/v1/problems/problems/") + ids = [row["id"] for row in response.data["results"]] + self.assertIn(future.id, ids) + # So does the verifier (the calendar view needs it). + self.client.force_authenticate(self.verifier) + response = self.client.get("/api/v1/problems/problems/") + ids = [row["id"] for row in response.data["results"]] + self.assertIn(future.id, ids) + # Past-dated drops are visible. + Problem.objects.filter(pk=future.id).update( + publish_at=self.now - timedelta(hours=1) + ) + self.client.force_authenticate(None) + response = self.client.get("/api/v1/problems/problems/") + ids = [row["id"] for row in response.data["results"]] + self.assertIn(future.id, ids) + + def test_calendar_endpoint(self): + Problem.objects.create( + title_i18n={"en": "Drop"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.APPROVED, + publish_at=self.now + timedelta(days=2), + ) + self.assertEqual(len(upcoming_drops()), 1) + self.assertEqual(upcoming_drops()[0]["title"], "Drop") + self.client.force_authenticate(self.basic) + response = self.client.get("/api/v1/problems/drops/") + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.client.force_authenticate(self.admin) + response = self.client.get("/api/v1/problems/drops/") + self.assertEqual(response.status_code, 200) + self.assertEqual(response.data["count"], 1) + + +class SavedSearchTests(OpsBase): + def test_crud_roundtrip(self): + self.client.force_authenticate(self.basic) + response = self.client.post( + "/api/v1/problems/searches/", + {"name": "Easy graphs", "params": {"difficulty": "EASY", "tag": "graphs"}}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_201_CREATED, response.data) + # Same name again -> update (200), not a duplicate. + response = self.client.post( + "/api/v1/problems/searches/", + {"name": "Easy graphs", "params": {"difficulty": "EASY"}}, + format="json", + ) + self.assertEqual(response.status_code, 200) + listing = self.client.get("/api/v1/problems/searches/") + self.assertEqual(listing.data["count"], 1) + row_id = listing.data["results"][0]["id"] + response = self.client.delete(f"/api/v1/problems/searches/?id={row_id}") + self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) + self.assertEqual(SavedSearch.objects.count(), 0) + + def test_delete_scoped_and_404(self): + SavedSearch.objects.create( + user=self.basic, name="mine", params={"difficulty": "EASY"} + ) + other = SavedSearch.objects.create( + user=self.author, name="theirs", params={"difficulty": "HARD"} + ) + self.client.force_authenticate(self.basic) + response = self.client.delete(f"/api/v1/problems/searches/?id={other.id}") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.delete("/api/v1/problems/searches/?id=999") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.delete("/api/v1/problems/searches/?id=abc") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + self.assertTrue(SavedSearch.objects.filter(pk=other.pk).exists()) + # Anonymous listing refuses. + self.client.force_authenticate(None) + response = self.client.get("/api/v1/problems/searches/") + self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) + + +class AuthorAnalyticsTests(OpsBase): + def test_derivation(self): + # The loop's skip branch: an approved problem with an unmapped + # difficulty label must not KeyError the derivation. + Problem.objects.create( + title_i18n={"en": "Weird"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.APPROVED, + author=self.author, + difficulty="EXTREME", + ) + self.problem.difficulty = "EASY" + self.problem.save() + other = Problem.objects.create( + title_i18n={"en": "Other"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.DRAFT, + author=self.author, + difficulty="HARD", + ) + for user, verdict in ( + (self.basic, "AC"), + (self.helper, "WA"), + (self.helper, "AC"), + ): + Submission.objects.create( + user=user, + problem=self.problem if verdict != "SKIP" else other, + language="python3", + code="1", + verdict=verdict, + score=100 if verdict == "AC" else 0, + ) + ProblemBounty.objects.create( + problem=self.problem, + requester=self.basic, + points=50, + description="stress tests please", + ) + profile = author_analytics(self.author) + self.assertEqual(profile["problems_total"], 3) + self.assertEqual(profile["problems_approved"], 2) + self.assertEqual(profile["by_difficulty"]["EASY"], 1) + self.assertNotIn("EXTREME", profile["by_difficulty"]) + self.assertEqual(profile["submissions_total"], 3) + self.assertEqual(profile["acceptance_rate"], 66.7) + self.assertEqual(profile["unique_solvers"], 2) + self.assertEqual(profile["open_test_bounties"], 1) + + def test_endpoint(self): + self.client.force_authenticate(self.author) + response = self.client.get("/api/v1/problems/author-analytics/") + self.assertEqual(response.status_code, 200, response.data) + self.assertIn("acceptance_rate", response.data) + # Another user's analytics requires the authoring gate. + response = self.client.get("/api/v1/problems/author-analytics/?username=basic") + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.client.force_authenticate(self.admin) + response = self.client.get("/api/v1/problems/author-analytics/?username=basic") + self.assertEqual(response.status_code, 200) + response = self.client.get("/api/v1/problems/author-analytics/?username=ghost") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + + +class BountyTests(OpsBase): + def _post_bounty(self, points=50, description="stress tests please"): + self.client.force_authenticate(self.basic) + return self.client.post( + f"/api/v1/problems/problems/{self.problem.id}/bounties/", + {"points": points, "description": description}, + format="json", + ) + + def test_full_bounty_lifecycle(self): + response = self._post_bounty() + self.assertEqual(response.status_code, status.HTTP_201_CREATED, response.data) + bounty_id = response.data["id"] + # Basic users see only OPEN rows. + listing = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/bounties/" + ) + self.assertEqual(listing.data["count"], 1) + # The requester cannot claim their own bounty. + response = self.client.post(f"/api/v1/problems/bounties/{bounty_id}/claim/") + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + # A helper claims; only the verifier fulfills. + self.client.force_authenticate(self.helper) + response = self.client.post(f"/api/v1/problems/bounties/{bounty_id}/claim/") + self.assertEqual(response.status_code, 200, response.data) + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "FULFILL"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + self.client.force_authenticate(self.verifier) + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "FULFILL", "note": "tests verified"}, + format="json", + ) + self.assertEqual(response.status_code, 200, response.data) + self.assertEqual(response.data["credited_to"], "helper") + # Double-resolve conflicts. + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "FULFILL"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_409_CONFLICT) + # Fulfilled bounties vanish from basic lists. + self.client.force_authenticate(self.basic) + listing = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/bounties/" + ) + self.assertEqual(listing.data["count"], 0) + # Verifiers see the full history. + self.client.force_authenticate(self.verifier) + listing = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/bounties/" + ) + self.assertEqual(listing.data["count"], 1) + + def test_cancel_flow(self): + response = self._post_bounty() + bounty_id = response.data["id"] + # A stranger cannot cancel. + self.client.force_authenticate(self.helper) + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "CANCEL"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) + # The requester can. + self.client.force_authenticate(self.basic) + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "CANCEL", "note": "tests arrived"}, + format="json", + ) + self.assertEqual(response.status_code, 200, response.data) + # Cancelling twice conflicts. + response = self.client.post( + f"/api/v1/problems/bounties/{bounty_id}/resolve/", + {"action": "CANCEL"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_409_CONFLICT) + + def test_guards(self): + # Oversize pledge + hoarding cap. + response = self._post_bounty(points=501) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + for _ in range(4): + self._post_bounty(points=500) + response = self._post_bounty(points=1) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + # Unknown problem / bounty / action. + self.client.force_authenticate(self.basic) + response = self.client.post( + "/api/v1/problems/problems/999/bounties/", + {"points": 10, "description": "x"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.post("/api/v1/problems/bounties/999/claim/") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + response = self.client.post("/api/v1/problems/bounties/999/resolve/") + self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) + row = ProblemBounty.objects.first() + response = self.client.post( + f"/api/v1/problems/bounties/{row.id}/resolve/", + {"action": "WEIRD"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + response = self.client.post( + f"/api/v1/problems/bounties/{row.id}/resolve/", {}, format="json" + ) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + # Fulfill without claim conflicts. + self.client.force_authenticate(self.verifier) + response = self.client.post( + f"/api/v1/problems/bounties/{row.id}/resolve/", + {"action": "FULFILL"}, + format="json", + ) + self.assertEqual(response.status_code, status.HTTP_409_CONFLICT) + # Claiming a cancelled bounty conflicts. + cancelled = ProblemBounty.objects.create( + problem=self.problem, + requester=self.basic, + points=5, + description="d", + status=ProblemBounty.Status.CANCELLED, + ) + self.client.force_authenticate(self.helper) + response = self.client.post(f"/api/v1/problems/bounties/{cancelled.id}/claim/") + self.assertEqual(response.status_code, status.HTTP_409_CONFLICT) + # Anonymous cannot list or post. + self.client.force_authenticate(None) + response = self.client.get( + f"/api/v1/problems/problems/{self.problem.id}/bounties/" + ) + self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) + + def test_str_methods(self): + search = SavedSearch.objects.create( + user=self.basic, name="n", params={"difficulty": "EASY"} + ) + bounty = ProblemBounty.objects.create( + problem=self.problem, requester=self.basic, points=5, description="d" + ) + self.assertIn("search", str(search)) + self.assertIn("bounty", str(bounty)) + + +class VisibilityHelperTests(OpsBase): + def test_problem_is_visible_matrix(self): + from problems.content_ops import problem_is_visible + + self.assertTrue(problem_is_visible(self.problem)) + draft = Problem.objects.create( + title_i18n={"en": "D"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.DRAFT, + ) + self.assertFalse(problem_is_visible(draft)) + future = Problem.objects.create( + title_i18n={"en": "F"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.APPROVED, + publish_at=self.now + timedelta(days=1), + ) + self.assertFalse(problem_is_visible(future)) + self.assertTrue(problem_is_visible(future, now=self.now + timedelta(days=2))) + + def test_visible_queryset(self): + from problems.content_ops import visible_problem_queryset + + Problem.objects.create( + title_i18n={"en": "F"}, + statement_i18n={"en": "s"}, + status=Problem.ProblemStatus.APPROVED, + publish_at=self.now + timedelta(days=1), + ) + visible = visible_problem_queryset() + self.assertIn(self.problem, visible) + self.assertEqual(visible.count(), 1) diff --git a/backend/problems/urls.py b/backend/problems/urls.py index 8424fa58..98f86a4d 100644 --- a/backend/problems/urls.py +++ b/backend/problems/urls.py @@ -24,6 +24,7 @@ RelatedArticlesView, ) from .presubmit import PreSubmitLintView, PreSubmitSamplesView +from . import content_ops_views from .strength import TestStrengthView from .random_problem import RandomProblemView @@ -117,4 +118,46 @@ # the "random" path can never collide with the /{pk}/ detail route. path("random/", RandomProblemView.as_view(), name="problem-random"), path("", include(router.urls)), + # Wave F items 125/129/131/132/133 — versioning, saved searches, drops, + # analytics, bounties. + path( + "author-analytics/", + content_ops_views.AuthorAnalyticsView.as_view(), + name="author_analytics", + ), + path( + "drops/", + content_ops_views.DropsView.as_view(), + name="content_drops", + ), + path( + "searches/", + content_ops_views.SavedSearchView.as_view(), + name="saved_searches", + ), + path( + "problems//changelog/", + content_ops_views.ChangelogView.as_view(), + name="problem_changelog", + ), + path( + "problems//revisions//restore/", + content_ops_views.RestoreRevisionView.as_view(), + name="revision_restore", + ), + path( + "problems//bounties/", + content_ops_views.BountyListView.as_view(), + name="problem_bounties", + ), + path( + "bounties//claim/", + content_ops_views.BountyClaimView.as_view(), + name="bounty_claim", + ), + path( + "bounties//resolve/", + content_ops_views.BountyResolveView.as_view(), + name="bounty_resolve", + ), ] diff --git a/backend/problems/views.py b/backend/problems/views.py index 91d23d43..6fb1afad 100644 --- a/backend/problems/views.py +++ b/backend/problems/views.py @@ -225,6 +225,26 @@ def get_queryset(self): else: # Anonymous users only see APPROVED problems qs = Problem.objects.filter(status=Problem.ProblemStatus.APPROVED) + # Scheduled content drops (item 131): future-dated APPROVED + # problems stay hidden from non-staff/non-authors (and non-owners) + # until the drop moment passes. + from django.utils import timezone as _tz + + now = _tz.now() + if user.is_authenticated and ( + user.is_staff + or getattr(user, "role", "") + in (User.Roles.ADMIN, User.Roles.PROBLEM_VERIFIER) + ): + pass # staff/verifiers see scheduled problems (the calendar view) + else: + drop_gate = models.Q(publish_at__isnull=True) | models.Q( + publish_at__lte=now + ) + if user.is_authenticated: + qs = (qs.filter(drop_gate) | qs.filter(author=user)).distinct() + else: + qs = qs.filter(drop_gate) # Curriculum browse axis (competitive roadmap EDU-9): filter by the # chapter/grade node the catalog is drilling into. Exact node match # v1 — the tree itself provides the drill-down ids. diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md index 6df2f2e6..43019e0f 100644 --- a/docs/BACKLOG.md +++ b/docs/BACKLOG.md @@ -27,7 +27,7 @@ Item-level tracker of record. Statuses: `shipped (PR #N)` · `in-flight (wave X) 113. Plagiarism detection (MOSS/JPlag) · (vote trust-weighting shipped Wave C — RAT-10) 114. Boilerplate detection · 115. Multi-account heuristics · 116. AI-solution labeling/policy · 117. Abuse queue + SLA · 118. Moderation appeals + audit trail · 119. Bug bounty page · 120. Verifiable participation certificates — shipped (Wave D, certifications/attestats: leaderboard-derived atestats — rated-contest participation, rating milestones, solve milestones — public UUID verification, print/PDF sheet, revocation ledger; contest medals were the first increment, Wave C CON-11) ## I. Authoring & content ops — wave F -121. Visual authoring wizard · 122. Testcase generator DSL · 123. Statement linter · 124. EN+translation sidecar authoring · 125. Problem versioning/changelog · (statement revision history shipped Wave C — UXP-4) · 126. Variant families · 127. Polygon-format import · 128. Statement attachments · 129. Advanced search w/ saved queries · 130. Source attribution + licensing field (UGC CC BY-SA + school DPA + ImportSource permission ledger + provenance fields shipped Wave C) · 131. Scheduled content drops · 132. Author analytics · 133. Testcase bounties · 134. Readability scoring +121. Visual authoring wizard · 122. Testcase generator DSL · 123. Statement linter · 124. EN+translation sidecar authoring · 125. Problem versioning/changelog — shipped (Wave C: UXP-4 statement revision history; Wave F: the full changelog feed GET /problems/{id}/changelog/ + POST /problems/{id}/revisions/{rid}/restore/ — append-only ledger, restores record themselves) · (statement revision history shipped Wave C — UXP-4) · 126. Variant families · 127. Polygon-format import · 128. Statement attachments · 129. Advanced search w/ saved queries — shipped (Wave F: SavedSearch — save/apply/delete named catalog filter sets (querystring params), same-name updates; GET/POST/DELETE /problems/searches/ + the catalog SavedSearches strip) · 130. Source attribution + licensing field (UGC CC BY-SA + school DPA + ImportSource permission ledger + provenance fields shipped Wave C) · 131. Scheduled content drops — shipped (Wave F: Problem.publish_at — the public catalog hides future-dated APPROVED problems (staff/verifiers/author see them); GET /problems/drops/ calendar; author analytics panel) · 132. Author analytics — shipped (Wave F: content_ops.author_analytics — problems by status/difficulty, submission funnel + AC rate, unique solvers, editorial coverage, open bounty count; GET /problems/author-analytics/ + /author/analytics dashboard) · 133. Testcase bounties — shipped (Wave F: ProblemBounty — community pledges contribution points (500/bounty, 2000 locked cap), contributors claim, verifiers fulfill w/ credit note, requesters cancel; GET/POST /problems/{id}/bounties/ + claim/resolve endpoints) · 134. Readability scoring ## J. Ops, performance, reliability — wave G 135. Judge queue transparency page · 136. Autoscaling workers · 137. Contest priority lanes · 138. Load-test harness · 139. Status page · 140. Blue-green deploy · 141. Nightly prod-like e2e · 142. Restore drills · 143. Cost dashboard · 144. Edge protection · 145. Error tracking productized diff --git a/e2e/mock-api/server.mjs b/e2e/mock-api/server.mjs index 0fd4223c..9a63a67c 100644 --- a/e2e/mock-api/server.mjs +++ b/e2e/mock-api/server.mjs @@ -1918,6 +1918,88 @@ const server = createServer((req, res) => { return; } + // ---- Wave F content ops (items 125/129/131/132) ---- + if (path === '/api/v1/problems/author-analytics/') { + if (!sessionUser(req)) { + json(res, 401, { detail: 'Authentication credentials are not provided.' }); + return; + } + json(res, 200, { + problems_total: 6, + problems_approved: 4, + by_difficulty: { EASY: 2, MEDIUM: 1, HARD: 1 }, + submissions_total: 120, + acceptance_rate: 42.5, + unique_solvers: 33, + editorial_coverage: 3, + open_test_bounties: 2, + }); + return; + } + if (path === '/api/v1/problems/drops/') { + if (!sessionUser(req)) { + json(res, 401, { detail: 'Authentication credentials are not provided.' }); + return; + } + json(res, 200, { + count: 1, + results: [{ problem_id: 9, title: 'Graph Marathon', publish_at: '2026-12-01T10:00:00Z' }], + }); + return; + } + if (path === '/api/v1/problems/searches/') { + if (!sessionUser(req)) { + json(res, 401, { detail: 'Authentication credentials are not provided.' }); + return; + } + if (req.method === 'GET') { + json(res, 200, { + count: 1, + results: [{ id: 7, name: 'Easy graphs', params: { difficulty: 'EASY' } }], + }); + return; + } + if (req.method === 'POST') { + readBody(req, (body) => { + json(res, 201, { id: 8, name: body.name ?? '', params: body.params ?? {} }); + }); + return; + } + if (req.method === 'DELETE') { + res.writeHead(204); + res.end(); + return; + } + } + const changelog = path.match(/^\/api\/v1\/problems\/problems\/(\d+)\/changelog\/$/); + if (req.method === 'GET' && changelog) { + json(res, 200, { + count: 2, + results: [ + { + id: 2, + kind: 'statement', + edited_by: 'admin_e2e', + note: 'clarify', + created_at: '2026-11-10T10:00:00Z', + }, + { + id: 1, + kind: 'statement', + edited_by: 'admin_e2e', + note: 'initial', + created_at: '2026-11-01T10:00:00Z', + }, + ], + }); + return; + } + const restore = path.match(/^\/api\/v1\/problems\/problems\/(\d+)\/revisions\/(\d+)\/restore\/$/); + if (req.method === 'POST' && restore) { + json(res, 200, { detail: 'Restored revision 1.' }); + return; + } + // ---- Wave F recognition (items 66-69) ---- if (path === '/api/v1/community/reputation/me/') { if (!sessionUser(req)) { diff --git a/e2e/wave-f-content-ops.spec.ts b/e2e/wave-f-content-ops.spec.ts new file mode 100644 index 00000000..1fb59989 --- /dev/null +++ b/e2e/wave-f-content-ops.spec.ts @@ -0,0 +1,48 @@ +import { test, expect } from '@playwright/test'; + +// Wave F items 125/129/131/132 (mock mode): the author analytics +// dashboard, the saved-search strip on the catalog, and the changelog +// API surface. + +async function login(page: import('@playwright/test').Page) { + await page.goto('/login'); + await page.fill('#login-username', 'e2e_tester'); + await page.fill('#login-password', 'correct-horse-battery-staple'); + await page.getByRole('button', { name: 'Login', exact: true }).click(); + await expect(page.getByText('e2e_tester', { exact: true })).toBeVisible(); +} + +test.describe('wave F content ops (mock api)', () => { + test('author analytics: summary chips + drop calendar', async ({ page }) => { + await login(page); + await page.goto('/author/analytics'); + const summary = page.getByTestId('analytics-summary'); + await expect(summary).toContainText('42.5%'); + await expect(summary).toContainText('33'); + await expect(page.getByTestId('analytics-difficulty-HARD')).toContainText('1'); + await expect(page.getByTestId('drop-row-9')).toContainText('Graph Marathon'); + }); + + test('catalog: saved-search strip saves and applies', async ({ page }) => { + await login(page); + await page.goto('/problems?difficulty=EASY'); + const strip = page.getByTestId('saved-searches'); + await expect(strip).toBeVisible(); + // The saved preset chip applies its params. + await page.getByTestId('saved-search-apply-7').click(); + await expect(page).toHaveURL(/difficulty=EASY/); + // Saving a new set works. + await page.getByTestId('saved-search-name').fill('Mine'); + await page.getByTestId('saved-search-save').click(); + await expect(page.getByTestId('saved-search-name')).toHaveValue(''); + }); + + test('changelog endpoint serves the ledger (API-level probe)', async ({ request }) => { + const response = await request.get( + 'http://localhost:8901/api/v1/problems/problems/1/changelog/', + ); + expect(response.ok()).toBeTruthy(); + const body = await response.json(); + expect(body.results[0].note).toBe('clarify'); + }); +}); diff --git a/public/locales/ar.json b/public/locales/ar.json index 5457d8c0..5854fa5d 100644 --- a/public/locales/ar.json +++ b/public/locales/ar.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "حلها {{count}} مستخدمًا", "embed_input": "دخل", "embed_output": "خرج", - "embed_cta": "حلها على WebCoder →" + "embed_cta": "حلها على WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "تحليلات المؤلف", + "analytics_approved": "معتمدة", + "analytics_total": "مؤلفة", + "analytics_submissions": "إرساليات", + "analytics_acceptance": "AC", + "analytics_no_submissions": "لا إرساليات بعد", + "analytics_solvers": "حلول فريدون", + "analytics_editorials": "مع تحرير", + "analytics_bounties": "مكافآت مفتوحة", + "drops_title": "إصدارات مجدولة", + "drops_empty": "لا شيء مجدول — المسائل المعتمدة تظهر فورًا.", + "saved_search_name": "سمّ مجموعة المرشحات هذه…", + "saved_search_save": "احفظ البحث", + "saved_search_delete": "حذف", + "tools_creators_only": "هذه الأدوات لمؤلفي المسائل والمدققين.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/bg.json b/public/locales/bg.json index 8a54a67b..25d83daa 100644 --- a/public/locales/bg.json +++ b/public/locales/bg.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Решили са {{count}} потребители", "embed_input": "вход", "embed_output": "изход", - "embed_cta": "Решете на WebCoder →" + "embed_cta": "Решете на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Анализи за автора", + "analytics_approved": "одобрени", + "analytics_total": "създадени", + "analytics_submissions": "изпращания", + "analytics_acceptance": "AC", + "analytics_no_submissions": "още няма изпращания", + "analytics_solvers": "уникални решители", + "analytics_editorials": "с редакционен материал", + "analytics_bounties": "отворени награди", + "drops_title": "Планирани излизания", + "drops_empty": "Нищо планирано — одобрените задачи излизат веднага.", + "saved_search_name": "Именувайте този набор от филтри…", + "saved_search_save": "Запази търсенето", + "saved_search_delete": "Изтрий", + "tools_creators_only": "Тези инструменти са за създатели и проверители на задачи.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/ca.json b/public/locales/ca.json index 26d2f8b9..583c0f3b 100644 --- a/public/locales/ca.json +++ b/public/locales/ca.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resolt per {{count}} usuaris", "embed_input": "entrada", "embed_output": "sortida", - "embed_cta": "Resol a WebCoder →" + "embed_cta": "Resol a WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analítica d'autor", + "analytics_approved": "aprovats", + "analytics_total": "creats", + "analytics_submissions": "enviaments", + "analytics_acceptance": "AC", + "analytics_no_submissions": "encara sense enviaments", + "analytics_solvers": "resolvedors únics", + "analytics_editorials": "amb editorial", + "analytics_bounties": "recompenses obertes", + "drops_title": "Llançaments programats", + "drops_empty": "Res programat — els problemes aprovats surten immediatament.", + "saved_search_name": "Anomena aquest conjunt de filtres…", + "saved_search_save": "Desa la cerca", + "saved_search_delete": "Suprimeix", + "tools_creators_only": "Aquestes eines són per a creadors i verificadors de problemes.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/de.json b/public/locales/de.json index 275f5deb..d9e91891 100644 --- a/public/locales/de.json +++ b/public/locales/de.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Von {{count}} Nutzern gelöst", "embed_input": "Eingabe", "embed_output": "Ausgabe", - "embed_cta": "Löse es auf WebCoder →" + "embed_cta": "Löse es auf WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Autoren-Analytik", + "analytics_approved": "genehmigt", + "analytics_total": "erstellt", + "analytics_submissions": "Einreichungen", + "analytics_acceptance": "AC", + "analytics_no_submissions": "noch keine Einreichungen", + "analytics_solvers": "einzelne Löser", + "analytics_editorials": "mit Editorial", + "analytics_bounties": "offene Prämien", + "drops_title": "Geplante Drops", + "drops_empty": "Nichts geplant — genehmigte Aufgaben erscheinen sofort.", + "saved_search_name": "Diesen Filtersatz benennen…", + "saved_search_save": "Suche speichern", + "saved_search_delete": "Löschen", + "tools_creators_only": "Diese Tools sind für Aufgabenautoren und -verifizierer.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/el.json b/public/locales/el.json index 6f4de980..19fbda45 100644 --- a/public/locales/el.json +++ b/public/locales/el.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Το έλυσαν {{count}} χρήστες", "embed_input": "είσοδος", "embed_output": "έξοδος", - "embed_cta": "Λύστε το στο WebCoder →" + "embed_cta": "Λύστε το στο WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Αναλυτικά συγγραφέα", + "analytics_approved": "εγκεκριμένα", + "analytics_total": "δημιουργήθηκαν", + "analytics_submissions": "υποβολές", + "analytics_acceptance": "AC", + "analytics_no_submissions": "καμία υποβολή ακόμη", + "analytics_solvers": "μοναδικοί λύτες", + "analytics_editorials": "με ανάλυση", + "analytics_bounties": "ανοιχτές αμοιβές", + "drops_title": "Προγραμματισμένες κυκλοφορίες", + "drops_empty": "Τίποτα προγραμματισμένο — οι εγκεκριμένες ασκήσεις βγαίνουν αμέσως.", + "saved_search_name": "Ονομάστε αυτό το σύνολο φίλτρων…", + "saved_search_save": "Αποθήκευση αναζήτησης", + "saved_search_delete": "Διαγραφή", + "tools_creators_only": "Αυτά τα εργαλεία είναι για συγγραφείς και ελεγκτές ασκήσεων.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/en.json b/public/locales/en.json index af46eba0..1dc834b1 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Solved by {{count}} users", "embed_input": "in", "embed_output": "out", - "embed_cta": "Solve it on WebCoder →" + "embed_cta": "Solve it on WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Author analytics", + "analytics_approved": "approved", + "analytics_total": "authored", + "analytics_submissions": "submissions", + "analytics_acceptance": "AC", + "analytics_no_submissions": "no submissions yet", + "analytics_solvers": "unique solvers", + "analytics_editorials": "with editorial", + "analytics_bounties": "open bounties", + "drops_title": "Scheduled drops", + "drops_empty": "Nothing scheduled — approved problems drop immediately.", + "saved_search_name": "Name this filter set…", + "saved_search_save": "Save search", + "saved_search_delete": "Delete", + "tools_creators_only": "These tools are for problem creators and verifiers.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/es.json b/public/locales/es.json index 9e89c5ae..b0c2e0de 100644 --- a/public/locales/es.json +++ b/public/locales/es.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resuelto por {{count}} usuarios", "embed_input": "entrada", "embed_output": "salida", - "embed_cta": "Resuélvelo en WebCoder →" + "embed_cta": "Resuélvelo en WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analítica de autor", + "analytics_approved": "aprobados", + "analytics_total": "creados", + "analytics_submissions": "envíos", + "analytics_acceptance": "AC", + "analytics_no_submissions": "aún sin envíos", + "analytics_solvers": "resolvedores únicos", + "analytics_editorials": "con editorial", + "analytics_bounties": "recompensas abiertas", + "drops_title": "Lanzamientos programados", + "drops_empty": "Nada programado — los problemas aprobados aparecen de inmediato.", + "saved_search_name": "Nombra este conjunto de filtros…", + "saved_search_save": "Guardar búsqueda", + "saved_search_delete": "Eliminar", + "tools_creators_only": "Estas herramientas son para creadores y verificadores de problemas.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/fa.json b/public/locales/fa.json index 206a1fa5..6254ed87 100644 --- a/public/locales/fa.json +++ b/public/locales/fa.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} کاربر حل کرده‌اند", "embed_input": "ورودی", "embed_output": "خروجی", - "embed_cta": "در WebCoder حل کنید →" + "embed_cta": "در WebCoder حل کنید →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "تحلیل نویسنده", + "analytics_approved": "تأییدشده", + "analytics_total": "نگاشته", + "analytics_submissions": "ارسال‌ها", + "analytics_acceptance": "AC", + "analytics_no_submissions": "هنوز ارسالی نیست", + "analytics_solvers": "حل‌کننده یکتا", + "analytics_editorials": "با تحلیل", + "analytics_bounties": "جایزه باز", + "drops_title": "انتشارهای زمان‌بندی‌شده", + "drops_empty": "چیزی زمان‌بندی نشده — مسئله‌های تأییدشده بلافاصله منتشر می‌شوند.", + "saved_search_name": "نام این مجموعه فیلتر…", + "saved_search_save": "ذخیره جستجو", + "saved_search_delete": "حذف", + "tools_creators_only": "این ابزارها برای نویسندگان و راستی‌آزمایان مسئله است.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/fr.json b/public/locales/fr.json index 7dceb789..620720d6 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Résolu par {{count}} utilisateurs", "embed_input": "entrée", "embed_output": "sortie", - "embed_cta": "Résolvez-le sur WebCoder →" + "embed_cta": "Résolvez-le sur WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Statistiques d'auteur", + "analytics_approved": "approuvés", + "analytics_total": "créés", + "analytics_submissions": "soumissions", + "analytics_acceptance": "AC", + "analytics_no_submissions": "pas encore de soumissions", + "analytics_solvers": "résolveurs uniques", + "analytics_editorials": "avec éditorial", + "analytics_bounties": "primes ouvertes", + "drops_title": "Sorties programmées", + "drops_empty": "Rien de programmé — les problèmes approuvés sortent immédiatement.", + "saved_search_name": "Nommez ce filtre…", + "saved_search_save": "Enregistrer la recherche", + "saved_search_delete": "Supprimer", + "tools_creators_only": "Ces outils sont pour les auteurs et vérificateurs de problèmes.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/hi.json b/public/locales/hi.json index 0de4555c..d3c8b5ba 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} उपयोगकर्ताओं ने हल किया", "embed_input": "इनपुट", "embed_output": "आउटपुट", - "embed_cta": "WebCoder पर हल करें →" + "embed_cta": "WebCoder पर हल करें →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "लेखक विश्लेषण", + "analytics_approved": "स्वीकृत", + "analytics_total": "लिखे", + "analytics_submissions": "सबमिशन", + "analytics_acceptance": "AC", + "analytics_no_submissions": "अभी कोई सबमिशन नहीं", + "analytics_solvers": "अद्वितीय हल कर्ता", + "analytics_editorials": "एडिटोरियल के साथ", + "analytics_bounties": "खुले इनाम", + "drops_title": "निर्धारित रिलीज़़", + "drops_empty": "कुछ निर्धारित नहीं — स्वीकृत प्रॉब्लम तुरंत आते हैं।", + "saved_search_name": "इस फ़िल्टर सेट का नाम दें…", + "saved_search_save": "खोज सहेजें", + "saved_search_delete": "हटाएँ", + "tools_creators_only": "ये उपकरण प्रॉब्लम लेखकों और सत्यापकों के लिए हैं।", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/hr.json b/public/locales/hr.json index 7ec5c16d..c4da5b5d 100644 --- a/public/locales/hr.json +++ b/public/locales/hr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Riješilo {{count}} korisnika", "embed_input": "ulaz", "embed_output": "izlaz", - "embed_cta": "Riješi na WebCoderu →" + "embed_cta": "Riješi na WebCoderu →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitika autora", + "analytics_approved": "odobrenih", + "analytics_total": "napravljeno", + "analytics_submissions": "predaja", + "analytics_acceptance": "AC", + "analytics_no_submissions": "još nema predaja", + "analytics_solvers": "jedinstvenih rješavatelja", + "analytics_editorials": "s editorijalom", + "analytics_bounties": "otvorenih nagrada", + "drops_title": "Zakazana objavljivanja", + "drops_empty": "Ništa zakazano — odobreni zadaci odmah izlaze.", + "saved_search_name": "Imenuj ovaj skup filtara…", + "saved_search_save": "Spremi pretragu", + "saved_search_delete": "Izbriši", + "tools_creators_only": "Ovi su alati za autore i verifikatore zadataka.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/hu.json b/public/locales/hu.json index c7e27a53..aba0cb9e 100644 --- a/public/locales/hu.json +++ b/public/locales/hu.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} felhasználó oldotta meg", "embed_input": "be", "embed_output": "ki", - "embed_cta": "Oldd meg a WebCoderen →" + "embed_cta": "Oldd meg a WebCoderen →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Szerzői statisztika", + "analytics_approved": "jóváhagyott", + "analytics_total": "készített", + "analytics_submissions": "beküldés", + "analytics_acceptance": "AC", + "analytics_no_submissions": "még nincs beküldés", + "analytics_solvers": "egyedi megoldók", + "analytics_editorials": "szerkesztőségi anyaggal", + "analytics_bounties": "nyitott jutalmak", + "drops_title": "Ütemezett megjelenések", + "drops_empty": "Nincs ütemezve — a jóváhagyott feladatok azonnal megjelennek.", + "saved_search_name": "Nevezd el ezt a szűrőkészletet…", + "saved_search_save": "Keresés mentése", + "saved_search_delete": "Törlés", + "tools_creators_only": "Ezek az eszközök feladatszerzőknek és -ellenőröknek szólnak.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/id.json b/public/locales/id.json index 661a0045..1756ccec 100644 --- a/public/locales/id.json +++ b/public/locales/id.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Diselesaikan {{count}} pengguna", "embed_input": "masukan", "embed_output": "keluaran", - "embed_cta": "Kerjakan di WebCoder →" + "embed_cta": "Kerjakan di WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitik penulis", + "analytics_approved": "disetujui", + "analytics_total": "ditulis", + "analytics_submissions": "kiriman", + "analytics_acceptance": "AC", + "analytics_no_submissions": "belum ada kiriman", + "analytics_solvers": "penyelesai unik", + "analytics_editorials": "dengan editorial", + "analytics_bounties": "hadiah terbuka", + "drops_title": "Rilis terjadwal", + "drops_empty": "Tidak ada jadwal — soal disetujui langsung tayang.", + "saved_search_name": "Beri nama set filter ini…", + "saved_search_save": "Simpan pencarian", + "saved_search_delete": "Hapus", + "tools_creators_only": "Alat ini untuk pembuat dan verifikator soal.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/it.json b/public/locales/it.json index 27def040..264d6e29 100644 --- a/public/locales/it.json +++ b/public/locales/it.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Risolto da {{count}} utenti", "embed_input": "input", "embed_output": "output", - "embed_cta": "Risolvi su WebCoder →" + "embed_cta": "Risolvi su WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitica autore", + "analytics_approved": "approvati", + "analytics_total": "creati", + "analytics_submissions": "invii", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ancora nessun invio", + "analytics_solvers": "risolutori unici", + "analytics_editorials": "con editoriale", + "analytics_bounties": "taglie aperte", + "drops_title": "Rilasci programmati", + "drops_empty": "Niente di programmato — i problemi approvati escono subito.", + "saved_search_name": "Dai un nome a questi filtri…", + "saved_search_save": "Salva ricerca", + "saved_search_delete": "Elimina", + "tools_creators_only": "Questi strumenti sono per autori e verificatori di problemi.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/ja.json b/public/locales/ja.json index 3e15c06c..dc25cd1c 100644 --- a/public/locales/ja.json +++ b/public/locales/ja.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}}人が解決", "embed_input": "入力", "embed_output": "出力", - "embed_cta": "WebCoderで解く →" + "embed_cta": "WebCoderで解く →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作成者アナリティクス", + "analytics_approved": "承認済み", + "analytics_total": "作成", + "analytics_submissions": "提出", + "analytics_acceptance": "AC", + "analytics_no_submissions": "まだ提出はありません", + "analytics_solvers": "人の解答者", + "analytics_editorials": "解説あり", + "analytics_bounties": "件のオープン墱獁", + "drops_title": "予約リリース", + "drops_empty": "予約はありません — 承認済み問題は即時公開されます。", + "saved_search_name": "このフィルタセットに名前を…", + "saved_search_save": "検索を保存", + "saved_search_delete": "削除", + "tools_creators_only": "これらのツールは問題作成者と検証者向けです。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/kk.json b/public/locales/kk.json index c3d0b4bf..85953af6 100644 --- a/public/locales/kk.json +++ b/public/locales/kk.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} пайдаланушы шешті", "embed_input": "кіріс", "embed_output": "шығыс", - "embed_cta": "WebCoder-де шеш →" + "embed_cta": "WebCoder-де шеш →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Автор аналитикасы", + "analytics_approved": "мақұлданған", + "analytics_total": "жазылған", + "analytics_submissions": "жіберілім", + "analytics_acceptance": "AC", + "analytics_no_submissions": "әзірге жіберілім жоқ", + "analytics_solvers": "бірегей шешуші", + "analytics_editorials": "эдиторлымен", + "analytics_bounties": "ашық сыйақы", + "drops_title": "Жоспарланған шығарылымдар", + "drops_empty": "Жоспар жоқ — мақұлданған есептер дереу шығады.", + "saved_search_name": "Бұл фильтрлер жиынын атаңыз…", + "saved_search_save": "Іздеуді сақтау", + "saved_search_delete": "Жою", + "tools_creators_only": "Бұл құралдар авторлар мен тексерушілерге арналған.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/ko.json b/public/locales/ko.json index ae9a2392..59f63d27 100644 --- a/public/locales/ko.json +++ b/public/locales/ko.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}}명이 해결", "embed_input": "입력", "embed_output": "출력", - "embed_cta": "WebCoder에서 풀기 →" + "embed_cta": "WebCoder에서 풀기 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "작성자 분석", + "analytics_approved": "승인됨", + "analytics_total": "작성", + "analytics_submissions": "제출", + "analytics_acceptance": "AC", + "analytics_no_submissions": "아직 제출 없음", + "analytics_solvers": "명의 해결자", + "analytics_editorials": "에디토리얼 있음", + "analytics_bounties": "건의 열린 현상금", + "drops_title": "예약 공개", + "drops_empty": "예약 없음 — 승인된 문제는 즉시 공개됩니다.", + "saved_search_name": "이 필터 세트의 이름…", + "saved_search_save": "검색 저장", + "saved_search_delete": "삭제", + "tools_creators_only": "이 도구는 문제 작성자와 검증자를 위한 것입니다.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/lt.json b/public/locales/lt.json index 2a0fdf57..ab459f65 100644 --- a/public/locales/lt.json +++ b/public/locales/lt.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Išsprendė {{count}} vartotojų", "embed_input": "įvestis", "embed_output": "išvestis", - "embed_cta": "Spręsk WebCoder →" + "embed_cta": "Spręsk WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Autoriaus analitika", + "analytics_approved": "patvirtintų", + "analytics_total": "sukurta", + "analytics_submissions": "pateikimų", + "analytics_acceptance": "AC", + "analytics_no_submissions": "dar nėra pateikimų", + "analytics_solvers": "unikalių sprendėjų", + "analytics_editorials": "su editorialu", + "analytics_bounties": "atvirų premijų", + "drops_title": "Suplanuoti išleidimai", + "drops_empty": "Nieko nesuplanuota — patvirtinti uždaviniai pasirodo iškart.", + "saved_search_name": "Pavadinkite šį filtrų rinkinį…", + "saved_search_save": "Išsaugoti paiešką", + "saved_search_delete": "Ištrinti", + "tools_creators_only": "Šie įrankiai skirti uždavinių kūrėjams ir tikrintojams.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/nl.json b/public/locales/nl.json index 774c5e60..509fede9 100644 --- a/public/locales/nl.json +++ b/public/locales/nl.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Opgelost door {{count}} gebruikers", "embed_input": "in", "embed_output": "uit", - "embed_cta": "Los het op op WebCoder →" + "embed_cta": "Los het op op WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Auteur-analytics", + "analytics_approved": "goedgekeurd", + "analytics_total": "gemaakt", + "analytics_submissions": "inzendingen", + "analytics_acceptance": "AC", + "analytics_no_submissions": "nog geen inzendingen", + "analytics_solvers": "unieke oplossers", + "analytics_editorials": "met editorial", + "analytics_bounties": "open premies", + "drops_title": "Geplande drops", + "drops_empty": "Niets gepland — goedgekeurde problemen verschijnen direct.", + "saved_search_name": "Geef deze filterset een naam…", + "saved_search_save": "Zoekopdracht opslaan", + "saved_search_delete": "Verwijderen", + "tools_creators_only": "Deze tools zijn voor probleemauteurs en -verificateurs.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/pl.json b/public/locales/pl.json index de1658d3..cb8a3fe2 100644 --- a/public/locales/pl.json +++ b/public/locales/pl.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rozwiązane przez {{count}} użytkowników", "embed_input": "wejście", "embed_output": "wyjście", - "embed_cta": "Rozwiąż na WebCoderze →" + "embed_cta": "Rozwiąż na WebCoderze →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analityka autora", + "analytics_approved": "zatwierdzonych", + "analytics_total": "napisanych", + "analytics_submissions": "zgłoszeń", + "analytics_acceptance": "AC", + "analytics_no_submissions": "jeszcze brak zgłoszeń", + "analytics_solvers": "unikalnych rozwiązujących", + "analytics_editorials": "z materiałem", + "analytics_bounties": "otwartych nagród", + "drops_title": "Zaplanowane premiery", + "drops_empty": "Nic nie zaplanowano — zatwierdzone zadania pojawiają się od razu.", + "saved_search_name": "Nazwij ten zestaw filtrów…", + "saved_search_save": "Zapisz wyszukiwanie", + "saved_search_delete": "Usuń", + "tools_creators_only": "Te narzędzia są dla twórców i weryfikatorów zadań.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/pt.json b/public/locales/pt.json index bec83e61..55490a28 100644 --- a/public/locales/pt.json +++ b/public/locales/pt.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resolvido por {{count}} usuários", "embed_input": "entrada", "embed_output": "saída", - "embed_cta": "Resolva no WebCoder →" + "embed_cta": "Resolva no WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analytics de autor", + "analytics_approved": "aprovados", + "analytics_total": "criados", + "analytics_submissions": "envios", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ainda sem envios", + "analytics_solvers": "resolvedores únicos", + "analytics_editorials": "com editorial", + "analytics_bounties": "recompensas abertas", + "drops_title": "Lançamentos programados", + "drops_empty": "Nada programado — problemas aprovados aparecem imediatamente.", + "saved_search_name": "Nomeie este conjunto de filtros…", + "saved_search_save": "Salvar busca", + "saved_search_delete": "Excluir", + "tools_creators_only": "Estas ferramentas são para criadores e verificadores de problemas.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/ro.json b/public/locales/ro.json index 9682142d..52787e04 100644 --- a/public/locales/ro.json +++ b/public/locales/ro.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rezolvată de {{count}} utilizatori", "embed_input": "intrare", "embed_output": "ieșire", - "embed_cta": "Rezolv-o pe WebCoder →" + "embed_cta": "Rezolv-o pe WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Statistici de autor", + "analytics_approved": "aprobate", + "analytics_total": "create", + "analytics_submissions": "trimiteri", + "analytics_acceptance": "AC", + "analytics_no_submissions": "nicio trimitere încă", + "analytics_solvers": "rezolvatori unici", + "analytics_editorials": "cu editorial", + "analytics_bounties": "recompense deschise", + "drops_title": "Lansări programate", + "drops_empty": "Nimic programat — problemele aprobate apar imediat.", + "saved_search_name": "Numește acest set de filtre…", + "saved_search_save": "Salvează căutarea", + "saved_search_delete": "Șterge", + "tools_creators_only": "Aceste unelte sunt pentru creatorii și verificatorii de probleme.", + "nav_author_wizard": "Asistent de creare", + "nav_author_tools": "Unelte autor", + "nav_author_analytics": "Statistici de autor" } diff --git a/public/locales/ru.json b/public/locales/ru.json index 584af387..39fb6928 100644 --- a/public/locales/ru.json +++ b/public/locales/ru.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Решили {{count}} пользователей", "embed_input": "вход", "embed_output": "выход", - "embed_cta": "Решите на WebCoder →" + "embed_cta": "Решите на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Аналитика автора", + "analytics_approved": "одобрено", + "analytics_total": "создано", + "analytics_submissions": "посылок", + "analytics_acceptance": "AC", + "analytics_no_submissions": "посылок пока нет", + "analytics_solvers": "уникальных решателей", + "analytics_editorials": "с разбором", + "analytics_bounties": "открытых наград", + "drops_title": "Запланированные релизы", + "drops_empty": "Ничего не запланировано — одобренные задачи выходят сразу.", + "saved_search_name": "Назовите этот набор фильтров…", + "saved_search_save": "Сохранить поиск", + "saved_search_delete": "Удалить", + "tools_creators_only": "Эти инструменты — для авторов и верификаторов задач.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/sr-Latn.json b/public/locales/sr-Latn.json index 6552f737..82f34196 100644 --- a/public/locales/sr-Latn.json +++ b/public/locales/sr-Latn.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rešilo {{count}} korisnika", "embed_input": "ulaz", "embed_output": "izlaz", - "embed_cta": "Reši na WebCoderu →" + "embed_cta": "Reši na WebCoderu →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitika autora", + "analytics_approved": "odobrenih", + "analytics_total": "napravljeno", + "analytics_submissions": "predaja", + "analytics_acceptance": "AC", + "analytics_no_submissions": "još nema predaja", + "analytics_solvers": "jedinstvenih rešavalaca", + "analytics_editorials": "s editorialom", + "analytics_bounties": "otvorenih nagrada", + "drops_title": "Zakazana objavljivanja", + "drops_empty": "Ništa zakazano — odobreni zadaci odmah izlaze.", + "saved_search_name": "Imenuj ovaj skup filtera…", + "saved_search_save": "Sačuvaj pretragu", + "saved_search_delete": "Izbriši", + "tools_creators_only": "Ovi alati su za autore i verifikatore zadataka.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/th.json b/public/locales/th.json index 8c21607b..e4cef7da 100644 --- a/public/locales/th.json +++ b/public/locales/th.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "แก้แล้วโดย {{count}} ผู้ใช้", "embed_input": "อินพุต", "embed_output": "เอาต์พุต", - "embed_cta": "แก้บน WebCoder →" + "embed_cta": "แก้บน WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "วิเคราะห์ผู้เขียน", + "analytics_approved": "อนุมัติแล้ว", + "analytics_total": "เขียนแล้ว", + "analytics_submissions": "การส่ง", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ยังไม่มีการส่ง", + "analytics_solvers": "ผู้แก้โจทย์๋ร้อย", + "analytics_editorials": "มีเอดิทอเรียล", + "analytics_bounties": "เงินรางวัลที่เปิด", + "drops_title": "การเปิดตามกำหนด", + "drops_empty": "ยังไม่มีกำหนด — โจทย์ที่อนุมัติเปิดทันที", + "saved_search_name": "ตั้งชื่อชุดตัวกรองนี้…", + "saved_search_save": "บันทึกการค้นหา", + "saved_search_delete": "ลบ", + "tools_creators_only": "เครื่องมือเหล่านี้สำหรับผู้เขียนและผู้ตรวจโจทย์", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/tr.json b/public/locales/tr.json index 35bc143e..62a6b7c7 100644 --- a/public/locales/tr.json +++ b/public/locales/tr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} kullanıcı çözdü", "embed_input": "girdi", "embed_output": "çıktı", - "embed_cta": "WebCoder'da çöz →" + "embed_cta": "WebCoder'da çöz →", + "analytics_subtitle": "Yazarlık huniniz: problemler, gönderiler, kapsam ve ödüller.", + "analytics_title": "Yazar analitiği", + "analytics_approved": "onaylı", + "analytics_total": "yazıldı", + "analytics_submissions": "gönderi", + "analytics_acceptance": "AC", + "analytics_no_submissions": "henüz gönderi yok", + "analytics_solvers": "benzersiz çözücü", + "analytics_editorials": "editorial'li", + "analytics_bounties": "açık ödül", + "drops_title": "Planlanan çıkışlar", + "drops_empty": "Planlanan yok — onaylı problemler anında çıkar.", + "saved_search_name": "Bu filtre setine ad ver…", + "saved_search_save": "Aramayı kaydet", + "saved_search_delete": "Sil", + "tools_creators_only": "Bu araçlar problem yazarları ve doğrulayıcıları içindir.", + "nav_author_wizard": "Yazım sihirbazı", + "nav_author_tools": "Yazar araçları", + "nav_author_analytics": "Yazar analitiği" } diff --git a/public/locales/uk.json b/public/locales/uk.json index 0cf0daac..83484fab 100644 --- a/public/locales/uk.json +++ b/public/locales/uk.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Вирішили {{count}} користувачів", "embed_input": "вхід", "embed_output": "вихід", - "embed_cta": "Вирішуйте на WebCoder →" + "embed_cta": "Вирішуйте на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Аналітика автора", + "analytics_approved": "схвалених", + "analytics_total": "створених", + "analytics_submissions": "надсилань", + "analytics_acceptance": "AC", + "analytics_no_submissions": "надсилань ще немає", + "analytics_solvers": "унікальних розв'язувачів", + "analytics_editorials": "з розбором", + "analytics_bounties": "відкритих винагород", + "drops_title": "Заплановані релізи", + "drops_empty": "Нічого не заплановано — схвалені задачі виходять одразу.", + "saved_search_name": "Назвіть цей набір фільтрів…", + "saved_search_save": "Зберегти пошук", + "saved_search_delete": "Видалити", + "tools_creators_only": "Ці інструменти — для авторів і верифікаторів задач.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/vi.json b/public/locales/vi.json index 66cce798..cb7f9745 100644 --- a/public/locales/vi.json +++ b/public/locales/vi.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} người đã giải", "embed_input": "vào", "embed_output": "ra", - "embed_cta": "Giải trên WebCoder →" + "embed_cta": "Giải trên WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Phân tích tác giả", + "analytics_approved": "đã duyệt", + "analytics_total": "đã sáng tác", + "analytics_submissions": "bài nộp", + "analytics_acceptance": "AC", + "analytics_no_submissions": "chưa có bài nộp", + "analytics_solvers": "người giải duy nhất", + "analytics_editorials": "có bản phân tích", + "analytics_bounties": "tiền thưởng mở", + "drops_title": "Bản phát hành theo lịch", + "drops_empty": "Không có lịch — bài đã duyệt phát hành ngay.", + "saved_search_name": "Đặt tên cho bộ lọc này…", + "saved_search_save": "Lưu tìm kiếm", + "saved_search_delete": "Xóa", + "tools_creators_only": "Các công cụ này dành cho người soạn và kiểm duyệt bài.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/zh-Hans.json b/public/locales/zh-Hans.json index 5fe6de75..46715bda 100644 --- a/public/locales/zh-Hans.json +++ b/public/locales/zh-Hans.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} 位用户已解决", "embed_input": "输入", "embed_output": "输出", - "embed_cta": "在 WebCoder 上求解 →" + "embed_cta": "在 WebCoder 上求解 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作者分析", + "analytics_approved": "已通过", + "analytics_total": "已出题", + "analytics_submissions": "提交", + "analytics_acceptance": "AC", + "analytics_no_submissions": "还没有提交", + "analytics_solvers": "位独立解题者", + "analytics_editorials": "有题解", + "analytics_bounties": "个开放悬赏", + "drops_title": "定时发布", + "drops_empty": "没有排期——通过的题目立即发布。", + "saved_search_name": "为这套筛选命名……", + "saved_search_save": "保存搜索", + "saved_search_delete": "删除", + "tools_creators_only": "这些工具面向题目作者与审核者。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/public/locales/zh-Hant.json b/public/locales/zh-Hant.json index 2ca23b09..0434fb83 100644 --- a/public/locales/zh-Hant.json +++ b/public/locales/zh-Hant.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} 位使用者已解決", "embed_input": "輸入", "embed_output": "輸出", - "embed_cta": "在 WebCoder 上求解 →" + "embed_cta": "在 WebCoder 上求解 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作者分析", + "analytics_approved": "已通過", + "analytics_total": "已出題", + "analytics_submissions": "提交", + "analytics_acceptance": "AC", + "analytics_no_submissions": "還沒有提交", + "analytics_solvers": "位獨立解題者", + "analytics_editorials": "有題解", + "analytics_bounties": "個開放懸賞", + "drops_title": "定時發佈", + "drops_empty": "沒有排期——通過的題目立即發佈。", + "saved_search_name": "為這套篩選命名……", + "saved_search_save": "儲存搜尋", + "saved_search_delete": "刪除", + "tools_creators_only": "這些工具面向題目作者與審核者。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/scripts/add-wave-f9-keys.py b/scripts/add-wave-f9-keys.py new file mode 100644 index 00000000..13b6e16f --- /dev/null +++ b/scripts/add-wave-f9-keys.py @@ -0,0 +1,494 @@ +# One-shot: add the wave-F content-ops key family (items 129/131/132) to +# every locale catalog. tr.json patched surgically (CRLF file). +import json +import pathlib +import subprocess + +ROOT = pathlib.Path(__file__).resolve().parent.parent +LOCALES = ROOT / "src" / "locales" + +K = { + "analytics_subtitle": { + "en": "Your authoring funnel: problems, submissions, coverage and bounties." + }, + "analytics_title": { + "en": "Author analytics", + "ro": "Statistici de autor", + "es": "Anal\u00edtica de autor", + "fr": "Statistiques d'auteur", + "de": "Autoren-Analytik", + "pt": "Analytics de autor", + "it": "Analitica autore", + "ca": "Anal\u00edtica d'autor", + "nl": "Auteur-analytics", + "pl": "Analityka autora", + "hu": "Szerz\u0151i statisztika", + "hr": "Analitika autora", + "sr-Latn": "Analitika autora", + "lt": "Autoriaus analitika", + "ru": "\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0430", + "uk": "\u0410\u043d\u0430\u043b\u0456\u0442\u0438\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0430", + "bg": "\u0410\u043d\u0430\u043b\u0438\u0437\u0438 \u0437\u0430 \u0430\u0432\u0442\u043e\u0440\u0430", + "el": "\u0391\u03bd\u03b1\u03bb\u03c5\u03c4\u03b9\u03ba\u03ac \u03c3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ad\u03b1", + "zh-Hans": "\u4f5c\u8005\u5206\u6790", + "zh-Hant": "\u4f5c\u8005\u5206\u6790", + "ja": "\u4f5c\u6210\u8005\u30a2\u30ca\u30ea\u30c6\u30a3\u30af\u30b9", + "ko": "\uc791\uc131\uc790 \ubd84\uc11d", + "hi": "\u0932\u0947\u0916\u0915 \u0935\u093f\u0936\u094d\u0932\u0947\u0937\u0923", + "vi": "Ph\u00e2n t\u00edch t\u00e1c gi\u1ea3", + "th": "\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19", + "id": "Analitik penulis", + "tr": "Yazar analiti\u011fi", + "kk": "\u0410\u0432\u0442\u043e\u0440 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u0441\u044b", + "ar": "\u062a\u062d\u0644\u064a\u0644\u0627\u062a \u0627\u0644\u0645\u0624\u0644\u0641", + "fa": "\u062a\u062d\u0644\u06cc\u0644 \u0646\u0648\u06cc\u0633\u0646\u062f\u0647", + }, + "analytics_approved": { + "en": "approved", + "ro": "aprobate", + "es": "aprobados", + "fr": "approuv\u00e9s", + "de": "genehmigt", + "pt": "aprovados", + "it": "approvati", + "ca": "aprovats", + "nl": "goedgekeurd", + "pl": "zatwierdzonych", + "hu": "j\u00f3v\u00e1hagyott", + "hr": "odobrenih", + "sr-Latn": "odobrenih", + "lt": "patvirtint\u0173", + "ru": "\u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043e", + "uk": "\u0441\u0445\u0432\u0430\u043b\u0435\u043d\u0438\u0445", + "bg": "\u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438", + "el": "\u03b5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03b1", + "zh-Hans": "\u5df2\u901a\u8fc7", + "zh-Hant": "\u5df2\u901a\u904e", + "ja": "\u627f\u8a8d\u6e08\u307f", + "ko": "\uc2b9\uc778\ub428", + "hi": "\u0938\u094d\u0935\u0940\u0915\u0943\u0924", + "vi": "\u0111\u00e3 duy\u1ec7t", + "th": "\u0e2d\u0e19\u0e38\u0e21\u0e31\u0e15\u0e34\u0e41\u0e25\u0e49\u0e27", + "id": "disetujui", + "tr": "onayl\u0131", + "kk": "\u043c\u0430\u049b\u04b1\u043b\u0434\u0430\u043d\u0493\u0430\u043d", + "ar": "\u0645\u0639\u062a\u0645\u062f\u0629", + "fa": "\u062a\u0623\u06cc\u06cc\u062f\u0634\u062f\u0647", + }, + "analytics_total": { + "en": "authored", + "ro": "create", + "es": "creados", + "fr": "cr\u00e9\u00e9s", + "de": "erstellt", + "pt": "criados", + "it": "creati", + "ca": "creats", + "nl": "gemaakt", + "pl": "napisanych", + "hu": "k\u00e9sz\u00edtett", + "hr": "napravljeno", + "sr-Latn": "napravljeno", + "lt": "sukurta", + "ru": "\u0441\u043e\u0437\u0434\u0430\u043d\u043e", + "uk": "\u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0445", + "bg": "\u0441\u044a\u0437\u0434\u0430\u0434\u0435\u043d\u0438", + "el": "\u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03b8\u03b7\u03ba\u03b1\u03bd", + "zh-Hans": "\u5df2\u51fa\u9898", + "zh-Hant": "\u5df2\u51fa\u984c", + "ja": "\u4f5c\u6210", + "ko": "\uc791\uc131", + "hi": "\u0932\u093f\u0916\u0947", + "vi": "\u0111\u00e3 s\u00e1ng t\u00e1c", + "th": "\u0e40\u0e02\u0e35\u0e22\u0e19\u0e41\u0e25\u0e49\u0e27", + "id": "ditulis", + "tr": "yaz\u0131ld\u0131", + "kk": "\u0436\u0430\u0437\u044b\u043b\u0493\u0430\u043d", + "ar": "\u0645\u0624\u0644\u0641\u0629", + "fa": "\u0646\u06af\u0627\u0634\u062a\u0647", + }, + "analytics_submissions": { + "en": "submissions", + "ro": "trimiteri", + "es": "env\u00edos", + "fr": "soumissions", + "de": "Einreichungen", + "pt": "envios", + "it": "invii", + "ca": "enviaments", + "nl": "inzendingen", + "pl": "zg\u0142osze\u0144", + "hu": "bek\u00fcld\u00e9s", + "hr": "predaja", + "sr-Latn": "predaja", + "lt": "pateikim\u0173", + "ru": "\u043f\u043e\u0441\u044b\u043b\u043e\u043a", + "uk": "\u043d\u0430\u0434\u0441\u0438\u043b\u0430\u043d\u044c", + "bg": "\u0438\u0437\u043f\u0440\u0430\u0449\u0430\u043d\u0438\u044f", + "el": "\u03c5\u03c0\u03bf\u03b2\u03bf\u03bb\u03ad\u03c2", + "zh-Hans": "\u63d0\u4ea4", + "zh-Hant": "\u63d0\u4ea4", + "ja": "\u63d0\u51fa", + "ko": "\uc81c\ucd9c", + "hi": "\u0938\u092c\u092e\u093f\u0936\u0928", + "vi": "b\u00e0i n\u1ed9p", + "th": "\u0e01\u0e32\u0e23\u0e2a\u0e48\u0e07", + "id": "kiriman", + "tr": "g\u00f6nderi", + "kk": "\u0436\u0456\u0431\u0435\u0440\u0456\u043b\u0456\u043c", + "ar": "\u0625\u0631\u0633\u0627\u0644\u064a\u0627\u062a", + "fa": "\u0627\u0631\u0633\u0627\u0644\u200c\u0647\u0627", + }, + "analytics_acceptance": {"en": "AC"}, + "analytics_no_submissions": { + "en": "no submissions yet", + "ro": "nicio trimitere \u00eenc\u0103", + "es": "a\u00fan sin env\u00edos", + "fr": "pas encore de soumissions", + "de": "noch keine Einreichungen", + "pt": "ainda sem envios", + "it": "ancora nessun invio", + "ca": "encara sense enviaments", + "nl": "nog geen inzendingen", + "pl": "jeszcze brak zg\u0142osze\u0144", + "hu": "m\u00e9g nincs bek\u00fcld\u00e9s", + "hr": "jo\u0161 nema predaja", + "sr-Latn": "jo\u0161 nema predaja", + "lt": "dar n\u0117ra pateikim\u0173", + "ru": "\u043f\u043e\u0441\u044b\u043b\u043e\u043a \u043f\u043e\u043a\u0430 \u043d\u0435\u0442", + "uk": "\u043d\u0430\u0434\u0441\u0438\u043b\u0430\u043d\u044c \u0449\u0435 \u043d\u0435\u043c\u0430\u0454", + "bg": "\u043e\u0449\u0435 \u043d\u044f\u043c\u0430 \u0438\u0437\u043f\u0440\u0430\u0449\u0430\u043d\u0438\u044f", + "el": "\u03ba\u03b1\u03bc\u03af\u03b1 \u03c5\u03c0\u03bf\u03b2\u03bf\u03bb\u03ae \u03b1\u03ba\u03cc\u03bc\u03b7", + "zh-Hans": "\u8fd8\u6ca1\u6709\u63d0\u4ea4", + "zh-Hant": "\u9084\u6c92\u6709\u63d0\u4ea4", + "ja": "\u307e\u3060\u63d0\u51fa\u306f\u3042\u308a\u307e\u305b\u3093", + "ko": "\uc544\uc9c1 \uc81c\ucd9c \uc5c6\uc74c", + "hi": "\u0905\u092d\u0940 \u0915\u094b\u0908 \u0938\u092c\u092e\u093f\u0936\u0928 \u0928\u0939\u0940\u0902", + "vi": "ch\u01b0a c\u00f3 b\u00e0i n\u1ed9p", + "th": "\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e2a\u0e48\u0e07", + "id": "belum ada kiriman", + "tr": "hen\u00fcz g\u00f6nderi yok", + "kk": "\u04d9\u0437\u0456\u0440\u0433\u0435 \u0436\u0456\u0431\u0435\u0440\u0456\u043b\u0456\u043c \u0436\u043e\u049b", + "ar": "\u0644\u0627 \u0625\u0631\u0633\u0627\u0644\u064a\u0627\u062a \u0628\u0639\u062f", + "fa": "\u0647\u0646\u0648\u0632 \u0627\u0631\u0633\u0627\u0644\u06cc \u0646\u06cc\u0633\u062a", + }, + "analytics_solvers": { + "en": "unique solvers", + "ro": "rezolvatori unici", + "es": "resolvedores \u00fanicos", + "fr": "r\u00e9solveurs uniques", + "de": "einzelne L\u00f6ser", + "pt": "resolvedores \u00fanicos", + "it": "risolutori unici", + "ca": "resolvedors \u00fanics", + "nl": "unieke oplossers", + "pl": "unikalnych rozwi\u0105zuj\u0105cych", + "hu": "egyedi megold\u00f3k", + "hr": "jedinstvenih rje\u0161avatelja", + "sr-Latn": "jedinstvenih re\u0161avalaca", + "lt": "unikali\u0173 sprend\u0117j\u0173", + "ru": "\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0448\u0430\u0442\u0435\u043b\u0435\u0439", + "uk": "\u0443\u043d\u0456\u043a\u0430\u043b\u044c\u043d\u0438\u0445 \u0440\u043e\u0437\u0432'\u044f\u0437\u0443\u0432\u0430\u0447\u0456\u0432", + "bg": "\u0443\u043d\u0438\u043a\u0430\u043b\u043d\u0438 \u0440\u0435\u0448\u0438\u0442\u0435\u043b\u0438", + "el": "\u03bc\u03bf\u03bd\u03b1\u03b4\u03b9\u03ba\u03bf\u03af \u03bb\u03cd\u03c4\u03b5\u03c2", + "zh-Hans": "\u4f4d\u72ec\u7acb\u89e3\u9898\u8005", + "zh-Hant": "\u4f4d\u7368\u7acb\u89e3\u984c\u8005", + "ja": "\u4eba\u306e\u89e3\u7b54\u8005", + "ko": "\uba85\uc758 \ud574\uacb0\uc790", + "hi": "\u0905\u0926\u094d\u0935\u093f\u0924\u0940\u092f \u0939\u0932 \u0915\u0930\u094d\u0924\u093e", + "vi": "ng\u01b0\u1eddi gi\u1ea3i duy nh\u1ea5t", + "th": "\u0e1c\u0e39\u0e49\u0e41\u0e01\u0e49\u0e42\u0e08\u0e17\u0e22\u0e4c\u0e4b\u0e23\u0e49\u0e2d\u0e22", + "id": "penyelesai unik", + "tr": "benzersiz \u00e7\u00f6z\u00fcc\u00fc", + "kk": "\u0431\u0456\u0440\u0435\u0433\u0435\u0439 \u0448\u0435\u0448\u0443\u0448\u0456", + "ar": "\u062d\u0644\u0648\u0644 \u0641\u0631\u064a\u062f\u0648\u0646", + "fa": "\u062d\u0644\u200c\u06a9\u0646\u0646\u062f\u0647 \u06cc\u06a9\u062a\u0627", + }, + "analytics_editorials": { + "en": "with editorial", + "ro": "cu editorial", + "es": "con editorial", + "fr": "avec \u00e9ditorial", + "de": "mit Editorial", + "pt": "com editorial", + "it": "con editoriale", + "ca": "amb editorial", + "nl": "met editorial", + "pl": "z materia\u0142em", + "hu": "szerkeszt\u0151s\u00e9gi anyaggal", + "hr": "s editorijalom", + "sr-Latn": "s editorialom", + "lt": "su editorialu", + "ru": "\u0441 \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c", + "uk": "\u0437 \u0440\u043e\u0437\u0431\u043e\u0440\u043e\u043c", + "bg": "\u0441 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u043e\u043d\u0435\u043d \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b", + "el": "\u03bc\u03b5 \u03b1\u03bd\u03ac\u03bb\u03c5\u03c3\u03b7", + "zh-Hans": "\u6709\u9898\u89e3", + "zh-Hant": "\u6709\u984c\u89e3", + "ja": "\u89e3\u8aac\u3042\u308a", + "ko": "\uc5d0\ub514\ud1a0\ub9ac\uc5bc \uc788\uc74c", + "hi": "\u090f\u0921\u093f\u091f\u094b\u0930\u093f\u092f\u0932 \u0915\u0947 \u0938\u093e\u0925", + "vi": "c\u00f3 b\u1ea3n ph\u00e2n t\u00edch", + "th": "\u0e21\u0e35\u0e40\u0e2d\u0e14\u0e34\u0e17\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e25", + "id": "dengan editorial", + "tr": "editorial'li", + "kk": "\u044d\u0434\u0438\u0442\u043e\u0440\u043b\u044b\u043c\u0435\u043d", + "ar": "\u0645\u0639 \u062a\u062d\u0631\u064a\u0631", + "fa": "\u0628\u0627 \u062a\u062d\u0644\u06cc\u0644", + }, + "analytics_bounties": { + "en": "open bounties", + "ro": "recompense deschise", + "es": "recompensas abiertas", + "fr": "primes ouvertes", + "de": "offene Pr\u00e4mien", + "pt": "recompensas abertas", + "it": "taglie aperte", + "ca": "recompenses obertes", + "nl": "open premies", + "pl": "otwartych nagr\u00f3d", + "hu": "nyitott jutalmak", + "hr": "otvorenih nagrada", + "sr-Latn": "otvorenih nagrada", + "lt": "atvir\u0173 premij\u0173", + "ru": "\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043d\u0430\u0433\u0440\u0430\u0434", + "uk": "\u0432\u0456\u0434\u043a\u0440\u0438\u0442\u0438\u0445 \u0432\u0438\u043d\u0430\u0433\u043e\u0440\u043e\u0434", + "bg": "\u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0438 \u043d\u0430\u0433\u0440\u0430\u0434\u0438", + "el": "\u03b1\u03bd\u03bf\u03b9\u03c7\u03c4\u03ad\u03c2 \u03b1\u03bc\u03bf\u03b9\u03b2\u03ad\u03c2", + "zh-Hans": "\u4e2a\u5f00\u653e\u60ac\u8d4f", + "zh-Hant": "\u500b\u958b\u653e\u61f8\u8cde", + "ja": "\u4ef6\u306e\u30aa\u30fc\u30d7\u30f3\u58b1\u7341", + "ko": "\uac74\uc758 \uc5f4\ub9b0 \ud604\uc0c1\uae08", + "hi": "\u0916\u0941\u0932\u0947 \u0907\u0928\u093e\u092e", + "vi": "ti\u1ec1n th\u01b0\u1edfng m\u1edf", + "th": "\u0e40\u0e07\u0e34\u0e19\u0e23\u0e32\u0e07\u0e27\u0e31\u0e25\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e34\u0e14", + "id": "hadiah terbuka", + "tr": "a\u00e7\u0131k \u00f6d\u00fcl", + "kk": "\u0430\u0448\u044b\u049b \u0441\u044b\u0439\u0430\u049b\u044b", + "ar": "\u0645\u0643\u0627\u0641\u0622\u062a \u0645\u0641\u062a\u0648\u062d\u0629", + "fa": "\u062c\u0627\u06cc\u0632\u0647 \u0628\u0627\u0632", + }, + "drops_title": { + "en": "Scheduled drops", + "ro": "Lans\u0103ri programate", + "es": "Lanzamientos programados", + "fr": "Sorties programm\u00e9es", + "de": "Geplante Drops", + "pt": "Lan\u00e7amentos programados", + "it": "Rilasci programmati", + "ca": "Llan\u00e7aments programats", + "nl": "Geplande drops", + "pl": "Zaplanowane premiery", + "hu": "\u00dctemezett megjelen\u00e9sek", + "hr": "Zakazana objavljivanja", + "sr-Latn": "Zakazana objavljivanja", + "lt": "Suplanuoti i\u0161leidimai", + "ru": "\u0417\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044b", + "uk": "\u0417\u0430\u043f\u043b\u0430\u043d\u043e\u0432\u0430\u043d\u0456 \u0440\u0435\u043b\u0456\u0437\u0438", + "bg": "\u041f\u043b\u0430\u043d\u0438\u0440\u0430\u043d\u0438 \u0438\u0437\u043b\u0438\u0437\u0430\u043d\u0438\u044f", + "el": "\u03a0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03ad\u03bd\u03b5\u03c2 \u03ba\u03c5\u03ba\u03bb\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2", + "zh-Hans": "\u5b9a\u65f6\u53d1\u5e03", + "zh-Hant": "\u5b9a\u6642\u767c\u4f48", + "ja": "\u4e88\u7d04\u30ea\u30ea\u30fc\u30b9", + "ko": "\uc608\uc57d \uacf5\uac1c", + "hi": "\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0930\u093f\u0932\u0940\u095b\u093c", + "vi": "B\u1ea3n ph\u00e1t h\u00e0nh theo l\u1ecbch", + "th": "\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e34\u0e14\u0e15\u0e32\u0e21\u0e01\u0e33\u0e2b\u0e19\u0e14", + "id": "Rilis terjadwal", + "tr": "Planlanan \u00e7\u0131k\u0131\u015flar", + "kk": "\u0416\u043e\u0441\u043f\u0430\u0440\u043b\u0430\u043d\u0493\u0430\u043d \u0448\u044b\u0493\u0430\u0440\u044b\u043b\u044b\u043c\u0434\u0430\u0440", + "ar": "\u0625\u0635\u062f\u0627\u0631\u0627\u062a \u0645\u062c\u062f\u0648\u0644\u0629", + "fa": "\u0627\u0646\u062a\u0634\u0627\u0631\u0647\u0627\u06cc \u0632\u0645\u0627\u0646\u200c\u0628\u0646\u062f\u06cc\u200c\u0634\u062f\u0647", + }, + "drops_empty": { + "en": "Nothing scheduled \u2014 approved problems drop immediately.", + "ro": "Nimic programat \u2014 problemele aprobate apar imediat.", + "es": "Nada programado \u2014 los problemas aprobados aparecen de inmediato.", + "fr": "Rien de programm\u00e9 \u2014 les probl\u00e8mes approuv\u00e9s sortent imm\u00e9diatement.", + "de": "Nichts geplant \u2014 genehmigte Aufgaben erscheinen sofort.", + "pt": "Nada programado \u2014 problemas aprovados aparecem imediatamente.", + "it": "Niente di programmato \u2014 i problemi approvati escono subito.", + "ca": "Res programat \u2014 els problemes aprovats surten immediatament.", + "nl": "Niets gepland \u2014 goedgekeurde problemen verschijnen direct.", + "pl": "Nic nie zaplanowano \u2014 zatwierdzone zadania pojawiaj\u0105 si\u0119 od razu.", + "hu": "Nincs \u00fctemezve \u2014 a j\u00f3v\u00e1hagyott feladatok azonnal megjelennek.", + "hr": "Ni\u0161ta zakazano \u2014 odobreni zadaci odmah izlaze.", + "sr-Latn": "Ni\u0161ta zakazano \u2014 odobreni zadaci odmah izlaze.", + "lt": "Nieko nesuplanuota \u2014 patvirtinti u\u017edaviniai pasirodo i\u0161kart.", + "ru": "\u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u2014 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441\u0440\u0430\u0437\u0443.", + "uk": "\u041d\u0456\u0447\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u043b\u0430\u043d\u043e\u0432\u0430\u043d\u043e \u2014 \u0441\u0445\u0432\u0430\u043b\u0435\u043d\u0456 \u0437\u0430\u0434\u0430\u0447\u0456 \u0432\u0438\u0445\u043e\u0434\u044f\u0442\u044c \u043e\u0434\u0440\u0430\u0437\u0443.", + "bg": "\u041d\u0438\u0449\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u0430\u043d\u043e \u2014 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u0437\u043b\u0438\u0437\u0430\u0442 \u0432\u0435\u0434\u043d\u0430\u0433\u0430.", + "el": "\u03a4\u03af\u03c0\u03bf\u03c4\u03b1 \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf \u2014 \u03bf\u03b9 \u03b5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03b5\u03c2 \u03b1\u03c3\u03ba\u03ae\u03c3\u03b5\u03b9\u03c2 \u03b2\u03b3\u03b1\u03af\u03bd\u03bf\u03c5\u03bd \u03b1\u03bc\u03ad\u03c3\u03c9\u03c2.", + "zh-Hans": "\u6ca1\u6709\u6392\u671f\u2014\u2014\u901a\u8fc7\u7684\u9898\u76ee\u7acb\u5373\u53d1\u5e03\u3002", + "zh-Hant": "\u6c92\u6709\u6392\u671f\u2014\u2014\u901a\u904e\u7684\u984c\u76ee\u7acb\u5373\u767c\u4f48\u3002", + "ja": "\u4e88\u7d04\u306f\u3042\u308a\u307e\u305b\u3093 \u2014 \u627f\u8a8d\u6e08\u307f\u554f\u984c\u306f\u5373\u6642\u516c\u958b\u3055\u308c\u307e\u3059\u3002", + "ko": "\uc608\uc57d \uc5c6\uc74c \u2014 \uc2b9\uc778\ub41c \ubb38\uc81c\ub294 \uc989\uc2dc \uacf5\uac1c\ub429\ub2c8\ub2e4.", + "hi": "\u0915\u0941\u091b \u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0928\u0939\u0940\u0902 \u2014 \u0938\u094d\u0935\u0940\u0915\u0943\u0924 \u092a\u094d\u0930\u0949\u092c\u094d\u0932\u092e \u0924\u0941\u0930\u0902\u0924 \u0906\u0924\u0947 \u0939\u0948\u0902\u0964", + "vi": "Kh\u00f4ng c\u00f3 l\u1ecbch \u2014 b\u00e0i \u0111\u00e3 duy\u1ec7t ph\u00e1t h\u00e0nh ngay.", + "th": "\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e33\u0e2b\u0e19\u0e14 \u2014 \u0e42\u0e08\u0e17\u0e22\u0e4c\u0e17\u0e35\u0e48\u0e2d\u0e19\u0e38\u0e21\u0e31\u0e15\u0e34\u0e40\u0e1b\u0e34\u0e14\u0e17\u0e31\u0e19\u0e17\u0e35", + "id": "Tidak ada jadwal \u2014 soal disetujui langsung tayang.", + "tr": "Planlanan yok \u2014 onayl\u0131 problemler an\u0131nda \u00e7\u0131kar.", + "kk": "\u0416\u043e\u0441\u043f\u0430\u0440 \u0436\u043e\u049b \u2014 \u043c\u0430\u049b\u04b1\u043b\u0434\u0430\u043d\u0493\u0430\u043d \u0435\u0441\u0435\u043f\u0442\u0435\u0440 \u0434\u0435\u0440\u0435\u0443 \u0448\u044b\u0493\u0430\u0434\u044b.", + "ar": "\u0644\u0627 \u0634\u064a\u0621 \u0645\u062c\u062f\u0648\u0644 \u2014 \u0627\u0644\u0645\u0633\u0627\u0626\u0644 \u0627\u0644\u0645\u0639\u062a\u0645\u062f\u0629 \u062a\u0638\u0647\u0631 \u0641\u0648\u0631\u064b\u0627.", + "fa": "\u0686\u06cc\u0632\u06cc \u0632\u0645\u0627\u0646\u200c\u0628\u0646\u062f\u06cc \u0646\u0634\u062f\u0647 \u2014 \u0645\u0633\u0626\u0644\u0647\u200c\u0647\u0627\u06cc \u062a\u0623\u06cc\u06cc\u062f\u0634\u062f\u0647 \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u0645\u0646\u062a\u0634\u0631 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f.", + }, + "saved_search_name": { + "en": "Name this filter set\u2026", + "ro": "Nume\u0219te acest set de filtre\u2026", + "es": "Nombra este conjunto de filtros\u2026", + "fr": "Nommez ce filtre\u2026", + "de": "Diesen Filtersatz benennen\u2026", + "pt": "Nomeie este conjunto de filtros\u2026", + "it": "Dai un nome a questi filtri\u2026", + "ca": "Anomena aquest conjunt de filtres\u2026", + "nl": "Geef deze filterset een naam\u2026", + "pl": "Nazwij ten zestaw filtr\u00f3w\u2026", + "hu": "Nevezd el ezt a sz\u0171r\u0151k\u00e9szletet\u2026", + "hr": "Imenuj ovaj skup filtara\u2026", + "sr-Latn": "Imenuj ovaj skup filtera\u2026", + "lt": "Pavadinkite \u0161\u012f filtr\u0173 rinkin\u012f\u2026", + "ru": "\u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u2026", + "uk": "\u041d\u0430\u0437\u0432\u0456\u0442\u044c \u0446\u0435\u0439 \u043d\u0430\u0431\u0456\u0440 \u0444\u0456\u043b\u044c\u0442\u0440\u0456\u0432\u2026", + "bg": "\u0418\u043c\u0435\u043d\u0443\u0432\u0430\u0439\u0442\u0435 \u0442\u043e\u0437\u0438 \u043d\u0430\u0431\u043e\u0440 \u043e\u0442 \u0444\u0438\u043b\u0442\u0440\u0438\u2026", + "el": "\u039f\u03bd\u03bf\u03bc\u03ac\u03c3\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c3\u03cd\u03bd\u03bf\u03bb\u03bf \u03c6\u03af\u03bb\u03c4\u03c1\u03c9\u03bd\u2026", + "zh-Hans": "\u4e3a\u8fd9\u5957\u7b5b\u9009\u547d\u540d\u2026\u2026", + "zh-Hant": "\u70ba\u9019\u5957\u7be9\u9078\u547d\u540d\u2026\u2026", + "ja": "\u3053\u306e\u30d5\u30a3\u30eb\u30bf\u30bb\u30c3\u30c8\u306b\u540d\u524d\u3092\u2026", + "ko": "\uc774 \ud544\ud130 \uc138\ud2b8\uc758 \uc774\ub984\u2026", + "hi": "\u0907\u0938 \u092b\u093c\u093f\u0932\u094d\u091f\u0930 \u0938\u0947\u091f \u0915\u093e \u0928\u093e\u092e \u0926\u0947\u0902\u2026", + "vi": "\u0110\u1eb7t t\u00ean cho b\u1ed9 l\u1ecdc n\u00e0y\u2026", + "th": "\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d\u0e0a\u0e38\u0e14\u0e15\u0e31\u0e27\u0e01\u0e23\u0e2d\u0e07\u0e19\u0e35\u0e49\u2026", + "id": "Beri nama set filter ini\u2026", + "tr": "Bu filtre setine ad ver\u2026", + "kk": "\u0411\u04b1\u043b \u0444\u0438\u043b\u044c\u0442\u0440\u043b\u0435\u0440 \u0436\u0438\u044b\u043d\u044b\u043d \u0430\u0442\u0430\u04a3\u044b\u0437\u2026", + "ar": "\u0633\u0645\u0651 \u0645\u062c\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u0631\u0634\u062d\u0627\u062a \u0647\u0630\u0647\u2026", + "fa": "\u0646\u0627\u0645 \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u0641\u06cc\u0644\u062a\u0631\u2026", + }, + "saved_search_save": { + "en": "Save search", + "ro": "Salveaz\u0103 c\u0103utarea", + "es": "Guardar b\u00fasqueda", + "fr": "Enregistrer la recherche", + "de": "Suche speichern", + "pt": "Salvar busca", + "it": "Salva ricerca", + "ca": "Desa la cerca", + "nl": "Zoekopdracht opslaan", + "pl": "Zapisz wyszukiwanie", + "hu": "Keres\u00e9s ment\u00e9se", + "hr": "Spremi pretragu", + "sr-Latn": "Sa\u010duvaj pretragu", + "lt": "I\u0161saugoti paie\u0161k\u0105", + "ru": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a", + "uk": "\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u043f\u043e\u0448\u0443\u043a", + "bg": "\u0417\u0430\u043f\u0430\u0437\u0438 \u0442\u044a\u0440\u0441\u0435\u043d\u0435\u0442\u043e", + "el": "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03b1\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7\u03c2", + "zh-Hans": "\u4fdd\u5b58\u641c\u7d22", + "zh-Hant": "\u5132\u5b58\u641c\u5c0b", + "ja": "\u691c\u7d22\u3092\u4fdd\u5b58", + "ko": "\uac80\uc0c9 \uc800\uc7a5", + "hi": "\u0916\u094b\u091c \u0938\u0939\u0947\u091c\u0947\u0902", + "vi": "L\u01b0u t\u00ecm ki\u1ebfm", + "th": "\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32", + "id": "Simpan pencarian", + "tr": "Aramay\u0131 kaydet", + "kk": "\u0406\u0437\u0434\u0435\u0443\u0434\u0456 \u0441\u0430\u049b\u0442\u0430\u0443", + "ar": "\u0627\u062d\u0641\u0638 \u0627\u0644\u0628\u062d\u062b", + "fa": "\u0630\u062e\u06cc\u0631\u0647 \u062c\u0633\u062a\u062c\u0648", + }, + "saved_search_delete": { + "en": "Delete", + "ro": "\u0218terge", + "es": "Eliminar", + "fr": "Supprimer", + "de": "L\u00f6schen", + "pt": "Excluir", + "it": "Elimina", + "ca": "Suprimeix", + "nl": "Verwijderen", + "pl": "Usu\u0144", + "hu": "T\u00f6rl\u00e9s", + "hr": "Izbri\u0161i", + "sr-Latn": "Izbri\u0161i", + "lt": "I\u0161trinti", + "ru": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c", + "uk": "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438", + "bg": "\u0418\u0437\u0442\u0440\u0438\u0439", + "el": "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae", + "zh-Hans": "\u5220\u9664", + "zh-Hant": "\u522a\u9664", + "ja": "\u524a\u9664", + "ko": "\uc0ad\uc81c", + "hi": "\u0939\u091f\u093e\u090f\u0901", + "vi": "X\u00f3a", + "th": "\u0e25\u0e1a", + "id": "Hapus", + "tr": "Sil", + "kk": "\u0416\u043e\u044e", + "ar": "\u062d\u0630\u0641", + "fa": "\u062d\u0630\u0641", + }, + "tools_creators_only": { + "en": "These tools are for problem creators and verifiers.", + "ro": "Aceste unelte sunt pentru creatorii \u0219i verificatorii de probleme.", + "es": "Estas herramientas son para creadores y verificadores de problemas.", + "fr": "Ces outils sont pour les auteurs et v\u00e9rificateurs de probl\u00e8mes.", + "de": "Diese Tools sind f\u00fcr Aufgabenautoren und -verifizierer.", + "pt": "Estas ferramentas s\u00e3o para criadores e verificadores de problemas.", + "it": "Questi strumenti sono per autori e verificatori di problemi.", + "ca": "Aquestes eines s\u00f3n per a creadors i verificadors de problemes.", + "nl": "Deze tools zijn voor probleemauteurs en -verificateurs.", + "pl": "Te narz\u0119dzia s\u0105 dla tw\u00f3rc\u00f3w i weryfikator\u00f3w zada\u0144.", + "hu": "Ezek az eszk\u00f6z\u00f6k feladatszerz\u0151knek \u00e9s -ellen\u0151r\u00f6knek sz\u00f3lnak.", + "hr": "Ovi su alati za autore i verifikatore zadataka.", + "sr-Latn": "Ovi alati su za autore i verifikatore zadataka.", + "lt": "\u0160ie \u012frankiai skirti u\u017edavini\u0173 k\u016br\u0117jams ir tikrintojams.", + "ru": "\u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u2014 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430\u0434\u0430\u0447.", + "uk": "\u0426\u0456 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438 \u2014 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0456\u0432 \u0456 \u0432\u0435\u0440\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440\u0456\u0432 \u0437\u0430\u0434\u0430\u0447.", + "bg": "\u0422\u0435\u0437\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438 \u0441\u0430 \u0437\u0430 \u0441\u044a\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u0438 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.", + "el": "\u0391\u03c5\u03c4\u03ac \u03c4\u03b1 \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b3\u03b9\u03b1 \u03c3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03b5\u03af\u03c2 \u03ba\u03b1\u03b9 \u03b5\u03bb\u03b5\u03b3\u03ba\u03c4\u03ad\u03c2 \u03b1\u03c3\u03ba\u03ae\u03c3\u03b5\u03c9\u03bd.", + "zh-Hans": "\u8fd9\u4e9b\u5de5\u5177\u9762\u5411\u9898\u76ee\u4f5c\u8005\u4e0e\u5ba1\u6838\u8005\u3002", + "zh-Hant": "\u9019\u4e9b\u5de5\u5177\u9762\u5411\u984c\u76ee\u4f5c\u8005\u8207\u5be9\u6838\u8005\u3002", + "ja": "\u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u306f\u554f\u984c\u4f5c\u6210\u8005\u3068\u691c\u8a3c\u8005\u5411\u3051\u3067\u3059\u3002", + "ko": "\uc774 \ub3c4\uad6c\ub294 \ubb38\uc81c \uc791\uc131\uc790\uc640 \uac80\uc99d\uc790\ub97c \uc704\ud55c \uac83\uc785\ub2c8\ub2e4.", + "hi": "\u092f\u0947 \u0909\u092a\u0915\u0930\u0923 \u092a\u094d\u0930\u0949\u092c\u094d\u0932\u092e \u0932\u0947\u0916\u0915\u094b\u0902 \u0914\u0930 \u0938\u0924\u094d\u092f\u093e\u092a\u0915\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0939\u0948\u0902\u0964", + "vi": "C\u00e1c c\u00f4ng c\u1ee5 n\u00e0y d\u00e0nh cho ng\u01b0\u1eddi so\u1ea1n v\u00e0 ki\u1ec3m duy\u1ec7t b\u00e0i.", + "th": "\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e21\u0e37\u0e2d\u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e1c\u0e39\u0e49\u0e15\u0e23\u0e27\u0e08\u0e42\u0e08\u0e17\u0e22\u0e4c", + "id": "Alat ini untuk pembuat dan verifikator soal.", + "tr": "Bu ara\u00e7lar problem yazarlar\u0131 ve do\u011frulay\u0131c\u0131lar\u0131 i\u00e7indir.", + "kk": "\u0411\u04b1\u043b \u049b\u04b1\u0440\u0430\u043b\u0434\u0430\u0440 \u0430\u0432\u0442\u043e\u0440\u043b\u0430\u0440 \u043c\u0435\u043d \u0442\u0435\u043a\u0441\u0435\u0440\u0443\u0448\u0456\u043b\u0435\u0440\u0433\u0435 \u0430\u0440\u043d\u0430\u043b\u0493\u0430\u043d.", + "ar": "\u0647\u0630\u0647 \u0627\u0644\u0623\u062f\u0648\u0627\u062a \u0644\u0645\u0624\u0644\u0641\u064a \u0627\u0644\u0645\u0633\u0627\u0626\u0644 \u0648\u0627\u0644\u0645\u062f\u0642\u0642\u064a\u0646.", + "fa": "\u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631\u0647\u0627 \u0628\u0631\u0627\u06cc \u0646\u0648\u06cc\u0633\u0646\u062f\u06af\u0627\u0646 \u0648 \u0631\u0627\u0633\u062a\u06cc\u200c\u0622\u0632\u0645\u0627\u06cc\u0627\u0646 \u0645\u0633\u0626\u0644\u0647 \u0627\u0633\u062a.", + }, +} + +for path in sorted(LOCALES.glob("*.json")): + locale = path.stem + catalog = json.loads(path.read_text(encoding="utf-8")) + fresh = {} + for key, translations in K.items(): + if key not in catalog: + fresh[key] = translations.get(locale, translations["en"]) + if not fresh: + continue + if locale == "tr": + raw = subprocess.run( + ["git", "show", f"origin/main:{path.relative_to(ROOT).as_posix()}"], + capture_output=True, + check=True, + cwd=ROOT, + ).stdout.decode("utf-8") + block = ",\r\n".join( + f" {json.dumps(k, ensure_ascii=False)}: {json.dumps(v, ensure_ascii=False)}" + for k, v in fresh.items() + ) + body = raw.rstrip() + inner = body[:-1].rstrip() + path.write_bytes((inner + ",\r\n" + block + "\r\n}\r\n").encode("utf-8")) + else: + catalog.update(fresh) + path.write_text( + json.dumps(catalog, ensure_ascii=False, indent=2) + "\n", encoding="utf-8" + ) + print(f"updated {locale}") +print("done") diff --git a/src/app/author/ContentOps.test.tsx b/src/app/author/ContentOps.test.tsx new file mode 100644 index 00000000..de097954 --- /dev/null +++ b/src/app/author/ContentOps.test.tsx @@ -0,0 +1,139 @@ +import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'; +import { render, screen, fireEvent, waitFor, cleanup } from '@testing-library/react'; +import AuthorAnalyticsPage from '@/app/author/analytics/page'; +import SavedSearchesStrip from '@/app/problems/SavedSearchesStrip'; +import type { User } from '@/types'; + +// Wave F items 129/131/132 — the analytics dashboard and the saved-search strip. + +const api = vi.hoisted(() => ({ + getAuthorAnalytics: vi.fn(), + getDrops: vi.fn(), + listSavedSearches: vi.fn(), + saveSavedSearch: vi.fn(), + deleteSavedSearch: vi.fn(), +})); + +vi.mock('@/services/ApiService', () => ({ + ProblemService: api, +})); + +const mocks = vi.hoisted(() => ({ + auth: { + isAuthenticated: true, + user: { id: 1, username: 'author', email: 'a@x.com', role: 'PROBLEM_CREATOR' } as User | null, + login: vi.fn(), + logout: vi.fn(), + }, + push: vi.fn(), +})); + +vi.mock('@/context/AuthContext', () => ({ + useAuth: () => mocks.auth, + AuthContext: { + Provider: ({ children }: { children: React.ReactNode }) => children, + Consumer: ({ children }: { children: (value: unknown) => React.ReactNode }) => + children(mocks.auth), + _currentValue: mocks.auth, + }, +})); + +vi.mock('next/navigation', () => ({ + useRouter: () => ({ push: mocks.push }), +})); + +beforeEach(() => { + Object.values(api).forEach((fn) => fn.mockReset()); + mocks.push.mockReset(); +}); + +afterEach(() => cleanup()); + +describe('AuthorAnalyticsPage (items 131/132)', () => { + it('renders the analytics summary + drop calendar', async () => { + api.getAuthorAnalytics.mockResolvedValue({ + problems_total: 6, + problems_approved: 4, + by_difficulty: { EASY: 2, MEDIUM: 1, HARD: 1 }, + submissions_total: 120, + acceptance_rate: 42.5, + unique_solvers: 33, + editorial_coverage: 3, + open_test_bounties: 2, + }); + api.getDrops.mockResolvedValue({ + count: 1, + results: [{ problem_id: 9, title: 'Drop soon', publish_at: '2026-12-01T10:00:00Z' }], + }); + render(); + const summary = await screen.findByTestId('analytics-summary'); + expect(summary.textContent).toContain('4'); + expect(summary.textContent).toContain('42.5%'); + expect(summary.textContent).toContain('33'); + expect(screen.getByTestId('analytics-difficulty-HARD').textContent).toContain('1'); + expect(screen.getByTestId('drop-row-9').textContent).toContain('Drop soon'); + }); + + it('empty drop calendar renders the honest empty state', async () => { + api.getAuthorAnalytics.mockResolvedValue({ + problems_total: 0, + problems_approved: 0, + by_difficulty: {}, + submissions_total: 0, + acceptance_rate: null, + unique_solvers: 0, + editorial_coverage: 0, + open_test_bounties: 0, + }); + api.getDrops.mockResolvedValue({ count: 0, results: [] }); + render(); + await screen.findByTestId('drops-calendar'); + expect(screen.getByText(/Nothing scheduled/i)).toBeTruthy(); + }); + + it('basic users get the creators-only note', () => { + mocks.auth.user = { id: 2, username: 'b', email: 'b@x.com', role: 'BASIC_USER' } as User; + render(); + expect(screen.getByText(/creators and verifiers/i)).toBeTruthy(); + mocks.auth.user = { + id: 1, + username: 'author', + email: 'a@x.com', + role: 'PROBLEM_CREATOR', + } as User; + }); +}); + +describe('SavedSearchesStrip (item 129)', () => { + it('saves the current filter set, applies and deletes', async () => { + api.listSavedSearches.mockResolvedValue({ + count: 1, + results: [{ id: 7, name: 'Easy graphs', params: { difficulty: 'EASY' } }], + }); + api.saveSavedSearch.mockResolvedValue({ id: 8, name: 'Mine', params: {} }); + api.deleteSavedSearch.mockResolvedValue({}); + render(); + await screen.findByTestId('saved-search-apply-7'); + fireEvent.change(screen.getByTestId('saved-search-name'), { + target: { value: 'Mine' }, + }); + fireEvent.click(screen.getByTestId('saved-search-save')); + await waitFor(() => + expect(api.saveSavedSearch).toHaveBeenCalledWith('Mine', { + difficulty: 'EASY', + q: 'graph', + }), + ); + fireEvent.click(screen.getByTestId('saved-search-apply-7')); + expect(mocks.push).toHaveBeenCalledWith('/problems?difficulty=EASY'); + fireEvent.click(screen.getByTestId('saved-search-delete-7')); + await waitFor(() => expect(api.deleteSavedSearch).toHaveBeenCalledWith(7)); + }); + + it('hidden for anonymous callers', () => { + mocks.auth.isAuthenticated = false; + const { container } = render(); + expect(container.textContent).toBe(''); + mocks.auth.isAuthenticated = true; + }); +}); diff --git a/src/app/author/analytics/page.tsx b/src/app/author/analytics/page.tsx new file mode 100644 index 00000000..c5a2005d --- /dev/null +++ b/src/app/author/analytics/page.tsx @@ -0,0 +1,151 @@ +'use client'; + +import React, { useCallback, useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { ProblemService } from '@/services/ApiService'; +import { useAuth } from '@/context/AuthContext'; +import { palette } from '@/theme/tokens'; +import PageHeader from '@/components/common/PageHeader'; + +/** + * Items 131/132 — the author content-ops dashboard: the analytics + * derivation (funnel, AC rate, difficulty mix, editorial coverage, bounty + * activity) and the scheduled-drop calendar. + */ + +interface Analytics { + problems_total: number; + problems_approved: number; + by_difficulty: Record; + submissions_total: number; + acceptance_rate: number | null; + unique_solvers: number; + editorial_coverage: number; + open_test_bounties: number; +} + +interface DropRow { + problem_id: number; + title: string; + publish_at: string; +} + +export default function AuthorAnalyticsPage() { + const { t } = useTranslation(); + const auth = useAuth(); + const [profile, setProfile] = useState(null); + const [drops, setDrops] = useState(null); + const [error, setError] = useState(null); + + const isAuthor = ['PROBLEM_CREATOR', 'PROBLEM_VERIFIER', 'TEACHER', 'ADMIN'].includes( + auth.user?.role ?? '', + ); + + const load = useCallback(async () => { + try { + setError(null); + const [analytics, dropRows] = await Promise.all([ + ProblemService.getAuthorAnalytics(), + ProblemService.getDrops().catch(() => null), + ]); + setProfile(analytics); + setDrops(dropRows ? dropRows.results : []); + } catch (err) { + setError(err instanceof Error ? err.message : 'error'); + } + }, []); + + useEffect(() => { + if (isAuthor) load(); + }, [isAuthor, load]); + + if (!isAuthor) { + return ( +
+ +

+ {t('tools_creators_only', 'These tools are for problem creators and verifiers.')} +

+
+ ); + } + + return ( +
+ + {error && ( +

+ {error} +

+ )} + {profile === null ? ( +

{t('loading', 'Loading…')}

+ ) : ( +
+ {profile.problems_approved} {t('analytics_approved', 'approved')} /{' '} + {profile.problems_total} {t('analytics_total', 'authored')} ·{' '} + {profile.submissions_total} {t('analytics_submissions', 'submissions')} ·{' '} + {profile.acceptance_rate !== null + ? `${profile.acceptance_rate}% ${t('analytics_acceptance', 'AC')}` + : t('analytics_no_submissions', 'no submissions yet')}{' '} + · {profile.unique_solvers} {t('analytics_solvers', 'unique solvers')} ·{' '} + {profile.editorial_coverage}{' '} + {t('analytics_editorials', 'with editorial')} ·{' '} + {profile.open_test_bounties} {t('analytics_bounties', 'open bounties')} +
+ )} + {profile && ( +
+ {Object.entries(profile.by_difficulty).map(([level, count]) => ( + + {level}: {count} + + ))} +
+ )} + +
+

{t('drops_title', 'Scheduled drops')}

+ {drops === null ? ( +

{t('loading', 'Loading…')}

+ ) : drops.length === 0 ? ( +

+ {t('drops_empty', 'Nothing scheduled — approved problems drop immediately.')} +

+ ) : ( +
    + {drops.map((row) => ( +
  • + {row.title} — {new Date(row.publish_at).toLocaleString()} +
  • + ))} +
+ )} +
+
+ ); +} diff --git a/src/app/problems/ProblemsListClient.tsx b/src/app/problems/ProblemsListClient.tsx index 0caf0253..86bfb14e 100644 --- a/src/app/problems/ProblemsListClient.tsx +++ b/src/app/problems/ProblemsListClient.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import Link from 'next/link'; import { useRouter, useSearchParams } from 'next/navigation'; +import SavedSearchesStrip from './SavedSearchesStrip'; import { useAuth } from '@/context/AuthContext'; import { ProblemType, TagType } from '@/types'; import { AuthService, ProblemService, RandomProblemService } from '@/services/ApiService'; @@ -185,6 +186,13 @@ export default function ProblemsListClient({ // [RO-6] The archive browse axis is server-filtered the same way: // ?archive=1 + optional ?source_year= / ?grade_group= refinements. const urlArchive = searchParams.get('archive') === '1'; + // [wave F item 129] the saved-search payload mirrors the URL filter set. + const currentParams = Object.fromEntries( + searchParams + .entries() + .filter(([key]) => key !== 'page') + .map(([key, value]) => [key, value]), + ); const urlYear = searchParams.get('source_year') ?? ''; const urlGroup = searchParams.get('grade_group') ?? ''; const [yearDraft, setYearDraft] = useState(urlYear); @@ -382,6 +390,9 @@ export default function ProblemsListClient({ )} /> + {/* [wave F item 129] saved searches: save/apply the current filter set */} + + {/* [roadmap ONB-1] first-run path: the /start trio */} ; +} + +export default function SavedSearchesStrip({ + currentParams, +}: { + currentParams: Record; +}) { + const { t } = useTranslation(); + const auth = useAuth(); + const router = useRouter(); + const [rows, setRows] = useState(null); + const [name, setName] = useState(''); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + + const load = useCallback(async () => { + try { + setError(null); + const data = await ProblemService.listSavedSearches(); + setRows(data.results); + } catch (err) { + setError(err instanceof Error ? err.message : 'error'); + } + }, []); + + useEffect(() => { + if (auth.isAuthenticated) load(); + }, [auth.isAuthenticated, load]); + + if (!auth.isAuthenticated) return null; + + const save = async () => { + if (!name.trim()) return; + setBusy(true); + try { + await ProblemService.saveSavedSearch(name.trim(), currentParams); + setName(''); + await load(); + } catch (err) { + setError(err instanceof Error ? err.message : 'error'); + } finally { + setBusy(false); + } + }; + + const apply = (params: Record) => { + const qs = new URLSearchParams(); + for (const [key, value] of Object.entries(params)) { + qs.set(key, Array.isArray(value) ? value.join(',') : String(value)); + } + router.push(`/problems?${qs.toString()}`); + }; + + const remove = async (id: number) => { + setBusy(true); + try { + await ProblemService.deleteSavedSearch(id); + await load(); + } finally { + setBusy(false); + } + }; + + return ( +
+ {error && ( +

+ {error} +

+ )} +
+ setName(e.target.value)} + placeholder={t('saved_search_name', 'Name this filter set…')} + aria-label={t('saved_search_name', 'Name this filter set…')} + style={{ padding: '6px 10px' }} + data-testid="saved-search-name" + /> + + {rows?.map((row) => ( + + + + + ))} +
+
+ ); +} diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx index b186a973..bbfd5e84 100644 --- a/src/components/layout/Navbar.tsx +++ b/src/components/layout/Navbar.tsx @@ -117,6 +117,15 @@ const Navbar: React.FC = () => { ...(canCreateProblems ? [ { href: '/problems/create', label: t('nav_create_problem', 'Create Problem') }, + { + href: '/author/wizard', + label: t('nav_author_wizard', 'Authoring wizard'), + }, + { href: '/author/tools', label: t('nav_author_tools', 'Author tools') }, + { + href: '/author/analytics', + label: t('nav_author_analytics', 'Author analytics'), + }, { href: '/my-created-problems', label: t('nav_my_created_problems', 'My Problems') }, ] : []), diff --git a/src/locales/ar.json b/src/locales/ar.json index 5457d8c0..5854fa5d 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "حلها {{count}} مستخدمًا", "embed_input": "دخل", "embed_output": "خرج", - "embed_cta": "حلها على WebCoder →" + "embed_cta": "حلها على WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "تحليلات المؤلف", + "analytics_approved": "معتمدة", + "analytics_total": "مؤلفة", + "analytics_submissions": "إرساليات", + "analytics_acceptance": "AC", + "analytics_no_submissions": "لا إرساليات بعد", + "analytics_solvers": "حلول فريدون", + "analytics_editorials": "مع تحرير", + "analytics_bounties": "مكافآت مفتوحة", + "drops_title": "إصدارات مجدولة", + "drops_empty": "لا شيء مجدول — المسائل المعتمدة تظهر فورًا.", + "saved_search_name": "سمّ مجموعة المرشحات هذه…", + "saved_search_save": "احفظ البحث", + "saved_search_delete": "حذف", + "tools_creators_only": "هذه الأدوات لمؤلفي المسائل والمدققين.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/bg.json b/src/locales/bg.json index 8a54a67b..25d83daa 100644 --- a/src/locales/bg.json +++ b/src/locales/bg.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Решили са {{count}} потребители", "embed_input": "вход", "embed_output": "изход", - "embed_cta": "Решете на WebCoder →" + "embed_cta": "Решете на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Анализи за автора", + "analytics_approved": "одобрени", + "analytics_total": "създадени", + "analytics_submissions": "изпращания", + "analytics_acceptance": "AC", + "analytics_no_submissions": "още няма изпращания", + "analytics_solvers": "уникални решители", + "analytics_editorials": "с редакционен материал", + "analytics_bounties": "отворени награди", + "drops_title": "Планирани излизания", + "drops_empty": "Нищо планирано — одобрените задачи излизат веднага.", + "saved_search_name": "Именувайте този набор от филтри…", + "saved_search_save": "Запази търсенето", + "saved_search_delete": "Изтрий", + "tools_creators_only": "Тези инструменти са за създатели и проверители на задачи.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/ca.json b/src/locales/ca.json index 26d2f8b9..583c0f3b 100644 --- a/src/locales/ca.json +++ b/src/locales/ca.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resolt per {{count}} usuaris", "embed_input": "entrada", "embed_output": "sortida", - "embed_cta": "Resol a WebCoder →" + "embed_cta": "Resol a WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analítica d'autor", + "analytics_approved": "aprovats", + "analytics_total": "creats", + "analytics_submissions": "enviaments", + "analytics_acceptance": "AC", + "analytics_no_submissions": "encara sense enviaments", + "analytics_solvers": "resolvedors únics", + "analytics_editorials": "amb editorial", + "analytics_bounties": "recompenses obertes", + "drops_title": "Llançaments programats", + "drops_empty": "Res programat — els problemes aprovats surten immediatament.", + "saved_search_name": "Anomena aquest conjunt de filtres…", + "saved_search_save": "Desa la cerca", + "saved_search_delete": "Suprimeix", + "tools_creators_only": "Aquestes eines són per a creadors i verificadors de problemes.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/de.json b/src/locales/de.json index 275f5deb..d9e91891 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Von {{count}} Nutzern gelöst", "embed_input": "Eingabe", "embed_output": "Ausgabe", - "embed_cta": "Löse es auf WebCoder →" + "embed_cta": "Löse es auf WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Autoren-Analytik", + "analytics_approved": "genehmigt", + "analytics_total": "erstellt", + "analytics_submissions": "Einreichungen", + "analytics_acceptance": "AC", + "analytics_no_submissions": "noch keine Einreichungen", + "analytics_solvers": "einzelne Löser", + "analytics_editorials": "mit Editorial", + "analytics_bounties": "offene Prämien", + "drops_title": "Geplante Drops", + "drops_empty": "Nichts geplant — genehmigte Aufgaben erscheinen sofort.", + "saved_search_name": "Diesen Filtersatz benennen…", + "saved_search_save": "Suche speichern", + "saved_search_delete": "Löschen", + "tools_creators_only": "Diese Tools sind für Aufgabenautoren und -verifizierer.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/el.json b/src/locales/el.json index 6f4de980..19fbda45 100644 --- a/src/locales/el.json +++ b/src/locales/el.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Το έλυσαν {{count}} χρήστες", "embed_input": "είσοδος", "embed_output": "έξοδος", - "embed_cta": "Λύστε το στο WebCoder →" + "embed_cta": "Λύστε το στο WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Αναλυτικά συγγραφέα", + "analytics_approved": "εγκεκριμένα", + "analytics_total": "δημιουργήθηκαν", + "analytics_submissions": "υποβολές", + "analytics_acceptance": "AC", + "analytics_no_submissions": "καμία υποβολή ακόμη", + "analytics_solvers": "μοναδικοί λύτες", + "analytics_editorials": "με ανάλυση", + "analytics_bounties": "ανοιχτές αμοιβές", + "drops_title": "Προγραμματισμένες κυκλοφορίες", + "drops_empty": "Τίποτα προγραμματισμένο — οι εγκεκριμένες ασκήσεις βγαίνουν αμέσως.", + "saved_search_name": "Ονομάστε αυτό το σύνολο φίλτρων…", + "saved_search_save": "Αποθήκευση αναζήτησης", + "saved_search_delete": "Διαγραφή", + "tools_creators_only": "Αυτά τα εργαλεία είναι για συγγραφείς και ελεγκτές ασκήσεων.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/en.json b/src/locales/en.json index af46eba0..1dc834b1 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Solved by {{count}} users", "embed_input": "in", "embed_output": "out", - "embed_cta": "Solve it on WebCoder →" + "embed_cta": "Solve it on WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Author analytics", + "analytics_approved": "approved", + "analytics_total": "authored", + "analytics_submissions": "submissions", + "analytics_acceptance": "AC", + "analytics_no_submissions": "no submissions yet", + "analytics_solvers": "unique solvers", + "analytics_editorials": "with editorial", + "analytics_bounties": "open bounties", + "drops_title": "Scheduled drops", + "drops_empty": "Nothing scheduled — approved problems drop immediately.", + "saved_search_name": "Name this filter set…", + "saved_search_save": "Save search", + "saved_search_delete": "Delete", + "tools_creators_only": "These tools are for problem creators and verifiers.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/es.json b/src/locales/es.json index 9e89c5ae..b0c2e0de 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resuelto por {{count}} usuarios", "embed_input": "entrada", "embed_output": "salida", - "embed_cta": "Resuélvelo en WebCoder →" + "embed_cta": "Resuélvelo en WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analítica de autor", + "analytics_approved": "aprobados", + "analytics_total": "creados", + "analytics_submissions": "envíos", + "analytics_acceptance": "AC", + "analytics_no_submissions": "aún sin envíos", + "analytics_solvers": "resolvedores únicos", + "analytics_editorials": "con editorial", + "analytics_bounties": "recompensas abiertas", + "drops_title": "Lanzamientos programados", + "drops_empty": "Nada programado — los problemas aprobados aparecen de inmediato.", + "saved_search_name": "Nombra este conjunto de filtros…", + "saved_search_save": "Guardar búsqueda", + "saved_search_delete": "Eliminar", + "tools_creators_only": "Estas herramientas son para creadores y verificadores de problemas.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/fa.json b/src/locales/fa.json index 206a1fa5..6254ed87 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} کاربر حل کرده‌اند", "embed_input": "ورودی", "embed_output": "خروجی", - "embed_cta": "در WebCoder حل کنید →" + "embed_cta": "در WebCoder حل کنید →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "تحلیل نویسنده", + "analytics_approved": "تأییدشده", + "analytics_total": "نگاشته", + "analytics_submissions": "ارسال‌ها", + "analytics_acceptance": "AC", + "analytics_no_submissions": "هنوز ارسالی نیست", + "analytics_solvers": "حل‌کننده یکتا", + "analytics_editorials": "با تحلیل", + "analytics_bounties": "جایزه باز", + "drops_title": "انتشارهای زمان‌بندی‌شده", + "drops_empty": "چیزی زمان‌بندی نشده — مسئله‌های تأییدشده بلافاصله منتشر می‌شوند.", + "saved_search_name": "نام این مجموعه فیلتر…", + "saved_search_save": "ذخیره جستجو", + "saved_search_delete": "حذف", + "tools_creators_only": "این ابزارها برای نویسندگان و راستی‌آزمایان مسئله است.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/fr.json b/src/locales/fr.json index 7dceb789..620720d6 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Résolu par {{count}} utilisateurs", "embed_input": "entrée", "embed_output": "sortie", - "embed_cta": "Résolvez-le sur WebCoder →" + "embed_cta": "Résolvez-le sur WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Statistiques d'auteur", + "analytics_approved": "approuvés", + "analytics_total": "créés", + "analytics_submissions": "soumissions", + "analytics_acceptance": "AC", + "analytics_no_submissions": "pas encore de soumissions", + "analytics_solvers": "résolveurs uniques", + "analytics_editorials": "avec éditorial", + "analytics_bounties": "primes ouvertes", + "drops_title": "Sorties programmées", + "drops_empty": "Rien de programmé — les problèmes approuvés sortent immédiatement.", + "saved_search_name": "Nommez ce filtre…", + "saved_search_save": "Enregistrer la recherche", + "saved_search_delete": "Supprimer", + "tools_creators_only": "Ces outils sont pour les auteurs et vérificateurs de problèmes.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/hi.json b/src/locales/hi.json index 0de4555c..d3c8b5ba 100644 --- a/src/locales/hi.json +++ b/src/locales/hi.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} उपयोगकर्ताओं ने हल किया", "embed_input": "इनपुट", "embed_output": "आउटपुट", - "embed_cta": "WebCoder पर हल करें →" + "embed_cta": "WebCoder पर हल करें →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "लेखक विश्लेषण", + "analytics_approved": "स्वीकृत", + "analytics_total": "लिखे", + "analytics_submissions": "सबमिशन", + "analytics_acceptance": "AC", + "analytics_no_submissions": "अभी कोई सबमिशन नहीं", + "analytics_solvers": "अद्वितीय हल कर्ता", + "analytics_editorials": "एडिटोरियल के साथ", + "analytics_bounties": "खुले इनाम", + "drops_title": "निर्धारित रिलीज़़", + "drops_empty": "कुछ निर्धारित नहीं — स्वीकृत प्रॉब्लम तुरंत आते हैं।", + "saved_search_name": "इस फ़िल्टर सेट का नाम दें…", + "saved_search_save": "खोज सहेजें", + "saved_search_delete": "हटाएँ", + "tools_creators_only": "ये उपकरण प्रॉब्लम लेखकों और सत्यापकों के लिए हैं।", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/hr.json b/src/locales/hr.json index 7ec5c16d..c4da5b5d 100644 --- a/src/locales/hr.json +++ b/src/locales/hr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Riješilo {{count}} korisnika", "embed_input": "ulaz", "embed_output": "izlaz", - "embed_cta": "Riješi na WebCoderu →" + "embed_cta": "Riješi na WebCoderu →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitika autora", + "analytics_approved": "odobrenih", + "analytics_total": "napravljeno", + "analytics_submissions": "predaja", + "analytics_acceptance": "AC", + "analytics_no_submissions": "još nema predaja", + "analytics_solvers": "jedinstvenih rješavatelja", + "analytics_editorials": "s editorijalom", + "analytics_bounties": "otvorenih nagrada", + "drops_title": "Zakazana objavljivanja", + "drops_empty": "Ništa zakazano — odobreni zadaci odmah izlaze.", + "saved_search_name": "Imenuj ovaj skup filtara…", + "saved_search_save": "Spremi pretragu", + "saved_search_delete": "Izbriši", + "tools_creators_only": "Ovi su alati za autore i verifikatore zadataka.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/hu.json b/src/locales/hu.json index c7e27a53..aba0cb9e 100644 --- a/src/locales/hu.json +++ b/src/locales/hu.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} felhasználó oldotta meg", "embed_input": "be", "embed_output": "ki", - "embed_cta": "Oldd meg a WebCoderen →" + "embed_cta": "Oldd meg a WebCoderen →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Szerzői statisztika", + "analytics_approved": "jóváhagyott", + "analytics_total": "készített", + "analytics_submissions": "beküldés", + "analytics_acceptance": "AC", + "analytics_no_submissions": "még nincs beküldés", + "analytics_solvers": "egyedi megoldók", + "analytics_editorials": "szerkesztőségi anyaggal", + "analytics_bounties": "nyitott jutalmak", + "drops_title": "Ütemezett megjelenések", + "drops_empty": "Nincs ütemezve — a jóváhagyott feladatok azonnal megjelennek.", + "saved_search_name": "Nevezd el ezt a szűrőkészletet…", + "saved_search_save": "Keresés mentése", + "saved_search_delete": "Törlés", + "tools_creators_only": "Ezek az eszközök feladatszerzőknek és -ellenőröknek szólnak.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/id.json b/src/locales/id.json index 661a0045..1756ccec 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Diselesaikan {{count}} pengguna", "embed_input": "masukan", "embed_output": "keluaran", - "embed_cta": "Kerjakan di WebCoder →" + "embed_cta": "Kerjakan di WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitik penulis", + "analytics_approved": "disetujui", + "analytics_total": "ditulis", + "analytics_submissions": "kiriman", + "analytics_acceptance": "AC", + "analytics_no_submissions": "belum ada kiriman", + "analytics_solvers": "penyelesai unik", + "analytics_editorials": "dengan editorial", + "analytics_bounties": "hadiah terbuka", + "drops_title": "Rilis terjadwal", + "drops_empty": "Tidak ada jadwal — soal disetujui langsung tayang.", + "saved_search_name": "Beri nama set filter ini…", + "saved_search_save": "Simpan pencarian", + "saved_search_delete": "Hapus", + "tools_creators_only": "Alat ini untuk pembuat dan verifikator soal.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/it.json b/src/locales/it.json index 27def040..264d6e29 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Risolto da {{count}} utenti", "embed_input": "input", "embed_output": "output", - "embed_cta": "Risolvi su WebCoder →" + "embed_cta": "Risolvi su WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitica autore", + "analytics_approved": "approvati", + "analytics_total": "creati", + "analytics_submissions": "invii", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ancora nessun invio", + "analytics_solvers": "risolutori unici", + "analytics_editorials": "con editoriale", + "analytics_bounties": "taglie aperte", + "drops_title": "Rilasci programmati", + "drops_empty": "Niente di programmato — i problemi approvati escono subito.", + "saved_search_name": "Dai un nome a questi filtri…", + "saved_search_save": "Salva ricerca", + "saved_search_delete": "Elimina", + "tools_creators_only": "Questi strumenti sono per autori e verificatori di problemi.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/ja.json b/src/locales/ja.json index 3e15c06c..dc25cd1c 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}}人が解決", "embed_input": "入力", "embed_output": "出力", - "embed_cta": "WebCoderで解く →" + "embed_cta": "WebCoderで解く →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作成者アナリティクス", + "analytics_approved": "承認済み", + "analytics_total": "作成", + "analytics_submissions": "提出", + "analytics_acceptance": "AC", + "analytics_no_submissions": "まだ提出はありません", + "analytics_solvers": "人の解答者", + "analytics_editorials": "解説あり", + "analytics_bounties": "件のオープン墱獁", + "drops_title": "予約リリース", + "drops_empty": "予約はありません — 承認済み問題は即時公開されます。", + "saved_search_name": "このフィルタセットに名前を…", + "saved_search_save": "検索を保存", + "saved_search_delete": "削除", + "tools_creators_only": "これらのツールは問題作成者と検証者向けです。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/kk.json b/src/locales/kk.json index c3d0b4bf..85953af6 100644 --- a/src/locales/kk.json +++ b/src/locales/kk.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} пайдаланушы шешті", "embed_input": "кіріс", "embed_output": "шығыс", - "embed_cta": "WebCoder-де шеш →" + "embed_cta": "WebCoder-де шеш →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Автор аналитикасы", + "analytics_approved": "мақұлданған", + "analytics_total": "жазылған", + "analytics_submissions": "жіберілім", + "analytics_acceptance": "AC", + "analytics_no_submissions": "әзірге жіберілім жоқ", + "analytics_solvers": "бірегей шешуші", + "analytics_editorials": "эдиторлымен", + "analytics_bounties": "ашық сыйақы", + "drops_title": "Жоспарланған шығарылымдар", + "drops_empty": "Жоспар жоқ — мақұлданған есептер дереу шығады.", + "saved_search_name": "Бұл фильтрлер жиынын атаңыз…", + "saved_search_save": "Іздеуді сақтау", + "saved_search_delete": "Жою", + "tools_creators_only": "Бұл құралдар авторлар мен тексерушілерге арналған.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/ko.json b/src/locales/ko.json index ae9a2392..59f63d27 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}}명이 해결", "embed_input": "입력", "embed_output": "출력", - "embed_cta": "WebCoder에서 풀기 →" + "embed_cta": "WebCoder에서 풀기 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "작성자 분석", + "analytics_approved": "승인됨", + "analytics_total": "작성", + "analytics_submissions": "제출", + "analytics_acceptance": "AC", + "analytics_no_submissions": "아직 제출 없음", + "analytics_solvers": "명의 해결자", + "analytics_editorials": "에디토리얼 있음", + "analytics_bounties": "건의 열린 현상금", + "drops_title": "예약 공개", + "drops_empty": "예약 없음 — 승인된 문제는 즉시 공개됩니다.", + "saved_search_name": "이 필터 세트의 이름…", + "saved_search_save": "검색 저장", + "saved_search_delete": "삭제", + "tools_creators_only": "이 도구는 문제 작성자와 검증자를 위한 것입니다.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/lt.json b/src/locales/lt.json index 2a0fdf57..ab459f65 100644 --- a/src/locales/lt.json +++ b/src/locales/lt.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Išsprendė {{count}} vartotojų", "embed_input": "įvestis", "embed_output": "išvestis", - "embed_cta": "Spręsk WebCoder →" + "embed_cta": "Spręsk WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Autoriaus analitika", + "analytics_approved": "patvirtintų", + "analytics_total": "sukurta", + "analytics_submissions": "pateikimų", + "analytics_acceptance": "AC", + "analytics_no_submissions": "dar nėra pateikimų", + "analytics_solvers": "unikalių sprendėjų", + "analytics_editorials": "su editorialu", + "analytics_bounties": "atvirų premijų", + "drops_title": "Suplanuoti išleidimai", + "drops_empty": "Nieko nesuplanuota — patvirtinti uždaviniai pasirodo iškart.", + "saved_search_name": "Pavadinkite šį filtrų rinkinį…", + "saved_search_save": "Išsaugoti paiešką", + "saved_search_delete": "Ištrinti", + "tools_creators_only": "Šie įrankiai skirti uždavinių kūrėjams ir tikrintojams.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/nl.json b/src/locales/nl.json index 774c5e60..509fede9 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Opgelost door {{count}} gebruikers", "embed_input": "in", "embed_output": "uit", - "embed_cta": "Los het op op WebCoder →" + "embed_cta": "Los het op op WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Auteur-analytics", + "analytics_approved": "goedgekeurd", + "analytics_total": "gemaakt", + "analytics_submissions": "inzendingen", + "analytics_acceptance": "AC", + "analytics_no_submissions": "nog geen inzendingen", + "analytics_solvers": "unieke oplossers", + "analytics_editorials": "met editorial", + "analytics_bounties": "open premies", + "drops_title": "Geplande drops", + "drops_empty": "Niets gepland — goedgekeurde problemen verschijnen direct.", + "saved_search_name": "Geef deze filterset een naam…", + "saved_search_save": "Zoekopdracht opslaan", + "saved_search_delete": "Verwijderen", + "tools_creators_only": "Deze tools zijn voor probleemauteurs en -verificateurs.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/pl.json b/src/locales/pl.json index de1658d3..cb8a3fe2 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rozwiązane przez {{count}} użytkowników", "embed_input": "wejście", "embed_output": "wyjście", - "embed_cta": "Rozwiąż na WebCoderze →" + "embed_cta": "Rozwiąż na WebCoderze →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analityka autora", + "analytics_approved": "zatwierdzonych", + "analytics_total": "napisanych", + "analytics_submissions": "zgłoszeń", + "analytics_acceptance": "AC", + "analytics_no_submissions": "jeszcze brak zgłoszeń", + "analytics_solvers": "unikalnych rozwiązujących", + "analytics_editorials": "z materiałem", + "analytics_bounties": "otwartych nagród", + "drops_title": "Zaplanowane premiery", + "drops_empty": "Nic nie zaplanowano — zatwierdzone zadania pojawiają się od razu.", + "saved_search_name": "Nazwij ten zestaw filtrów…", + "saved_search_save": "Zapisz wyszukiwanie", + "saved_search_delete": "Usuń", + "tools_creators_only": "Te narzędzia są dla twórców i weryfikatorów zadań.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/pt.json b/src/locales/pt.json index bec83e61..55490a28 100644 --- a/src/locales/pt.json +++ b/src/locales/pt.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Resolvido por {{count}} usuários", "embed_input": "entrada", "embed_output": "saída", - "embed_cta": "Resolva no WebCoder →" + "embed_cta": "Resolva no WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analytics de autor", + "analytics_approved": "aprovados", + "analytics_total": "criados", + "analytics_submissions": "envios", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ainda sem envios", + "analytics_solvers": "resolvedores únicos", + "analytics_editorials": "com editorial", + "analytics_bounties": "recompensas abertas", + "drops_title": "Lançamentos programados", + "drops_empty": "Nada programado — problemas aprovados aparecem imediatamente.", + "saved_search_name": "Nomeie este conjunto de filtros…", + "saved_search_save": "Salvar busca", + "saved_search_delete": "Excluir", + "tools_creators_only": "Estas ferramentas são para criadores e verificadores de problemas.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/ro.json b/src/locales/ro.json index 9682142d..52787e04 100644 --- a/src/locales/ro.json +++ b/src/locales/ro.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rezolvată de {{count}} utilizatori", "embed_input": "intrare", "embed_output": "ieșire", - "embed_cta": "Rezolv-o pe WebCoder →" + "embed_cta": "Rezolv-o pe WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Statistici de autor", + "analytics_approved": "aprobate", + "analytics_total": "create", + "analytics_submissions": "trimiteri", + "analytics_acceptance": "AC", + "analytics_no_submissions": "nicio trimitere încă", + "analytics_solvers": "rezolvatori unici", + "analytics_editorials": "cu editorial", + "analytics_bounties": "recompense deschise", + "drops_title": "Lansări programate", + "drops_empty": "Nimic programat — problemele aprobate apar imediat.", + "saved_search_name": "Numește acest set de filtre…", + "saved_search_save": "Salvează căutarea", + "saved_search_delete": "Șterge", + "tools_creators_only": "Aceste unelte sunt pentru creatorii și verificatorii de probleme.", + "nav_author_wizard": "Asistent de creare", + "nav_author_tools": "Unelte autor", + "nav_author_analytics": "Statistici de autor" } diff --git a/src/locales/ru.json b/src/locales/ru.json index 584af387..39fb6928 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Решили {{count}} пользователей", "embed_input": "вход", "embed_output": "выход", - "embed_cta": "Решите на WebCoder →" + "embed_cta": "Решите на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Аналитика автора", + "analytics_approved": "одобрено", + "analytics_total": "создано", + "analytics_submissions": "посылок", + "analytics_acceptance": "AC", + "analytics_no_submissions": "посылок пока нет", + "analytics_solvers": "уникальных решателей", + "analytics_editorials": "с разбором", + "analytics_bounties": "открытых наград", + "drops_title": "Запланированные релизы", + "drops_empty": "Ничего не запланировано — одобренные задачи выходят сразу.", + "saved_search_name": "Назовите этот набор фильтров…", + "saved_search_save": "Сохранить поиск", + "saved_search_delete": "Удалить", + "tools_creators_only": "Эти инструменты — для авторов и верификаторов задач.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/sr-Latn.json b/src/locales/sr-Latn.json index 6552f737..82f34196 100644 --- a/src/locales/sr-Latn.json +++ b/src/locales/sr-Latn.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Rešilo {{count}} korisnika", "embed_input": "ulaz", "embed_output": "izlaz", - "embed_cta": "Reši na WebCoderu →" + "embed_cta": "Reši na WebCoderu →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Analitika autora", + "analytics_approved": "odobrenih", + "analytics_total": "napravljeno", + "analytics_submissions": "predaja", + "analytics_acceptance": "AC", + "analytics_no_submissions": "još nema predaja", + "analytics_solvers": "jedinstvenih rešavalaca", + "analytics_editorials": "s editorialom", + "analytics_bounties": "otvorenih nagrada", + "drops_title": "Zakazana objavljivanja", + "drops_empty": "Ništa zakazano — odobreni zadaci odmah izlaze.", + "saved_search_name": "Imenuj ovaj skup filtera…", + "saved_search_save": "Sačuvaj pretragu", + "saved_search_delete": "Izbriši", + "tools_creators_only": "Ovi alati su za autore i verifikatore zadataka.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/th.json b/src/locales/th.json index 8c21607b..e4cef7da 100644 --- a/src/locales/th.json +++ b/src/locales/th.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "แก้แล้วโดย {{count}} ผู้ใช้", "embed_input": "อินพุต", "embed_output": "เอาต์พุต", - "embed_cta": "แก้บน WebCoder →" + "embed_cta": "แก้บน WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "วิเคราะห์ผู้เขียน", + "analytics_approved": "อนุมัติแล้ว", + "analytics_total": "เขียนแล้ว", + "analytics_submissions": "การส่ง", + "analytics_acceptance": "AC", + "analytics_no_submissions": "ยังไม่มีการส่ง", + "analytics_solvers": "ผู้แก้โจทย์๋ร้อย", + "analytics_editorials": "มีเอดิทอเรียล", + "analytics_bounties": "เงินรางวัลที่เปิด", + "drops_title": "การเปิดตามกำหนด", + "drops_empty": "ยังไม่มีกำหนด — โจทย์ที่อนุมัติเปิดทันที", + "saved_search_name": "ตั้งชื่อชุดตัวกรองนี้…", + "saved_search_save": "บันทึกการค้นหา", + "saved_search_delete": "ลบ", + "tools_creators_only": "เครื่องมือเหล่านี้สำหรับผู้เขียนและผู้ตรวจโจทย์", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/tr.json b/src/locales/tr.json index 35bc143e..62a6b7c7 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} kullanıcı çözdü", "embed_input": "girdi", "embed_output": "çıktı", - "embed_cta": "WebCoder'da çöz →" + "embed_cta": "WebCoder'da çöz →", + "analytics_subtitle": "Yazarlık huniniz: problemler, gönderiler, kapsam ve ödüller.", + "analytics_title": "Yazar analitiği", + "analytics_approved": "onaylı", + "analytics_total": "yazıldı", + "analytics_submissions": "gönderi", + "analytics_acceptance": "AC", + "analytics_no_submissions": "henüz gönderi yok", + "analytics_solvers": "benzersiz çözücü", + "analytics_editorials": "editorial'li", + "analytics_bounties": "açık ödül", + "drops_title": "Planlanan çıkışlar", + "drops_empty": "Planlanan yok — onaylı problemler anında çıkar.", + "saved_search_name": "Bu filtre setine ad ver…", + "saved_search_save": "Aramayı kaydet", + "saved_search_delete": "Sil", + "tools_creators_only": "Bu araçlar problem yazarları ve doğrulayıcıları içindir.", + "nav_author_wizard": "Yazım sihirbazı", + "nav_author_tools": "Yazar araçları", + "nav_author_analytics": "Yazar analitiği" } diff --git a/src/locales/uk.json b/src/locales/uk.json index 0cf0daac..83484fab 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "Вирішили {{count}} користувачів", "embed_input": "вхід", "embed_output": "вихід", - "embed_cta": "Вирішуйте на WebCoder →" + "embed_cta": "Вирішуйте на WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Аналітика автора", + "analytics_approved": "схвалених", + "analytics_total": "створених", + "analytics_submissions": "надсилань", + "analytics_acceptance": "AC", + "analytics_no_submissions": "надсилань ще немає", + "analytics_solvers": "унікальних розв'язувачів", + "analytics_editorials": "з розбором", + "analytics_bounties": "відкритих винагород", + "drops_title": "Заплановані релізи", + "drops_empty": "Нічого не заплановано — схвалені задачі виходять одразу.", + "saved_search_name": "Назвіть цей набір фільтрів…", + "saved_search_save": "Зберегти пошук", + "saved_search_delete": "Видалити", + "tools_creators_only": "Ці інструменти — для авторів і верифікаторів задач.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/vi.json b/src/locales/vi.json index 66cce798..cb7f9745 100644 --- a/src/locales/vi.json +++ b/src/locales/vi.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} người đã giải", "embed_input": "vào", "embed_output": "ra", - "embed_cta": "Giải trên WebCoder →" + "embed_cta": "Giải trên WebCoder →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "Phân tích tác giả", + "analytics_approved": "đã duyệt", + "analytics_total": "đã sáng tác", + "analytics_submissions": "bài nộp", + "analytics_acceptance": "AC", + "analytics_no_submissions": "chưa có bài nộp", + "analytics_solvers": "người giải duy nhất", + "analytics_editorials": "có bản phân tích", + "analytics_bounties": "tiền thưởng mở", + "drops_title": "Bản phát hành theo lịch", + "drops_empty": "Không có lịch — bài đã duyệt phát hành ngay.", + "saved_search_name": "Đặt tên cho bộ lọc này…", + "saved_search_save": "Lưu tìm kiếm", + "saved_search_delete": "Xóa", + "tools_creators_only": "Các công cụ này dành cho người soạn và kiểm duyệt bài.", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/zh-Hans.json b/src/locales/zh-Hans.json index 5fe6de75..46715bda 100644 --- a/src/locales/zh-Hans.json +++ b/src/locales/zh-Hans.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} 位用户已解决", "embed_input": "输入", "embed_output": "输出", - "embed_cta": "在 WebCoder 上求解 →" + "embed_cta": "在 WebCoder 上求解 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作者分析", + "analytics_approved": "已通过", + "analytics_total": "已出题", + "analytics_submissions": "提交", + "analytics_acceptance": "AC", + "analytics_no_submissions": "还没有提交", + "analytics_solvers": "位独立解题者", + "analytics_editorials": "有题解", + "analytics_bounties": "个开放悬赏", + "drops_title": "定时发布", + "drops_empty": "没有排期——通过的题目立即发布。", + "saved_search_name": "为这套筛选命名……", + "saved_search_save": "保存搜索", + "saved_search_delete": "删除", + "tools_creators_only": "这些工具面向题目作者与审核者。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/locales/zh-Hant.json b/src/locales/zh-Hant.json index 2ca23b09..0434fb83 100644 --- a/src/locales/zh-Hant.json +++ b/src/locales/zh-Hant.json @@ -1563,5 +1563,24 @@ "embed_solved_by": "{{count}} 位使用者已解決", "embed_input": "輸入", "embed_output": "輸出", - "embed_cta": "在 WebCoder 上求解 →" + "embed_cta": "在 WebCoder 上求解 →", + "analytics_subtitle": "Your authoring funnel: problems, submissions, coverage and bounties.", + "analytics_title": "作者分析", + "analytics_approved": "已通過", + "analytics_total": "已出題", + "analytics_submissions": "提交", + "analytics_acceptance": "AC", + "analytics_no_submissions": "還沒有提交", + "analytics_solvers": "位獨立解題者", + "analytics_editorials": "有題解", + "analytics_bounties": "個開放懸賞", + "drops_title": "定時發佈", + "drops_empty": "沒有排期——通過的題目立即發佈。", + "saved_search_name": "為這套篩選命名……", + "saved_search_save": "儲存搜尋", + "saved_search_delete": "刪除", + "tools_creators_only": "這些工具面向題目作者與審核者。", + "nav_author_wizard": "Authoring wizard", + "nav_author_tools": "Author tools", + "nav_author_analytics": "Author analytics" } diff --git a/src/services/ApiService.ts b/src/services/ApiService.ts index 5206a651..0e2f34c5 100644 --- a/src/services/ApiService.ts +++ b/src/services/ApiService.ts @@ -77,6 +77,10 @@ import { DivisionTableRow, AmaDetailRow, AmaListRow, + AuthorAnalytics, + ChangelogRow, + DropRow, + SavedSearchRow, AwardRow, EmbedProblem, SetterCV, @@ -907,6 +911,30 @@ export const TrackService = { }; export const ProblemService = { + // Wave F items 125/129/131/132 — content ops. + getAuthorAnalytics: (username?: string) => + apiFetch( + `/problems/author-analytics/${username ? `?username=${encodeURIComponent(username)}` : ''}`, + ), + getDrops: () => apiFetch<{ count: number; results: DropRow[] }>('/problems/drops/'), + listSavedSearches: () => + apiFetch<{ count: number; results: SavedSearchRow[] }>('/problems/searches/'), + saveSavedSearch: (name: string, params: Record) => + apiFetch('/problems/searches/', { + method: 'POST', + body: JSON.stringify({ name, params }), + }), + deleteSavedSearch: (id: number) => + apiFetch<{ detail?: string }>(`/problems/searches/?id=${id}`, { method: 'DELETE' }), + getChangelog: (problemId: number) => + apiFetch<{ count: number; results: ChangelogRow[] }>( + `/problems/problems/${problemId}/changelog/`, + ), + restoreRevision: (problemId: number, revisionId: number) => + apiFetch<{ detail: string }>( + `/problems/problems/${problemId}/revisions/${revisionId}/restore/`, + { method: 'POST' }, + ), getProblems: ( filters: { status?: string; authorId?: number | string; curriculumNode?: number | string } = {}, page: { page?: number; pageSize?: number } = {}, diff --git a/src/types/api.ts b/src/types/api.ts index 1c24b51b..352cdd6a 100644 --- a/src/types/api.ts +++ b/src/types/api.ts @@ -1201,3 +1201,36 @@ export interface EmbedProblem { solved_by: number; solve_url: string; } + +// ---- Wave F content ops (items 125/129/131/132) ---- + +export interface ChangelogRow { + id: number; + kind: string; + edited_by: string | null; + note: string; + created_at: string; +} + +export interface SavedSearchRow { + id: number; + name: string; + params: Record; +} + +export interface DropRow { + problem_id: number; + title: string; + publish_at: string; +} + +export interface AuthorAnalytics { + problems_total: number; + problems_approved: number; + by_difficulty: Record; + submissions_total: number; + acceptance_rate: number | null; + unique_solvers: number; + editorial_coverage: number; + open_test_bounties: number; +}