D22122: use pwquality_strerror to get error strings

2019-08-05 Thread Harald Sitter
This revision was automatically updated to reflect the committed changes.
Closed by commit R128:29768b08aa06: use pwquality_strerror to get error strings 
(authored by sitter).

REPOSITORY
  R128 User Manager

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D22122?vs=60770&id=63130

REVISION DETAIL
  https://phabricator.kde.org/D22122

AFFECTED FILES
  src/passworddialog.cpp
  src/passworddialog.h

To: sitter, #plasma, ltoscano
Cc: rikmills, davidedmundson, ltoscano, anthonyfieroni, plasma-devel, 
LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-07-31 Thread Luigi Toscano
ltoscano accepted this revision.
ltoscano added a comment.
This revision is now accepted and ready to land.


  My bad, there were some typos in the value of the variable.
  
  I confirm that it works. +1 from the translation point of view.

REPOSITORY
  R128 User Manager

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma, ltoscano
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-07-31 Thread Harald Sitter
sitter added a comment.


  Is that with the latest diff (the one changed to fromUtf8)?
  
  LANGUAGE=uk seems to work for me F7126679: Screenshot_20190731_162607.png 


REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-07-31 Thread Luigi Toscano
ltoscano added a comment.


  Sorry, I totally missed the notifications (but I received them).
  
  I think that there is an encoding issue with any characters over the 
canonical 127 base ones. Observed with Italian and Ukrainian, see F7126642: 
user-manager-pwquality-it.png  and 
F7126646: user-manager-pwquality-uk.png .

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-07-09 Thread Harald Sitter
sitter added a comment.


  In D22122#487601 , @davidedmundson 
wrote:
  
  > Concept makes sense.
  >  +1
  >
  > @ltoscano can you confirm you're ok from an i18n side.
  
  
  ping @ltoscano

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-06-28 Thread Harald Sitter
sitter updated this revision to Diff 60770.
sitter added a comment.


  use fromUtf8

REPOSITORY
  R128 User Manager

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D22122?vs=60726&id=60770

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D22122

AFFECTED FILES
  src/passworddialog.cpp
  src/passworddialog.h

To: sitter, #plasma
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-06-28 Thread David Edmundson
davidedmundson added subscribers: ltoscano, davidedmundson.
davidedmundson added a comment.


  Concept makes sense.
  +1
  
  @ltoscano can you confirm you're ok from an i18n side.

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: davidedmundson, ltoscano, anthonyfieroni, plasma-devel, LeGast00n, 
jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-06-27 Thread Harald Sitter
sitter added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in passworddialog.cpp:157
> Shouldn't be fromUtf8 ? You can't handle all languages by latin.

Oh, indeed!

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: anthonyfieroni, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-06-27 Thread Anthony Fieroni
anthonyfieroni added inline comments.

INLINE COMMENTS

> passworddialog.cpp:157
> +const QString errorString =
> +QString::fromLatin1(pwquality_strerror(buf, 
> PWQ_MAX_ERROR_MESSAGE_LEN,
> +   error, auxerror));

Shouldn't be fromUtf8 ? You can't handle all languages by latin.

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D22122

To: sitter, #plasma
Cc: anthonyfieroni, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D22122: use pwquality_strerror to get error strings

2019-06-27 Thread Harald Sitter
sitter created this revision.
sitter added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION SUMMARY
  libpwquality has localized error string mappings, no need to reinvent
  the wheel here. the previous mapping was fairly incomplete resulting in
  cases where one would get the generic "use another password" option
  was shown, which is fairly meh as it can mean literally anything.
  
  should libpwquality for whatever reason fail to provide a string we will
  still fall back to the unfortunate generic default. better than nothing
  I suppose.
  
  also carry around auxerror. it contains data such as how many digits
  would have been reuired. auxerror doesn't need freeing it simply contains
  pointers to internals for the benefit of pwquality_strerror
  
  CHANGELOG: Password quality problems are better explained in the UI

TEST PLAN
  password 'a' now gets error'd as a palindrom rather than the generic error. 
other errors such as too-short, no-match continue to be reported properly as 
well

REPOSITORY
  R128 User Manager

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D22122

AFFECTED FILES
  src/passworddialog.cpp
  src/passworddialog.h

To: sitter, #plasma
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart