Skip to content

Phase 7: i18n completion and PWA assets - #8

Draft
maouM-cmd wants to merge 7 commits into
mainfrom
cursor/phase-7-i18n-assets-8ba0
Draft

Phase 7: i18n completion and PWA assets#8
maouM-cmd wants to merge 7 commits into
mainfrom
cursor/phase-7-i18n-assets-8ba0

Conversation

@maouM-cmd

Copy link
Copy Markdown
Owner

Summary

Completes Phase 7 for Prompt Dojo: remaining i18n work, API success message localization, locale-aware auto-evaluation, and PWA asset fixes.

API message localization

  • Added map-api-message.ts for messageCode → translated success messages
  • Updated register, challenges, report, and forgot-password APIs
  • Added report error codes (INVALID_REPORT_REASON, CANNOT_REPORT)

UI i18n

  • Fully localized AdminDashboard with admin namespace
  • Localized ReportButton, PushNotifyButton, LLMEvaluationDisplay, AdSlot
  • Applied mapApiMessage / mapApiError to register, challenge submit, email verification banner, and report flows
  • Shared report reason labels via report.reasons.* (removed hardcoded labels from constants)

Auto-evaluation locale

  • evaluatePrompt(text, locale) reads labels/tips from messages/*.json
  • /api/evaluate accepts locale; PromptForm passes current locale

PWA assets

  • Added public/icons/icon-192.png and icon-512.png
  • Added dynamic /[locale]/manifest.webmanifest route
  • Updated layout metadata with icons and locale-specific manifest URL
  • Documented @capacitor/assets in mobile/README.md

Documentation

  • Updated REQUIREMENTS.md to v7.0

Verification

  • npm run build — pass
  • npm run lint — pass

Manual checks

  • /en/admin — English admin UI after login
  • /en/challenges/new — English success message after submit
  • /en challenge page — English auto-check labels while typing
  • DevTools → Application → Manifest/icons load without 404
Open in Web Open in Cursor 

cursoragent and others added 7 commits July 1, 2026 06:10
New Next.js app for community prompt writing practice:
- Challenge list with seed data and admin CRUD
- Real-time rule-based prompt structure scoring
- Star ratings from other users with leaderboard
- Session-based nickname auth, history, sharing
- Docker and Render deployment config

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
…eval, OAuth, ads

- Comments and reports with auto-hide after 3 reports
- Admin moderation for submissions, pending challenges, reports
- User-submitted challenges with pending/approve workflow
- OpenAI LLM scoring on submission with daily rate limit
- Google OAuth via NextAuth v5 alongside nickname sessions
- AdSlot on home, challenge detail, leaderboard pages
- Updated docs, privacy policy, and Render env vars

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
…ge gen, email auth, push

- Comment threads with parent_id and reply UI (max 2 levels)
- GitHub and Apple OAuth via refactored NextAuth providers
- LLM challenge generation API and UI for users and admin
- Email/password register and login with bcrypt
- Web push notifications on comment, rating, challenge approval
- Service worker, push subscribe API, history page notify button
- Updated REQUIREMENTS, README, render.yaml, privacy policy

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
- Add email verification flow with SMTP mailer and auth tokens
- Add password reset via forgot/reset pages and APIs
- Enforce email verification for submissions, comments, and challenges
- Support recursive comment threads up to 5 levels deep
- Add PWA manifest, icons, and shared service worker registration
- Update REQUIREMENTS.md and privacy policy for Phase 4

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
- Add categories, tags, and challenge filtering (DB, API, UI)
- Integrate next-intl with ja/en routing and LocaleSwitcher
- Extend service worker with cache strategy and offline page
- Localize mail templates and main auth/home UI
- Update REQUIREMENTS.md to v5.0

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
- Add api-errors.ts and mapApiError for localized API error codes
- Extend errorCode coverage across auth, admin, session, and CRUD routes
- Complete UI i18n for auth pages, submission detail, and shared components
- Add English terms/privacy content via LegalContent component
- Implement IndexedDB offline queue with OfflineSyncProvider and SyncBadge
- Add Capacitor mobile shell (mobile/) with setup README
- Update REQUIREMENTS.md to v6.0

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
- Add mapApiMessage for localized API success messageCode responses
- Migrate report, register, and challenges APIs to messageCode/errorCode
- Localize AdminDashboard, ReportButton, PushNotifyButton, LLMEvaluationDisplay, AdSlot
- Add locale-aware prompt evaluator and evaluate API
- Add PWA icons and per-locale manifest.webmanifest route
- Update REQUIREMENTS.md to v7.0

Co-authored-by: maouM-cmd <maouM-cmd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants