WordPress.org

GlotPress

Opened 3 years ago

Last modified 12 months ago

#149 new defect

Do not allow empty translations

Reported by: zodiac1978 Owned by: somebody
Milestone: 1.0 Priority: blocker
Version: Component: general
Keywords: Cc: japh@…, daryl@…

Description

If you have a string which has Singular and Plural and you have just translated the Singular or the plural of the string, the whole string is marked as translated (green).

It should remain untranslated until the second part is translated too.

(Seen on translate.wordpress.com)

Attachments (2)

149.1.diff (3.0 KB) - added by Japh 18 months ago.
149.diff (4.6 KB) - added by markoheijnen 12 months ago.

Download all attachments as: .zip

Change History (13)

comment:1 nacin2 years ago

  • Keywords has-patch commit added

comment:2 nacin2 years ago

  • Keywords has-patch commit removed

Patch was added to the wrong ticket.

comment:3 nacin2 years ago

  • Milestone set to 1.0
  • Priority changed from major to blocker
  • Summary changed from If just Singular is translated, but not plural the string is marked as translated to Do not allow empty translations

The real fix for this ticket is #112. I am going to repurpose this one.

comment:4 Japh18 months ago

  • Cc japh@… added

comment:5 Japh18 months ago

Patch 149.1.diff is an attempt to start getting validation on. It looks like the validation methods are already there, at least partly, and now they're being used.

Better error messages are needed (#226), and a very rudimentary first go at that is also in this patch.

Japh18 months ago

comment:6 Japh18 months ago

Note: I left the word "invalid" in the error messages because changes to the error messages break the assertInvalidRedirect test, which should probably not be so fragile / specific.

comment:7 nbachiyski18 months ago

I agree the test could be better. Do you have a better idea how to tell if we got this specific error?

comment:8 markoheijnen13 months ago

Hey Japh, are you fine that this patch getting committed or is something else needed?

comment:9 dllh13 months ago

  • Cc daryl@… added

markoheijnen12 months ago

comment:10 markoheijnen12 months ago

Changed some of the logic to have a better readable string. Still not really happy with it but #226 can be used for that.
Also did some small cleanup around the code.

comment:11 markoheijnen12 months ago

Patch 149.diff has been commited [749]. Only thing that needs to happen here is that errors also need to show up when there are plurals for a string.

Note: See TracTickets for help on using tickets.