Make WordPress Core

Opened 9 years ago

Last modified 9 years ago

#19832 closed defect (bug)

Optimization of loaded translations — at Version 7

Reported by: pavelevap Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: I18N Keywords: close
Focuses: Cc:

Description (last modified by nacin)

Originally suggested by Chouby: 17128#comment:15

Localization file is bigger and bigger with every new release. It would be very helpfull to split it into several files:

1) Frontend - There are only several strings which are needed on frontend side, but localization file is loaded as a whole.

2) Backend

3) Akismet - Please remove Akismet strings from default localization file. I understand that there is any reason to bundle Akismet with WordPress, no problem, but why all users have to load many strings when they do not need them? Akismet is not updated with WordPress anymore, but strings are still available...

4) Consider About page and Help tabs. There are many long strings and not all users need them translated. They would be much more happier when they could save 2 - 3 MB of memory_limit. It could be help textdomain which would be enabled by default, but could be turned off for example by plugin.

Together with Language packs it would be real improvement for 3.4.

Related: #17128

Change History (7)

#1 @SergeyBiryukov
9 years ago

See #19597 for Akismet.

#2 @wet
9 years ago

  • Cc r.wetzlmayr@… added

#3 @pavelevap
9 years ago

Thank you, I thought that this ticket is especially for header information, but you are right, there is also special textdomain mentioned.

#4 @DrewAPicture
9 years ago

  • Cc xoodrew@… added

#5 @jottlieb
9 years ago

  • Cc jottlieb@… added

#6 @knutsp
9 years ago

  • Cc knut@… added

#7 @nacin
9 years ago

  • Description modified (diff)

Akismet will get pulled out, #19597.

Isolating the About strings is interesting, but how much are we really talking? Let's assume only about.php, credits.php, freedoms.php. What's our memory actually saved? I doubt much.

Removing the help strings would require a manual textdomain. And since help appears almost everywhere in the admin, it'd be loaded on every page. No huge benefit here. Ideas?

Splitting the admin and the frontend is worthy. We would need to load the admin textdomain in includes/admin.php if it isn't already loaded, in the case of including the admin includes bootstrap on the frontend (admin-ajax, just one core example).

I think the idea of tagging strings in is_multisite() branches with an explicit, manual textdomain is additionally intriguing.

Since this ticket proposes a number of ideas I am going to spin off the admin/frontend split and mark it as a task.

Note: See TracTickets for help on using tickets.