[drupal-devel] [task] Consistent return 'passive voice' in
form_set_error() and drupal_set_message()
puregin
puregin at puregin.org
Sat Apr 23 08:24:32 UTC 2005
On 22 Apr 2005, at 5:05 AM, stefan nagtegaal wrote:
> Issue status update for http://drupal.org/node/15595
>
> Project: Drupal
> Version: cvs
> Component: base system
> Category: tasks
> Priority: normal
> Assigned to: stefan nagtegaal
> Reported by: bertboerland at www.drop.org
> Updated by: stefan nagtegaal
> -Status: active
> +Status: patch
>
> Setting status to Patch.
>
>
>
>
> stefan nagtegaal
>
>
>
> Previous comments:
> -----------------------------------------------------------------------
> -
>
> January 14, 2005 - 15:59 : bertboerland at www.drop.org
>
> *My* drupal not *Yours*!
>
>
> I think that when one addresses the user or the administrator of a
> site, it is best to do this outside in instead of inside out. So when
> in the documentation the coder is referring to the site of the
> administrator, this site should be called "your site" (/inside out/)
> but "my site" (/outside in/). There are numours examples where the text
> in referring to "your"where "my"would be apopriate [1]
>
>
> There used to be some "your" in the userinterface for the enduser as
> well, but that has been solved in 4.5. Before that you had "my
> account", but "track your postings". This has now all beens replaced by
> "my"and "mine". If everybody agrees, lets also corect this for the
> administrator as well; my administrator, not yours ;-)
>
>
> [1] examples:
> admin/logs/referrers "...that point to your web site."
> admin/settings "General configuration options for your site"
>
>
>
>
> -----------------------------------------------------------------------
> -
>
> April 19, 2005 - 18:36 : stefan nagtegaal
>
> We should consistently use the 'passive voice', when returning messages
> using form_set_error() and drupal_set_message().
>
>
>
>
> -----------------------------------------------------------------------
> -
>
> April 22, 2005 - 14:05 : stefan nagtegaal
>
> Attachment: http://drupal.org/files/issues/drupal_set_message
> consistency part 1 of 2 (51.16 KB)
>
> first patch of 2 to make the drupal_set_message(), form_set_error() and
> watchdog() messages more consistent.
>
>
> please review/comment and apply..
>
>
For some reason, when I click on the patch link, I get a
'Page Not Found' error.
Looking at the patch on the issues page, I have a couple of
comments.
Generally, the passive voice messages read well, though they are
longer than the
messages they replace. There's some inconsistency with single and
double quoting
of strings - is this deliberate?
1) There is a problem with the message "The permissions of directory
%directory has been changed...".
In order to agree with the subject (permissions) the verb phrase must
be plural in number:
"The permissions of directory %directory have been changed...".
2) The message
The directory %directory is not writable, because it has not the
right permissions set.
would read better as
The directory %directory is not writable, because it does not have
the correct permissions set.
3) The word 'not' is doubled:
'The selected file %file could not not be uploaded, because the
destination %directory is not properly configured or has not set the
right permissions.',
Also, this is better expressed as
'The selected file %file could not be uploaded, because the destination
%directory could not be found, or because its permissions do not permit
the file to be written.',
4) Should we specifically indicate that it is the *destination*
of the copy that would be overwritten?
The selected file %file can not be copied, because the file
already exists.
Might be better as:
The selected file %file could not be copied, because a file by
that name already exists in the destination.
5) 'could not' vs. 'can not' - for consistency and clarity (could
implies that we tried :)
The selected file %file can not be copied.
I'd prefer to see:
The selected file %file can not be copied.
(should we give hints as to what might cause the problem?)
6) "The removal of the original file %file has failed."
Again, can we give some hints as to why this might have failed?
7) 'The file %file has not been saved, because of a possible
exploit abuse.'
Hmm - I'm not sure about this. How about
'The file %file has not been saved, because it may be a possible
attempt to exploit or abuse this system.'
8) "The file %file has not been saved, because it has exceeded
the maximum allowed size."
Why do we say 'has not been" sometimes and "could not be" at other
times? I suggest:
"The file %file could not be saved, because it exceeds the
maximum allowed size."
9) "The file %file has not been saved, because the upload was
incomplete. "
Same issue. Suggest:
"The file %file could not be saved, because the upload did not
complete. "
10) "The file %file has not been saved. "
"The file %file could not be saved. An unknown error has
occured. "
11) in function file_save_upload around line 402: same comment as
7) above
12) 'The file can not be created.' - Suggest 'could' instead of
'can' - this implies
that we tried.
13) in _locale_import_po:
Rather than 'There is an unsupported language selected for
import.', I'd suggest
'The language selected for import is not supported.'
14) 'The translation file %filename appears to be broken and
could not be read.' - I suggest
'The translation file %filename appears to contain errors and
could not be read.'
This is a little more formal.
15) 'The translation file %filename appears to be broken, due to
the header which is not properly set.'
I suggest
'The translation file %filename appears have a missing or
improperly formed header.'
16) 'The translation is succesfully imported. There are %number
new translated strings created and %update strings updated.'
I suggest
'The translation was successfully imported. There are %number
newly created translated strings and %update strings were updated.'
17) The translation import failed, because the file %filename
cannot be read.'
Can vs. could:
'The translation import failed, because the file %filename could
not be read.'
18) 'The translation file %filename seems to be broken, because
"msgstr" is expected on line %line.'
Suggest:
'The translation file %filename contains an error: "msgstr" was
expected but not found on line %line.'
19) 'The translation file %filename seems to be broken, because
"msgid_plural" is expected on line %line.'
Suggest:
'The translation file %filename contains an error: "msgid_plural"
was expected but not found on line %line.'
20) 'The translation file %filename seems to be broken, because
"msgid" is unexpected on line %line.'
Suggest:
'The translation file %filename contains an error: found
unexpected "msgid" on line %line.'
21) 'The translation file %filename seems to be broken, because
there is a syntax error on line %line.'
Suggest: 'The translation file %filename contains a syntax error on
line %line.'
I'm quit here for now... I didn't realize that it was quite so long
when I started!
Perhaps it would be easier if I grab the files from CVS, apply the
patch file, edit, and submit the
new patch? Or would you prefer if I continue in this way and supply
some justification for
my changes?
Regards, Djun
--
Djun M. Kim, Director
djun.kim at cielosystems.com
Cielo Systems Inc.
http://www.cielosystems.com
Strategic Software Research Tel: (604) 739-3941
302 - 1298 10th Avenue West FAX: (604) 739-3943
Vancouver, BC, V6H 1J4 Mobile:(778) 895-1379
More information about the drupal-devel
mailing list