[wp-trac] [WordPress Trac] #19832: Optimization of loaded translations

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 18 18:07:27 UTC 2012


#19832: Optimization of loaded translations
--------------------------+------------------------------
 Reporter:  pavelevap     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:  3.3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Old description:

> Originally suggested by Chouby:
> http://core.trac.wordpress.org/ticket/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: http://core.trac.wordpress.org/ticket/17128

New description:

 Originally suggested by Chouby: [ticket: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

--

Comment (by nacin):

 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19832#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list