Skip to content

CMM-2132: Send the app language slug when fetching blogging prompts#23057

Draft
nbradbury wants to merge 1 commit into
trunkfrom
cmm-2132-daily-blogging-prompts-locale
Draft

CMM-2132: Send the app language slug when fetching blogging prompts#23057
nbradbury wants to merge 1 commit into
trunkfrom
cmm-2132-daily-blogging-prompts-locale

Conversation

@nbradbury

@nbradbury nbradbury commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

A Turkish customer reported that daily blogging prompts were appearing in English even though the app language was set to Turkish (CMM-2132).

After looking into this it appeared the problem was that we were requesting prompts using the language code tr_TR instead of the correct code (tr). This PR resolves this, but it doesn't fix the problem - which suggests a problem with the backend.

This change is still a legitimate correctness fix (sends the properly-formatted slug, consistent with Reader/Stats) and is a prerequisite for prompt localization to ever work, but the ticket also needs a backend follow-up to confirm/add prompt translations.

Testing instructions

Prerequisites: a WordPress.com or Jetpack site with the Blogging Prompts card enabled.

Verify the request format:

  1. Set the app language to a non-English locale (Settings → App Settings → language, API 33+).
  2. Open the My Site dashboard so the Blogging Prompt card loads.
  • With Volley verbose logging (adb shell setprop log.tag.Volley VERBOSE), confirm the request is .../wpcom/v3/sites/{id}/blogging-prompts/?...&_locale=<slug> with a clean slug (e.g. tr), and that there is no duplicate _locale parameter.

Regression check:

  1. Confirm the Blogging Prompt card and the Prompts list still load prompts normally in English.
  • Verify prompts still appear and the card behaves as before.
  • Verify existing unit tests pass (fluxc BloggingPromptsRestClientTest/BloggingPromptsStoreTest, WordPress FetchBloggingPromptsListUseCaseTest/BloggingPromptCardViewModelSliceTest).

The blogging prompts fetch relied on the framework's default _locale, which
is region-qualified (e.g. tr_TR). WP.com content endpoints resolve
translations by the clean language slug (tr), so pass PerAppLocaleManager's
language code explicitly and disable the framework locale for this request,
matching how Reader and Stats already localize content.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr23057-f17af21
Build Number1497
Application IDorg.wordpress.android.prealpha
Commitf17af21
Installation URL7fru0fk597ppg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr23057-f17af21
Build Number1497
Application IDcom.jetpack.android.prealpha
Commitf17af21
Installation URL30geb5cfmf0qg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@nbradbury nbradbury added Do Not Merge PR shouldn't be merged, failing the build Localization labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.44%. Comparing base (7e0ac61) to head (f17af21).

Files with missing lines Patch % Lines
...loggingprompts/BloggingPromptCardViewModelSlice.kt 28.57% 5 Missing ⚠️
...luxc/network/rest/wpcom/WPComGsonRequestBuilder.kt 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #23057   +/-   ##
=======================================
  Coverage   37.44%   37.44%           
=======================================
  Files        2326     2326           
  Lines      125606   125619   +13     
  Branches    17249    17249           
=======================================
+ Hits        47035    47043    +8     
- Misses      74748    74753    +5     
  Partials     3823     3823           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge PR shouldn't be merged, failing the build Localization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants