WordPress.org

Making WordPress.org

Opened 3 years ago

Closed 3 years ago

#1619 closed defect (fixed)

Plugin Directory: The first number in the translation is skipped

Reported by: Nao Owned by: ocean90
Milestone: Priority: low
Component: Plugin Directory Keywords: needs-patch
Cc:

Description

If a plugin readme translation starts with an ASCII number, that number is missed on the plugin page. For example:

https://translate.wordpress.org/projects/wp-plugins/wp-idea-stream/stable-readme/ja/default?filters[status]=either&filters[original_id]=1827985&sort[by]=translation_date_added&sort[how]=asc

If I approve the translation below, the entire text is correctly displayed.

デモ用3分間動画はこちら (英語が下手でごめんなさい) : http://vimeo.com/107403493

But if I approve the one below, the number "3" at the beginning of the translation does not show up.

3分間のデモはこちら (英語が下手でごめんなさい) : http://vimeo.com/107403493

Attachments (2)

wp-idea-stream-correct.png (94.7 KB) - added by Nao 3 years ago.
wp-idea-stream-number-missing.png (83.1 KB) - added by Nao 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 @Otto42
3 years ago

  • Component changed from General to Plugin Directory

Tagging this with Plugin Directory as I think it is most likely a problem with the readme parser.

#2 follow-up: @samuelsidler
3 years ago

Is this happening with the new directory? I noticed that the string, while shown as translated in translate.wordpress.org, is showing as untranslated on the front-end. /cc @dd32

#3 in reply to: ↑ 2 @dd32
3 years ago

Replying to samuelsidler:

Is this happening with the new directory? I noticed that the string, while shown as translated in translate.wordpress.org, is showing as untranslated on the front-end. /cc @dd32

I believe Alex used the same code from the existing directory, so yes, i suspect this bug was brought over.

#4 @SergeyBiryukov
3 years ago

#1854 was marked as a duplicate.

#5 @ocean90
3 years ago

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

In 3716:

Plugin Directory: Don't use the translation in the replacement parameter of preg_replace().

The translation may contain backreference-like characters.

Fixes #1619.

Note: See TracTickets for help on using tickets.