D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
This revision was automatically updated to reflect the committed changes.
Closed by commit R304:91f212f983ef: Fix translations of $GenericName (authored 
by meven).

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25216?vs=69461=69472

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

AFFECTED FILES
  src/kmoretools/kmoretoolsmenufactory.cpp

To: meven, leinir, ngraham, #localization, aspotashev
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven added a comment.


  In D25216#560212 , @aspotashev 
wrote:
  
  > LGTM since it fixes the issue.
  >
  > A next step could be a clearer explaination of what $GenericName will be 
replaced with. Is it always replaced with Filelight's GenericName from its 
filelight.desktop file?
  
  
  Yes, it uses KMoreToolsService::formatString to replace $GenericName with 
content from its desktop file.

REPOSITORY
  R304 KNewStuff

BRANCH
  arcpatch-D25216

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

To: meven, leinir, ngraham, #localization, aspotashev
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Alexander Potashev
aspotashev accepted this revision.
aspotashev added a comment.


  LGTM since it fixes the issue.
  
  A next step could be a clearer explaination of what $GenericName will be 
replaced with. Is it always replaced with Filelight's GenericName from its 
filelight.desktop file?

REPOSITORY
  R304 KNewStuff

BRANCH
  arcpatch-D25216

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

To: meven, leinir, ngraham, #localization, aspotashev
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven added a comment.


  @aspotashev Is it good for ?

REPOSITORY
  R304 KNewStuff

BRANCH
  arcpatch-D25216

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

To: meven, leinir, ngraham, #localization
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R304 KNewStuff

BRANCH
  arcpatch-D25216

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

To: meven, leinir, ngraham, #localization
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Nathaniel Graham
ngraham added a reviewer: Localization.
ngraham added a comment.


  LGTM but please wait for approval from a translator too.

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham, #localization
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven updated this revision to Diff 69461.
meven added a comment.


  Better translator-friendly implementation

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25216?vs=69453=69461

BRANCH
  arcpatch-D25216

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

AFFECTED FILES
  src/kmoretools/kmoretoolsmenufactory.cpp

To: meven, leinir, ngraham
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Alexander Potashev
aspotashev added a comment.


  In general, string concatenation that you suggested is a big red flag for me 
as a translator. Concatenation often creates an untranslatable word puzzle.

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven added a comment.


  In D25216#560122 , @aspotashev 
wrote:
  
  > I suggest a more flexible approach which allows translators to more around 
the "$GenericName" part inside their translation and change the " - " separator 
to anything more appropriate in their language:
  >
  >   i18nc("@action:inmenu %1=\"$GenericName\"", "%1 - current folder", 
"$GenericName")
  >
  >
  > (and so on for the other messages)
  
  
  I like it better will do

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Alexander Potashev
aspotashev added a comment.


  I suggest a more flexible approach which allows translators to more around 
the "$GenericName" part inside their translation and change the " - " separator 
to anything more appropriate in their language:
  
i18nc("@action:inmenu %1=\"$GenericName\"", "%1 - current folder", 
QStringLiteral("$GenericName"))
  
  (and so on for the other messages)

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham
Cc: aspotashev, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven updated this revision to Diff 69453.
meven added a comment.


  Amend comment

REPOSITORY
  R304 KNewStuff

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25216?vs=69452=69453

BRANCH
  master

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

AFFECTED FILES
  src/kmoretools/kmoretoolsmenufactory.cpp

To: meven, leinir, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven edited the summary of this revision.

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
meven requested review of this revision.

REVISION SUMMARY
  $GenericName was translated before being passed to 
KMoreToolsService::formatString,
  causing translators to process "$GenericName - ..." in their language, in 
turn causing formatString not to replace the expected placeholder $GenericName 
for instance.

TEST PLAN
  In another language than English:
  Open Dolphin
  Click on the free space progress bar
  Menu appears
  
  Before (with French) :
  First entry begins with "$NomGénérique -..."
  
  After:
  First entry begins with "Statistiques d'utilisation des disques - ..."

REPOSITORY
  R304 KNewStuff

BRANCH
  master

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

AFFECTED FILES
  src/kmoretools/kmoretoolsmenufactory.cpp

To: meven
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25216: Fix translations of $GenericName

2019-11-08 Thread Méven Car
meven added reviewers: leinir, ngraham.

REPOSITORY
  R304 KNewStuff

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

To: meven, leinir, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns