Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Dec 2012 at 09:14 UTC
Updated:
29 Jul 2014 at 21:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
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 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 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@projectversus%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 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 commentedCommitted to 8.x.
Comment #11
gábor hojtsyWoot, thanks!