Skip to content

Add "Why Trust Metaculus" page at /why#4531

Open
ryooan wants to merge 2 commits intomainfrom
claude/issue-4530-implement-why-trust-metaculus-page
Open

Add "Why Trust Metaculus" page at /why#4531
ryooan wants to merge 2 commits intomainfrom
claude/issue-4530-implement-why-trust-metaculus-page

Conversation

@ryooan
Copy link
Copy Markdown
Contributor

@ryooan ryooan commented Mar 24, 2026

Implements a new page at metaculus.com/why with content explaining why Metaculus forecasts are trustworthy, including sections on accuracy, how forecasts are made, and comparison to prediction markets.

Closes #4530

Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Launched a localized "Why trust Metaculus?" informational page (EN, ES, PT, CS, ZH-TW, ZH) explaining accuracy, forecasting approach, comparisons, and credibility, with rich-text links and illustrative images.
  • Chores
    • Minor i18n content fixes to ensure JSON validity and clean punctuation in localized strings.

Implements a new page at metaculus.com/why with content explaining
why Metaculus forecasts are trustworthy, including sections on accuracy,
how forecasts are made, and comparison to prediction markets.

Adds translation keys to all 6 language files (en, es, cs, pt, zh, zh-TW).

Closes #4530

Co-authored-by: Ryan Beck <ryooan@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

Adds a new static Next.js page at /why and 16 new localized translation keys across six language files (en, cs, es, pt, zh, zh-TW). The page loads translations, renders rich-text links and images, and exposes page metadata.

Changes

Cohort / File(s) Summary
Internationalization
front_end/messages/en.json, front_end/messages/cs.json, front_end/messages/es.json, front_end/messages/pt.json, front_end/messages/zh.json, front_end/messages/zh-TW.json
Added ~16 whyTrustMetaculus* i18n keys per file containing multi-paragraph marketing/copy with embedded rich-text/link placeholders (e.g., <wisdomLink>, <agiLink>). Minor punctuation/JSON formatting tweaks to existing thousandsOfOpenQuestions / feedTileSummaryPlaceholder.
Why page implementation
front_end/src/app/(main)/why/page.tsx
New Next.js App Router page exporting metadata and default async WhyTrustMetaculusPage. Loads localized copy via getTranslations(), uses t.rich for rich-text links, renders headings/paragraphs, and includes two next/image figures with alt text from translations.

Sequence Diagram(s)

sequenceDiagram
participant Browser
participant NextJS
participant I18n
participant CDN
Browser->>NextJS: GET /why
NextJS->>I18n: getTranslations(locale)
I18n-->>NextJS: localized strings (whyTrustMetaculus*)
NextJS->>CDN: request images (next/image unoptimized)
CDN-->>NextJS: image assets
NextJS-->>Browser: HTML with rendered content, links, and images
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • hlbmtc

Poem

🐰✨ I stitched a page about truth and light,
Six tongues singing wisdom, clear and bright—
Links that guide, images that show,
Crowd forecasts that help futures grow. 🎯📈

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a new informational page at /why titled "Why Trust Metaculus", which matches the primary objective.
Linked Issues check ✅ Passed The pull request implements all coding requirements from issue #4530: new /why page with sections on accuracy, forecasting mechanics, market comparison, and public resource positioning, with translations across locales.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the /why page and its translations; no unrelated modifications detected beyond the stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-4530-implement-why-trust-metaculus-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
front_end/src/app/(main)/why/page.tsx (1)

62-69: Avoid opting out of Next image optimization for static page assets.

At Line 68 and Line 153, unoptimized disables resizing/optimization for both large images. If these domains are allowed in Next image config, removing unoptimized will improve payload efficiency and caching behavior.

