On Fri, 2018-06-01 at 01:46 +0300, Dmitry V. Levin wrote:
On Thu, May 31, 2018 at 02:08:19PM +0200, Tomas Mraz wrote:
> On Thu, 2018-05-31 at 14:42 +0300, Dmitry V. Levin wrote:
> > On Thu, May 31, 2018 at 12:47:10PM +0200, Tomas Mraz wrote:
[...]
> > > I do not oppose the commit strongly. But I still think we
> > > should at
> > > least review the other strings (from other modules) to see
> > > whether
> > > there are any similar changes needed.
> >
> > There is a bulk of translated strings in libpam/pam_strerror.c,
> > each of them starts with a capital letter and does not end with a
> > dot,
> > which is in line with glibc strerror messages.
> > There are also a few pam_strerror-like duplicates in pam_tally
> > and
> > pam_tally2.
>
> The question is whether adding the dot is really the right thing if
> the
> message is not a proper sentence. I.E. "No password supplied" is
> not a
> full sentence, should there be a dot?
>
> Do we have a native speaker to verify?
If a message is printed in the context where a proper sentence is
expected, then it should be a proper sentence, shouldn't it?
I agree.
I also agree with your suggestions. Would you prepare a patch changing
all of these?
If we do this complete overhaul I think it is worth it even if it
triggers the translations changes.
> > Besides that, we currently have quite inconsistent
prompt-like
> > translated
> > strings.
> >
> > Without a trailing dot:
> > =======================
> >
> > #: modules/pam_cracklib/pam_cracklib.c:695
> > #: modules/pam_unix/pam_unix_passwd.c:568
> > msgid "No password supplied"
>
> Not a sentence
>
> > #: modules/pam_cracklib/pam_cracklib.c:695
> > #: modules/pam_unix/pam_unix_passwd.c:568
> > msgid "Password unchanged"
>
> Not a sentence
In both cases the message is printed without further modifications
using
pam_prompt, so it should rather be a proper sentence, e.g.
"No password has been supplied." and
"The password has not been changed."
> > #: modules/pam_selinux/pam_selinux.c:210
> > msgid "Default Security Context %s\n"
>
> Hm... the capitalization of each word does not seem to me to be
> right.
This is a very strange message indeed, does it mean something like
"The default security context is %s."?
The trailing \n is redundant and doesn't help either.
> > #: modules/pam_selinux/pam_selinux.c:230
> > msgid "No default type for role %s\n"
>
> Not a sentence
>
> > #: modules/pam_selinux/pam_selinux.c:295
> > msgid "Not a valid security context"
>
> Not a sentence
>
> > #: modules/pam_selinux/pam_selinux.c:544
> > msgid "Unable to get valid context for %s"
>
> Not a sentence
>
> > #: modules/pam_selinux/pam_selinux.c:663
> > msgid "Security Context %s Assigned"
> > #: modules/pam_selinux/pam_selinux.c:679
> > msgid "Key Creation Context %s Assigned"
>
> Again the caps in the two messages above are weird but they are not
> a
> sentence.
Each of these messages is printed without further modifications using
pam_prompt, so proper sentences would be more appropriate.
> > #: modules/pam_tally/pam_tally.c:541
> > modules/pam_tally2/pam_tally2.c:597
> > msgid "Account temporary locked (%ld seconds left)"
>
> Not a sentence
>
> > #: modules/pam_tally/pam_tally.c:566
> > modules/pam_tally2/pam_tally2.c:580
> > msgid "Account locked due to %u failed logins"
>
> Not a sentence
Likewise, a proper sentence like
"Account is temporary locked (%ld seconds left)." or
"Account is locked due to %u failed logins." would be more
appropriate
here.
> > #: modules/pam_unix/pam_unix_acct.c:253
> > modules/pam_unix/pam_unix_acct.c:275
> > msgid "Your account has expired; please contact your system
> > administrator"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_acct.c:261
> > msgid "You are required to change your password immediately
> > (administrator enforced)"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_acct.c:267
> > msgid "You are required to change your password immediately
> > (password
> > expired)"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_acct.c:288
> > modules/pam_unix/pam_unix_acct.c:295
> > msgid "Warning: your password will expire in %d day"
> > msgid_plural "Warning: your password will expire in %d days"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_acct.c:300
> > msgid "Warning: your password will expire in %d days"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_passwd.c:585
> > msgid "You must choose a longer password"
>
> A sentence, there should be a dot.
>
> > #: modules/pam_unix/pam_unix_passwd.c:722
> > msgid "You must wait longer to change your password"
>
> A sentence, there should be a dot.
>
> > With a trailing dot:
> > ====================
> >
> > #: libpam/pam_get_authtok.c:46
> > msgid "Sorry, passwords do not match."
> >
> > #: libpam/pam_get_authtok.c:164 libpam/pam_get_authtok.c:236
> > msgid "Password change aborted."
>
> ...was aborted. ?
has been aborted?
> > #: modules/pam_lastlog/pam_lastlog.c:536
> > modules/pam_lastlog/pam_lastlog.c:543
> > msgid "There was %d failed login attempt since the last
> > successful
> > login."
> > msgid_plural ""
> > "There were %d failed login attempts since the last successful
> > login."
> >
> > #: modules/pam_lastlog/pam_lastlog.c:548
> > msgid "There were %d failed login attempts since the last
> > successful
> > login."
> >
> > #: modules/pam_limits/pam_limits.c:1091
> > msgid "Too many logins for '%s'."
>
> No dot, or make a sentence?
The message is printed unchanged using pam_prompt so
it should rather be a sentence.
> > #: modules/pam_mail/pam_mail.c:297
> > msgid "No mail."
>
> No dot, or make a sentence?
A sentence like "You have no mail." would be in line with other
messages
produced by this module.
> > #: modules/pam_mail/pam_mail.c:300
> > msgid "You have new mail."
> >
> > #: modules/pam_mail/pam_mail.c:303
> > msgid "You have old mail."
> >
> > #: modules/pam_mail/pam_mail.c:307
> > msgid "You have mail."
> >
> > #: modules/pam_mail/pam_mail.c:314
> > msgid "You have no mail in folder %s."
> >
> > #: modules/pam_mail/pam_mail.c:318
> > msgid "You have new mail in folder %s."
> >
> > #: modules/pam_mail/pam_mail.c:322
> > msgid "You have old mail in folder %s."
> >
> > #: modules/pam_mail/pam_mail.c:327
> > msgid "You have mail in folder %s."
> >
> > #: modules/pam_mkhomedir/pam_mkhomedir.c:111
> > msgid "Creating directory '%s'."
>
> No dot, or make a sentence?
>
> > #: modules/pam_mkhomedir/pam_mkhomedir.c:176
> > msgid "Unable to create and initialize directory '%s'."
>
> No dot, or make a sentence?
These messages are printed unchanged using pam_prompt so
they should rather be sentences.
> > #: modules/pam_pwhistory/pam_pwhistory.c:217
> > #: modules/pam_unix/pam_unix_passwd.c:589
> > msgid "Password has been already used. Choose another."
> >
> > #: modules/pam_pwhistory/pam_pwhistory.c:224
> > msgid "Password has been already used."
> >
> > #: modules/pam_stress/pam_stress.c:470
> > msgid "Changing STRESS password for %s."
>
> No dot, or make a sentence?
This is pam_stress, does it have to be translated at all?
> > #: modules/pam_timestamp/pam_timestamp.c:357
> > msgid "Access granted (last access was %ld seconds ago)."
>
> No dot, or make a sentence?
"Access has been granted (last access was %ld seconds ago)."
> > #: modules/pam_unix/pam_unix_passwd.c:470
> > msgid "NIS password could not be changed."
> >
> > #: modules/pam_unix/pam_unix_passwd.c:692
> > msgid "Changing password for %s."
>
> No dot, or make a sentence?
The message is printed unchanged using pam_prompt so
it should rather be a sentence.
> Heh, we have quite some inconsistency here.
Yes, there is definitely a room for improvement.
--
Tomáš Mráz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb
[You'll know whether the road is wrong if you carefully listen to your
conscience.]