Opened 14 years ago
Closed 14 years ago
#6603 closed bug (fixed)
[Installer] not enough chars to store translated string (patch)
Reported by: | diver | Owned by: | anevilyak |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Installer | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev38644.
If you select Russian locale in ReadOnlyBootPrompt and then start Installer you'll see question marks in the black diamonds in the drop down menus. See screenshot.
Attachments (2)
Change History (10)
by , 14 years ago
Attachment: | installer.png added |
---|
comment:2 by , 14 years ago
patch: | 0 → 1 |
---|
comment:4 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Applied in hrev38647. Thanks!
comment:6 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Aren't those "black diamonds" the sign that current implementation of "string_for_size" function is buggy? Looks like the string was just cut out regardless of real character boundaries. UTF-8 is not fixed-size symbol encoding. And much more elegant solution would be translating with "..." at end in case proposed buffer is not enough, IMO. Anyway this is a partial solution and I'm not sure, that 20 bytes "will be enough" for any language. ;-)
comment:7 by , 14 years ago
By the way another potential place for the same problem:
src/kits/tracker/InfoWindow.cpp 1548 char capacityStr[16], usedStr[16], freeStr[16]; 1549 string_for_size(capacity, capacityStr, sizeof(capacityStr)); 1550 string_for_size(capacity - fFreeBytes, usedStr, sizeof(usedStr)); 1551 string_for_size(fFreeBytes, freeStr, sizeof(freeStr));
Other occuriences of using "string_for_size" are using either 1024 or 128 bytes for result buffer. ;-)
comment:8 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
To me, if the bug reporter tested the patch OK, it is good enough. Please create a more general bug for the string_for_size() API problem.