Skip to content

WEBDEV-9240: Localize the ia-reviews strings - #133

Open
jbuckner wants to merge 6 commits into
WEBDEV-8840-review-servicefrom
WEBDEV-9240-localize-reviews
Open

jbuckner wants to merge 6 commits into
WEBDEV-8840-review-servicefrom
WEBDEV-9240-localize-reviews

Conversation

@jbuckner

@jbuckner jbuckner commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Wraps the rest of the ia-reviews strings in msg() and makes them follow a live locale switch.

WEBDEV-9240: https://webarchive.jira.com/browse/WEBDEV-9240

🤖 Generated with Claude Code

https://claude.ai/code/session_01N6GtWdx3xKytP8c8CLtpAX

jbuckner and others added 2 commits October 1, 2026 12:08
Switching to Spanish left most of ia-reviews in English. Ten msg() calls
failed extraction outright (template literals with an expression and no
str tag, and msg() on a stored string), "Delete this review" and
"(edited)" were never wrapped, and none of the three elements re-rendered
on a locale switch.

- Add @Localized() to ia-reviews, ia-review and ia-review-form.
- Use str for the review count, star titles, rating labels, character
  limits and the edited date. Split "Display review(s)" and "Rate N
  star(s)" into whole messages per form.
- Resolve the recaptcha and generic errors, the delete outcome and the
  "Anonymous" fallback when they render, not when the element is built
  or the event fires. submitterScreenname is optional now.
- The review date stays en-us. @lit/localize only exposes getLocale from
  configureLocalization, which the app owns.

ia-reviews-localization.test.ts switches the locale live against a
test-only catalog. Reverting each fix fails its own test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6GtWdx3xKytP8c8CLtpAX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N6GtWdx3xKytP8c8CLtpAX
@jbuckner
jbuckner added this pull request to stack #123 October 1, 2026 19:08
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://internetarchive.github.io/elements/pr/pr-133/

Built to branch ghpages at 2026-10-12 20:24 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.04651% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.70%. Comparing base (c754af1) to head (9179a10).

Files with missing lines Patch % Lines
src/elements/ia-reviews/ia-review-form.ts 86.20% 2 Missing and 2 partials ⚠️
src/elements/ia-reviews/ia-reviews.ts 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           WEBDEV-8840-review-service     #133      +/-   ##
==============================================================
+ Coverage                       90.42%   90.70%   +0.27%     
==============================================================
  Files                             107      107              
  Lines                            3886     3904      +18     
  Branches                          964      970       +6     
==============================================================
+ Hits                             3514     3541      +27     
+ Misses                            153      150       -3     
+ Partials                          219      213       -6     

☔ 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.

jbuckner and others added 4 commits October 6, 2026 15:00
…iews

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RgyoVnVd6Wt6HHbGy3Vuvh

* origin/WEBDEV-8840-review-service:
  WEBDEV-9107: Answer the delete request locally in the reviews demo
* origin/WEBDEV-8840-review-service:
  1.1.6 (#145)
  WEBDEV-9329: Update the Firefox add-on link in ia-topnav (#143)
  WEBDEV-9241: Add ia-wayback-search-form for the home page Wayback block (#134)
  WEBDEV-9219: Localize the topnav strings (#125)
  WEBDEV-9051: Migrate the donation form models, currency validator and form section into elements (#98)
  WEBDEV-9038: Migrate the topnav into elements (#95)
* origin/WEBDEV-8840-review-service:
  WEBDEV-9052: Migrate edit-donation into elements (#100)

This branch has not been deployed

No deployments
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