Skip to content

QV vote button hardcoded to English under non-English locale #93

Description

@hankpan99

Problem

On the regular QV vote stage, the navigation button is hardcoded to English (Next Question → / Next Module →) and ignores the survey locale. Under zh-TW, respondents see English instead of Chinese.

(QVPlus flow is unaffected — already fixed separately.)

When it happens

  • Survey has 2+ QV questions → button shows Next Question →.
  • QV block is followed by another module → button shows Next Module →.
  • A single trailing QV question is fine (falls through to localized Submit).

The hardcoded code

client/src/pages/survey/components/QuadraticSurveyPage.tsx:246-250:

const votePrimaryLabel = !isLastNavigatorQuestion
  ? 'Next Question →'      // <-- hardcoded English
  : hasNextModule
    ? 'Next Module →'      // <-- hardcoded English
    : undefined;

This is passed to QsNavBar as voteCtaLabel. In QsNavBar.tsx:245:

voteCtaLabel || (voteCtaMode === 'next' ? labels.text.nextQuestion : labels.text.submit)

the hardcoded voteCtaLabel shadows the already-localized labels.text.nextQuestion (下一題 →), so the translation is never used.

Fix

  • Replace the literals with resolvedQvLabels.text.nextQuestion / a new nextModule key (only nextQuestion is translated today; Next Module → has none).
  • Do it on a branch off main (touches the shared/regular QV path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions