V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
banxi1988
V2EX  ›  Android

给 AOSP 报一个拼写错误的曲折过程

  •  
  •   banxi1988 · 2015-05-17 11:57:37 +08:00 · 4819 次点击
    这是一个创建于 3267 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天我发现了 Android 源代码中注释的一个拼写错误.
    然后来到了:
    http://source.android.com/
    然后其中有这么一段:

    You can also contribute to the Android Open Source Project (AOSP) repository to make your changes available to everyone else in the Android ecosystem.

    其中的 contribute to指向一个链接,像这样: contribute to
    不过打开的是Gerrit,对我来说, 不知道怎么接下来怎么做.

    回到原点: 找到这个 http://source.android.com/source/contributing.html
    看来拼写错误还是报Bug吧.

    然后来到这里: 还是选择文档类型的Bug吧
    https://code.google.com/p/android/issues/entry?template=Developer%20Documentation

    我要报的拼写错误在:
    android.graphics.Color#parseColor 的注释的:

    /**
         * Parse the color string, and return the corresponding color-int.
         * If the string cannot be parsed, throws an IllegalArgumentException
         * exception. Supported formats are:
         * #RRGGBB
         * #AARRGGBB
         * 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta',
         * 'yellow', 'lightgray', 'darkgray', 'grey', 'lightgrey', 'darkgrey',
         * 'aqua', 'fuschia', 'lime', 'maroon', 'navy', 'olive', 'purple',
         * 'silver', 'teal'
         */
    

    中"fuschia"的拼写错误. 正确的拼法是 "fuchsia"

    不过要报Documentation的Bug,得引用文档 URL
    当我打开 http://developer.android.com/intl/zh-cn/reference/android/graphics/Color.html
    时,我发现其中的文档的拼写是正确的.

    但是我在Android 源代码也是 API 22级别.
    于是找到最新的线上源代码看:
    https://android.googlesource.com/platform/frameworks/base/+/android-5.1.1_r2/graphics/java/android/graphics/Color.java
    里在有parseColor注释,关于fuchsia的拼写还是错误的
    所以最后我还是提了一个bug

    https://code.google.com/p/android/issues/detail?id=173704

    请大家指正我英文描述上的错误.

    3 条回复    2015-05-18 15:54:27 +08:00
    mozartgho
        1
    mozartgho  
       2015-05-18 11:40:01 +08:00
    fuschia 是桃红色,不是拼写错误
    msg7086
        2
    msg7086  
       2015-05-18 14:56:48 +08:00
    @mozartgho 那 fuchsia 是啥?
    banxi1988
        3
    banxi1988  
    OP
       2015-05-18 15:54:27 +08:00
    @mozartgho
    这个确实是拼写错误.
    Android 这个支持的是 HTML 4.0.1 的 Named Color
    虽然注释有错,但是Android 代码没有错:
    ```Java
    sColorNameMap.put("fuchsia", 0xFFFF00FF);
    ```
    所以 Android 想表达的是 fuchsia, 所以注释中拼写错误
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1015 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:41 · PVG 03:41 · LAX 12:41 · JFK 15:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.