lyft读音_把lyft翻译成西班牙语

lyft读音

This article is a translation. Original publication here.

本文是翻译。 原始出版物在这里

In the United States, the Latinx community comprises a large part of the population. Therefore, many of Lyft’s drivers and riders speak Spanish. However, before 2018, these users could only access the app in English. This issue prompted several of our engineers in 2018 to engage in discussions with other companies to learn more about the solutions they used in making their respective applications available in multiple languages. After these conversations, we at Lyft decided to do things a little differently than other technology companies. This solution allowed us to have more than two languages available in the app. We decided to start with Spanish, since, after English, it is the most common language preferred by Lyft drivers based on their mobile device settings.

在美国,拉丁裔社区占人口的很大一部分。 因此,Lyft的许多驾驶员和骑手都说西班牙语。 但是,在2018年之前,这些用户只能使用英语访问该应用程序。 该问题促使我们在2018年的几名工程师与其他公司进行讨论,以了解有关他们在以多种语言提供各自的应用程序时使用的解决方案的更多信息。 经过这些交谈,Lyft决定与其他技术公司做些不同的事情。 此解决方案使我们在应用程序中可以使用两种以上的语言。 我们决定从西班牙语开始,因为在英语之后,它是Lyft驾驶员根据其移动设备设置选择的最常用语言。

There are two types of platforms on which we store Lyft content for translation: client (in mobile apps) and on our servers. For both, a new type of data structure was created, the “translatable string,” which contains not only a string of characters but the context in which it will be used.

我们将Lyft内容存储在两种平台上进行翻译:客户端(在移动应用中)和服务器上。 两者都创建了一种新型的数据结构,即“可翻译字符串”,它不仅包含字符串,而且包含将在其中使用的上下文。

Here is a very simple example:

这是一个非常简单的示例:

STRING: redCONTEXT: car color dropdown option in Lyft’s online driver sign up process, e.g. “car color: red”

In this case, it would seem evident that we are looking to translate a single word, “red”, which alludes to the color of the car. It is not so complicated for the translator to understand, however, in more complex examples, the context will help him or her find the right translation for each situation.

在这种情况下,很明显,我们正在寻找一个单一的词“红色”,这暗指汽车的颜色。 译者理解起来并不那么复杂,但是,在更复杂的示例中,上下文将帮助他或她为每种情况找到正确的翻译。

解决方案 (The solution)

For both the client and the server, there are several elements that we have to define before showing our system designs.

对于客户端和服务器,在显示系统设计之前,必须定义几个元素。

First, it’s important to note that we use a third-party translation management system (TMS) that handles the translations we send them.

首先,请务必注意,我们使用第三方翻译管理系统(TMS)来处理发送给我们的翻译。

Then, we created an internal microservice in Lyft called “translation service.” This service handles interactions between the third-party system and Lyft’s mobile services and apps that need to translate a string of characters. This service takes care of three things:

然后,我们在Lyft中创建了一个内部微服务,称为“翻译服务”。 该服务处理第三方系统与Lyft的移动服务和需要翻译字符串的应用程序之间的交互。 此服务照顾三件事:

  1. Extracting character strings that need to be translated.

    提取需要翻译的字符串。
  2. Sending those strings to the TMS.

    将那些字符串发送到TMS。
  3. Distributing the translations to the microservices or clients (mobile apps) that need them.

    将翻译分发给需要它们的微服务或客户端(移动应用程序)。

This is the overall solution we’ve implemented at Lyft. However, certain specific considerations will change depending on whether the translations are delivered to microservices or mobile (client) applications.

这是我们在Lyft实施的整体解决方案。 但是,某些特定的考虑会根据翻译是传递到微服务还是移动(客户端)应用程序而改变。

应用程序中的翻译(客户端) (Translations in the app (client))

In mobile apps, there are a lot of strings, but the advantage is that a large part of them are constant. This makes the design of the mobile solution a little simpler. Here you can see the diagram that explains the design that’s used to translate the strings for the client apps:

在移动应用程序中,有很多字符串,但是优点是它们中的很大一部分是恒定的。 这使移动解决方案的设计更加简单。 在这里,您可以看到该图,该图说明了用于翻译客户端应用程序的字符串的设计:

Image for post

微服务中的翻译(“后端”) (Translations in the microservices (‘backend’))

In this case, many of the strings to be translated are dynamic because they may be stored in a database or in a configuration file on the servers. This makes the solution in this case a little more complex. Here, apart from the translation service and the TMS, there is also a configuration repository containing translations called “translationdata.” This data is downloaded to the servers of the services that subscribe to it by way of the configuration of the service that needs it. This design allows translations and changes to be made when the data changes dynamically. This can be seen in the following diagram:

在这种情况下,许多要转换的字符串是动态的,因为它们可能存储在数据库中或服务器上的配置文件中。 这使得这种情况下的解决方案更加复杂。 在这里,除了翻译服务和TMS之外,还有一个配置库,其中包含称为“ translationdata”的翻译。 通过需要该数据的服务的配置,该数据被下载到订阅该数据的服务的服务器。 这种设计允许在数据动态更改时进行转换和更改。 如下图所示:

