Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#16998 closed defect (bug) (fixed)

Default Link Label on Next and Previous Links Functions not Tanslated

Reported by: CharlesClarkson Owned by:
Priority: normal Milestone: 3.2
Component: I18N Version:
Severity: normal Keywords: has-patch dev-feedback
Cc: Focuses:

Description

The default link $label parameter on these Previous/Next posts functions is not translatable.

get_next_posts_link()
next_posts_link()
get_previous_posts_link()
previous_posts_link()

The path handles the label text the same way as the comment Previous/Next links in the same file (/wp-includes/link-template.php).

This patch might break a plugin or theme which relies on passing in the function call. I'm not sure why anyone would do that to a link text label, but ...

Attachments (3)

16998.diff (2.2 KB ) - added by CharlesClarkson 15 years ago.
16998.2.diff (1.7 KB ) - added by nathanrice 15 years ago.
Translate $label, use null and is_null for backward compatibility
16998.3.diff (1.7 KB ) - added by nathanrice 15 years ago.
Translate $label, use null and a strict check for backward compatibility

Download all attachments as: .zip

Change History (8)

#1 @CharlesClarkson
15 years ago

This patch might break a plugin or theme which relies on passing an empty string in the function call. I'm not sure why anyone would do that to a link text label, but ...

get_next_posts_link('')

#2 @nathanrice
15 years ago

  • Cc ncrice@… added
  • Component GeneralI18N
  • Keywords has-patch dev-feedback added

+1

Having the default text non-translatable is bad form for international users, and places the burden on theme developers to pass their own translatable text to these functions in order to use them properly.

#3 @nacin
15 years ago

  • Milestone Awaiting Review3.2

We can change this to null as the default. Then a strict check would avoid any edge cases with an empty string.

@nathanrice
15 years ago

Translate $label, use null and is_null for backward compatibility

@nathanrice
15 years ago

Translate $label, use null and a strict check for backward compatibility

#4 @ryan
15 years ago

  • Resolutionfixed
  • Status newclosed

(In [17728]) Translate default link labels for *posts_link(). Props nathanrice, CharlesClarkson. fixes #16998

#5 @ryan
15 years ago

I tweaked the patches a bit to do null === like we do elsewhere for default labels.

Note: See TracTickets for help on using tickets.