WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 53224
Web Inspector: WebSocket-related console messages are not localized
https://bugs.webkit.org/show_bug.cgi?id=53224
Summary
Web Inspector: WebSocket-related console messages are not localized
Joseph Pecoraro
Reported
2011-01-26 23:11:44 PST
There are numerous strings that can be added to the console that aren't localized. There may be others than the ones mentioned here. In WebSocketHandshake::readStatusLine:
http://trac.webkit.org/browser/trunk/Source/WebCore/websockets/WebSocketHandshake.cpp#L430
"Status line contains embedded null" "Status line is too long" "No response code found: ..." "Status line does not end with CRLF" "Invalid status code: ..." In WebSocketHandshake::readHTTPHeaders:
http://trac.webkit.org/browser/trunk/Source/WebCore/websockets/WebSocketHandshake.cpp#L497
"CR doesn't follow LF at ..." "Unexpected CR in name at ..." "Unexpected LF in name at ..." "Unexpected LF in value at ..." "CR doesn't follow LF after value at ..." "invalid UTF-8 sequence in header name" "invalid UTF-8 sequence in header value" And WebSocketHandshake::checkResponseHeaders:
http://trac.webkit.org/browser/trunk/Source/WebCore/websockets/WebSocketHandshake.cpp#L582
"Error during WebSocket handshake: 'sec-websocket-origin' header is missing" "Error during WebSocket handshake: 'sec-websocket-location' header is missing" "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + m_wsOrigin "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + m_wsLocation "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + m_wsProtocol
Attachments
Add attachment
proposed patch, testcase, etc.
Yuta Kitamura
Comment 1
2011-01-31 04:47:20 PST
I'm not familiar with localization in WebKit. How do we localize texts like these? Any pointers?
Kent Tamura
Comment 2
2011-01-31 05:08:25 PST
(In reply to
comment #1
)
> I'm not familiar with localization in WebKit. How do we localize texts like these? Any pointers?
Please look at WebCore/platform/LocalizedStrings.h. Each of platforms has implementations of these functions. Mac: WebKit/mac/Misc/WebLocalizedStrings.mm WebKit2 platforms: WebCore/platform/LocalizedStrings.cpp Chromium: WebKit/chromium/src/LocalizedStrings.cpp ...
Alexey Proskuryakov
Comment 3
2016-09-08 14:00:53 PDT
<
rdar://problem/28213695
>
Blaze Burg
Comment 4
2016-09-09 10:07:45 PDT
It's debatable whether we want to localize error messages, as this makes it harder for users to search the web and figure out their problem. In Web Inspector, we purposefully don't localize CSS properties or values. So, if we localize such strings, we need to be very careful to avoid translating things that have a very specific meaning, such as sec-websocket-origin, CSP policy strings, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug