WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#7449 closed enhancement (fixed)

"the_content" with translatable "(more)"

Reported by: msi08 Owned by: westi
Milestone: 2.7 Priority: low
Severity: trivial Version: 2.6
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

One user in the german WP forum said, Kubrik is using the german language but it displays the "(more...)" in English. That is because the theme is just using "the_content()" without a parameter.

There are two ways to fix it. One can change the theme file(s), or one can change the functions in "post-template.php" (s. the attachment). What would you guys prefer?

Attachments (2)

post-template.patch (1.0 KB) - added by msi08 7 years ago.
7449.viper.patch (1.1 KB) - added by Viper007Bond 7 years ago.
Better patch IMO

Download all attachments as: .zip

Change History (6)

@msi087 years ago

@Viper007Bond7 years ago

Better patch IMO

comment:1 follow-up: @Viper007Bond7 years ago

  • Component changed from General to i18n
  • Keywords has-patch added
  • Version set to 2.6

Just uploaded what's a better patch IMO. Allows for a blank "more" link, a better test, and cleaner code.

comment:2 in reply to: ↑ 1 ; follow-up: @westi7 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Replying to Viper007Bond:

Just uploaded what's a better patch IMO. Allows for a blank "more" link, a better test, and cleaner code.

Patch looks good.

Why do we need the code in the_content when it calls get_the_content can't we just do the NULL check in one place? (or is there something I'm missing here?)

comment:3 in reply to: ↑ 2 @Viper007Bond7 years ago

Replying to westi:

Replying to Viper007Bond:

Just uploaded what's a better patch IMO. Allows for a blank "more" link, a better test, and cleaner code.

Patch looks good.

Why do we need the code in the_content when it calls get_the_content can't we just do the NULL check in one place? (or is there something I'm missing here?)

No, you're correct. I just was following the original reporter's ticket and not paying attention. Passing "NULL" to get_the_content() should work fine.

comment:4 @westi7 years ago

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

(In [8547]) Allow the default more string to be translated. Fixes #7449 props Viper007Bond.

Note: See TracTickets for help on using tickets.