Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#44662 closed enhancement (fixed)

Text length of the Incremental search of link in tinymce should be localizable

Reported by: toro_unit's profile Toro_Unit Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:


related: #44541

Incremental search of link in tinymce should fire from 2 chars in Japanese. These fixes are included in the WP Multibyte Patch plugin in the Japanese package.

So, the number should be localizable.

Attachments (5)

44662.patch (1.7 KB) - added by Toro_Unit 6 years ago.
44662.2.patch (1.8 KB) - added by Toro_Unit 6 years ago.
Add comment for translators.
44662.3.patch (1.8 KB) - added by Toro_Unit 6 years ago.
44662.4.patch (2.2 KB) - added by Toro_Unit 5 years ago.
44662-5.diff (2.2 KB) - added by birgire 4 years ago.

Download all attachments as: .zip

Change History (20)

6 years ago

#1 @miyauchi
6 years ago

This is a one of a series of patches to fix problems for Japanese package.

Related: #meta3163, #43829, #44296, #44541, #15955, #22363, #44548

6 years ago

Add comment for translators.

#3 @swissspidy
6 years ago

IMHO this also needs a context that's better to understand than search internal links. Something like minimum search input word length or so.

6 years ago

#4 @Toro_Unit
6 years ago

Hi @swissspidy

Thanks for your review.

i fixed to make it easier to understand that search starts from the 3rd character.

#5 @ocean90
5 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 5.0

Thanks for the patch! A few suggestions:

  • Let's try to reduce the context to 5-6 words
  • Cast the value to an integer ((int) _x( … ))
  • Provide a fallback if (int) _x( … ) returns 0

5 years ago

#6 @Toro_Unit
5 years ago

@ocean90 Thank you Review!

add new patch.

add fallback for _x( … ) return 0 or not number value.

#7 @peterwilsoncc
5 years ago

  • Milestone changed from 5.0 to 5.1

Moving to the 5.1 milestone due to the WordPress 5.0 focus on the new
editor (Gutenberg).

#8 @pento
5 years ago

  • Milestone changed from 5.1 to 5.2

This ticket needs a review and decision.

#9 @desrosj
5 years ago

  • Milestone changed from 5.2 to 5.3

This has not seen any action during the 5.2 cycle. Punting to 5.3 since 5.2 beta 1 is fast approaching.

4 years ago

#10 @birgire
4 years ago

  • Keywords needs-refresh removed

The patch 44662-5.diff is a minor refresh that

1) Replaces the typo serchLength with searchLength.

2) Fixes the PHPCS issue:

 1395 | ERROR | [x] Expected 1 space after closing brace; newline found

3) Replaces the for part in variables:




4) Combines the variable defining parts of patch 44662.4.patch

I tested this by increasing the minimum search word length to 5 (instead of 3) in the patch and that seems to work as expected on my test install.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.

4 years ago

#12 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#13 @davidbaumwald
4 years ago

@SergeyBiryukov Is this ready for 5.3 Beta 1 by tomorrow?

#14 @desrosj
4 years ago

  • Milestone changed from 5.3 to 5.4

Unfortunately, with beta 1 in a few hours, this needs to be punted.

#15 @SergeyBiryukov
4 years ago

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

In 46988:

I18N: Make the minimum input length to start searching posts in the "Insert/edit link" modal localizable.

Props Toro_Unit, birgire, miyauchi, swissspidy, ocean90.
Fixes #44662.

Note: See TracTickets for help on using tickets.