$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.
Details
- Reviewers
leinir ngraham aspotashev - Group Reviewers
Localization - Commits
- R304:91f212f983ef: Fix translations of $GenericName
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 - ..."
Diff Detail
- Repository
- R304 KNewStuff
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
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)
In general, string concatenation that you suggested is a big red flag for me as a translator. Concatenation often creates an untranslatable word puzzle.
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.