Closed Bug 109891 Opened 23 years ago Closed 22 years ago

make DOM Inspector localizable

Categories

(Other Applications :: DOM Inspector, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.4final

People

(Reporter: hewitt, Assigned: caillon)

References

Details

(Keywords: l12y)

Attachments

(1 file, 5 obsolete files)

DOM Inspector is only half-localizable right now. I need to scan for hard-coded strings in xul and js files and move them into dtds and properties files.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Attached file add some .dtd (obsolete) (deleted) —
download attachment 87533 [details] [diff] [review] as inspector.diff and attachment 87535 [details] as viewers.zip. % cd mozilla/extensions/inspector % patch -p0 < inspector.diff % cd resources/locale/en-US/viewers % unzip viewers.zip I checked only .xul and .dtd files. I didn't check .js and .properties files.
Just a mention that bug #148073 also addresses this issue.
Attachment #87535 - Attachment mime type: application/octet-stream → text/plain
Attachment #87535 - Attachment mime type: text/plain → application/octet-stream
*** Bug 148073 has been marked as a duplicate of this bug. ***
you missed a spot: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/tests/allskin.xul&rev=1.3&mark=78 when you get around to js, this is where you should look: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/inspector.js&rev=1.13&mark=161,175,258,357,421,430,435 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/utils.js&rev=1.6&mark=132-143#129 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/prefs/pref-sidebar.js&rev=1.7&mark=121#119 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/search/modules/findFiles/dialog.js&rev=1.1&mark=35 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/search/modules/junkImgs/dialog.js&rev=1.1&mark=35 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/viewers/domNode/domNode.js&rev=1.7&mark=307,309,371 http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/viewers/styleRules/styleRules.js&rev=1.9&mark=201,228 As for your patch... 1. you use a lot of abbreviations, which i'm not sure is a particularly good thing. (evalExprDialog.des, and the many of the random prefix abbreviations) 2. you aren't consistent about case: mipadding.label cpImage.label FindDialog.title The patch doesn't appear to have rotted (my fault for not doing more to other bugs). And the only place where i'd imagine you're likely to hit problems in the future is if i fix the notepad calling js (which you haven't patched yet anyway) to do something remotely sane (i'm not sure if there's a bug for this, but that's not really a big concern yet).
Adding bug #161762 as blocking this.
Depends on: 161762
*** Bug 163412 has been marked as a duplicate of this bug. ***
download attachment 109164 [details] [diff] [review] as inspector.patch % cd mozilla (source tree root) % patch -p0 < inspector.patch I can display some Japanese word. but this patch need more test.
Attached patch patch for 1.2.1 (obsolete) (deleted) — Splinter Review
Attachment #87533 - Attachment is obsolete: true
Attachment #87535 - Attachment is obsolete: true
Attachment #109164 - Attachment is obsolete: true
attachment 109164 [details] [diff] [review] has one problem. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/inspector/resources/content/inspector.js&rev=1.13&mark=175 var file = FilePickerUtils.pickFile("Find Search File", path, ["filterXML"], "Open"); i seem "Open" is command, can't localize. but attachment 109164 [details] [diff] [review] change "Open" to getMsg("runSearch_Msg2"). don't patch 109164, please test attachment 109881 [details] [diff] [review] .
*** Bug 191095 has been marked as a duplicate of this bug. ***
Attachment #109881 - Flags: superreview?(hewitt)
Attachment #109881 - Flags: review?(timeless)
Nominating for 1.3.
Flags: blocking1.3?
=>patch author
Assignee: hewitt → btm
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla1.4alpha
I wouldn't hold 1.3 for this. It would be nice to have and drivers would consider approving reviewed patches.
Flags: blocking1.3? → blocking1.3-
*** Bug 196767 has been marked as a duplicate of this bug. ***
Flags: blocking1.4?
Comment on attachment 109881 [details] [diff] [review] patch for 1.2.1 Does this patch still apply? I'll review it, but I think there have been additional string additions to inspector since it was created. Please patch the current trunk and request a review from me.
Attachment #109881 - Flags: superreview?(hewitt)
Attachment #109881 - Flags: review?(timeless)
Comment on attachment 109881 [details] [diff] [review] patch for 1.2.1 >- <caption label="Element Blinking"/> >+ <caption label="&blinkGrp.label;"/> Also, please use more descriptive names for your entities where possible. blinkGrp does not qualify here. >+ <treecol id="colNodeName" label="&tccolNodeName.label;" primary="true" persist="width,hidden,ordinal" flex="3"/> Neither does tccol* in computedStyle.xul. I suppose I should have a look at updating this patch myself sometime, because I have issues with almost all the names that have been chosen...
Attachment #109881 - Flags: review-
I need to follow progress on this bug. I'm working on a lot of patches for Inspector, and unfortunately, localization has been way back on my mind. If this bug is fixed and then my patches land, it would certainly cause a regression in this bug. Please advise me on what I should do; whatever it is, it should probably be a requirement for any new code being submitted to Inspector.
I translate DOM Inspector to Japanese with using #12's attachment. It corrected in order are local and to apply a patch. Then, it applied and created. inspector.jar is in below. #19's comment inspector-1.3.1.jar : For 1.3, 1.3.1 inspector-1.4a.jar: For 1.4a http://plaza25.mbn.or.jp/~snip/jlp/inspector-1.3.1.jar http://plaza25.mbn.or.jp/~snip/jlp/inspector-1.4a.jar After image: http://plaza25.mbn.or.jp/~snip/images/moz121DOM_753x556.png http://plaza25.mbn.or.jp/~snip/images/moz121DOM_800x1154.png http://plaza25.mbn.or.jp/~snip/ is top page.
Flags: blocking1.4? → blocking1.4-
Attached patch patch for trunk (obsolete) (deleted) — Splinter Review
attachment 109881 [details] [diff] [review] base patch. some fix for #19 comment.
Attachment #109881 - Attachment is obsolete: true
download attachment 122951 [details] [diff] [review] as inspector.patch % cd mozilla/extensions/inspector (inspector's root) % patch -p0 < inspector.patch attachment 122951 [details] [diff] [review] is based on attachment 109881 [details] [diff] [review]. I make this patch on trunk and I rewrite to use descriptive names.
Attachment #122951 - Flags: review?(caillon)
Great, Thanks for the patch! If you don't mind, I am going to take this bug from you and clean up the patch little bit. There are a few things you put in the patch that should not be localized (DOM/CSS API references), and a couple other changes I would like to make to it. I will post a new one within the next couple days, but you posting the patch against the trunk has really helped. I want to get this into 1.4 final, so targetting there.
Assignee: btm → caillon
Keywords: l12y
Priority: -- → P1
Target Milestone: mozilla1.4alpha → mozilla1.4final
Comment on attachment 122951 [details] [diff] [review] patch for trunk By the way, there are also some big problems with this patch. For instance, you copied code from Chatzilla and apparantly didn't bother to fully test it. That code will not work in inspector as-is. I'm fixing that up as well.
Attachment #122951 - Flags: review?(caillon) → review-
Attached patch Proposed Patch (deleted) — Splinter Review
Actually, this is pretty much a completely different patch from what was previously posted. I ended up not really using anything from the previous patches. This even changes some literal strings to better suit their purpose, as well as updates some regular alert/prompt calls to do their magic via the prompt service, and commenting out some (as of yet) unused code -- note that I would rather comment that code out than remove it as I will actually look at it if it is commented with XXXcaa. Additionally, I tried to minimize the string bundle usage by placing the bundle itself on the panelset. I've tested this on Linux, and all is well.
Attachment #122951 - Attachment is obsolete: true
Comment on attachment 123599 [details] [diff] [review] Proposed Patch r=me with these changes (as discussed on irc): <biesi> but could you split the long lines in that file? <biesi> (that file=findDialog.xul) don't make nodeName and nodeValue translatable in domNode.xul and add a comment why not add a localization note on toggleSelectedImportant.label to not translate !important In inspector.properties, add a comment above the node types about where they come from use false instead of "" as value for dummy in styleRules.js
Attachment #123599 - Flags: review?(cbiesinger) → review+
Comment on attachment 123599 [details] [diff] [review] Proposed Patch I got a verbal rs=bzbarsky on IRC. Seeking approval for 1.4.
Attachment #123599 - Flags: superreview+
Attachment #123599 - Flags: approval1.4?
Comment on attachment 123599 [details] [diff] [review] Proposed Patch making stuff localizable seems like a no-brainer to me, a=sspitzer it's easy to find undefined dtd entities (since you notice on load) but undefined .properties can be lurking, waiting to bite you and give you js errors. please test well.
Attachment #123599 - Flags: approval1.4? → approval1.4+
This is in. Have fun.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Thanks. Great. It seems that however, there is an error in about one point. prefs.dtd It seems that it is read only when it is en-US. An error does not come out at the time of ja-JP, either. Moreover, an indication is not given. Linux Build ID: 2003051822 It seems "DOM Inspector" is lost in Advanced Category. ja-JP - snapshot http://plaza25.mbn.or.jp/~snip/snapshot1.png en-US - snapshot http://plaza25.mbn.or.jp/~snip/snapshot2.png
I'm sorry. It's mistake my testing. It was displayed normally. If possible, I want to delete the last comment.
Blocks: 234261
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: