Closed Bug 39004 Opened 20 years ago Closed 19 years ago

importMsgs.properties not localizable

Categories

(Core :: Localization, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: amasri, Assigned: tonyr)

References

Details

(Whiteboard: [nsbeta2+])

The file, /chrome/messenger/locale/importMsgs.properties,
contains several string variables that are not localizable because the strings 
are meant to be concatenated with other data that may not fall in the correct 
location for other languages. Strings should be rewritten in printf format:

Example: Settings were imported from %S

These strings need to be changed:

ImportSettingsSuccess=Settings were imported from
ImportMailFailed=An error occurred importing mail from
ImportMailSuccess=Mail was successfully imported from
ImportAddressFailed=An error occurred importing addresses from 
ImportAddressSuccess=Addresses were successfully imported from 
MailProgressMeterText=Converting mailboxes from 
AddrProgressMeterText=Converting address books from
Target Milestone: --- → M17
These are all used in JS.  Anyone know what the JS equivalent of printf is?
Status: NEW → ASSIGNED
bill law wrote a javascript method that does this in 
http://lxr.mozilla.org/seamonkey/source/xpfe/components/xfer/resources/downloadP

Alec Flett has the same problem you do in
http://bugzilla.mozilla.org/show_bug.cgi?id=38834

So far as I know, the code is not externalized into JavaScript itself. Someone 
should probably take on the task, since it seems to be a general issue and will 
likely continue to be so in the future.
Blocks: 12394
Keywords: nsbeta2
copying alec so that when he figures out the fix for 38834, tony can implement 
the same fix. 
putting on nsbeta2- radar.
Whiteboard: [nsbeta2-]
removing nsbeta2- and nominating again. How are we supposed to make sense of 
sentences we cannot localize?
Whiteboard: [nsbeta2-]
Putting on [NEED INFO] radar.
Whiteboard: [NEED INFO]
I have check . All these string are used in 
/mailnews/import/resources/content/importDialog.js
and the right way to handle it is to change to 
ImportSettingsSuccess=Settings were imported from #1
ImportMailFailed=An error occurred importing mail from #1
ImportMailSuccess=Mail was successfully imported from #1
ImportAddressFailed=An error occurred importing addresses from #1
ImportAddressSuccess=Addresses were successfully imported from #1
MailProgressMeterText=Converting mailboxes from #1
AddrProgressMeterText=Converting address books from #1

and see how bill law use the replaceInsert in 
xpfe/components/xfer/resources/downloadProgress.js to replace the #1 with the 
data.
no, don't use bill law's method, it's totally crazy and hardcoded into his 
progress dialog code.
I have exposed nsTextFormatter through the string bundle
see nsIStringBundle::formatStringFromName for correct usage.
per msanz:
"The only workaround for this in some languages is to leave it in English, which 
is not acceptable."

Putting on [nsbeta2+] radar
Whiteboard: [NEED INFO] → [nsbeta2+]
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Reassign QA to Allan. 

Allan, can you verify the fix? Thanks.
QA Contact: teruko → amasri
Verified fixed in 7/18 build
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.