Opened 14 years ago
Closed 13 years ago
#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: | ||
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 (5)
Change History (15)
by , 14 years ago
Attachment: | DeviceNameVirtualError.png added |
---|
by , 14 years ago
Attachment: | devices-fix.patch added |
---|
An enhancement and fix for the Devices application.
comment:1 by , 14 years ago
patch: | 0 → 1 |
---|
follow-up: 4 comment:3 by , 14 years ago
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.
by , 14 years ago
Attachment: | WhatsWrongWithDevicesAbout.png added |
---|
Devices About window with wrong left alignment before this fix
by , 14 years ago
Attachment: | FixedDevicesAboutWindow.png added |
---|
Devices About window after fixes of the patch
follow-up: 5 comment:4 by , 14 years ago
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 by , 14 years ago
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:6 by , 14 years ago
comment:8 by , 13 years ago
patch: | 1 → 0 |
---|
by , 13 years ago
Attachment: | fix_devices-patch.diff added |
---|
This should fix non-localized strings of the Devices application
comment:9 by , 13 years ago
patch: | 0 → 1 |
---|
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied with hrev43723. Thanks! Closing as fixed, right?
A "Virtual" bug