Opened 6 years ago

Closed 5 years ago

#3929 closed defect (bug) (fixed)

Plugin Directory: Plugin title includes a translation of another string

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords: has-patch needs-testing


Background: #2919

On, the plugin title is translated as "LuckyWP Содержание".

However, in the translation project the string is left in English:

Random string parts shouldn't be translated like that, only the whole strings should be.

Attachments (1)

3929.diff (4.2 KB) - added by dd32 5 years ago.

Download all attachments as: .zip

Change History (3)

5 years ago

#1 @dd32
5 years ago

  • Keywords has-patch needs-testing added

The main problem occurring here is that we're applying translations to translations, but that we're also running into the fact that we're translating text which isn't defined succinctly.

3929.diff is a rough tested variant of the current translation functions which does it slightly different

  • For each translation, ordered by longest first
    • Replace the string with a placeholder (Hopefully the placeholder value never exists within an original)
  • For each placeholder marker
    • Replace the placeholder with either the translation (if it exists) or otherwise, with the original (which better still exist..)

It seems like it works without problem, but it needs more testing than I have time for right now.

#2 @dd32
5 years ago

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

In 7899:

Plugin Directory: i18n: When translating the content of a plugins readme, don't apply the translations to other translations.

Fixes #3929.

Note: See TracTickets for help on using tickets.