add localization notes for length-limited PKCS#11 strings in

RESOLVED FIXED in Firefox 59



13 years ago
a year ago


(Reporter: prometeo.bugs, Assigned: flod)


Windows XP
Dependency tree / graph

Firefox Tracking Flags

(firefox59 fixed)


(Whiteboard: [kerh-coa][psm-backlog])


(1 attachment)



13 years ago
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 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.

Comment 1

13 years ago
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 and maybe even

Before someone asks (and I foget), CertPassPrompt has got %S (capital) also in the translated version.

Comment 2

13 years ago
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
Depends on: 317630
Ever confirmed: true
Keywords: intl, l12y


13 years ago
Whiteboard: [kerh-coa]


13 years ago
Priority: -- → P3
Target Milestone: --- → Future

Comment 5

12 years ago
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.

That bug also added the following comment to
# 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.

Comment 6

12 years ago
Can we mark this bug as WONTFIX/INVALID?

Comment 7

12 years ago
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.
Keywords: intl, l12y → helpwanted

Comment 8

12 years ago
Please use the standard notation for localization warnings:
LOCALIZAION NOTE (<entityname>): <explanation>
This will help a lot with automated tools, thanks!

Comment 9

12 years ago
In the Italian branch 1.8 (for Firefox and Thunderbird 2) the string is:

Disp. di sicurezza software

so it complies with the 32 characters limit.
QA Contact: ui


8 years ago
Blocks: 629034
reassign bug owner.
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
Whiteboard: [kerh-coa] → [kerh-coa][psm-backlog]


a year ago
Assignee: nobody → francesco.lodolo
Comment hidden (mozreview-request)

Comment 13

a year ago
Comment on attachment 8934231 [details]
Bug 320231 - Update localization notes for length-limited PKCS#11 strings in

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-
Comment hidden (mozreview-request)

Comment 15

a year ago
Updated per IRC discussion with something that clearly looks like a directive, and should be easier to parse.

Comment 16

a year ago
Comment on attachment 8934231 [details]
Bug 320231 - Update localization notes for length-limited PKCS#11 strings in
Attachment #8934231 - Flags: review?(l10n) → review+

Comment 17

a year ago
Pushed by
Update localization notes for length-limited PKCS#11 strings in r=Pike

Comment 18

a year ago
Last Resolved: a year ago
status-firefox59: --- → fixed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.