Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

#65895 closed enhancement (fixed)

In About.php update "Welcome to WordPress (version)" to a dynamic string

Reported by: NekoJonez Owned by: peterwilsoncc
Priority: low Milestone: 7.2
Component: Help/About Version:
Severity: normal Keywords: good-first-bug has-patch
Cc: Focuses:

Description

https://translate.wordpress.org/projects/wp/dev/admin/nl-be/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=27039&sort%5Bby%5D=translation_date_added&sort%5Bhow%5D=asc&historypage

https://build.trac.wordpress.org/browser/trunk/wp-admin/about.php?marks=63#L63

In my honest opinion, to save a little bit of time for the translators and not have a string with many olds and updating every new version... I think it would be nice if this string also had %s so one variable needs to be updated.

Change History (9)

#2 in reply to: ↑ 1 ; follow-up: @NekoJonez
4 weeks ago

Replying to mukesh27:

WordPress 7.0 also have similar string https://build.trac.wordpress.org/browser/tags/7.0/wp-admin/about.php#L65
WordPress 6.9 - https://build.trac.wordpress.org/browser/tags/6.9/wp-admin/about.php#L65

Looking at my NL_BE translation history, it was at one point a dynamic string. So, this must have changed in the release of 6.8 -> 6.9? Maybe? But yes, those two versions also had that non-dynamic string.

#3 in reply to: ↑ 2 ; follow-up: @SergeyBiryukov
4 weeks ago

  • Component GeneralHelp/About
  • Milestone Awaiting Review7.2

Replying to NekoJonez:

Looking at my NL_BE translation history, it was at one point a dynamic string. So, this must have changed in the release of 6.8 -> 6.9? Maybe?

Yes, it appears that we still have WordPress %s as a dynamic string added for 6.1 in [54499] / #56357, but also Welcome to WordPress 6.9 was added with a hardcoded number in [61204] / #63941. Perhaps it was originally intended for that release only, but now it can be changed to a dynamic string too.

#4 @mukesh27
4 weeks ago

  • Keywords good-first-bug needs-patch added

This ticket was mentioned in PR #13100 on WordPress/wordpress-develop by @khokansardar.


4 weeks ago
#5

  • Keywords has-patch added; needs-patch removed

The About page heading hardcodes the version as Welcome to WordPress 7.1, so translators retranslate it every major release.

The dynamic Welcome to WordPress %s form was in core through 6.7, but [61204] reintroduced a hardcoded number. This restores the placeholder and passes $display_major_version, the same variable the two sibling headings on the page already use.

Rendered output is unchanged; $display_major_version is the major version, so point releases still read Welcome to WordPress 7.1.

Trac ticket: https://core.trac.wordpress.org/ticket/65895

## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Reviewing the ticket, locating the existing version-heading idiom in the same file, and confirming the rendered heading is unchanged. All changes were reviewed and validated by me.

@mukesh27 commented on PR #13100:


4 weeks ago
#6

@itzmekhokan Thanks for the PR!

When an issue is marked as good-first-bug, please don't pick it up, as these issues are intended for new contributors who are looking to make their first contribution and learn how the contribution process works.

@khokansardar commented on PR #13100:


4 weeks ago
#7

@itzmekhokan Thanks for the PR!

When an issue is marked as good-first-bug, please don't pick it up, as these issues are intended for new contributors who are looking to make their first contribution and learn how the contribution process works.

🤦‍♂️ my bad.

#8 in reply to: ↑ 3 @NekoJonez
4 weeks ago

Replying to SergeyBiryukov:

Replying to NekoJonez:

Looking at my NL_BE translation history, it was at one point a dynamic string. So, this must have changed in the release of 6.8 -> 6.9? Maybe?

Yes, it appears that we still have WordPress %s as a dynamic string added for 6.1 in [54499] / #56357, but also Welcome to WordPress 6.9 was added with a hardcoded number in [61204] / #63941. Perhaps it was originally intended for that release only, but now it can be changed to a dynamic string too.

#Thinking out loud...

Maybe we should have it in the handbook that when the about page is created, we don't use hardcoded strings? Since, if a fellow contributor makes the about page and takes an old template, it doesn't have the dynamic string, and that's maybe what happened? ... Now, I tell my thinking here not fully knowing how the About page is created for each version, but it might be a nice fix for this too?

#9 @peterwilsoncc
3 weeks ago

  • Owner set to peterwilsoncc
  • Resolutionfixed
  • Status newclosed

In 63329:

Help/About: Update heading string to use placeholder.

Updates the "Welcome to WordPress X.X" heading to use a placeholder for the version number to ease l10n efforts with a reusable string across each version of WordPress.

Props nekojonez, khokansardar, mukesh27, SergeyBiryukov.
Fixes #65895.

Note: See TracTickets for help on using tickets.