On Thu, May 31, 2018 at 12:47:10PM +0200, Tomas Mraz wrote:
On Thu, 2018-05-31 at 13:24 +0300, Dmitry V. Levin wrote:
> On Thu, May 31, 2018 at 10:32:51AM +0200, Tomas Mraz wrote:
> > On Thu, 2018-05-31 at 06:14 +0300, Dmitry V. Levin wrote:
> > > Some of prompts issued directly or indirectly by pam_unix that
> > > start
> > > with a capital letter are finished with a dot, some are not.
> > > Fix this grammatical inconsistency by changing all these prompts
> > > to finish with a dot.
> > >
> > > * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass):
> > > Harmonize prompts.
> > > * modules/pam_unix/pam_unix_acct.c (pam_sm_acct_mgmt): Likewise.
> > > * modules/pam_unix/pam_unix_passwd.c (_pam_unix_approve_pass,
> > > pam_sm_chauthtok): Likewise.
> > > * po/Linux-PAM.pot: Regenerate.
> >
> > Is this really worth the change of translatable strings triggering
> > needed changes in all the translations? I'd prefer at least
> > postponing
> > this commit until we have other more significant changes in
> > translated
> > strings such as new translatable strings added or so.
>
> There is a background for this change that is not quite obvious so
> I'd
> rather tell the full story.
>
> I maintain an out of tree module called pam_tcb, it's a part of tcb
> suite.
> This module was born as a fork of pam_unix to implement the tcb
> password
> shadowing scheme about 17 years ago, i18n support was added there 7
> years
> ago, and less than a year ago I've got a bug report that some
> messages are
> untranslated because pam_tcb uses "Linux-PAM" domain and some prompts
> have
> this "trailing dot" difference with pam_unix.
>
> Now I have to choose whether to fix Linux-PAM translations or to fork
> them
> into pam_tcb and maintain them there. As the second approach would
> result
> to worse quality of translations, I'd rather follow the first
> approach.
>
> For this I need a consensus that the change of translatable strings
> is OK
> and will be applied before the next release of Linux-PAM whenever it
> happens.
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.
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"
#: modules/pam_cracklib/pam_cracklib.c:695
#: modules/pam_unix/pam_unix_passwd.c:568
msgid "Password unchanged"
#: modules/pam_selinux/pam_selinux.c:210
msgid "Default Security Context %s\n"
#: modules/pam_selinux/pam_selinux.c:230
msgid "No default type for role %s\n"
#: modules/pam_selinux/pam_selinux.c:295
msgid "Not a valid security context"
#: modules/pam_selinux/pam_selinux.c:544
msgid "Unable to get valid context for %s"
#: 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"
#: modules/pam_tally/pam_tally.c:541 modules/pam_tally2/pam_tally2.c:597
msgid "Account temporary locked (%ld seconds left)"
#: modules/pam_tally/pam_tally.c:566 modules/pam_tally2/pam_tally2.c:580
msgid "Account locked due to %u failed logins"
#: 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"
#: modules/pam_unix/pam_unix_acct.c:261
msgid "You are required to change your password immediately (administrator
enforced)"
#: modules/pam_unix/pam_unix_acct.c:267
msgid "You are required to change your password immediately (password expired)"
#: 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"
#: modules/pam_unix/pam_unix_acct.c:300
msgid "Warning: your password will expire in %d days"
#: modules/pam_unix/pam_unix_passwd.c:585
msgid "You must choose a longer password"
#: modules/pam_unix/pam_unix_passwd.c:722
msgid "You must wait longer to change your password"
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."
#: 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'."
#: modules/pam_mail/pam_mail.c:297
msgid "No mail."
#: 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'."
#: modules/pam_mkhomedir/pam_mkhomedir.c:176
msgid "Unable to create and initialize directory '%s'."
#: 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."
#: modules/pam_timestamp/pam_timestamp.c:357
msgid "Access 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."
--
ldv