Opened 4 years ago

Last modified 3 years ago

#338 assigned enhancement

Add a flag to show that a string has a history of translations (or hide link if not)

Reported by: zodiac1978 Owned by: yoavf
Milestone: 1.1 Priority: normal
Version: Component: interface
Keywords: needs-patch Cc:


It would be great to have a flag (just a little visual helper) that shows me, that a waiting string has a history of translations and wasn’t untranslated before.

It’s important, because we have to check now with three clicks, this is very time consuming.

As an alternative we could hide the link "All translations of this original" if there is no history of translations. The link would just get us to a "No translations were found!" page, so this link makes no sense in this case.

See: http://blog.glotpress.org/2013/10/07/wordcamp-europe-results/#comment-24185

Attachments (2)

history.diff (1.7 KB) - added by Secretmapper 4 years ago.
338.diff (1.5 KB) - added by yoavf 4 years ago.

Download all attachments as: .zip

Change History (11)

#1 @yoavf
4 years ago

  • Owner set to yoavf
  • Status changed from new to assigned

Good suggestions, I'll look into this.

#2 @Secretmapper
4 years ago

I'll try and add this on the General Polish block on the GSoC timeline!

4 years ago

#3 follow-up: @Secretmapper
4 years ago

Made a quick patch for this. Direct has_history method for if we need this cached in the future.

#4 in reply to: ↑ 3 @yoavf
4 years ago

Replying to 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:

4 years ago

#5 @yoavf
4 years ago

I also simplified the template to only show the link if there is a translation history. What do you think?

#6 @markoheijnen
4 years ago

The only thin I wonder if it makes sense to have a method to request all data while we only want to know if there is a history. Unsure what the performance impact of that could be.

#7 @markoheijnen
3 years ago

  • Milestone set to 1.0

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

3 years ago

#9 @markoheijnen
3 years ago

  • Milestone changed from 1.0 to 1.1

Design related tickets. Let's tackle them in 1.1.

Note: See TracTickets for help on using tickets.