Fix Words & Chars String on katestatusbar.
ClosedPublic

Authored by ppeter on Mar 16 2019, 6:12 AM.

Details

Summary

The current string I think have some issues, for example:

This is a text file:

ABC DEF GHI JKL

When I selected "DEF GHI", I expect this message:

Words 2/4, Chars 6/12

but the current message shows:

Words 4/2, Chars 12/6

This is a fix of this issue.

Diff Detail

Repository
R39 KTextEditor
Branch
fixStatusBarString (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9651
Build 9669: arc lint + arc unit
ppeter created this revision.Mar 16 2019, 6:12 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMar 16 2019, 6:12 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
ppeter requested review of this revision.Mar 16 2019, 6:12 AM
ppeter updated this revision to Diff 53985.Mar 16 2019, 6:14 AM

Fix the newline issue.

The reason why I just change %1/%2 to %2/%1 not swap wordsInDocument and wordsInSelection, because I want to notify
translators about this change (or those current translation may have some issue when applied this fix.)

Sorry for my poor English :(

ppeter added a reviewer: Kate.Mar 16 2019, 6:19 AM
pino added a subscriber: pino.Mar 16 2019, 7:00 AM

The reason why I just change %1/%2 to %2/%1 not swap wordsInDocument and wordsInSelection, because I want to notify
translators about this change (or those current translation may have some issue when applied this fix.)

Instead of swapping the placeholders, I recommend adding a context to the string (see i18nc) explaining what all the placeholders represent: this way

  • the translations become fuzzy, and translators must act on it to make it used
  • translators have the hints on what the placeholders mean
ppeter updated this revision to Diff 53989.Mar 16 2019, 8:01 AM

Use i18nc instead of swaping order.

Done, thanks! :D

dhaumann accepted this revision.Mar 16 2019, 10:48 AM
This revision is now accepted and ready to land.Mar 16 2019, 10:48 AM

I would like to push that but fail on the name filter.
Can I ammend the author to "Yi-Jyun Pan <pan93412@gmail.com>"?

This revision was automatically updated to reflect the committed changes.