Ticket #7449 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

"the_content" with translatable "(more)"

Reported by: msi08 Owned by: westi
Priority: low Milestone: 2.7
Component: I18N Version: 2.6
Severity: trivial Keywords: has-patch
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

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

Change History

msi084 years ago

Better patch IMO

comment:1 follow-up: ↓ 2   Viper007Bond4 years ago

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

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: ↓ 3   westi4 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   Viper007Bond4 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.

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

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

Note: See TracTickets for help on using tickets.