Closed
Bug 1127417
Opened 11 years ago
Closed 11 years ago
Replace hardcoded "…" with internationalized version in markup view
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 38
People
(Reporter: bgrins, Assigned: vaibhavChoudhary, Mentored)
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 2 obsolete files)
2.02 KB,
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
See "XXX: internationalize the elliding" at https://dxr.mozilla.org/mozilla-central/source/browser/devtools/markupview/markup-view.js#2075.
We just need to replace this character with:
Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data
Reporter | ||
Updated•11 years ago
|
Mentor: bgrinstead
Whiteboard: [good first bug][lang=js]
Assignee | ||
Comment 1•11 years ago
|
||
:Brain i would really like to work on this bug.I m new to open source and i think this can help me to further venture in open source world.
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to vaibhav from comment #1)
> :Brain i would really like to work on this bug.I m new to open source and i
> think this can help me to further venture in open source world.
Hello, to get started first take a look at https://wiki.mozilla.org/DevTools/GetInvolved for some information and resources about working on DevTools.
Once you are ready to start pulling down the code, follow the instructions at https://wiki.mozilla.org/DevTools/Hacking#First_Build. Feel free to hop onto the #devtools IRC channel and ask if you have any issues getting started up.
Reporter | ||
Comment 3•11 years ago
|
||
Once you get a build running, the patch itself should be pretty simple. The hard part is going to be getting your development environment set up and then learning how to build and submit a patch: https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F.
We will just need a line like this near the top of the file with any other consts:
const ELLIPSIS = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data;
And then just replace the hardcoded "…" with ELLIPSIS.
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8557262 -
Flags: review?(bgrinstead)
Assignee | ||
Comment 5•11 years ago
|
||
Brian ,would greatly appriciate if u can review the patch and let me know if there are any problems with it.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → choudharyvaibhav132
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•11 years ago
|
||
Brain ,do i have to do anything else regarding this patch ?
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 8557262 [details] [diff] [review]
bug1127417_InternationalizedMarkup.diff
Review of attachment 8557262 [details] [diff] [review]:
-----------------------------------------------------------------
This isn't quite right (see inline comments for what needs to change). You can test your changes on a page like: http://jsbin.com/yubaniseze/1. Inspect the div with the really long text content and expand it in the markup view - you should see the ellipses in this case.
::: browser/devtools/markupview/markup-view.js
@@ +2072,5 @@
>
> update: function() {
> if (!this.selected || !this.node.incompleteValue) {
> let text = this.node.shortValue;
> + Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data;
Remove this line altogether
@@ +2077,2 @@
> if (this.node.incompleteValue) {
> text += "…";
You need to replace the "…" here with ELLIPSIS, and just remove the line with the comment.
Attachment #8557262 -
Flags: review?(bgrinstead) → review-
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 8•11 years ago
|
||
sorry for check-in ...will changing code right now ..
Reporter | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 9•11 years ago
|
||
brian ,can you please explain what do you mean by "nspect the div with the really long text content and expand it in the markup view".
Reporter | ||
Comment 10•11 years ago
|
||
(In reply to vaibhav [:vaibhavChoudhary] from comment #9)
> brian ,can you please explain what do you mean by "nspect the div with the
> really long text content and expand it in the markup view".
Open this in a tab: http://jsbin.com/yubaniseze/1. Then right click on the text and say Inspect Element. Notice that a <div> gets highlighted in the markup view. Now expand this div in devtools by clicking on the triangle to the left of it. See the "..." at the end of it and how it cuts off the text of the element? This is the string that we want to update.
So you can test that you are changing the right thing by modifying that string to something else and see if it is reflected in your build. Once you know you are changing the right thing, just swap it out with ELLIPSIS.
Assignee | ||
Comment 11•11 years ago
|
||
Brian,Thanx
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8557262 -
Attachment is obsolete: true
Attachment #8557308 -
Flags: review?(bgrinstead)
Reporter | ||
Comment 13•11 years ago
|
||
Comment on attachment 8557308 [details] [diff] [review]
rev1 : modified and tested
Review of attachment 8557308 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/markupview/markup-view.js
@@ +2076,2 @@
> if (this.node.incompleteValue) {
> + text = ELLIPSIS;
This should remain += so we don't end up overwriting the actual text
Attachment #8557308 -
Flags: review?(bgrinstead)
Assignee | ||
Comment 14•11 years ago
|
||
brian ,i added the "+=" sign there but if you notice problem still persists. check the rev1 after changing "+=" to "=" whole text appear as ".." and on click it expands.but with rev2 which is this current patch the small section of text appears with ".." .I would really appriciate if u can explain this to me.
Attachment #8557462 -
Flags: review?(bgrinstead)
Reporter | ||
Comment 15•11 years ago
|
||
(In reply to vaibhav [:vaibhavChoudhary] from comment #14)
> after changing "+=" to "=" whole text appear as ".." and on
> click it expands.but with rev2 which is this current patch the small section
> of text appears with ".." .I would really appriciate if u can explain this
> to me.
This is the expected behavior :). The patch looks good, pushed it to the test servers: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fb42294b4353
Reporter | ||
Updated•11 years ago
|
Attachment #8557308 -
Attachment is obsolete: true
Reporter | ||
Comment 16•11 years ago
|
||
Comment on attachment 8557462 [details] [diff] [review]
rev_2 += added
Review of attachment 8557462 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me
Attachment #8557462 -
Flags: review?(bgrinstead) → review+
Reporter | ||
Comment 17•11 years ago
|
||
Pushed to fxteam: https://hg.mozilla.org/integration/fx-team/rev/2098158a0374
Whiteboard: [good first bug][lang=js] → [fixed-in-fx-team][good first bug][lang=js]
Comment 18•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team][good first bug][lang=js] → [good first bug][lang=js]
Target Milestone: --- → Firefox 38
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•