Also applies to: 147-154

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@front_end/src/app/`(main)/why/page.tsx around lines 62 - 69, The Image
components in page.tsx are using the unoptimized prop which disables Next.js
image optimization; remove the unoptimized prop from the Image elements (the
instance rendering the why-trust-agi-citations.png and the other large image
around lines 147-154) and ensure the source domain
"metaculus-web-media.s3.amazonaws.com" (and any other external image host used)
is added to the Next.js images.domains configuration so Next can
resize/cache/serve optimized images.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@front_end/messages/cs.json`:
- Around line 2075-2090: The Czech locale file contains English strings for the
new "why" page; replace the English text with Czech translations for the listed
message keys (e.g. whyTrustMetaculusTitle, whyTrustMetaculusIntro1,
whyTrustMetaculusIntro2, whyTrustMetaculusIntro3,
whyTrustMetaculusAgiCitationsAlt, whyTrustMetaculusIntro4,
whyTrustMetaculusAccuracyTitle, whyTrustMetaculusAccuracy1,
whyTrustMetaculusAccuracy2, whyTrustMetaculusAccuracy3,
whyTrustMetaculusForecastsTitle, whyTrustMetaculusForecasts1,
whyTrustMetaculusForecasts2, whyTrustMetaculusMarketsComparisonAlt,
whyTrustMetaculusLessNoiseTitle, whyTrustMetaculusLessNoise) keeping inline
tags/links (e.g. <wisdomLink>, <outperformLink>, <agiLink>) intact; update
cs.json with accurate Czech translations, validate the JSON, and preview the
/why page to confirm translations render correctly.

In `@front_end/messages/es.json`:
- Around line 2075-2090: The Spanish locale still contains English strings for
the new whyTrustMetaculus* keys (e.g., whyTrustMetaculusTitle,
whyTrustMetaculusIntro1–4, whyTrustMetaculusAgiCitationsAlt,
whyTrustMetaculusAccuracyTitle, whyTrustMetaculusAccuracy1–3,
whyTrustMetaculusForecastsTitle, whyTrustMetaculusForecasts1–2,
whyTrustMetaculusMarketsComparisonAlt, whyTrustMetaculusLessNoiseTitle,
whyTrustMetaculusLessNoise); replace each English value with an accurate Spanish
translation while preserving embedded HTML/link placeholders (like <wisdomLink>,
<outperformLink>, <agiLink>, etc.), keep JSON string escaping/encoding correct
(UTF-8), and run a JSON validation check to ensure the file remains valid after
edits.

In `@front_end/messages/pt.json`:
- Around line 2073-2088: The Portuguese locale entries for the why page (keys
like whyTrustMetaculusTitle, whyTrustMetaculusIntro1, whyTrustMetaculusIntro2,
whyTrustMetaculusIntro3, whyTrustMetaculusAgiCitationsAlt,
whyTrustMetaculusIntro4, whyTrustMetaculusAccuracyTitle,
whyTrustMetaculusAccuracy1, whyTrustMetaculusAccuracy2,
whyTrustMetaculusAccuracy3, whyTrustMetaculusForecastsTitle,
whyTrustMetaculusForecasts1, whyTrustMetaculusForecasts2,
whyTrustMetaculusMarketsComparisonAlt, whyTrustMetaculusLessNoiseTitle,
whyTrustMetaculusLessNoise) are still in English; translate each value into
Portuguese while preserving all rich-text placeholders/tags exactly (e.g.,
<wisdomLink>, <outperformLink>, <agiLink>, <forbesLink>, <acx2023Link>,
<acx2024Link>, <midtermsLink>, <covidLink>, <trackRecordLink>, <warLink>,
<scoringLink>, <marketsLink>, <leaderboardLink>, <tournamentsLink>,
<servicesLink>) and keep alt text semantics for *_Alt keys; update the locale
file entries to the Portuguese translations.

In `@front_end/messages/zh-TW.json`:
- Around line 2072-2087: The new why-page localization keys (e.g.,
whyTrustMetaculusTitle, whyTrustMetaculusIntro1, whyTrustMetaculusIntro2,
whyTrustMetaculusIntro3, whyTrustMetaculusAgiCitationsAlt,
whyTrustMetaculusIntro4, whyTrustMetaculusAccuracyTitle,
whyTrustMetaculusAccuracy1, whyTrustMetaculusAccuracy2,
whyTrustMetaculusAccuracy3, whyTrustMetaculusForecastsTitle,
whyTrustMetaculusForecasts1, whyTrustMetaculusForecasts2,
whyTrustMetaculusMarketsComparisonAlt, whyTrustMetaculusLessNoiseTitle,
whyTrustMetaculusLessNoise) are still in English—translate each value into
Traditional Chinese (zh-TW), preserving inline link tags like <wisdomLink>,
<outperformLink>, <agiLink>, etc., and keep alt text semantics intact (e.g.,
whyTrustMetaculusAgiCitationsAlt); ensure translations match tone/length of
other zh-TW strings and confirm punctuation/encoding are correct for JSON.

