Skip to content

[new Ranking Pages] Add 18n messages for ranking page titles with "the World"#6239

Merged
juliawu merged 5 commits into
datacommonsorg:masterfrom
juliawu:the-world-i18n
Apr 27, 2026
Merged

[new Ranking Pages] Add 18n messages for ranking page titles with "the World"#6239
juliawu merged 5 commits into
datacommonsorg:masterfrom
juliawu:the-world-i18n

Conversation

@juliawu
Copy link
Copy Markdown
Contributor

@juliawu juliawu commented Apr 24, 2026

As a followup to the comments in #6235 discussing translations, this PR adds translation strings for ranking page titles that contain "the World", so that they will be translated the next time we submit strings for translation. There is no change to UI or functionality.

@juliawu juliawu requested a review from nick-nlb April 24, 2026 17:36
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces new internationalization (i18n) message definitions to support localized titles for ranking pages that reference 'the World'. These changes prepare the codebase for upcoming translation submissions without altering existing UI behavior or functionality.

Highlights

  • Internationalization Support: Added new translation keys for ranking page titles that include 'the World' to support future localization efforts.
  • Code Documentation: Updated comments in the ranking route handler to clarify the current limitation regarding 'the World' page titles and the plan for future removal of hardcoded strings.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds several new internationalization message keys for world-level ranking titles in i18n_ranking_messages.ts and updates a TODO comment in html.py regarding the localization strategy for 'the World' page titles. A review comment suggested refining the TODO text to more accurately reflect that the message keys have now been defined and the next step is to update the frontend to utilize them.

Comment thread server/routes/ranking/html.py Outdated
Comment thread static/js/i18n/i18n_ranking_messages.ts Outdated
},
topPlacesWorldTitle: {
id: "ranking-subtitle_top_world",
defaultMessage: "Top {rankSize} {pluralPlaceType} in the World",
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.

With {placeName}, this gets interpolated as a link. Here with the raw text, as it is the "the World" will not be wrapped in an anchor.

We'll only deal with the actual link creation later, but to prepare for it before these get translated, we can wrap "the World" in a rich text tag: Top {rankSize} {pluralPlaceType} in <worldLink>the World</worldLink>.

The translators will then be able to rearrange the string as they see fit for their languages (i.e. {pluralPlaceType} del <worldLink>mundo</worldLink>)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great callout! Wrapped "the World" with <worldLink> and updated the descriptions.

@juliawu juliawu requested a review from nick-nlb April 27, 2026 18:01
Copy link
Copy Markdown
Contributor

@nick-nlb nick-nlb left a comment

Choose a reason for hiding this comment

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

LGTM!

@juliawu juliawu enabled auto-merge (squash) April 27, 2026 22:13
@juliawu juliawu merged commit ed9acfb into datacommonsorg:master Apr 27, 2026
13 checks passed
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