<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>53224</bug_id>
          
          <creation_ts>2011-01-26 23:11:44 -0800</creation_ts>
          <short_desc>Web Inspector: WebSocket-related console messages are not localized</short_desc>
          <delta_ts>2026-01-12 09:02:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Blaze Burg">bburg</assigned_to>
          <cc>ap</cc>
    
    <cc>bburg</cc>
    
    <cc>dbates</cc>
    
    <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>tkent</cc>
    
    <cc>ukai</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
    
    <cc>yutak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>340732</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-01-26 23:11:44 -0800</bug_when>
    <thetext>There are numerous strings that can be added to the console that aren&apos;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

    &quot;Status line contains embedded null&quot;
    &quot;Status line is too long&quot;
    &quot;No response code found: ...&quot;
    &quot;Status line does not end with CRLF&quot;
    &quot;Invalid status code: ...&quot;

In WebSocketHandshake::readHTTPHeaders:
http://trac.webkit.org/browser/trunk/Source/WebCore/websockets/WebSocketHandshake.cpp#L497

    &quot;CR doesn&apos;t follow LF at ...&quot;
    &quot;Unexpected CR in name at ...&quot;
    &quot;Unexpected LF in name at ...&quot;
    &quot;Unexpected LF in value at ...&quot;
    &quot;CR doesn&apos;t follow LF after value at ...&quot;
    &quot;invalid UTF-8 sequence in header name&quot;
    &quot;invalid UTF-8 sequence in header value&quot;

And WebSocketHandshake::checkResponseHeaders:
http://trac.webkit.org/browser/trunk/Source/WebCore/websockets/WebSocketHandshake.cpp#L582

    &quot;Error during WebSocket handshake: &apos;sec-websocket-origin&apos; header is missing&quot;
    &quot;Error during WebSocket handshake: &apos;sec-websocket-location&apos; header is missing&quot;
    &quot;Error during WebSocket handshake: origin mismatch: &quot; + clientOrigin() + &quot; != &quot; + m_wsOrigin
    &quot;Error during WebSocket handshake: location mismatch: &quot; + clientLocation() + &quot; != &quot; + m_wsLocation
    &quot;Error during WebSocket handshake: protocol mismatch: &quot; + m_clientProtocol + &quot; != &quot; + m_wsProtocol</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342535</commentid>
    <comment_count>1</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2011-01-31 04:47:20 -0800</bug_when>
    <thetext>I&apos;m not familiar with localization in WebKit. How do we localize texts like these? Any pointers?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342538</commentid>
    <comment_count>2</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-01-31 05:08:25 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; I&apos;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
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1227786</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-09-08 14:00:53 -0700</bug_when>
    <thetext>&lt;rdar://problem/28213695&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1228173</commentid>
    <comment_count>4</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2016-09-09 10:07:45 -0700</bug_when>
    <thetext>It&apos;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&apos;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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>