In `@front_end/messages/zh.json`:
- Around line 2077-2092: The new /why strings in zh.json (keys:
whyTrustMetaculusTitle, whyTrustMetaculusIntro1, whyTrustMetaculusIntro2,
whyTrustMetaculusIntro3, whyTrustMetaculusAgiCitationsAlt,
whyTrustMetaculusIntro4, whyTrustMetaculusAccuracyTitle,
whyTrustMetaculusAccuracy1, whyTrustMetaculusAccuracy2,
whyTrustMetaculusAccuracy3, whyTrustMetaculusForecastsTitle,
whyTrustMetaculusForecasts1, whyTrustMetaculusForecasts2,
whyTrustMetaculusMarketsComparisonAlt, whyTrustMetaculusLessNoiseTitle,
whyTrustMetaculusLessNoise) are still in English; translate each value into
Simplified Chinese while keeping all inline placeholder/link tags (e.g.,
<wisdomLink>, <outperformLink>, <agiLink>, <forbesLink>, <acx2023Link>,
<acx2024Link>, <midtermsLink>, <covidLink>, <trackRecordLink>, <warLink>,
<scoringLink>, <marketsLink>, <leaderboardLink>, <tournamentsLink>,
<servicesLink>) exactly as they appear so bindings remain intact, and ensure
punctuation and quote escaping follow the existing JSON format.

