Closed Bug 1127417 Opened 11 years ago Closed 11 years ago

Replace hardcoded "…" with internationalized version in markup view

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

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)

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
Mentor: bgrinstead
Whiteboard: [good first bug][lang=js]
: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.
(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.
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.
Attachment #8557262 - Flags: review?(bgrinstead)
Brian ,would greatly appriciate if u can review the patch and let me know if there are any problems with it.
Assignee: nobody → choudharyvaibhav132
Status: NEW → ASSIGNED
Brain ,do i have to do anything else regarding this patch ?
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-
Keywords: checkin-needed
sorry for check-in ...will changing code right now ..
Keywords: checkin-needed
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".
(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.
Brian,Thanx
Attached patch rev1 : modified and tested (obsolete) — Splinter Review
Attachment #8557262 - Attachment is obsolete: true
Attachment #8557308 - Flags: review?(bgrinstead)
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)
Attached patch rev_2 += addedSplinter Review
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)
(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
Attachment #8557308 - Attachment is obsolete: true
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+
Whiteboard: [good first bug][lang=js] → [fixed-in-fx-team][good first bug][lang=js]
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
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: