Bug 432462

Summary: too long translation in Plasma Battery applet
Product: [Translations] i18n Reporter: Rolf Eike Beer <kde>
Component: deAssignee: German-Translators <kde-i18n-de>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs, schwarzer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot

Description Rolf Eike Beer 2021-02-03 13:19:48 UTC
All I can see from it is "Automatischen Ruhezustand und Bildschirmsperre …", no idea if it is enable or disable.
Comment 1 Rolf Eike Beer 2021-02-03 13:20:12 UTC
Created attachment 135392 [details]
screenshot
Comment 2 Frederik Schwarzer 2021-02-04 00:13:36 UTC
Sorry, but this is not a translation issue but a layouting issue.

https://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.231:_Pixel_Based_Layouts
Comment 3 Nate Graham 2021-02-04 17:29:45 UTC
It's not a layout issue; we are indeed using layouts, and there is plenty of space here for a shorter translation, but the applet size is fixed. Therefore it is important that short strings and short translations be used in plasma applets. 

FWIW there is more horizontal space available in Plasma 5.21 because we moved the buttons to the header. So it may already be accidentally fixed there. But still, a shorter translation would be better if possible. Moving to the i18n product to see if that's possible.
Comment 4 Frederik Schwarzer 2021-02-04 20:17:43 UTC
Correct me if I am wrong. Depending on the system font configured by the user the maximum length for that string varies. ... If that is the case, it is not possible to find a properly shortened string that will work.

In this special case the label could be broken into two lines if too long.
Comment 5 Nate Graham 2021-02-04 20:25:19 UTC
The size of the applet's popup adjusts with the font metrics and size. So roughly, the amount of space for text should scale.

Since this text is in a checkbox, there is a technical issue that prevents it from being able to have two lines. So we're stuck with either making more space, or shortening the translation.
Comment 6 Unknown 2021-02-04 21:32:14 UTC
SVN commit 1592508 by schwarzer:

shorten translation a bit to fit it into fixed width layout


 M  +2 -2      plasma_applet_org.kde.plasma.battery.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1592508
Comment 7 Frederik Schwarzer 2021-02-04 21:39:18 UTC
I hope this fits now.

Eike, could you please check, if this is working now?
Comment 8 Rolf Eike Beer 2021-02-05 11:50:48 UTC
Yes, short enough. Thx.