Conversation
docs/hardware/location.md
Outdated
|
|
||
| > **IMPORTANT:** Starting with NativeScript 1.5.0, the built-in Location module is deprecated. To implement geolocation in your apps, use the `nativescript-geolocation` plugin, available via npm. This plugin provides an API similar to the [W3C Geolocation API](http://dev.w3.org/geo/api/spec-source.html). | ||
|
|
||
| > **重要信息:** 从NativeScript 1.5.0版本开始, 内建的地理位置模块将被弃用. 若需要在您的应用中实现地理位置处理相关功能, 可以通过npm安装使用`nativescript-geolocation`插件。 该插件提供了类似于[W3C Geolocation API](http://dev.w3.org/geo/api/spec-source.html)的API。 |
There was a problem hiding this comment.
“已被弃用”可直接翻译为“已弃用”,英文中很多被动语句在中文中并不需要加“被”。
“若需要在您的应用中实现地理位置处理相关功能, 可以通过npm安装使用nativescript-geolocation插件”
建议改为
“若要在应用中实现处理地理位置的功能,可用npm安装一个nativescript-geolocation插件”
这样比较简短,而且英文中使用的you在很多情况下并不需要翻译。
docs/hardware/location.md
Outdated
|
|
||
| The most important difference between the deprecated module and the new plugin is that location monitoring via the plugin returns an `id` that you can use to stop location monitoring. The `nativescript-geolocation` plugin also uses an accuracy criteria approach to deliver geolocation. This means that getting a location is powered by the most accurate location provider that is available. For example, if a GPS signal is available and the GPS provider is enabled, the plugin uses GPS; if GPS is not connected, the device falls back to other available providers such as Wi-Fi networks or cell towers). | ||
|
|
||
| 被弃用的模块和新启用的插件之间最大的区别在于,通过插件获取到的位置监控器返回一个`id`,你可以通过使用这个`id`来结束位置监控器。此外,`nativescript-geolocation`插件还通过使用一种高精度标准的方式来提供地理位置信息。这意味着获取的位置信息由当前可用的最精确的位置提供者提供。例如,如果可以获取到GPS信号而且GPS提供者被启用,则插件使用GPS;如果GPS无法连接,则设备使用其他可用的提供者例如Wi-Fi网络或者蜂窝网络信号塔。 |
There was a problem hiding this comment.
”通过插件获取到的位置监控器(会)返回一个id,你可以 通过使 用这个id来 结束 停止位置监控器“。位置监控器是个名词,一般”结束“后面要跟动词。所以可改为停止监控器或者结束监控。
建议翻译完英文之后,完整的通读一遍中文,避免英文语法带来的翻译腔。
docs/hardware/location.md
Outdated
|
|
||
| This approach does not limit location monitoring only to a specific location provider; it can still work with all of them. | ||
|
|
||
| 这种方式并不是要限制位置监控器,使其使用某个特定的位置提供者;所有的位置提供者均被会使用。 |
There was a problem hiding this comment.
但这种方式并不会把位置监控器限定为某个特定的位置提供者,而是仍使用全部的。
docs/hardware/location.md
Outdated
|
|
||
| You might want to start with this [example](https://github.com/nsndeck/locationtest), which demonstrates how to use the `nativescript-geolocation` plugin. | ||
|
|
||
| 你可能会希望通过一个教你如何使用`nativescript-geolocation`插件的[示例](https://github.com/nsndeck/locationtest)来开始了解这一部分的内容。 |
docs/hardware/location.md
Outdated
|
|
||
| After you install the plugin, you can request to use location services in the app with the code in __Example 1__: | ||
|
|
||
| 在你完成插件的安装后,你可以使用__样例1__中的代码来请求使用位置服务。 |
There was a problem hiding this comment.
”你“字过多,在中文中一个语句中出现两个”你“通常是坏味道。
比如可翻译为:
在安装完插件后,你可以使用__样例1__中的代码来申请使用位置服务。
docs/hardware/location.md
Outdated
|
|
||
| > Example 1: How to enable location service on a device | ||
|
|
||
| > 样例1:如何在设备启用位置服务 |
docs/hardware/location.md
Outdated
|
|
||
| This method gets a single location. It accepts the `location options` parameter. | ||
|
|
||
| 这个方法获取单个位置信息。方法接受`location options`参数。 |
There was a problem hiding this comment.
这个方法获取单个位置信息,它接受location options参数。
两句简短的英文可以合并成一个汉语语句,不要过于受限于英文的句号。
docs/hardware/location.md
Outdated
| 属性 | 类型 | 描述 | ||
| ---|---|--- | ||
| `latitude` | Number | 纬度,以角度为单位 | ||
| `longitude` | Number | 纬度,以角度为单位 |
docs/hardware/location.md
Outdated
|
|
||
| 属性 | 类型 | 描述 | ||
| ---|---|--- | ||
| `latitude` | Number | 纬度,以角度为单位 |
There was a problem hiding this comment.
”以角度为单位“
建议改为
”以度数(deg)为单位“
因为角度是个广义词,有多种表示方法,包括弧度。
docs/hardware/location.md
Outdated
| `verticalAccuracy` | Number | 垂直精度,以米为单位 | ||
| `speed` | Number | 速度,以米每秒为单位 | ||
| `direction` | Number | 方向(航向),以角度为单位 | ||
| `timestamp` | Object | 此位置获取完成时候的时间戳 |
docs/hardware/location.md
Outdated
|
|
||
| 属性 | 类型 | 描述 | ||
| ---|---|--- | ||
| `desiredAccuracy` | Number | (可选的)制定所需的精度,以米为单位. NativeScript有一个特殊的枚举类型[Accuracy](http://docs.nativescript.org/api-reference/modules/_ui_enums_.accuracy.html)来帮助提高代码的可读性。默认设为`Accuracy.any`。这样的精度可以通过WiFi和辅助GPS来实现,不会对电池消耗造成额外的压力。若要使用高精度模式(需要GPS传感器)请将其设置为`Accuracy.high`. |
docs/hardware/location.md
Outdated
|
|
||
| ### `watchLocation` | ||
|
|
||
| ### `监视位置` |
There was a problem hiding this comment.
watchLocation(监视位置)
方法名本身不要翻译,翻译信息可以跟在后面加括号。
docs/hardware/location.md
Outdated
|
|
||
| ### `distance` | ||
|
|
||
| ### `距离` |
location.md初翻已经完成