Image for post

用西班牙语测试应用 (Testing the app in Spanish)

When we performed the first tests of our translation systems, we realized that some strings in Spanish did not fit within the available screen spaces for certain buttons, since this language tends to use more characters than English in order to express an idea. To fix this problem internally, Lyft created a way to control the language in the app’s alpha settings so that you can change the app’s language to check different strings and how they are displayed on the screen. In the following example, we can see the above with the screenshots I took from the alpha version app on my mobile phone.

当我们对翻译系统进行首次测试时,我们意识到西班牙语的某些字符串不适合某些按钮的可用屏幕空间,因为这种语言倾向于使用比英语更多的字符来表达想法。 为了在内部解决此问题,Lyft创建了一种方法来控制应用程序的Alpha设置中的语言,以便您可以更改应用程序的语言以检查不同的字符串以及它们在屏幕上的显示方式。 在以下示例中,我们可以看到上面的内容以及我从手机上的Alpha版本应用程序中截取的屏幕截图。

Image for post
Changing the app language in Lyft Beta Rider app
在Lyft Beta Rider应用程序中更改应用程序语言

When the first translations came out, many Spanish-speaking employees had the opportunity to test the Lyft apps in Spanish and see what errors were present in some of the translations which failed in the contextualization process, as well as make suggestions to correct them. For example, one of the errors I found the first time I used the app in Spanish was that on the promotions page, whereas in English it said “Free rides”, in Spanish it said, “Viajes libres” (free as in speech) instead of “Viajes gratis” (free as in products).

当第一批翻译发布时,许多说西班牙语的员工就有机会用西班牙语测试Lyft应用程序,查看在上下文化过程中失败的某些翻译中存在哪些错误,并提出纠正建议。 例如,我第一次在西班牙语中使用该应用程序时发现的错误之一是在促销页面上,而在英语中则显示“ Free rides”,在西班牙语中则显示了“ Viajes libres”(言论自由)而不是“免费提供”(产品免费)。

At Lyft, these changes were crucial to the services we offer. They could not have happened without the efforts of key team members such as Dan Sullivan, Julien Silland, Ava Zhang, Kris Gellci, Brian McConnell, Ryan Grasell, Zak Haitkin, Alex Atencio, Antonio Luna, Jonathan Schoonhoven, Rahul Phalak, Dan Barak, among others.

在Lyft,这些更改对于我们提供的服务至关重要。 没有丹·沙利文,朱利安·席兰德,阿瓦·张,克里斯·盖尔奇,布莱恩·麦康奈尔,瑞安·格拉塞尔,扎克·海特金,亚历克斯·阿滕西奥,安东尼奥·卢纳,乔纳森·舒恩霍芬,拉胡尔·帕拉克,丹·巴拉克,其中。

Lyft is hiring. If you want to be a part of our team, check out lyft.com/careers.

Lyft正在招聘。 如果您想成为我们团队的一员,请访问lyft.com/careers

Original article by Miguel Molina. Translated to English by Zak Haitkin.

Miguel Molina的原创文章 扎克·海特金(Zak Haitkin)将其翻译成英文。

翻译自: https://eng.lyft.com/translating-lyft-into-spanish-6f14cb37c7fd

lyft读音

### 解决 Python 导入 `lyft_dataset_sdk` 模块时出现的 "No module named 'lyft_dataset_sdk'" 错误 当遇到 “ModuleNotFoundError: No module named lyft_dataset_sdk” 错误时,这通常意味着 Python 环境无法定位到所需的库文件。以下是几种可能的原因以及对应的解决方案: #### 1. 库未安装 如果尚未安装 `lyft_dataset_sdk`,则需要先通过 pip 进行安装。可以使用以下命令来确保最新版本被正确安装[^4]: ```bash pip install -U lyft_dataset_sdk ``` #### 2. 虚拟环境中缺失该包 有时即使已经安装了所需软件包,在特定虚拟环境下仍可能出现找不到模块的情况。确认当前使用的 Python 解释器确实包含了已安装的 `lyft_dataset_sdk` 包。 对于 Anaconda 用户来说,建议创建一个新的 conda 环境并在此基础上安装必要的依赖项[^5]。例如: ```bash conda create --name myenv python=3.7 conda activate myenv pip install -U lyft_dataset_sdk ``` #### 3. PYTHONPATH 设置不当 另一个常见问题是系统的环境变量设置不正确,特别是 `PYTHONPATH` 变量没有指向包含自定义模块的位置。可以通过临时修改此路径或将源码复制到标准位置之一来解决问题。 假设本地有克隆下来的 GitHub 仓库,则可以直接将其根目录加入到解释器会话中的 sys.path 列表里去测试是否能正常工作: ```python import sys sys.path.append('/path/to/your/local/repo') from lyft_dataset_sdk.lyftdataset import LyftDataset ``` 以上方法应该能够帮助克服大多数情况下由于缺少 `lyft_dataset_sdk` 所引发的问题。不过需要注意的是,具体操作还需视个人开发环境而定。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值