In `@front_end/src/app/`(main)/why/page.tsx:
- Line 35: The external citation URL used by the outperformLink
(href="http://jasondana.net/docs/2014%20Davis%20Stober%20et%20al.pdf") is plain
HTTP; update the link to use HTTPS
(https://jasondana.net/docs/2014%20Davis%20Stober%20et%20al.pdf) so the
component or constant that defines outperformLink (or the JSX anchor's href)
uses a secure scheme and avoids mixed/weak transport security.
- Around line 7-11: Replace the hardcoded export const metadata with a
locale-aware generateMetadata function that calls getTranslations() to produce
localized title and description; specifically, remove or replace the current
metadata object and implement export async function generateMetadata({ params,
locale }) { const t = await getTranslations(locale); return { title:
t('why.title'), description: t('why.description') }; } (use the existing
translation keys used in the page), so browser/social previews use translated
strings instead of the English literals in metadata.

---

Nitpick comments:
In `@front_end/src/app/`(main)/why/page.tsx:
- Around line 62-69: The Image components in page.tsx are using the unoptimized
prop which disables Next.js image optimization; remove the unoptimized prop from
the Image elements (the instance rendering the why-trust-agi-citations.png and
the other large image around lines 147-154) and ensure the source domain
"metaculus-web-media.s3.amazonaws.com" (and any other external image host used)
is added to the Next.js images.domains configuration so Next can
resize/cache/serve optimized images.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6960828c-9995-4d1d-bc24-c1e0f497bce2

📥 Commits

Reviewing files that changed from the base of the PR and between 0d1586c and b3d9dcd.

📒 Files selected for processing (7)
  • front_end/messages/cs.json
  • front_end/messages/en.json
  • front_end/messages/es.json
  • front_end/messages/pt.json
  • front_end/messages/zh-TW.json
  • front_end/messages/zh.json
  • front_end/src/app/(main)/why/page.tsx

Comment on lines +7 to +11
export const metadata = {
title: "Why Trust Metaculus?",
description:
"Learn why Metaculus is one of the most accurate, well-calibrated forecasting platforms available, built on the wisdom of the crowd and a decade of demonstrated accuracy.",
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and read the relevant lines
cat -n front_end/src/app/\(main\)/why/page.tsx | head -20

Repository: Metaculus/metaculus

Length of output: 1882


🏁 Script executed:

# Search for other generateMetadata() usage in the codebase
rg "generateMetadata" front_end/src/app --type tsx -A 3 | head -50

Repository: Metaculus/metaculus

Length of output: 1878


🏁 Script executed:

# Check for metadata export patterns in other pages
rg "export const metadata" front_end/src/app --type tsx -B 2 -A 3 | head -80

Repository: Metaculus/metaculus

Length of output: 90


Localize route metadata instead of hardcoding English.

The metadata export at lines 7–11 contains hardcoded English strings ("Why Trust Metaculus?" and the description). Since the page body uses getTranslations() for localization, the metadata should too. Otherwise, non-English locales will still display the English title and description in browser/social previews.

Use generateMetadata() with getTranslations():

Proposed fix
+import type { Metadata } from "next";
 import Image from "next/image";
 import Link from "next/link";
 import { getTranslations } from "next-intl/server";
@@
-export const metadata = {
-  title: "Why Trust Metaculus?",
-  description:
-    "Learn why Metaculus is one of the most accurate, well-calibrated forecasting platforms available, built on the wisdom of the crowd and a decade of demonstrated accuracy.",
-};
+export async function generateMetadata(): Promise<Metadata> {
+  const t = await getTranslations();
+  return {
+    title: t("whyTrustMetaculusTitle"),
+    description: t("whyTrustMetaculusIntro1"),
+  };
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@front_end/src/app/`(main)/why/page.tsx around lines 7 - 11, Replace the
hardcoded export const metadata with a locale-aware generateMetadata function
that calls getTranslations() to produce localized title and description;
specifically, remove or replace the current metadata object and implement export
async function generateMetadata({ params, locale }) { const t = await
getTranslations(locale); return { title: t('why.title'), description:
t('why.description') }; } (use the existing translation keys used in the page),
so browser/social previews use translated strings instead of the English
literals in metadata.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4531-claude-issue-4530-implement-wh-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-4530-implement-why-trust-metaculus-page-b3d9dcd
🗄️ PostgreSQL NeonDB branch preview/pr-4531-claude-issue-4530-implement-wh
Redis Fly Redis mtc-redis-pr-4531-claude-issue-4530-implement-wh

Details

  • Commit: f591b4ea9293de37f9846b857d6bc634fe773aaa
  • Branch: claude/issue-4530-implement-why-trust-metaculus-page
  • Fly App: metaculus-pr-4531-claude-issue-4530-implement-wh

ℹ️ Preview Environment Info

Isolation:

  • PostgreSQL and Redis are fully isolated from production
  • Each PR gets its own database branch and Redis instance
  • Changes pushed to this PR will trigger a new deployment

Limitations:

  • Background workers and cron jobs are not deployed in preview environments
  • If you need to test background jobs, use Heroku staging environments

Cleanup:

  • This preview will be automatically destroyed when the PR is closed

Comment on lines +2076 to +2077
"whyTrustMetaculusIntro1": "The world is full of unfounded speculation about the future. If you're like us, you're likely tired of the overconfident claims made by pundits and talking heads that prioritize attention over accuracy, instead of focusing on what's realistic or true. These individuals are rarely held accountable for their bold claims, yet they consistently go viral and dominate the airwaves.",
"whyTrustMetaculusIntro2": "But it doesn't have to be that way. Metaculus was founded to find and reward truth. We provide transparent forecasts that update as new evidence emerges. Rather than rely on any single individual, we draw on the proven <wisdomLink>wisdom of the crowd</wisdomLink> to combine many perspectives, offset individual biases, and generate forecasts that <outperformLink>consistently outperform</outperformLink> an individual's predictions.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All non-English locale files contain the English text verbatim – none of the 16 new translation keys are actually translated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

@claude claude bot Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @hlbmtc's task in 1m 20s —— View job


Addressing review feedback

  • Read current files and understand the English source strings
  • Translate all 16 whyTrustMetaculus* keys into Czech (cs.json)
  • Translate all 16 keys into Spanish (es.json)
  • Translate all 16 keys into Portuguese (pt.json)
  • Translate all 16 keys into Traditional Chinese (zh-TW.json)
  • Translate all 16 keys into Simplified Chinese (zh.json)
  • Fix HTTP → HTTPS for outperformLink in page.tsx
  • Remove fragile scroll-to-text fragment from Forbes URL
  • Commit and push changes

All 16 whyTrustMetaculus* translation keys have been translated into all 5 non-English locales (cs, es, pt, zh-TW, zh). Rich-text placeholder tags are preserved in all translations. Additionally fixed the HTTP → HTTPS issue on the outperformLink and removed the fragile #:~:text= scroll-to-text fragment from the Forbes URL.

Note on export const metadata vs generateMetadata: Kept export const metadata since that's the pattern used by all similar static content pages in this codebase (terms-of-use, faq, privacy-policy, how-to-forecast, etc.). The generateMetadata pattern is only used for dynamic pages (questions, notebooks, tournaments).

Note on locale-based routing: The /why page uses getTranslations() for i18n, which is the more modern approach vs. separate page files per locale (as in terms-of-use). With translations now filled in, all locales will render correctly without needing separate page components.
| Branch

Comment on lines +13 to +15
export default async function WhyTrustMetaculusPage() {
const t = await getTranslations();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other similar content pages (terms-of-use, about, help/guidelines) implement locale-based routing with Portuguese fallbacks:

const locale = await getLocale();
if (locale === "pt") {
  return content_pt();
}

The /why page skips this entirely.

),
forbesLink: (chunks) => (
<a
href="https://www.forbes.com/sites/calumchace/2023/05/02/gpt-to-ban-or-not-to-ban-that-is-the-question/#:~:text=The%20latest%20median%20forecast%20on%20the%20Metaculus%20prediction%20market%20for%20the%20arrival%20of%20full%20AGI%20is%202032."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Forbes URL contains a #:~:text=... scroll-to-text fragment. These are browser-generated and fragile – if Forbes changes page content, the highlight silently stops working. Consider using just the article URL.

@hlbmtc
Copy link
Copy Markdown
Contributor

hlbmtc commented Mar 26, 2026

@claude Check the PR review comments

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

Claude finished @hlbmtc's task in 10m 4s —— View job


Addressing PR review comments

  • Read current files and assess what needs to be done
  • Fix HTTP → HTTPS for outperformLink in page.tsx
  • Remove fragile scroll-to-text fragment from Forbes URL
  • Translate all 16 whyTrustMetaculus* keys into Czech (cs.json)
  • Translate all 16 keys into Spanish (es.json)
  • Translate all 16 keys into Portuguese (pt.json)
  • Translate all 16 keys into Traditional Chinese (zh-TW.json)
  • Translate all 16 keys into Simplified Chinese (zh.json)
  • Push changes to remote

Summary

All code changes are complete and committed locally (373a5c2), but I'm unable to push because:

  1. The remote branch has commit 351d1e3 (from a previous Claude run) that diverged from the local base
  2. I need git fetch + git rebase to reconcile, but these git operations are blocked by the current permission configuration

Changes made (in local commit 373a5c2):

  • page.tsx: Fixed http://https:// for outperformLink; removed fragile #:~:text=... fragment from Forbes URL
  • cs.json: All 16 whyTrustMetaculus* keys translated to Czech
  • es.json: All 16 keys translated to Spanish
  • pt.json: All 16 keys translated to Portuguese
  • zh-TW.json: All 16 keys translated to Traditional Chinese
  • zh.json: All 16 keys translated to Simplified Chinese

To push these changes, please re-trigger with git fetch and git pull allowed, or manually run on this branch:

git fetch origin
git rebase origin/claude/issue-4530-implement-why-trust-metaculus-page
git push origin HEAD

Notes on other review comments:

  • generateMetadata: Kept export const metadata as-is — this matches the pattern used by all similar static pages (terms-of-use, faq, privacy-policy, etc.)
  • Locale-based routing: The /why page uses getTranslations() for i18n. With translations now filled in, all locales render correctly without separate page components.
  • unoptimized on Images: Would require adding the S3 domain to Next.js image config — best addressed in a follow-up.

- Translate all 16 whyTrustMetaculus* keys into Czech, Spanish,
  Portuguese, Traditional Chinese, and Simplified Chinese
- Fix HTTP → HTTPS for outperformLink citation URL
- Remove fragile scroll-to-text fragment from Forbes URL

Co-authored-by: Hlib <hlbmtc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@front_end/messages/zh.json`:
- Line 2088: The JSON value for key whyTrustMetaculusForecasts1 contains
unescaped double quotes around the phrases "可能发生什么" and "为什么", breaking parsing;
update the string for whyTrustMetaculusForecasts1 to escape the inner double
quotes (e.g., use \"可能发生什么\" and \"为什么\") or replace them with safe Chinese
punctuation (e.g., 「可能发生什么」/「为什么」) so the JSON becomes valid and jq parses
correctly, ensuring the key name whyTrustMetaculusForecasts1 is unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f033dd0d-6172-4ccb-b91a-99380f16dfcd

📥 Commits

Reviewing files that changed from the base of the PR and between b3d9dcd and 351d1e3.

📒 Files selected for processing (6)
  • front_end/messages/cs.json
  • front_end/messages/es.json
  • front_end/messages/pt.json
  • front_end/messages/zh-TW.json
  • front_end/messages/zh.json
  • front_end/src/app/(main)/why/page.tsx
✅ Files skipped from review due to trivial changes (1)
  • front_end/messages/pt.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • front_end/src/app/(main)/why/page.tsx
  • front_end/messages/es.json
  • front_end/messages/zh-TW.json

"whyTrustMetaculusAccuracy2": "经过十年的预测积累,Metaculus 已充分证明其聚合结果——社区预测——的准确性。平均而言,社区预测对最终发生的事件给出比个人更高的概率,对未发生的事件给出更低的概率。在预测竞赛中,它持续击败大多数人类和 AI 预测者,包括数千人参与的大型竞赛(例如 ACX 预测锦标赛,Metaculus 在<acx2023Link>2023 年</acx2023Link>位列第 99.5 百分位,在<acx2024Link>2024 年</acx2024Link>位列第 97.7 百分位)。在 2022 年美国中期选举中,Metaculus <midtermsLink>的预测表现名列前茅</midtermsLink>,超过了真实货币预测市场和 FiveThirtyEight——后者通常被视为美国选举预测的黄金标准。而在 COVID-19 疫情初期,社区预测的表现也<covidLink>优于</covidLink> CDC 专家。",
"whyTrustMetaculusAccuracy3": "Metaculus 的<trackRecordLink>公开历史记录</trackRecordLink>表明,社区预测同样经过良好校准,即它能准确估计自身的不确定性——当 Metaculus 预测某事发生的概率为 70% 时,该事件实际发生的频率大约就是 70%。",
"whyTrustMetaculusForecastsTitle": "Metaculus 上的预测是如何进行的?",
"whyTrustMetaculusForecasts1": "任何人都可以在 Metaculus 注册,并提交对某个问题结果的概率判断。例如,用户可能对<warLink>2035 年前是否会爆发美中战争?</warLink>这一问题给出 10% 的概率。预测者还被鼓励在评论中分享推理过程,形成相互学习、持续修正估计的反馈循环。这不仅提升了群体预测的准确性,也让决策者不仅能了解"可能发生什么",更能理解"为什么"。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify JSON is valid after the fix
jq empty front_end/messages/zh.json

# Print the target key for spot-check
rg -n '^\s*"whyTrustMetaculusForecasts1"\s*:' front_end/messages/zh.json

Repository: Metaculus/metaculus

Length of output: 124


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read line 2088 with context to see the unescaped quotes
echo "=== Line 2088 with line numbers ==="
sed -n '2088p' front_end/messages/zh.json | head -c 500

echo ""
echo ""

# Try to find the exact position of problematic quotes
echo "=== Checking column 448 area on line 2088 ==="
sed -n '2088p' front_end/messages/zh.json | cut -c 430-470

echo ""
echo ""

# Count straight quotes in the line to confirm unescaped quotes issue
echo "=== Counting straight quotes in line 2088 ==="
sed -n '2088p' front_end/messages/zh.json | grep -o '"' | wc -l

Repository: Metaculus/metaculus

Length of output: 431


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Test if the proposed fix (replacing "" with 「」) makes JSON valid
echo "=== Testing proposed fix ==="

# Create a temporary corrected version
cp front_end/messages/zh.json /tmp/zh_fixed.json

# Apply the fix: replace the unescaped quotes with corner brackets
sed -i '2088s/"可能发生什么"/"「可能发生什么」"/g' /tmp/zh_fixed.json
sed -i '2088s/"为什么"/"「为什么」"/g' /tmp/zh_fixed.json

# Actually, the fix should use 「」 not quotes around them
# Let me redo this correctly
cp front_end/messages/zh.json /tmp/zh_fixed.json
sed -i '2088s/"可能发生什么"/「可能发生什么」/g' /tmp/zh_fixed.json
sed -i '2088s/"为什么"/「为什么」/g' /tmp/zh_fixed.json

echo "Testing corrected JSON..."
if jq empty /tmp/zh_fixed.json 2>&1; then
  echo "✓ JSON is valid after fix"
else
  echo "✗ JSON still invalid after fix"
fi

# Also check for similar issues elsewhere
echo ""
echo "=== Checking for other unescaped quote patterns in zh.json ==="
rg '": "[^"]*"[^"]*"' front_end/messages/zh.json | head -20

Repository: Metaculus/metaculus

Length of output: 917


Fix invalid JSON string escaping in whyTrustMetaculusForecasts1.

Line 2088 contains unescaped double quotes in the value ("可能发生什么" and "为什么"), which breaks JSON parsing. The jq parser confirms this at column 448.

🔧 Proposed fix
-  "whyTrustMetaculusForecasts1": "任何人都可以在 Metaculus 注册,并提交对某个问题结果的概率判断。例如,用户可能对<warLink>2035 年前是否会爆发美中战争?</warLink>这一问题给出 10% 的概率。预测者还被鼓励在评论中分享推理过程,形成相互学习、持续修正估计的反馈循环。这不仅提升了群体预测的准确性,也让决策者不仅能了解"可能发生什么",更能理解"为什么"。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。",
+  "whyTrustMetaculusForecasts1": "任何人都可以在 Metaculus 注册,并提交对某个问题结果的概率判断。例如,用户可能对<warLink>2035 年前是否会爆发美中战争?</warLink>这一问题给出 10% 的概率。预测者还被鼓励在评论中分享推理过程,形成相互学习、持续修正估计的反馈循环。这不仅提升了群体预测的准确性,也让决策者不仅能了解「可能发生什么」,更能理解「为什么」。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"whyTrustMetaculusForecasts1": "任何人都可以在 Metaculus 注册,并提交对某个问题结果的概率判断。例如,用户可能对<warLink>2035 年前是否会爆发美中战争?</warLink>这一问题给出 10% 的概率。预测者还被鼓励在评论中分享推理过程,形成相互学习、持续修正估计的反馈循环。这不仅提升了群体预测的准确性,也让决策者不仅能了解"可能发生什么",更能理解"为什么"。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。",
"whyTrustMetaculusForecasts1": "任何人都可以在 Metaculus 注册,并提交对某个问题结果的概率判断。例如,用户可能对<warLink>2035 年前是否会爆发美中战争?</warLink>这一问题给出 10% 的概率。预测者还被鼓励在评论中分享推理过程,形成相互学习、持续修正估计的反馈循环。这不仅提升了群体预测的准确性,也让决策者不仅能了解可能发生什么,更能理解为什么。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。",
🧰 Tools
🪛 Biome (2.4.9)

[error] 2088-2088: expected , but instead found 可能发生什么

(parse)


[error] 2088-2088: expected : but instead found ",更能理解"

(parse)


[error] 2088-2088: expected , but instead found 为什么

(parse)


[error] 2088-2088: expected : but instead found "。每个问题都有明确的结果定义,由具体、严格的解析标准支撑。个人预测者会获得一个专门<scoringLink>设计</scoringLink>用于激励其如实表达真实判断的评分。社区预测是对所有个人预测进行时间加权的稳健聚合。"

(parse)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@front_end/messages/zh.json` at line 2088, The JSON value for key
whyTrustMetaculusForecasts1 contains unescaped double quotes around the phrases
"可能发生什么" and "为什么", breaking parsing; update the string for
whyTrustMetaculusForecasts1 to escape the inner double quotes (e.g., use
\"可能发生什么\" and \"为什么\") or replace them with safe Chinese punctuation (e.g.,
「可能发生什么」/「为什么」) so the JSON becomes valid and jq parses correctly, ensuring the
key name whyTrustMetaculusForecasts1 is unchanged.

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.

Implement why trust Metaculus page

3 participants