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

2015-05-17 11:57:37 +08:00
 banxi1988

今天我发现了 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

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

4890 次点击
所在节点    Android
3 条回复
mozartgho
2015-05-18 11:40:01 +08:00
fuschia 是桃红色,不是拼写错误
msg7086
2015-05-18 14:56:48 +08:00
@mozartgho 那 fuchsia 是啥?
banxi1988
2015-05-18 15:54:27 +08:00
@mozartgho
这个确实是拼写错误.
Android 这个支持的是 HTML 4.0.1 的 Named Color
虽然注释有错,但是Android 代码没有错:
```Java
sColorNameMap.put("fuchsia", 0xFFFF00FF);
```
所以 Android 想表达的是 fuchsia, 所以注释中拼写错误

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/191671

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX