Closed Bug 320231 Opened 18 years ago Closed 6 years ago
add localization notes for length-limited PKCS#11 strings in pipnss
59 bytes, text/x-review-board-request
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8) Gecko/20051206 SeaMonkey/1.0b Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8) Gecko/20051206 SeaMonkey/1.0b When using a localized version of SM, the password prompt for the security device is being cut at the end. The CertPassPrompt string is ok (that is, is shown fully), but the substitution for the included %S seems to fail for some reason (that is, the last char is being cut). As an example, if I try to export a personal certificate, the dialog shows the problem (under it-IT): the PrivateTokenDescription entity (in Italian: "Dispositivo di sicurezza") which is used in the dialog shows up as "Dispositivo di sicurezz". Reproducible: Always Under guidance from dveditz over IRC, I've tried adding "xxx" at the end of PvtTknDesc, but the outcome doesn't change. If I change the string to "Dispositivo xxx", it shows up fully in the dialog. I have tried also adding a space before the fullstop in CertPassPrompt, but it didn't help with the failing substitution (but showed up correctly in the dialog after the cutten string). Also, dveditz can't see any string limit (nor it is reported as a LOCALIZATION NOTE in the pipnss.properties file) anywhere in the code, which was my first wild guess at first. I also checked the translated file with a hex editor to see if any extraneous char was added, and saw none. I've still one or two tests I'd like to do, and report back the outcome.
More findings, on the left the string for PrivateTokenDescription, on the right the outcome in the dialog: "Dispositivo di abcdefghijklmnopqrstuvwxyz" -> "Dispositivo di abcdefghijklmnopq" "Dispositivo abcdefghijklmnopqrstuvwxyz" -> "Dispositivo abcdefghijklmnopqrst" "Dispositivo sicurezza" -> "Dispositivo sicurezza" This makes me think there is actually a real limit on the substitution string of around 32 chars. If you agree, then the limit should be removed, or, if it is a security concern, a LOCALIZATION NOTE should be added to the relevant entries (probably more than only PrivateTokenDescription...) in pipnss.properties and maybe even pippki.properties. Before someone asks (and I foget), CertPassPrompt has got %S (capital) also in the translated version.
Need to correct my comment 0: it's not "Dispositivo di sicurezza", but it's "Dispositivo di sicurezza software", and it gets truncated as "Dispositivo di sicurezza softwar" (missing last "e"). More evidence of a 32 chars limit for the string...
see also bug 317630
Yeah, I bet you're right
See bug 90956 comment 21 why some of the strings are truncated at 32 bytes and others at 64 bytes. That's defined in PKCS #11, which is an industry standard API. http://en.wikipedia.org/wiki/PKCS That bug also added the following comment to pipnss.properties: # the following strings have special requirements: # they must fit in a 32 or 64 byte buffer after being translated # to UTF8. Note to translator. It's not easy for you to figure # whether the escaped unicode string you produce will fit in # the space allocated. http://lxr.mozilla.org/seamonkey/source/security/manager/locales/en-US/chrome/pipnss/pipnss.properties#44
Can we mark this bug as WONTFIX/INVALID?
Actually, it looks like we should revisit our localizations and check which are broken, and get bugs on individual locales filed. I don't have time to do this this week, and my head is going to drop it by then, probably, thus adding a helpwanted keyword.
Please use the standard notation for localization warnings: LOCALIZAION NOTE (<entityname>): <explanation> This will help a lot with automated tools, thanks!
In the Italian branch 1.8 (for Firefox and Thunderbird 2) the string is: Disp. di sicurezza software http://lxr.mozilla.org/l10n-mozilla1.8/source/it/security/manager/chrome/pipnss/pipnss.properties#47 so it complies with the 32 characters limit.
reassign bug owner. mass-update-kaie-20120918
Assignee: kaie → nobody
See comment 8.
Component: Security: UI → Security: PSM
Priority: P3 → P5
Summary: Password prompt truncates security device translation → add localization notes for length-limited PKCS#11 strings in pipnss.properties
Whiteboard: [kerh-coa] → [kerh-coa][psm-backlog]
Comment on attachment 8934231 [details] Bug 320231 - Update localization notes for length-limited PKCS#11 strings in pipnss.properties https://reviewboard.mozilla.org/r/205156/#review211390 This is basically OK, but I'd like to have some more machine-readable comments, and I think we can do that without making this much harder to read. For one, can we put the whole sentence in one line, so that we don't line-break it at different places? And put the number and unit at the end? Something like # LOCALIZATION NOTE (RootCertModuleName): # string limit after conversion to UTF-8: 64 bytes
Attachment #8934231 - Flags: review?(l10n) → review-
Updated per IRC discussion with something that clearly looks like a directive, and should be easier to parse.
Comment on attachment 8934231 [details] Bug 320231 - Update localization notes for length-limited PKCS#11 strings in pipnss.properties https://reviewboard.mozilla.org/r/205156/#review211434
Attachment #8934231 - Flags: review?(l10n) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/a74542182b97 Update localization notes for length-limited PKCS#11 strings in pipnss.properties r=Pike
6 years ago
Target Milestone: Future → mozilla59
You need to log in before you can comment on or make changes to this bug.