Closed Bug 234087 Opened 21 years ago Closed 21 years ago

Localizers should be able able to customize "translate page" URL

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kairo, Assigned: kairo)

References

Details

(Keywords: l12y)

Attachments

(1 file)

The summary says it all: Tools > Translate Page always translates to English currently, this should be different in localized builds: Localizers should be able to set this to a different URL so that it e.g. translates to German in the German build. The setting of the URL should move into some file in the content pack, so that it's customizable along with the other URLs in the localization area. BTW, this already had been mentioned in bug 135181 comment #60
how? it's a user preference.
timeless: see http://lxr.mozilla.org/mozilla/source/xpfe/bootstrap/browser-prefs.js#96 and http://lxr.mozilla.org/mozilla/source/xpfe/browser/resources/locale/en-US/region.properties#16 if you're pointing to the .properties file from prefs, and have an entry with the same name as the pref in that .properties file, you achieve exactly that. I guess that you'll want to use the same file as with that search URL here as well.
i'm not doing this. note that this isn't remotely close to transparent, you need to add an extra preference and check two preferences. see all the ugly code in navigator.js
Assignee: timeless → kairo
For me, both http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/navigator.js#986 and http://lxr.mozilla.org/seamonkey/source/xpfe/components/search/resources/search-panel.js#825 imply that this approach should be quite straight forward to use. I could miss something important here though...
OK, here's the patch. It looks pretty straight forward, and it does work in my trunk CVS build. I even tested it with a German localization for the URL, and it really does work as expected. I nearly died of laughing when I read the automated translation of www.mozilla.org ;-)
Attachment #143050 - Flags: review?(timeless)
Attachment #143050 - Flags: superreview?(tor)
Attachment #143050 - Flags: review?(timeless)
Attachment #143050 - Flags: review+
Attachment #143050 - Flags: superreview?(tor) → superreview+
Checking in xpfe/bootstrap/browser-prefs.js; /cvsroot/mozilla/xpfe/bootstrap/browser-prefs.js,v <-- browser-prefs.js new revision: 1.8; previous revision: 1.7 done Checking in xpfe/browser/resources/content/navigator.js; /cvsroot/mozilla/xpfe/browser/resources/content/navigator.js,v <-- navigator.js new revision: 1.530; previous revision: 1.529 done Checking in xpfe/browser/resources/locale/en-US/region.properties; /cvsroot/mozilla/xpfe/browser/resources/locale/en-US/region.properties,v <-- region.properties new revision: 1.10; previous revision: 1.9 done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: