Closed Bug 210948 Opened 22 years ago Closed 22 years ago

Some file dialogs have harcoded filter description

Categories

(Core :: Internationalization: Localization, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: vberon, Assigned: KaiE)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.3) Gecko/20030413 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.3) Gecko/20030413 A couple file descriptions in file dialogs were hardcoded in javascript files rather than localized in a properties file. This bug is to have them localizable. Reproducible: Always Steps to Reproduce: 1. 2. 3.
This bug is not about the Bosnian/bs-BA localization, it's for the main branch. Somebody can reassign it to the proper person please?
This patch should fix the bug in the two separate instances I found it, ie Certificate Manager and Chatzilla.
Changing Product to Browser.
Component: Bosnian/bs-BA → Localization
Product: Mozilla Localizations → Browser
Version: unspecified → Trunk
over to kaie
Assignee: aselimovic → kaie
.
Assignee: kaie → rchen
QA Contact: aselimovic → ylong
.
Assignee: rchen → kaie
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 126658 [details] [diff] [review] Patch for some filter descriptions in file dialogs The change to security/manager looks ok to me. r=kaie on that part Please ask rginda to review the chatzilla change.
Attachment #126658 - Flags: review+
Requesting review from rginda for the chatzilla part of attachment #126658 [details] [diff] [review].
you'll need to add the message to chatzilla.properties as well. after that, r=rginda.
Messages already exist in chatzilla.properties, lines 456-457 in chatzilla.properties 1.16. Confirm review with that info?
ah, ok then, r=rginda
Attachment #126658 - Flags: superreview?(brendan)
Comment on attachment 126658 [details] [diff] [review] Patch for some filter descriptions in file dialogs >diff -urN mozilla-orig/extensions/irc/xul/content/prefpanel/startup-newScript.js mozilla/extensions/irc/xul/content/prefpanel/startup-newScript.js >--- mozilla-orig/extensions/irc/xul/content/prefpanel/startup-newScript.js 2003-06-27 19:16:51.000000000 -0400 >+++ mozilla/extensions/irc/xul/content/prefpanel/startup-newScript.js 2003-06-27 19:43:52.000000000 -0400 >@@ -18,9 +18,10 @@ > try { > var flClass = Components.classes["@mozilla.org/filepicker;1"]; > var fp = flClass.createInstance(nsIFilePicker); >- fp.init(window, "Choose a JavaScript script", nsIFilePicker.modeOpen); >+ fp.init(window, getMsg("file_browse_Script"), >+ nsIFilePicker.modeOpen); The only nits I can pick are for multi-line call expressions like this one: please indent the overflow lines so they underhang the first actual argument. >- fp.appendFilter("PKCS12 Files", "*.p12"); >+ fp.appendFilter(bundle.GetStringFromName("file_browse_PKCS12_spec"), >+ "*.p12"); Same here (so "*.p12" starts in the same column as bundle above it). sr=brendan@mozilla.org with that. /be
Attachment #126658 - Flags: superreview?(brendan) → superreview+
Update to attachment #126658 [details] [diff] [review] integrating the changes requested by brendan@mozilla.org.
Attachment #126658 - Attachment is obsolete: true
Requesting integration in CVS HEAD of attachment #126928 [details] [diff] [review]. If possible, also requesting integration in CVS MOZILLA_1_4_BRANCH of attachment #126928 [details] [diff] [review].
Comment on attachment 126658 [details] [diff] [review] Patch for some filter descriptions in file dialogs Requesting approval for 1.4.x.
Attachment #126658 - Flags: approval1.4.x?
Asked via email: Is there any way to get this into 1.4 without changing the properties files? We want to avoid translation if possible.
Unfortunately, I don't think so. The issue at hand is some non-localisable strings. The goal of the patch is to be able to localise them. Since they're in a js file, a properties file needs to be modified. The text is not present in any other properties file.
can we do a try catch block and use english if the string is not in the bundle?
Not sure. If the bundle.GetStringFromName("") throws an exception with the current locale, I don't know a way to get to the english version since chrome://foo/locale/bar.properties will point to the current locale. Maybe there's already a catchall to English (but then the proper line must be in bar.properties, at least in English), else somebody else will have to do it.
Couldn't we just use the exisiting code in the failing case (hardcoded in the Javascript) I just want to make sure 1.4 translations work in a 1.4.1.
Really not sure kaie will appreciate having some translations everywhere in his files. Better to not try to apply the last part of the patch to 1.4.1 then. The first part (startup-newScript.js) could be committed to 1.4.x as it doesn't touch any .properties file, hence a current translation will be usable.
Things are already hardcoded in the current files. I don't think that adding the current hardcoded option as a fallback if the translations aren't there isn't that big of a deal, especially if it is only on a branch.
fixed on trunk
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment on attachment 126658 [details] [diff] [review] Patch for some filter descriptions in file dialogs Sorry, we don't want changes that impact localization in 1.4.1.
Attachment #126658 - Flags: approval1.4.x? → approval1.4.x-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: