Problem/Motivation
During tests of #1804702: Display interface translation status the progress messages of Locale's check, download and import batch operations proved to be confusing. The default "Completed @count of @total" message confused because the '@total' does not match the number of projects checked/imported.
Proposed resolution
Remove clutter. Show what is needed for an indication of the task in progress. Provide feedback after batch completion that is relevant and (if required) actionable.
Remaining tasks
To be determined
User interface changes
Changes to user interface text.
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#8 | locale-batch-messages-1866544-8.patch | 7.3 KB | Sutharsan |
#8 | interdiff-1866544-1-8.txt | 3.02 KB | Sutharsan |
#1 | locale-batch-messages-1866544-1.patch | 5.22 KB | Sutharsan |
#1 | locale-batch-messages-1866544-1.1.png | 11.27 KB | Sutharsan |
#1 | locale-batch-messages-1866544-1.2.png | 14.98 KB | Sutharsan |
Comments
Comment #1
Sutharsan CreditAttribution: Sutharsan commentedThis patch improves the batch progress messages. Screenshots below show various states of an import process after enabling a language. You can see the process in action on this video.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedAdding more tags
Comment #3
Gábor HojtsyComment #4
Gábor HojtsyFirst of all I like the changes. The screenshot illustrates the improved UI very well. Reviewing the patch I also like that concrete file names are now replaced by project names. We want to automate file downloads and imports for users, so the files are just a means of getting the translations and users will have no exposure to them. The download and import is all automated. So it is internal detail at this point and we don't need to put that burden on the user to understand. There are also different things intertwined in the batches, and the general progress is clearly visible while more user friendly messages help the user to understand what is going on currently. My only concern is the application of the project name display:
@project or %project does not seem to be consistently applied.
Looks good otherwise!
Comment #5
Gábor HojtsyComment #6
Sutharsan CreditAttribution: Sutharsan commentedUsing @project here is on purpose, but perhaps someone else has a better solution.
The above 'message' text is used as the variable in the code below for the import progress. In the code below the
<em>
text is escaped.$context['message'] = t('@message (@percent%).', array('@message' => $options['message'], '@percent' => (int) ($context['finished'] * 100)));
Either we use
t('!message (@percent%).', ...
and not sanitize 'message' but it is potentially bad for security, or not translate the text$message .' (' . $percent).'
. ')' witch is bad for translators and rtl languages, or we are inconsistent with@project
versus%project
. I don't see a better solution.Comment #7
Gábor HojtsyI don't think using !message is bad, the output of t() is assumed to be "secure" as long as the input was (appropriate placeholders are used for replacement data).
Comment #8
Sutharsan CreditAttribution: Sutharsan commentedChanged @project into %project.
Changed @message to !message and added a note that the string must be sanitized.
Made the same UI changes to the file import batch. i.e. removed the "Completed @count of @total" text.
Comment #9
Gábor HojtsyLooks good to me.
Comment #10
Dries CreditAttribution: Dries commentedCommitted to 8.x.
Comment #11
Gábor HojtsyWoot, thanks!