Summary: | Web Inspector: Loc: Zoom level in Settings tab needs to use localized formatting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||||
Component: | Web Inspector | Assignee: | BJ Burg <bburg> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bburg, commit-queue, inspector-bugzilla-changes, mattbaker | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
BJ Burg
2017-02-16 14:16:35 PST
STEPS TO REPRODUCE: - Open Settings Tab - Look at Zoom Level: section EXPECTED: With en-US locale, should be 100%, 120%, etc. With tr-TR locale, should be %100, %120, etc. Created attachment 301823 [details]
[AFTER] tr-TR locale
Created attachment 301824 [details]
Patch
Comment on attachment 301824 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301824&action=review > Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:188 > - option.textContent = `${Math.round(level * 100)}%`; > + option.textContent = formatter.format(level); We have Number.percentageString in Utilities.js. Should we just use that? (In reply to comment #4) > Comment on attachment 301824 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=301824&action=review > > > Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:188 > > - option.textContent = `${Math.round(level * 100)}%`; > > + option.textContent = formatter.format(level); > > We have Number.percentageString in Utilities.js. Should we just use that? Had no idea. Yes, it works the same it seems. Created attachment 301836 [details]
Patch v2
Comment on attachment 301836 [details]
Patch v2
Text isn't being localized with the patch applied
(In reply to comment #1) > STEPS TO REPRODUCE: > - Open Settings Tab > - Look at Zoom Level: section > > EXPECTED: > > With en-US locale, should be 100%, 120%, etc. > With tr-TR locale, should be %100, %120, etc. To get tr-TR locale on macOS, go to System Preferences > Language & Region and add Turkish/Türkçe, then drag it to the top position. Relaunch Safari. (In reply to comment #7) > Comment on attachment 301836 [details] > Patch v2 > > Text isn't being localized with the patch applied It works for me. Did you change the system language? (In reply to comment #9) > (In reply to comment #7) > > Comment on attachment 301836 [details] > > Patch v2 > > > > Text isn't being localized with the patch applied > > It works for me. Did you change the system language? Works! My mistake. Comment on attachment 301836 [details] Patch v2 Clearing flags on attachment: 301836 Committed r212578: <http://trac.webkit.org/changeset/212578> All reviewed patches have been landed. Closing bug. |