make DOM Inspector localizable

RESOLVED FIXED in mozilla1.4final


18 years ago
12 years ago


(Reporter: hewitt, Assigned: caillon)



Dependency tree / graph
Bug Flags:
blocking1.3 -
blocking1.4 -

Firefox Tracking Flags

(Not tracked)



(1 attachment, 5 obsolete attachments)



18 years ago
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.


18 years ago
Target Milestone: --- → Future
Posted file add some .dtd (obsolete) —
download attachment 87533 [details] [diff] [review] as inspector.diff and attachment 87535 [details] as 

% cd mozilla/extensions/inspector
% patch -p0 < inspector.diff
% cd resources/locale/en-US/viewers
% unzip

I checked only .xul and .dtd files. I didn't check .js and .properties files.

Comment 4

17 years ago
Just a mention that bug #148073 also addresses this issue.


17 years ago
Attachment #87535 - Attachment mime type: application/octet-stream → text/plain


17 years ago
Attachment #87535 - Attachment mime type: text/plain → application/octet-stream

Comment 5

17 years ago
*** Bug 148073 has been marked as a duplicate of this bug. ***

Comment 6

17 years ago
you missed a spot:

when you get around to js, this is where you should look:,175,258,357,421,430,435,309,371,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.
Posted patch patch for 1.2.1 (obsolete) — 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.
var file = FilePickerUtils.pickFile("Find Search File", path, ["filterXML"],
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. ***


16 years ago
Attachment #109881 - Flags: superreview?(hewitt)
Attachment #109881 - Flags: review?(timeless)

Comment 14

16 years ago
Nominating for 1.3.
Flags: blocking1.3?

Comment 15

16 years ago
=>patch author
Assignee: hewitt → btm
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-

Comment 17

16 years ago
*** Bug 196767 has been marked as a duplicate of this bug. ***


16 years ago
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 

Comment 21

16 years ago
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

After image: is top page.


16 years ago
Flags: blocking1.4? → blocking1.4-
Posted patch patch for trunk (obsolete) — 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-
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

In, 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

please test well.
Attachment #123599 - Flags: approval1.4? → approval1.4+
This is in.  Have fun.
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 31

16 years ago
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

en-US - snapshot

Comment 32

16 years ago
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.