Ticket #3315 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Language files in wp-content

Reported by: Nazgul Assigned to: Nazgul
Priority: normal Milestone: 2.1
Component: General Version: 2.1
Severity: normal Keywords: has-patch
Cc:

Description

Currently language files have to be stored in wp-include/languages, while other "user content" like plugins and themes are in wp-content. It makes more sense (to me at least) to place language files in wp-content as well.

This also simplifies upgrading, because you don't have to remember to save/backup your language files, before deleting the wp-includes folder, as per the installation instructions.

Attachments

3315.diff (1.0 kB) - added by Nazgul on 11/01/06 20:27:28.
lang_in_content_dir.diff (0.8 kB) - added by markjaquith on 11/04/06 05:12:02.
slightly more streamlined logic

Change History

11/01/06 20:27:28 changed by Nazgul

  • attachment 3315.diff added.

11/01/06 20:29:31 changed by Nazgul

  • keywords set to has-patch.
  • owner changed from anonymous to Nazgul.
  • status changed from new to assigned.

Attached patch uses wp-content/languages folder if it exists and falls back to wp-includes/languages if it doesn't. This fallback keeps existing installations working.

11/01/06 23:39:05 changed by Viper007Bond

Good thinking.

11/02/06 06:02:39 changed by markjaquith

I like it. No modified files or directories should be in wp-admin or wp-includes

11/02/06 06:08:31 changed by ryan

Why not.

11/03/06 01:37:05 changed by idle

In response to Ryan's comment:

Because future upgrades will overwrite the modified files, unless you want to manually update your files. Adding new files to wp-includes or wp-admin is a whole different arm, however.

Personally, I never delete my wp-includes directory, but keep my global functions in a file of its own inside that directory. Anyway, I like this patch. Nice work, Nazgul!

11/03/06 19:43:19 changed by ryan

By why not I meant, +1. :-)

11/04/06 05:12:02 changed by markjaquith

  • attachment lang_in_content_dir.diff added.

slightly more streamlined logic

11/04/06 05:13:00 changed by markjaquith

Newer patch with more streamlined logic... no need to nest those ifs so deep.

11/04/06 05:20:40 changed by markjaquith

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4446]) make /languages/ directory default to /wp-content/languages/ with fallback to /wp-includes/languages/. Props Nazgul. fixes #3315