Ticket #7245 (closed bug: fixed)
Some enchancements and fixing of the Devices application localization
| Reported by: | Karvjorm | Owned by: | nobody |
|---|---|---|---|
| Priority: | normal | Milestone: | R1 |
| Component: | Applications/Devices | Version: | R1/alpha2 |
| Keywords: | Devices localization | Cc: | Karvjorm |
| Blocked By: | Blocking: | ||
| Has a Patch: | yes | Platform: | All |
Description
Localization has caused some problems in Devices application. Details tab can include English "Device name" and value "unknown" and at the same time a localized "Device name" with some quite reasonable text. I backed a little backward in localization and started to test, how those duplicate fields could be removed. I wrote a filter that work by some way. Still it is only a workaround, but could be used until someone have time to refactor the whole application.
As you can see in the enclosed figure, the scsi/vendor + scsi/product could combined to better "Device name" than "unknown" or the localized "Unknown device" is now. In my filter I tried the same ide, but it does not work quite correct yet. At present "Manufacturer" and "Device name" are already combined in device tree on the left ("Intel Corporation"+"82372AB/EB/MB PIIX4 ACPI").
In the figure you can also see, that V from Virtual is clipped (it is at the end of scsi/vendor). It is a bug before the localization, I think.
Also, I enchanced code by adding handling of ACPI Battery (it is not quite complete but better than before). I added also DeviceUSB and DeviceSCSI code, but only USB code is compiled and is shown in ACPI only, I think.
Br, Karvjorm
Attachments
Change History
Changed 15 months ago by Karvjorm
-
attachment
DeviceNameVirtualError.png
added
Changed 15 months ago by Karvjorm
-
attachment
devices-fix.patch
added
An enhancement and fix for the Devices application.
comment:2 Changed 15 months ago by Karvjorm
About text looked awful and I fixed it too.
br, Karvjorm
comment:3 follow-up: ↓ 4 Changed 15 months ago by siarzhuk
What is wrong with this one so you going to change it?
@@ -53,13 +53,13 @@
void
DevicesApplication::ShowAbout()
{
- BAlert* alert = new BAlert("about", B_TRANSLATE("Devices\n"
- "\twritten by Pieter Panman\n"
- "\n"
- "\tBased on listdev by Jérôme Duval\n"
- "\tand the previous Devices preference\n"
- "\tby Jérôme Duval and Sikosis\n"
- "\tCopyright 2009, Haiku, Inc.\n"), B_TRANSLATE("OK"));
+ BString aboutStr("%1\n%2\n\n%3\nCopyright 2009, Haiku, Inc.\n");
+ aboutStr.ReplaceFirst("%1", B_TRANSLATE("Devices"));
+ aboutStr.ReplaceFirst("%2", B_TRANSLATE("written by Pieter Panman"));
+ aboutStr.ReplaceFirst("%3", B_TRANSLATE("Based on listdev by Jérôme "
+ "Duval\nand the previous Devices preference\nby Jérôme Duval and "
+ "Sikosis"));
+ BAlert* alert = new BAlert("about", aboutStr.String(), B_TRANSLATE("OK"));
1) This lines already translated to dozen of languages and changing it now discards all that translations work. Please be more thrifty to your colleagues' work and do not change already translated lines without significant reasons;
2) Frankly speaking original code is looking much more clean than you one. Please do not over-complicate the source code because temporary problems at HTA. Sooner or later HTA will be fixed but this bloat-lines can stay in the sources for years;
3) As it was already discussed in ML - the first parameter of BAlert constructor call must be translated too. It is visible on some non-default decoration themes.
Changed 15 months ago by Karvjorm
-
attachment
WhatsWrongWithDevicesAbout.png
added
Devices About window with wrong left alignment before this fix
Changed 15 months ago by Karvjorm
-
attachment
FixedDevicesAboutWindow.png
added
Devices About window after fixes of the patch
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 15 months ago by Karvjorm
Replying to siarzhuk:
What is wrong with this one so you going to change it?
1) This lines already translated to dozen of languages and changing it now discards all that translations work. Please be more thrifty to your colleagues' work and do not change already translated lines without significant reasons;
2) Frankly speaking original code is looking much more clean than you one. Please do not over-complicate the source code because temporary problems at HTA. Sooner or later HTA will be fixed but this bloat-lines can stay in the sources for years;
PLS, feel free to compare the two figures I have enclosed here. The problem with the previous layout was those '\t' marks that caused that alignment to to left was wrong.
3) As it was already discussed in ML - the first parameter of BAlert constructor call must be translated too. It is visible on some non-default decoration themes.
Sorry, I forgot that one.
Br, Karvjorm
comment:5 in reply to: ↑ 4 Changed 15 months ago by siarzhuk
Replying to Karvjorm:
PLS, feel free to compare the two figures I have enclosed here. The problem with the previous layout was those '\t' marks that caused that alignment to to left was wrong.
But alignment of original English line is OK. :-) To solve this problem you can reformat localized part as you want - remove tabs, or break the string into more lines.
3) As it was already discussed in ML - the first parameter of BAlert constructor call must be translated too. It is visible on some non-default decoration themes.
Sorry, I forgot that one.
Not a problem, just a reminder.
comment:7 Changed 7 months ago by mmadia
Marking the patch obsolete, as an updated version has been requested.
Changed 4 months ago by Karvjorm
-
attachment
fix_devices-patch.diff
added
This should fix non-localized strings of the Devices application
comment:10 Changed 3 months ago by humdinger
- Status changed from new to closed
- Resolution set to fixed
Applied with hrev43723. Thanks! Closing as fixed, right?

A "Virtual" bug