Closed
Bug 11097
Opened 25 years ago
Closed 25 years ago
Move localizable strings from UI JavaScript files into string bundle: Editor.properties
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: cmanske, Assigned: cmanske)
Details
Dynamic text used in the Editor UI must get strings from a localizable source. This will be in the Editor.properties string bundle file and we should use the JS helpers developed by Tao. Here's his instructions: I had checked in the needed functionality for retrieving external resources in JS function. To save you a few effort, I also checked in a convinient function, JS_GetStrBundle(chrome_url_to_the_property_file, app_locale), which returns a JS nsIStringBundle object. For now, the second argument, 'app_locale', shall be null since you can get hold of the application locale from JS functions yet. I will fix it when nsILocale is xpconnected. You can call this object's member functions, GetStringFromID() and GetStringFromName(), to retrieve texts from *.properties files just like the way you do in C++ code. To use this JS_ fucntion, you need to have the following line in your XUL files before its usage: <html:script language="javascript" src="chrome://global/content/strres.js" /> Known bugs: The property file loader does not properly interpret escape unicode which will cause non-ascii characters not render correctly in the UI. We are working on this. english texts shall be drawn fine. A sample JS function is provided at the end of this message. Feel free to let me know if you have any question or comment.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M10
Assignee | ||
Comment 1•25 years ago
|
||
If there's a rush to do this while I'm on vacation (8/7 - 8/19), Simon or Kathy can jump in and do this.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M10 → M12
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•25 years ago
|
||
All of the editor UI strings in JavaScript have been place in editor.properties. We have a GetString() method in the editor IDL that can be used in our JS for accessing strings (we always use the "name" strategy, not ID). Thanks for supplying the JS helpers, but we needed string bundle access in the editor shell, so it was trivial to allow it to be used in JS as well.
Assignee | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Assignee | ||
Updated•25 years ago
|
Resolution: FIXED → ---
Assignee | ||
Comment 4•25 years ago
|
||
Boy was that tedious! I found some strings in the image and link dialogs that need to be moved into the editor.properties dialog. Waiting for approval to check in fixes for those.
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: M12 → M11
Assignee | ||
Comment 5•25 years ago
|
||
I'd like to get this in ASAP for I18N folks.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•25 years ago
|
||
Checked in 9/30.
Assignee | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 7•25 years ago
|
||
I've verified this now (which is how I found the last remaining strings and had to reopen it!)
You need to log in
before you can comment on or make changes to this bug.
Description
•