[glotpress-updates] [GlotPress] #338: Add a flag to show that a string has a history of translations (or hide link if not)

GlotPress noreply at wordpress.org
Tue Jul 15 08:24:46 UTC 2014


#338: Add a flag to show that a string has a history of translations (or hide
link if not)
--------------------------+-------------------------
  Reporter:  zodiac1978   |      Owner:  yoavf
      Type:  enhancement  |     Status:  assigned
  Priority:  normal       |  Milestone:
 Component:  interface    |    Version:
Resolution:               |   Keywords:  needs-patch
--------------------------+-------------------------

Comment (by yoavf):

 Replying to [comment:3 Secretmapper]:
 > Made a quick patch for this. Direct has_history method for if we need
 this cached in the future.

 Nice work @secretmapper - but checking find_one will also return the
 "waiting" string - so it will always be true on the waiting strings
 @zodiac1978 wanted to check.

 I was just going to change it something like
 {{{
 return( count( GP::$translation->find_many( array( 'original_id' =>
 $original_id, 'translation_set_id' => $translation_set_id ) ) ) > 1 );
 }}}

 But then I figured out we'd better off just renaming {{{has_history()}}}
 to {{{by_original_and_set()}}} and actually returning the translations,
 and doing the count comparison in the template:

--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/338#comment:4>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'


More information about the glotpress-updates mailing list