Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6614 closed defect (bug) (fixed)

String disambiguation for slugs (in upgrade.php)

Reported by: ranyanivhartstein's profile RanYanivHartstein Owned by:
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

The localized strings for the default slugs for categories and link categories can clash with their names when localizing to a language that can't be used in URLs.

For e.g., when localizing to Hebrew, the default category name would be localized to the Hebrew equivalent of "Uncategorized", but the default slug should remain "uncategorized", since Hebrew can't be properly used in URLs. Therefor, I recommend adding comments to the slug strings, so they can have different localizations:

$cat_slug = sanitize_title(_c('Uncategorized|Slug for default category'));

and

$cat_slug = sanitize_title(_c('Blogroll|Slug for default link category'));

(in wp-admin/includes/upgrade.php)

Attachments (1)

disambiguate-slugs.diff (4.0 KB) - added by nbachiyski 16 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nbachiyski
16 years ago

  • Keywords has-patch added
  • Version set to 2.5

RanYanivHartstein, preparing a patch is always better than just pasting the new code in the ticket description. I know you know how to create a patch, just reminding :-)

#2 @ryan
16 years ago

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

(In [7628]) Disambiguate default slugs. Props RanYanivHartstein. fixes #6614 for trunk

#3 @ryan
16 years ago

(In [7629]) Disambiguate default slugs. Props RanYanivHartstein. fixes #6614 for 2.5

Note: See TracTickets for help on using tickets.