Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#31858 closed defect (bug) (fixed)

Avoid using HTML tags in translation strings (wp-admin/edit-form-advanced.php)‎

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch needs-testing 2nd-opinion
Focuses: Cc:

Description


Attachments (3)

31858.patch (4.2 KB) - added by ramiy 10 years ago.
31858.2.patch (4.7 KB) - added by ramiy 9 years ago.
31858.3.patch (4.9 KB) - added by ramiy 9 years ago.

Download all attachments as: .zip

Change History (17)

@ramiy
10 years ago

#1 @ramiy
10 years ago

  • Keywords has-patch needs-testing 2nd-opinion added

#2 @DrewAPicture
10 years ago

  • Version trunk deleted

This ticket was mentioned in Slack in #polyglots by ramiy. View the logs.


10 years ago

#4 @pavelevap
10 years ago

I do not think it is a good idea to split these strings, because of RTL for example?

#5 @ramiy
10 years ago

What about RTL?

For the last four years I'm translating WordPress to Hebrew (he_IL), It's an RTL language.

I see no problem in splitting those strings. The strings will be presented one after the other. First the action result and then the link.

Do you see a problem with other RTL languages?

#6 @pavelevap
10 years ago

No, I am not familiar with RTL :-)
But I thought that RTL use first link and second text (different order)?

I understand that these strings can be splitted and HTML removed, but in this case we are limiting translators freedom. No problem for our language, only my feeling :-)

#7 @ramiy
10 years ago

Pavel,

  • I've spoken to friend, he speaks Arabic language - same answer. The patch splits the string into two sentences - first we show the action result and then the link to the post.
  • This string split, is not actually a split. Some of the new string already exist in other places in the code. For example:
    • "Post updated." - exist in wp-admin/edit-form-advanced.php:84
    • "Page updated." - exist in wp-admin/edit-form-advanced.php:100
    • "View post" - exist in wp-includes/post.php:1637
  • From my perspective, the "translators freedom" you are talking about, is to make the translation work easier. It's very hard to translate strings with HTML code because the string is in hebrew and the code is in english. With RTL it's even harder, When the code is in RTL it's very confusing. This is why I'm trying to promote this issue to avoid using HTML tags in translation strings.

#8 @wonderboymusic
9 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Owner set to SergeyBiryukov
  • Status changed from new to assigned

#9 @wonderboymusic
9 years ago

  • Owner changed from SergeyBiryukov to wonderboymusic

#10 @wonderboymusic
9 years ago

  • Owner changed from wonderboymusic to SergeyBiryukov

needs to be reconciled with #17609

@ramiy
9 years ago

#11 follow-up: @ramiy
9 years ago

31858.2 is a new patch reconciled with #17609.

#12 in reply to: ↑ 11 @ocean90
9 years ago

Replying to ramiy:

31858.2 is a new patch reconciled with #17609.

The message for a scheduled page is now missing a period after the date. Same for posts.

@ramiy
9 years ago

#13 @wonderboymusic
9 years ago

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

In 34473:

Edit Post: After [33666], separate the translation string for pages, avoiding HTML usage.

Props ramiy.
Fixes #31858.

#14 @ocean90
9 years ago

In 34486:

Edit Post: Add missing periods.

See #31858.

Note: See TracTickets for help on using tickets.