WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#28123 closed defect (bug) (fixed)

Duplicate strings for tabs in theme install page

Reported by: pavelevap Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: I18N Keywords: has-patch commit
Focuses: Cc:

Description

There are several duplicate strings, for example:

  • "Featured" with context "Theme Installer"

https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php#L44

  • "Featured" with context "themes"

https://core.trac.wordpress.org/browser/trunk/src/wp-admin/theme-install.php#L123

But it is the same context. We do not need several duplicate strings. I am not sure if older strings are needed in new redesign of install page? But we should use the same context and combine strings, I guess.

Attachments (2)

combine_theme_install_strings.patch (2.1 KB) - added by pavelevap 5 years ago.
28123.patch (996 bytes) - added by SergeyBiryukov 5 years ago.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 4.0

WP_Theme_Install_List_Table is no longer used, but yes, we should use a consistent context.

#2 @pavelevap
5 years ago

I can make a patch, but I am not sure if only combine context or there will be some code cleanup changes (removing not used parts).

#3 @SergeyBiryukov
5 years ago

Let's just combine the context for now.

#4 @pavelevap
5 years ago

OK, thank you! I tried to combine strings and as a result 4 strings can be removed.

  • "Fetured" (same strings with different context).
  • Changed "Latest" to "Newest" (combine strings and respect also Plugin Installer)
  • Combined "Upload" and "Upload Theme" (same meaning).
  • Commented "Recenty Updated" (not used and needed).

I am not sure about all these changes, so please look at it.

#5 @SergeyBiryukov
5 years ago

  • Keywords has-patch commit added

I'd suggest using the newer context, 'themes': 28123.patch.

It would still allow us to remove 3 strings. 'Recently Updated' is indeed unused, but I think we should keep it until the whole WP_Theme_Install_List_Table class is removed.

#6 @pavelevap
5 years ago

No problem :-) Only 2 strings ("Featured" and "Latest") will be removed when "Upload" and "Upload Theme" will not be merged.

#7 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28287:

Use a consistent context to remove duplicate strings.

props pavelevap.
fixes #28123.

Note: See TracTickets for help on using tickets.