Lokalise API v2是围绕着休息. API具有面向资源的URL,并使用HTTP响应代码指示API错误。
JSON由所有API响应返回,包括错误。
有Lokalise CLI v2作为所有端点的包装器。您可以下载针对不同平台的预编译二进制文件。
通过提供API令牌作为请求头来认证您的帐户X-Api-Token
. 令牌可以在您的下生成个人资料- - - - - - API的令牌。用户必须在项目中具有Admin角色,才能使用提供的令牌访问项目。
所有API请求都必须通过HTTPS进行。通过普通HTTP进行的调用将会失败。没有身份验证的API请求也会失败。
请求200
标题
X-Api-Token: f4d3f29bf893dc3583e9970735e08de094e82b0
所有顶级API资源都支持通过列表API方法。例如,您可以列出语言、贡献者或翻译。
这些列表API方法共享一个共同的结构,至少有以下两个参数:限制
和页面
.
的限制
默认是One hundred.
, 最大限度5000
和页面
默认是1
.
每个列表方法包括一个X-Pagination-Total-Count
头,可用条目的总数和X-Pagination-Page-Count
具有可用页面总数的页眉。
对所有端点的访问将被限制为每秒6次请求从2021年9月14日- 不会有任何额外的宽限期。每个API令牌和每个IP地址应用此限制。如果超出限制,将以JSON格式返回429 HTTP状态代码:
{"message": "请求太多。"details": "See //www.wwealerts.com/api2docs/curl/#resource-rate-limits for more information on API request rate limits."}
每个令牌只允许一个并发请求。
如果您使用的是project分支在Lokalise中的功能,只需将分号分隔的分号添加到任何端点中的项目ID,以访问分支,即3002780358964 f9bab5a92.87762498:功能/新书
.
检索分支列表。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id} /分支--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“分支”: [{“branch_id”:1234,“名称”:“功能/最好的web”,“created_at”:“2019-10-01 14:16:00(etc / utc)”,“created_at_timestamp”:1567001760,“created_by”:1123,“created_by_email”:"john@lokalise.com"},{“branch_id”:5678,“名称”:“热修复补丁/ error1”,“created_at”:“2019-10-0214:15:50(Etc/UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"}]}
检索分支对象。
curl——request GET \
——https url://api.lokalise.com/api2/projects/ {project_id} / branches/ {branch_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“600904245C4ECF0EC4A9D4.28360690”,“分支”:{“branch_id”:5678,“名称”:“热修复补丁/ error1”,“created_at”:“2019-10-0214:15:50(Etc/UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"}}
在项目中创建分支。需要管理员权限。
{“名称”:“热修复补丁/很重要”}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id} /分支--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“名称”:“热修复补丁/很重要”}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“分支”:{“branch_id”:995991,“名称”:“热修复补丁/很重要”,“created_at”:“2019-10-03 14:15:50(等/ UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"}}
更新项目中的一个分支。需要管理。
{“名称”:“热修复补丁/ needed-yesterday”}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/ {project_id} / branches/ {branch_id} \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“名称”:“热修复补丁/ needed-yesterday”}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“分支”:{“branch_id”:995991,“名称”:“热修复补丁/ needed-yesterday”,“created_at”:“2019-10-03 14:15:50(等/ UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"}}
删除项目中已配置的分支。需要管理员权限。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /分支/ {branch_id}
{“项目id”:“3002780358964 f9bab5a92.87762498”,“branch_deleted”:符合事实的}
合并项目中的一个分支。需要管理。
目标
或源
.
{“force_conflict_resolve_using”:“目标”}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id} / {branch_id} /合并\ /分支--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{“force_conflict_resolve_using”:“目标”}’
{“项目id”:“3002780358964 f9bab5a92.87762498”,“branch_merged”:符合事实的,“分支”:{“branch_id”:995991,“名称”:“热修复补丁/ needed-yesterday”,“created_at”:“2019-10-03 14:15:50(等/ UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"},“target_branch”:{“branch_id”:995123,“名称”:“掌握”,“created_at”:“2019-10-03 14:15:50(等/ UTC)”,“created_at_timestamp”:1567001750,“created_by”:1123,“created_by_email”:"john@lokalise.com"}}
注释可以用来给译者提供一个关于密钥的上下文,或者作为对密钥翻译的某些方面的讨论。每个键都有一个单独的注释线程。所有的评论都交叉张贴到项目聊天。
检索项目中所有评论的列表。
curl——request GET \
- url.'https://api.lokalise.com/api2/projects/{project_id:branch}/comments?limit={limit}&page={page}'\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“评论”: [{“comment_id”:44444,“key_id”:12345,“评论”:“你好,世界!”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600},{“comment_id”:44445,“key_id”:12346,“评论”:“再见,世界!”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600}]}
检索键的所有注释列表。
curl——request GET \
- url.“https://api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} /评论?限制={极限}和页面={页面}'\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“评论”: [{“comment_id”:44444,“key_id”:12345,“评论”:“你好,世界!”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600},{“comment_id”:44445,“key_id”:12345,“评论”:“再见,世界!”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600}]}
向键添加一组注释。
{“评论”: [{“评论”:“这是一次测试。”},{“评论”:“添加多个注释。”}]}
curl——请求发布\
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/keys/{key\u id}/comments\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{"comments":[{"comment":"This is a test."},{“评论”:“添加多个注释。”}]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“评论”: [{“comment_id”:44444,“key_id”:12345,“评论”:“这是一次测试。”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600},{“comment_id”:44445,“key_id”:12345,“评论”:“添加多个注释。”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600}]}
检索评论对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} / {comment_id} \ /评论--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“评论”:{“comment_id”:44444,“key_id”:12345,“评论”:“这是一次测试。”,“added_by”:420.,“added_by_email”:“compounter@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600}}
从项目中删除注释。经过身份验证的用户只能删除自己的注释。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} / {comment_id} \ /评论--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“comment_deleted”:符合事实的}
您可以为您的项目添加无限数量的贡献者。用户角色包括管理员、翻译和审稿人。了解更多.
列出项目的贡献者,包括对项目语言的访问级别。管理员对所有语言都有读/写权限。
curl——request GET \
- url.“https://api.lokalise.com/api2/projects/ {project_id:分支}/贡献者?限制={极限}和页面={页面}'\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“贡献者”: [{“user_id”:420.,“电子邮件”:“Johndoe@mycompany.com”,“全名”:“John Doe”,“created_at”:“2018-01-01 12:00:00(etc \ / utc)”,“created_at_timestamp”:1546257600,“is_admin”:符合事实的,“is_reviewer”:符合事实的,“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“is_writable”:1},{“语言id”:597,“lang_iso”:“汝”,“lang_name”:“俄罗斯”,“is_writable”:1} ],“admin_rights”:【“钥匙”,“语言”[}]}
在项目中创建一个或多个贡献者。需要管理贡献者管理权利。
如果is_admin
标志设置为符合事实的
,用户将自动访问所有项目语言,覆盖提供语言
对象。属性fullname
如果用户已经在Lokalise中注册,则将被忽略。
is_admin
被设置为假
.
上传
,活动
,下载
,设置
,create_branches.
,统计数据
,键
,截图
,术语表
,贡献者
,语言
,任务
.省略或空参数将为用户角色设置默认的admin权限。
{“贡献者”: [{“电子邮件”:“translator@mycompany.com”,“全名”:“翻译”先生,“is_admin”:假,“is_reviewer”:符合事实的,“语言”: [{“lang_iso”:“en”,“is_writable”:假},{“lang_iso”:“汝”,“is_writable”:符合事实的}]}}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/贡献者\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“贡献者”:[{“电子邮件”:“translator@mycompany.com”、“fullname”:“先生。翻译”、“is_admin”:假的,“is_reviewer”:真的,“语言”:[{“lang_iso”:“en”,“is_writable”:假},{“lang_iso”:“俄罗斯”,“is_writable”:真正}]}]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“贡献者”:{“user_id”:421.,“电子邮件”:“translator@mycompany.com”,“全名”:“翻译”先生,“is_admin”:假,“is_reviwer”:符合事实的,“语言”: [{“lang_iso”:“en”,“is_writable”:假},{“lang_iso”:“汝”,“is_writable”:符合事实的} ],“admin_rights”: []}}
检索贡献者对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {contributor_id} \贡献者--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“贡献者”:{“user_id”:421.,“电子邮件”:“translator@mycompany.com”,“全名”:“翻译”先生,“is_admin”:假,“is_reviwer”:符合事实的,“语言”: [{“lang_iso”:“en”,“is_writable”:假},{“lang_iso”:“汝”,“is_writable”:符合事实的} ],“admin_rights”:【“钥匙”,“语言”]}}
更新贡献者的属性。需要管理贡献者管理权利。
如果您想让一个现有的贡献者访问一种新的语言,您必须指定full语言
数组,包括先前添加的语言也是如此。
上传
,活动
,下载
,设置
,create_branches.
,统计数据
,键
,截图
,术语表
,贡献者
,语言
,任务
.空参数将为用户角色设置默认的管理权限。
{“is_admin”:符合事实的}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {contributor_id} \贡献者--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据“{“is_admin”:真}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“贡献者”:{“user_id”:421.,“电子邮件”:“translator@mycompany.com”,“全名”:“翻译”先生,“is_admin”:符合事实的,“is_reviwer”:符合事实的,“语言”: [{“lang_iso”:“en”,“is_writable”:符合事实的},{“lang_iso”:“汝”,“is_writable”:符合事实的} ],“admin_rights”:【“钥匙”,“语言”]}}
从项目中删除用户。需要管理贡献者管理权利。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {contributor_id} \贡献者--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“contributor_deleted”:符合事实的}
本地化是面向项目的翻译管理系统,这意味着我们将所有的密钥和翻译存储在数据库中,并可以生成您需要的任何格式的文件。为一个或多个平台分配一个密钥意味着将该密钥包含在与该平台相关的文件格式的导出例程中,例如,如果一个密钥被分配给iOS平台,它将被包含在其中字符串
和xliff
格式出口。除了为平台分配密钥之外,您还可以为文件分配密钥,并根据平台使用不同的文件名。
最受欢迎的iOS,Android和Web语言文件格式支持。
列出项目文件和相关的键数。如果项目中有一些键没有文件关联,它们将用文件名返回__unassigned__
.
curl——request GET \
- url.'https://api.lokalise.com/api2/projects/{project\u id:branch}/files?filter\u filename={filter\u filename}&limit={limit}&page={page}'\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“文件”: [{“文件名”:“index.json”,“key_count”:441.},{“文件名”:“admin.json”,“key_count”:32},{“文件名”:“__unassigned__”,“key_count”:11}]}
队列用于导入的本地化文件并返回a202
或302
回应以及一个排队过程对象。了解更多.需要上传文件管理权利。支持的文件类型.
请注意302
目前没有使用响应代码,但如果相同的文件已经在上传队列中,那么将来将返回响应代码。
use_automations
如果设置为符合事实的
.
{“文件名”:“index.json”,“数据”:“d94bwwgdmvyc2lvbj0ims4wiiblbmnvzgluzz0ivvrgl .....”,“lang_iso”:“en”,“标签”:【“指数”,“admin”,“版本”],“转换\u占位符”:符合事实的}
curl——请求发布\
——https url://api.lokalise.com/api2/projects/{project_id:branch}/files/upload\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“filename”:“index.json”,“数据”:“d94bwwgdmvyc2lvbj0ims4wiiblbmnvzgluzz0ivvrgl .....”,“lang_iso”:“en”,“标签”:[“索引”,“admin”,“v2.0“],”convert_placeholders“:true}'
{“项目id”:“767946315 e9866d013c1d0.08299127”,“过程”:{“process_id”:“2 e0559e60e856555fbc15bdf78ab2b0ca3406e8f”,“类型”:“文件导入”,“地位”:“排队”,“消息”:"",“created_by”:1234,“created_by_email”:“example@example.com”,“created_at”:“2020-04-20 13:43:43(Etc/UTC)”,“created_at_timestamp”:1587390223}}
{“项目id”:“767946315 e9866d013c1d0.08299127”,“过程”:{“process_id”:“2 e0559e60e856555fbc15bdf78ab2b0ca3406e8f”,“类型”:“文件导入”,“地位”:“排队”,“消息”:"",“created_by”:1234,“created_by_email”:“example@example.com”,“created_at”:“2020-04-20 13:43:43(Etc/UTC)”,“created_at_timestamp”:1587390223}}
以.zip包的形式导出项目文件。生成的bundle将被上传到Amazon S3 bucket中,该bucket将存储在那里12个月,可供下载。当bundle生成并上传时,您将得到一个带有文件URL的响应。需要下载文件管理权利。
在导出时,有两种方法可以根据文件名对键进行分组——一种是每种语言的所有键到单个文件中,另一种是使用前面分配的文件名。了解更多.
ios_sdk
或android_sdk
对于各自的OTA SDK包。
假
所有密钥将导出到每种语言的单个文件中。
原始文件名
设置为假
.允许的占位符% LANG_ISO %
,%郎_姓名%
,%格式%
和% PROJECT_NAME %
).
原始文件名
设置为符合事实的
).允许占位符% LANG_ISO %
.
格式
将被导出。
翻译
或未经翻译
,综述了
(或仅审查
),last_reviewed_only
,验证
和non
.
first_added
,last_added.
,last_updated
,a_z
,佐亚
.
空
保持空的,基地
若要用基本语言值替换,无效的
将其替换为null(仅限YAML导出),或者跳过
省略。
无效的
保持空,空
替换为空字符串。
amazons3
,地面军事系统
,github
,github企业
,gitlab
,bitbucket都
,比特桶企业
,azure
.
组织/存储库
格式)。保留空数组,仅按平台处理所有配置的集成。
json_string
,加护病房
,数组
,通用的
,symfony
,i18next
.有关对特定文件格式的复数支持的更多信息,请参阅复数和占位符。
printf
,ios
,加护病房
,网
,symfony
).有关更多信息,请参阅复数和占位符。
零
,一
和两个
将被替换= 0
,= 1
和= 2
分别。仅适用于ICU复数格式。
默认的
,1sp
,2 sp
,3 sp
,4 sp
,5 sp
,6SP.
,7 sp
,8 sp
和选项卡
.
UTF-8.
和latin - 1
.
=
和:
.
ios_sdk
或android_sdk
OTA SDK包。
{“格式”:“json”,“original_filenames”:符合事实的}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/文件/下载\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“格式”:“JSON”,“Oricall_FiLenames”:True}'
{“项目id”:“3002780358964 f9bab5a92.87762498”,“bundle_url”:“https: \ / \ / s3 -欧盟-西方- 1. - amazonaws.com \ / lokalise-assets \ /导出\ / MyApp-locale.zip”}
关键字是项目的核心元素。
在你的应用程序或网站中使用的每个短语都必须通过一个键来识别,并具有代表不同语言翻译的值。例如关键index.welcome
的值欢迎
英语和Benvenuto
在意大利。密钥可以分配给一个或多个平台。一旦一个键被分配给一个平台,它将被包含在与这个平台相关的文件格式的导出中。
Lokalise的一个独特功能是能够在不同平台上使用类似的键,从而减少翻译人员的翻译工作量。一旦你导入或添加键,它们需要被分配到一个或多个平台(例如iOS, Android)。了解更多.
is_plural
是符合事实的
.
无效的
如果不是。
列出项目中的所有键。重要的是:我们不为您的语言文件提供内容交付网络。不要向你的网站/应用程序的每个访问者提出这个端点的请求。相反,要不时地获取这个端点,将结果存储在本地,并为您的访问者提供静态文件/数据库内容。或者,您可以使用我们的Amazon S3/谷歌CouldStorage集成自动上传您的语言文件到您选择的桶。
1
和0
.
1
和0
.
1
和0
.
1
和0
.
ios
,安卓
,网页
和其他
.
1
和0
.
spelling_and_grammar
,占位符
,超文本标记语言
,url_count
,网址
,Email_Count.
,电子邮件
,括号
,数字
,leading_whitespace
,trailing_whitespace
,double_space
,Special_PlaceHolder.
和Unbalanced_Brackets.
.
包括
,排除
和只有
.
curl——request GET \
- url.'https://api.lokalise.com/api2/projects/{project_id:branch}/keys?include_translations={include_translations}&include_comments={include_comments}&include_screenshots={include_screenshots}&limit={limit}&page={page}\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“钥匙”: [{“key_id”:222222,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“欢迎光临”,“android”:“indexWelcome”,“网络”:“索引,欢迎”,“其他”:“welcome-index”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“索引页欢迎”,“平台”:【“苹果”,“android”,“网络”,“其他”],“标签”:【“主要”,“指数”],“评论”: [{“comment_id”:233112,“评论”:“有感叹号吗?”,“added_by”:420.,“added_by_email”:“user@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600} ],“截图”: [{“screenshot_id”:11233,“标题”:“欢迎页面”,“描述”:"",“screenshot_tags”:【“指数”],“url”:“https://s3 -欧盟-西方- 1. - amazonaws.com/files/screenshots/welcome.jpg”,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600} ],“翻译”: [{“translation_id”:444212,“key_id”:222222,“language_iso”:“en”,“翻译”:“欢迎来到MyApp !”,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:符合事实的,“reviewed_by”:1357,“文字”:3.,“custom_translation_statuses”:[],“任务id”:2185.},{“translation_id”:444147,“key_id”:222222,“language_iso”:“汝”,“翻译”:“Добропожаловать!”,“modified_by”:422.,“modified_by_email”:“translator@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:2,“custom_translation_statuses”:[],“任务id”:无效的}]}, ....]}
在项目中创建一个或多个密钥。需要管理密钥管理权。我们建议按每个请求最多500个密钥的块发送有效负载。
ios
,安卓
,网页
和其他
字符串属性。
ios
,安卓
,网页
和其他
.
is_plural
是符合事实的
.
{“钥匙”: [{“key_name”:“索引,欢迎”,“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”],“翻译”: [{“language_iso”:“en”,“翻译”:“欢迎”}]},{“key_name”:“index.apple”,“描述”:“欢迎苹果”,“平台”:【“网络”],“is_plural”:符合事实的,“翻译”: [{“language_iso”:“en”,“翻译”:{“一”:“我有一个苹果”,“其他”:“我有很多苹果”}}]}, {“key_name”:“index.hello”,“平台”:【“网络”[}]}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/键--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“钥匙”:[{“key_name”:“指数。欢迎”、“描述”:“指数应用欢迎”、“平台”:“网络”,“翻译”:[{“language_iso”:“en”,“翻译”:“欢迎”}]},{:“key_name指数。苹果苹果”、“描述”:“欢迎”、“平台”:“网络”,“is_plural”:的确,翻译:[{“language_iso”:“en”,“翻译”:{“一”:“我有一个苹果”,“其他”:“我有很多苹果“}}]},{“key_name”:“index.hello”、“平台”:(“网络”)}]}’
{“项目id”:“3002780358964 f9bab5a92.87762498”,“钥匙”: [{“key_id”:331223,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“索引,欢迎”,“android”:“索引,欢迎”,“网络”:“索引,欢迎”,“其他”:“索引,欢迎”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”],“标签”:[],“评论”:[],“截图”:[],“翻译”: [{“translation_id”:444921,“key_id”:331223,“language_iso”:“en”,“翻译”:“欢迎”,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:492},{“translation_id”:444929,“key_id”:331223,“language_iso”:“汝”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:无效的}]},{“key_id”:331224,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“index.apple”,“android”:“index.apple”,“网络”:“index.apple”,“其他”:“index.apple”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“欢迎苹果”,“平台”:【“网络”],“is_plural”:符合事实的,“标签”:[],“评论”:[],“截图”:[],“翻译”: [{“translation_id”:444941,“key_id”:331224,“language_iso”:“en”,“翻译”:“{\'one\':\'我有一个苹果\',\'其他\':'我有很多苹果\'”,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:9147},{“translation_id”:444949,“key_id”:331224,“language_iso”:“汝”,“翻译”:“{\” \":\"\",\" 几 \":\"\",\" 许多 \":\"\",\" 其他\ ":\ " \“}”,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:无效的} ] } ],“错误”: [{“消息”:"此密钥名已被占用",“代码”:400,“钥匙”:{“key_name”:“index.hello”}}]}
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“钥匙”:{“key_id”:222222,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“欢迎光临”,“android”:“indexWelcome”,“网络”:“索引,欢迎”,“其他”:“welcome-index”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“索引页欢迎”,“平台”:【“网络”,“其他”],“标签”:【“主要”,“指数”],“评论”: [{“comment_id”:233112,“评论”:“有感叹号吗?”,“added_by”:420.,“added_by_email”:“user@mycompany.com”,“添加在”:“2018-12-31 12:00:00(等\ / UTC)”,“added_at_timestamp”:1546257600} ],“截图”: [{“screenshot_id”:11233,“标题”:“欢迎页面”,“描述”:"",“screenshot_tags”:【“指数”],“url”:“https://s3 -欧盟-西方- 1. - amazonaws.com/files/screenshots/welcome.jpg”,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600} ],“翻译”: [{“translation_id”:444212,“key_id”:222222,“language_iso”:“en”,“翻译”:“欢迎来到MyApp !”,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:符合事实的,“reviewed_by”:1357,“文字”:3.,“custom_translation_statuses”:[],“任务id”:95},{“translation_id”:444147,“key_id”:222222,“language_iso”:“汝”,“翻译”:“Добропожаловать!”,“modified_by”:422.,“modified_by_email”:“translator@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:2,“custom_translation_statuses”:[],“任务id”:无效的}]}}
更新键及其关联对象的属性。需要管理密钥管理权利。
ios
,安卓
,网页
和其他
字符串属性。
ios
,安卓
,网页
和其他
.
{“平台”:【“网络”,“其他”],“描述”:“欢迎使用索引应用程序”}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“平台”:“网络”,“其他”,“描述”:“指数应用欢迎“}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“钥匙”:{“key_id”:331223,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“new.index.welcome”,“android”:“索引,欢迎”,“网络”:“索引,欢迎”,“其他”:“索引,欢迎”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”,“其他”],“标签”:[],“评论”:[],“截图”:[],“翻译”: [{“translation_id”:444921,“key_id”:331223,“language_iso”:“en”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:121},{“translation_id”:444929,“key_id”:331223,“language_iso”:“汝”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:无效的}]}}
更新项目中的一个或多个密钥。需要管理密钥管理权利。
ios
,安卓
,网页
和其他
字符串属性。
ios
,安卓
,网页
和其他
.
is_plural
是符合事实的
.
{“钥匙”: [{“key_id”:331223,“key_name”:“索引,欢迎”,“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”}, {“key_id”:331224,“key_name”:“index.hello”,“描述”:“指数的问候”,“平台”:【“网络”[}]}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/键--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“键”:[{“key_id”:331223,“key_name”:“index.welcome”,“描述”:“索引应用程序欢迎”,“平台”:[“Web”]},{“key_id”:331224,“key_name”:“index.hello”,“描述”:“索引问候”,“平台”:[“Web”]}]}'
{“项目id”:“3002780358964 f9bab5a92.87762498”,“钥匙”: [{“key_id”:331223,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“索引,欢迎”,“android”:“索引,欢迎”,“网络”:“索引,欢迎”,“其他”:“索引,欢迎”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”],“标签”:[],“评论”:[],“截图”:[],“翻译”: [{“translation_id”:444921,“key_id”:331223,“language_iso”:“en”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:512},{“translation_id”:444929,“key_id”:331223,“language_iso”:“汝”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:无效的}]},{“key_id”:331224,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“key_name”:{“苹果”:“索引,欢迎”,“android”:“索引,欢迎”,“网络”:“索引,欢迎”,“其他”:“索引,欢迎”},“文件名”:{“苹果”:"",“android”:"",“网络”:"",“其他”:""},“描述”:“欢迎使用索引应用程序”,“平台”:【“网络”],“标签”:[],“评论”:[],“截图”:[],“翻译”: [{“translation_id”:444921,“key_id”:331223,“language_iso”:“en”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:906.},{“translation_id”:444929,“key_id”:331223,“language_iso”:“汝”,“翻译”:"",“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“是否已审核”:假,“reviewed_by”:0,“文字”:0,“custom_translation_statuses”:[],“任务id”:无效的} ] } ],“错误”: [ ] }
从项目中删除多个键。需要管理密钥管理权利。
{“钥匙”:【12345,12346]}
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/键--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“钥匙”:(12345、12346)}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“keys_removed”:符合事实的,“keys_locked”:0}
从项目中删除一个键。需要管理密钥管理权利。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/键/ {key_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“已删除密钥”:假,“keys_locked”:1}
Lokalise中有超过500种预定义的语言/方言组合。如果您需要自定义语言/方言组合使用custom_x.
语言(X是1到100之间的一个数字)。您可以在添加语言时重写语言代码和名称,或者稍后更新现有的语言属性。
在某些情况下,需要将不同的语言代码导出到不同的平台(例如。zh-Hans
到iOS和zh_Hans
Web)。在这种情况下,您需要设置任何首选版本和ise导出参数,以根据文件格式设置语言映射。
检索系统语言列表。
curl——request GET \
——https url://api.lokalise.com/api2/system/languages\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“是什么?”:假,“plural_forms”:【“一”,“其他”]},...... {“语言id”:597,“lang_iso”:“汝”,“lang_name”:“俄罗斯”,“是什么?”:假,“plural_forms”:【“一”,“几”,“许多”,“其他”},}
检索项目语言列表。
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project_id:branch}/languages\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“是什么?”:假“plural_forms”:【“一”,“其他”]},...... {“语言id”:597,“lang_iso”:“汝”,“lang_name”:“俄罗斯”,“是什么?”:假“plural_forms”:【“一”,“几”,“许多”,“其他”[}]}
在项目中创建一种或多种语言。需要管理语言管理权利。
的language_iso
是一种系统语言的标识符。你只需要包括language_iso
属性,但您也可以覆盖默认的语言代码、语言名称和复数形式。
{“语言”: [{“lang_iso”:“en”},{“lang_iso”:“汝”}]}
curl——请求发布\
——https url://api.lokalise.com/api2/projects/{project_id:branch}/languages\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{"语言":[{“lang_iso”:“en”},{“lang_iso”:“俄罗斯”}]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“是什么?”:假,“plural_forms”:【“一”,“其他”}, {“语言id”:597,“lang_iso”:“汝”,“lang_name”:“俄罗斯”,“是什么?”:假,“plural_forms”:【“一”,“几”,“许多”,“其他”[}]}
检索语言对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/语言/ {lang_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“语言”:{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“是什么?”:假,“plural_forms”:【“一”,“其他”]}}
更新语言的属性。需要管理语言管理权利。
{“lang_iso”:“恩我们”,“plural_forms”:【“一”,“零”,“几”,“其他”]}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/语言/ {lang_id} \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{lang_iso”:“en - us”、“plural_forms”:[“一”、“零”、“几”、“其他”]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“语言”:{“语言id”:640,“lang_iso”:“恩我们”,“lang_name”:“英语”,“是什么?”:假,“plural_forms”:【“一”,“零”,“几”,“其他”]}}
从项目中删除一种语言。需要管理语言管理权利。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/语言/ {lang_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“已删除语言”:符合事实的}
credit_card
,team_credit
,没有一个
.无效的
将为属性引入之前所做的订单返回。
进行中
,完成
.处理
,草案
如果如果dry_run
=符合事实的
.
gengo
仅提供程序。
列出团队中所有的翻译订单。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ \ {team_id} /订单--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“订单”: [{“订单号”:“20181231AAA”,“项目id”:“20008339586 cded200e0d8.29879849”,“payment_method”:“credit_card”,“卡号”:12345,“地位”:“完成”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“jonn@company.com”,“source_language_iso”:“恩,我们”,“target_language_isos”:【“汝”,“fr”,“它”],“钥匙”:【12213,12214,12215,21216],“source_words”:{“汝”:256,“fr”:222,“它”:256},“provider_slug”:“gengo”,“translation_style”:“友好”,“translation_tier”:1,“translation_tier_name”:“母语人士”,“简报”:“请翻译我们的应用程序字符串”,“总计”:177.90}]}
创建翻译顺序。您必须在要下订单的项目中拥有管理权限。
credit_card
(默认)或team_credit
.
付款方法
=credit_card
.
假
(生活方式)。
gengo
提供者。可用值是正式的
,非正式的
,业务
,友好的
.默认为友好的
.
{“项目id”:“20008339586 cded200e0d8.29879849”,“卡号”:12345,“简报”:“我们应用程序的使用条款。”,“source_language_iso”:“恩,我们”,“target_language_isos”:【“汝”,“fr”,“它”],“钥匙”:【12213,12214,12215,21216],“provider_slug”:“gengo”,“translation_tier”:1}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/teams/ \ {team_id} /订单--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{"project_id":"20008339586cded200e0d8.29879849","card_id":12345,"briefing":"Terms of use of our app.","source_language_iso":"en_US","target_language_iso ":["ru","fr","it"],"keys":[12213,12214,12215,21216],"provider_slug":"gengo","translation_tier":1}'
{“订单号”:“20181231AAA”,“项目id”:“20008339586 cded200e0d8.29879849”,“payment_method”:“credit_card”,“卡号”:12345,“地位”:“进行中”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“jonn@company.com”,“source_language_iso”:“恩,我们”,“target_language_isos”:【“汝”,“fr”,“它”],“钥匙”:【12213,12214,12215,21216],“source_words”:{“汝”:256,“fr”:222,“它”:256},“provider_slug”:“gengo”,“translation_style”:“友好”,“translation_tier”:1,“translation_tier_name”:“母语人士”,“简报”:“我们应用程序的使用条款。”,“总计”:177.90,“dry_run”:假}
检索一个订单对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / {order_id} \ /订单--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“订单号”:“20181231AAA”,“项目id”:“20008339586 cded200e0d8.29879849”,“payment_method”:“credit_card”,“卡号”:12345,“地位”:“进行中”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“jonn@company.com”,“source_language_iso”:“恩,我们”,“target_language_isos”:【“汝”,“fr”,“它”],“钥匙”:【12213,12214,12215,21216],“source_words”:{“汝”:256,“fr”:222,“它”:256},“provider_slug”:“gengo”,“translation_style”:“友好”,“translation_tier”:1,“translation_tier_name”:“母语人士”,“简报”:“我们应用程序的使用条款。”,“总计”:177.90}
信用卡是用来支付翻译顺序.每个用户都有自己的卡片,不能与其他用户共享。我们不存储信用卡信息。一旦添加了卡,我们将详细信息发送给Stripe,并接收卡令牌,该令牌只能用于在Lokalise进行订单购买。
添加新的支付卡到用户卡。
{“数量”:“4242424242424242”,“cvc”:“123”,“exp_month”:5,“exp_year”:2021}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/payment_cards \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据“{”数字“:“4242”,“cvc:“123”,“经验月”:5,“经验年”:2021}”
{“卡号”:1234,“last4”:4242,“品牌”:“签证”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}
列出所有用户支付卡。
curl——request GET \
——https url:/ / api.lokalise.com/api2/payment_cards \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“user_id”:420.,“payment_cards”: [{“卡号”:22192,“last4”:“5678”,“品牌”:“万事达”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600},{“卡号”:22193,“last4”:“1234”,“品牌”:“签证”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600},]}
检索支付卡对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/payment_cards/ {card_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“user_id”:420.,“支付卡”:{“卡号”:22193,“last4”:“1234”,“品牌”:“签证”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}}
从用户卡中删除支付卡。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/payment_cards/ {card_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“卡号”:22193,“已删除卡片”:符合事实的}
检索由令牌授权的用户可用的项目列表。
1
和0
.
1
和0
.
curl——request GET \
- url.“https://api.lokalise.com/api2/projects?filter_team_id= {filter_team_id}”\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目”: [{“项目id”:“20008339586 cded200e0d8.29879849”,“project_type”:“localization_files”,“名称”:“SuperApp (iOS + Android)”,“描述”:"",“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:87,“keys_total”:13,“团队”:2,“base_words”:22,“qa_issues_total”:65,“质量保证问题”:{“not_reviewed”:39,“未经证实的”:7,“spelling_crammar”:4,“不一致的持有者”:5,“inconsistent_html”:1,“different_number_of_urls”:0,“different_urls”:1,“leading_whitespace”:1,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:6,“different_numbers”:1,“double_space”:0,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:800,“language_iso”:“lv_lv”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:673,“language_iso”:“fr”,“进步”:63,“words_to_do”:8}]}}, {“项目id”:“100137835922 d7d69a98e6.35789135”,“project_type”:“localization_files”,“名称”:“营销电子邮件”,“描述”:"",“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:87,“keys_total”:13,“团队”:2,“base_words”:22,“qa_issues_total”:65,“质量保证问题”:{“not_reviewed”:39,“未经证实的”:7,“spelling_crammar”:4,“不一致的持有者”:5,“inconsistent_html”:1,“different_number_of_urls”:0,“different_urls”:1,“leading_whitespace”:1,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:6,“different_numbers”:1,“double_space”:1,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:800,“language_iso”:“lv_lv”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:673,“language_iso”:“fr”,“进步”:63,“words_to_do”:8}]},}
在指定的团队中创建一个新项目。需要管理在团队中的角色。
语言
列表。使用custom_iso
代码,以便它定义。
localization_files
,paged_documents
{“名称”:“TheApp项目”,“描述”:iOS + Android字符串的TheApp。https://theapp.com”,“语言”: [{“lang_iso”:“en”,“custom_iso”:“en - us”},{“lang_iso”:“en_gb”,“custom_iso”:“en-gb”} ],“base_lang_iso”:“en - us”}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{"name":"TheApp Project","description":"iOS + Android字符串的TheApp。https://theapp.com”、“语言”:[{“lang_iso”:“en”,“custom_iso”:“en - us”},{“lang_iso”:“en_GB”、“custom_iso”:“en”}],“base_lang_iso”:“en - us”}’
{“项目id”:“3002780358964 f9bab5a92.87762498”,“project_type”:“localization_files”,“名称”:“TheApp项目”,“描述”:iOS + Android字符串的TheApp。https://theapp.com”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en - us”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:0,“keys_total”:0,“团队”:1,“base_words”:0,“qa_issues_total”:0,“质量保证问题”:{“not_reviewed”:0,“未经证实的”:0,“spelling_crammar”:0,“不一致的持有者”:0,“inconsistent_html”:0,“different_number_of_urls”:0,“different_urls”:0,“leading_whitespace”:0,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:0,“different_numbers”:0,“double_space”:1,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en - us”,“进步”:0,“words_to_do”:0},{“language_id”:610,“language_iso”:“en-gb”,“进步”:0,“words_to_do”:0}]}}
检索项目对象。
curl——request GET \
——https url://api.lokalise.com/api2/projects/ {project_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“project_type”:“localization_files”,“名称”:“TheApp项目”,“描述”:iOS + Android字符串的TheApp。https://theapp.com”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:87,“keys_total”:13,“团队”:2,“base_words”:22,“qa_issues_total”:65,“质量保证问题”:{“not_reviewed”:39,“未经证实的”:7,“spelling_crammar”:4,“不一致的持有者”:5,“inconsistent_html”:1,“different_number_of_urls”:0,“different_urls”:1,“leading_whitespace”:1,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:6,“different_numbers”:1,“double_space”:1,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:800,“language_iso”:“lv_lv”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:673,“language_iso”:“fr”,“进步”:63,“words_to_do”:8}]}}
更新项目的详细信息。需要管理设置管理权利。
{“名称”:“TheZapp项目”,“描述”:iOS + Android串的TheZapp。https://thezapp.com”}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/ {project_id} \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据“{”name:“TheZapp项目”,“description:“TheZapp的iOS+Android字符串”。https://thezapp.com"}'
{“项目id”:“3002780358964 f9bab5a92.87762498”,“project_type”:“localization_files”,“名称”:“TheApp项目”,“描述”:iOS + Android字符串的TheApp。https://theapp.com”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:87,“keys_total”:13,“团队”:2,“base_words”:22,“qa_issues_total”:65,“质量保证问题”:{“not_reviewed”:39,“未经证实的”:7,“spelling_crammar”:4,“不一致的持有者”:5,“inconsistent_html”:1,“different_number_of_urls”:0,“different_urls”:1,“leading_whitespace”:1,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:6,“different_numbers”:1,“double_space”:1,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:800,“language_iso”:“lv_lv”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:673,“language_iso”:“fr”,“进步”:63,“words_to_do”:8}]}}
从项目中删除所有键和翻译。要求管理设置管理权利。
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/空\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“keys_deleted”:符合事实的}
删除一个项目。
curl——request DELETE \
——https url://api.lokalise.com/api2/projects/ {project_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“project_deleted”:符合事实的}
繁重的操作(例如文件导入)将排队等待处理。有关这些排队进程的信息可以通过API检索。
点击文件
,sketch-import
或批量应用-TM
.
排队
,pre_processing
,跑步
,post_processing
,取消了
,完成了
或失败的
.
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/流程--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“767946315 e9866d013c1d0.08299127”,“进程”: [{“process_id”:“2 e0559e60e856555fbc15bdf78ab2b0ca3406e8f”,“类型”:“文件导入”,“地位”:“完成”,“消息”:"",“created_by”:1234,“created_by_email”:“example@example.com”,“created_at”:“2020-04-20 13:43:43(Etc/UTC)”,“created_at_timestamp”:1587390223},{“process_id”:“f70bbf40059386a568d42c0f80297477e252cc48”,“类型”:“文件导入”,“地位”:“完成”,“消息”:"",“created_by”:1234,“created_by_email”:“example@example.com”,“created_at”:“2020-04-20 13:48:00(etc / utc)”,“created_at_timestamp”:1587390480}]}
检索排队过程对象的附加细节
包含特定流程类型信息的字段。
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/processs/{process\u id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“767946315 e9866d013c1d0.08299127”,“过程”:{“process_id”:“2 e0559e60e856555fbc15bdf78ab2b0ca3406e8f”,“类型”:“文件导入”,“地位”:“完成”,“消息”:"",“created_by”:1234,“created_by_email”:“example@example.com”,“created_at”:“2020-04-20 13:43:43(Etc/UTC)”,“created_at_timestamp”:1587390223,“细节”:{“文件”: [{“地位”:“完成”,“消息”:"",“name_original”:“index.json”,“name_custom”:“index.json”,“word_count_total”:2,“密钥\u计数\u总数”:1,“key_count_inserted”:0,“key_count_updated”:0,“key_count_skipped”:1}]}}
从项目中检索截图列表。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /截图\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“截图”: [{“screenshot_id”:403021,“数据”:"",“标题”:“欢迎屏幕”,“描述”:"",“key_ids”:【1132290,1132292,1132293],“钥匙”: [{密钥id:1132290,协调:无效的},{密钥id:1132292,协调:无效的},{密钥id:1132293,协调:{左:10,前:10,宽度:One hundred.,身高:One hundred.,}}],“screenshot_tags”:【“onboarding”,“主要”],“宽度”:1024,“高度”:768,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600},{“screenshot_id”:403022,“标题”:“登录屏幕”,“描述”:"",“key_ids”:【1132290,1132292,1132293],“钥匙”: [{密钥id:1132290,协调:无效的},{密钥id:1132292,协调:无效的},{密钥id:1132293,协调:{左:10,前:10,宽度:One hundred.,身高:One hundred.,}}],“screenshot_tags”:【“onboarding”,“主要”],“宽度”:1024,“高度”:768,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}]}
在项目中创建一个或多个屏幕截图。需要管理截图管理权利。
数据:图像/jpeg;base64,
).支持的文件格式为JPG、PNG。
{“截图”: [{“数据”:“数据:图像/ jpeg; base64,d94bwwgdmvyc2lvbj0ims4wiiblbmnvzgluzz0ivvrgl ......”,“ocr”:假,“key_ids”:【1132290,1132292,1132293],“标签”:【“onboarding”[}]}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /截图\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“屏幕截图”:[{“数据”:“数据:图像/ jpeg; base64,d94bwwgdmvyc2lvbj0ims4wiiblbmnvzgluzz0ivvrgl .....”,“ocr”:false,“key_ids”:[1132290,1132292,1132293],“标签”:[“onboarding”]}]}'
{“项目id”:“20008339586 cded200e0d8.29879849”,“截图”: [{“screenshot_id”:403021,“url”:“https://s3 -欧盟-西方- 1. - amazonaws.com/files/screenshots/welcome.jpg”,“key_ids”:【1132290,1132292,1132293],“钥匙”: [{密钥id:1132290,协调:无效的},{密钥id:1132292,协调:无效的},{密钥id:1132293,协调:{左:10,前:10,宽度:One hundred.,身高:One hundred.,}}],“标题”:“欢迎屏幕”,“描述”:"",“screenshot_tags”:【“onboarding”],“宽度”:1024,“高度”:768,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}]}
检索截图对象。
curl——request GET \
——https url://api.lokalise.com/api2/projects/ {project_id} /screenshots/ {screenshot_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“截图”:{“screenshot_id”:403021,“url”:“https://s3 -欧盟-西方- 1. - amazonaws.com/files/screenshots/welcome.jpg”,“key_ids”:【1132290,1132292,1132293],“钥匙”: [{密钥id:1132290,协调:无效的},{密钥id:1132292,协调:无效的},{密钥id:1132293,协调:{左:10,前:10,宽度:One hundred.,身高:One hundred.,}}],“标题”:“欢迎屏幕”,“描述”:"",“screenshot_tags”:【“onboarding”],“宽度”:1024,“高度”:768,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}}
更新截图的属性。需要管理截图管理权利。
{“key_ids”:【1132290,1132292],“标签”:【“主要”]}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/{project_id:branch}/screenshots/{screenshot_id}\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据“{”key_id:[1132290113292],“tags:[“main”]}”
{“项目id”:“20008339586 cded200e0d8.29879849”,“截图”:{“screenshot_id”:403021,“url”:“https://s3 -欧盟-西方- 1. - amazonaws.com/files/screenshots/welcome.jpg”,“key_ids”:【1132290,1132292],“钥匙”: [{密钥id:1132290,协调:无效的},{密钥id:1132292,协调:无效的},{密钥id:1132293,协调:{左:10,前:10,宽度:One hundred.,身高:One hundred.,}}],“标题”:“欢迎屏幕”,“描述”:"",“screenshot_tags”:【“主要”],“宽度”:1024,“高度”:768,“created_at”:“2019-02-01 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600}}
从项目中删除截图。需要管理截图管理权利。
curl——request DELETE \
——https url://api.lokalise.com/api2/projects/ {project_id} /screenshots/ {screenshot_id}
{“项目id”:“3002780358964 f9bab5a92.87762498”,“screenshot_deleted”:符合事实的}
检索项目快照列表。需要管理设置管理权利。
curl——request GET \
——https url://api.lokalise.com/api2/projects/ {project_id} /snapshots \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“快照”: [{“snapshot_id”:1523966589,“标题”:“API快照”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”},{“snapshot_id”:1523966599,“标题”:“API快照”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”}]}
创建项目的快照。需要管理设置管理权利。
{“标题”:“API快照”}
curl——请求发布\
——https url://api.lokalise.com/api2/projects/ {project_id} /snapshots \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“标题”:“API快照”}”
{“项目id”:“20008339586 cded200e0d8.29879849”,“快照”:{“snapshot_id”:1523966599,“标题”:“API快照”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”}}
将业务快照恢复到业务副本。需要管理设置管理权利和管理在团队中的角色。
curl——请求发布\
——https url://api.lokalise.com/api2/projects/ {project_id} /snapshots/ {snapshot_id} \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“project_type”:“localization_files”,“名称”:“TheApp项目复制”,“描述”:iOS + Android字符串的TheApp。https://theapp.com”,“created_at”:“2018-12-13 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“user@mycompany.com”,“team_id”:12345,“base_language_id”:640,“base_language_iso”:“en”,“设置”:{“每个平台密钥名称”:假,“审查”:假,“upvoting”:假,“auto_toggle_unverified”:符合事实的,“offline_translation”:假,“按键编辑”:符合事实的,“inline_machine_translations”:符合事实的,“custom_translation_statuses”:符合事实的,“custom_translation_statuses_allow_multiple”:假},“统计”:{“progress_total”:87,“keys_total”:13,“团队”:2,“base_words”:22,“qa_issues_total”:65,“质量保证问题”:{“not_reviewed”:39,“未经证实的”:7,“spelling_crammar”:4,“不一致的持有者”:5,“inconsistent_html”:1,“different_number_of_urls”:0,“different_urls”:1,“leading_whitespace”:1,“trailing_whitespace”:0,“different_number_of_email_address”:0,“different_email_address”:0,“不同的_brackets”:6,“different_numbers”:1,“double_space”:1,“special_placeholder”:0,“unbalanced_brackets”:0},“语言”: [{“language_id”:640,“language_iso”:“en”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:800,“language_iso”:“lv_lv”,“进步”:One hundred.,“words_to_do”:0},{“language_id”:673,“language_iso”:“fr”,“进步”:63,“words_to_do”:8}]}}
删除项目快照。需要管理设置管理权利。
curl——request DELETE \
——https url://api.lokalise.com/api2/projects/{project\u id}/snapshots/{snapshot\u id}
{“项目id”:“3002780358964 f9bab5a92.87762498”,“snapshot_deleted”:符合事实的}
完成
,进行中
,创建
,排队
.
翻译
或回顾
.
完成
,进行中
,创建
.
翻译
任务项应在编辑时自动标记为已完成。
列出项目中的所有任务。
创建
,排队
,in_progress
*和完成
.进行中
地位不_
.
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/任务--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“任务”: [{“任务id”:55392,“标题”:“语音留言”,“can_be_parent”:假,“task_type”:“翻译”,“parent_task_id”:12345,“closing_tags”:【“标记一”,“tag_two”],“do_lock_translations”:假,“描述”:"需要你帮忙翻译一些语音信息。谢谢!”,“地位”:“进行中”,“进步”:25,“due_date”:“2018-12-31 12:00:00(等\ / UTC)”,“den_date_timestamp”:1546257600,“keys_count”:3.,“words_count”:91,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“manager@yourcompany.com”,“语言”: [{“language_iso”:" fi ",“用户”: [{“user_id”:421.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”} ],“群体”: [{“ID”:191,“名称”:“语音邮件翻译”} ],“钥匙”:【11212,11241,11245],“地位”:“创建”,“进步”:0,“initial_tm_leverage”:{“0% +”:91,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的},{“language_iso”:“汝”,“用户”: [{“user_id”:422.,“电子邮件”:“jfox@mycompany.com”,“全名”:“詹姆斯·福克斯”} ],“群体”:[],“钥匙”:【11212,11241,11245],“地位”:“进行中”,“进步”:80,“initial_tm_leverage”:{“0% +”:91,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的} ],“source_language_iso”:“en”,“auto_close_languages”:符合事实的,“auto_close_task”:符合事实的,“auto_close_items”:符合事实的,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的,“自定义\u翻译\u状态\u ID”:【77,85,86[}]}
在项目中创建任务。需要管理任务管理权利。请记住initial_tm_leverage.
属性将在服务器响应中为空。它是在任务创建后计算的,这个过程可能需要一些时间。
Y-m-d H:i:s
格式。例如:“2018-12-24 23:59:59”
parent_task_id
未指定
翻译
任务项应在编辑时自动标记为已完成。
翻译
(默认)或回顾
.
task_type
是回顾
,它可以有一个父任务。当父任务关闭时,当前任务将被打开。
{“标题”:“语音留言”,“描述”:"需要你帮忙翻译一些语音信息。谢谢!”,“due_date”:“2018-12-31 12:00:00”,“钥匙”:【11212,11241,11245],“语言”: [{“language_iso”:" fi ",“用户”:【421.}, {“language_iso”:“汝”,“群体”:【191}),“source_language_iso”:“en”,“auto_close_languages”:符合事实的,“auto_close_task”:符合事实的,“auto_close_items”:符合事实的,“task_type”:“翻译”,“parent_task_id”:12345,“closing_tags”:【“标记一”,“tag_two”],“do_lock_translations”:符合事实的,“自定义\u翻译\u状态\u ID”:【77,85,86]}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ \ {project_id:分支}/任务--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{"title":"Voicemail messages","description":"需要您帮助翻译一些语音邮件信息。"谢谢!”、“due_date”:“2018-12-3112:00:00”、“钥匙”:(11212、11241、11245),“语言”:[{“language_iso”:" fi ", "用户":[421]},{“language_iso”:“俄罗斯”,“组织”:[191]}],“source_language_iso”:“en”、“auto_close_languages”:真的,”auto_close_task”:真的,”auto_close_items”:真的,”task_type”:“翻译”、“parent_task_id”:12345年,“closing_tags”:“tag_one”、“tag_two”,“do_lock_translations custom_tr“:真的,”anslation_status_ids”(77、85、86):}’
{“项目id”:“20008339586 cded200e0d8.29879849”,“任务”:{“任务id”:55392,“标题”:“语音留言”,“描述”:"需要你帮忙翻译一些语音信息。谢谢!”,“地位”:“进行中”,“进步”:0,“can_be_parent”:符合事实的,“task_type”:“审查”,“parent_task_id”:12345,“closing_tags”:【“标记一”,“tag_two”],“do_lock_translations”:符合事实的,“due_date”:“2018-12-31 12:00:00(等\ / UTC)”,“den_date_timestamp”:1546257600,“keys_count”:3.,“words_count”:91,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“manager@yourcompany.com”,“语言”: [{“language_iso”:" fi ",“用户”: [{“user_id”:421.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”} ],“群体”:[],“钥匙”:【11212,11241,11245],“地位”:“创建”,“进步”:0,“initial_tm_leverage”:{“0% +”:0,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的},{“language_iso”:“汝”,“用户”:[],“群体”: [{“ID”:191,“名称”:“语音邮件翻译”} ],“钥匙”:【11212,11241,11245],“地位”:“进行中”,“进步”:0,“initial_tm_leverage”:{“0% +”:0,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的} ],“source_language_iso”:“en”,“auto_close_languages”:符合事实的,“auto_close_task”:符合事实的,“auto_close_items”:符合事实的,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的,“自定义\u翻译\u状态\u ID”:【77,85,86]}}
检索任务对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {task_id} \ /任务--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“任务”:{“任务id”:55392,“标题”:“语音留言”,“描述”:"需要你帮忙翻译一些语音信息。谢谢!”,“地位”:“进行中”,“进步”:80,“can_be_parent”:符合事实的,“task_type”:“审查”,“parent_task_id”:12345,“closing_tags”:【“标记一”,“tag_two”],“do_lock_translations”:假,“due_date”:“2018-12-31 12:00:00(等\ / UTC)”,“den_date_timestamp”:1546257600,“keys_count”:3.,“words_count”:91,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“manager@yourcompany.com”,“语言”: [{“language_iso”:" fi ",“用户”: [{“user_id”:421.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”} ],“群体”: [{“ID”:191,“名称”:“语音邮件翻译”} ],“钥匙”:【11212,11241,11245],“地位”:“创建”,“进步”:0,“initial_tm_leverage”:{“0% +”:91,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的},{“language_iso”:“汝”,“用户”: [{“user_id”:422.,“电子邮件”:“jfox@mycompany.com”,“全名”:“詹姆斯·福克斯”} ],“群体”: [{“ID”:191,“名称”:“语音邮件翻译”} ],“钥匙”:【11212,11241,11245],“地位”:“进行中”,“进步”:90,“initial_tm_leverage”:{“0% +”:60,“60% +”:0,“75% +”:31,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的} ],“source_language_iso”:“en”,“auto_close_languages”:符合事实的,“auto_close_task”:符合事实的,“auto_close_items”:符合事实的,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的,“自定义\u翻译\u状态\u ID”:【77,85,86]}}
更新任务属性。需要管理任务管理权利。
Y-m-d H:i:s
格式。例如:“2018-12-24 23:59:59”
翻译
任务项应在编辑时自动标记为已完成。
{“due_date”:“2019-12-31 12:00:00”,“auto_close_languages”:假,“auto_close_task”:假}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {task_id} \ /任务--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{due_date”:“2019-12-31 12:00:00”、“auto_close_languages”:假的,“auto_close_task”:假}”
{“项目id”:“20008339586 cded200e0d8.29879849”,“任务”:{“任务id”:55392,“标题”:“语音留言”,“描述”:"需要你帮忙翻译一些语音信息。谢谢!”,“地位”:“进行中”,“进步”:40,“can_be_parent”:符合事实的,“task_type”:“翻译”,“parent_task_id”:12345,“closing_tags”:【“标记一”,“tag_two”],“do_lock_translations”:假,“due_date”:“2019-12-31 12:00:00(等\ / UTC)”,“den_date_timestamp”:1546257600,“keys_count”:3.,“words_count”:91,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“created_by”:420.,“created_by_email”:“manager@yourcompany.com”,“语言”: [{“language_iso”:" fi ",“用户”: [{“user_id”:421.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”} ],“群体”: [{“ID”:191,“名称”:“语音邮件翻译”} ],“钥匙”:【11212,11241,11245],“地位”:“创建”,“进步”:0,“initial_tm_leverage”:{“0% +”:0,“60% +”:31,“75% +”:60,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的},{“language_iso”:“汝”,“用户”: [{“user_id”:422.,“电子邮件”:“jfox@mycompany.com”,“全名”:“詹姆斯·福克斯”} ],“群体”:[],“钥匙”:【11212,11241,11245],“地位”:“进行中”,“进步”:90,“initial_tm_leverage”:{“0% +”:91,“60% +”:0,“75% +”:0,"95%+":0,“100%”:0},“keys_count”:3.,“words_count”:91,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的} ],“source_language_iso”:“en”,“auto_close_languages”:假,“auto_close_task”:假,“completed_at”:无效的,“completed_at_timestamp”:无效的,“completed_by”:无效的,“completed_by_email”:无效的}}
从项目中删除任务。需要管理任务管理权利。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ {task_id} \ /任务--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“task_deleted”:符合事实的}
列出用户可用的所有团队。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“团队”: [{“team_id”:18821,“名称”:“MyCompany公司。”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“计划”:“必不可少”,“quota_usage”:{“用户”:14,“钥匙”:8125,“项目”:4,“猫”:119337},“quota_allowed”:{“用户”:40,“钥匙”:10000,“项目”:99999999,“猫”:200000年}}]}
老板
,管理
,成员
.
列出所有团队用户。需要管理在团队中的角色。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ \ {team_id} /用户--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“team_id”:18821,“team_users”: [{“user_id”:420.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“角色”:“所有者”},{“user_id”:421.,“电子邮件”:“axel@mycompany.com”,“全名”:“Axel福利”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“角色”:“成员”}]}
检索团队用户对象。需要管理在团队中的角色。
curl——request GET \
——https url://api.lokalise.com/api2/teams/{team_id}/users/{user_id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“team_id”:18821,“team_user”:{“user_id”:420.,“电子邮件”:“jdoe@mycompany.com”,“全名”:“John Doe”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“角色”:“所有者”}}
更新团队用户的角色。需要管理在团队中的角色。
老板
,管理
,成员
.
{“角色”:“admin”}
curl——request PUT \
——https url://api.lokalise.com/api2/teams/{team_id}/users/{user_id}\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{“角色”:“admin”}’
{“team_id”:18821,“team_user”:{“user_id”:421.,“电子邮件”:“axel@mycompany.com”,“全名”:“Axel福利”,“created_at”:“2018-12-31 12:00:00(等\ / UTC)”,“created_at_timestamp”:1546257600,“角色”:“admin”}}
从团队中删除用户。需要管理在团队中的角色。
curl——request DELETE \
——https url://api.lokalise.com/api2/teams/{team_id}/users/{user_id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“team_id”:18821,“team_user_deleted”:符合事实的}
列出团队中的所有用户组。
curl——request GET \
- url.'https://api.lokalise.com/api2/teams/ {team_id }/groups?limit= {limit} &page=(page}'\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“team_id”:444.,“user_groups”: [{“group_id”:50031,“名称”:“验证”,“权限”:【“is_admin”:假,“is_reviewer”:符合事实的,“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“is_writable”:1},{“语言id”:597,“lang_iso”:“汝”,“lang_name”:“俄罗斯”,“is_writable”:1} ],“admin_rights”: []],“created_at”:“2019-01-08 09:10:46(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:【“598901215 bexxx43dcba74.xxx”],“成员”:【22212[}]}
在团队中创建一个小组。需要管理就在队伍里。
如果is_admin
标志设置为符合事实的
,该组将自动访问所有项目语言,覆盖所提供的语言语言
对象。
要求
如果组具有admin权限。可能的值是上传
,活动
,下载
,设置
,create_branches.
,统计数据
,键
,截图
,术语表
,贡献者
,语言
,任务
.
要求
如果组没有管理员权限。
{“名称”:“验证”,“is_reviewer”:符合事实的,“is_admin”:假,“admin_rights”:[],“语言”:{“参考”:[],“contributable”:【640]}}
curl——请求发布\
——https url://api.lokalise.com/api2/teams/{team_id}/groups\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“名称”:“校对”、“is_reviewer”:真的,“is_admin”:假的,“admin_rights”:[],“语言”:{“参考”:[],“contributable”:[640]}}”
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“验证”,“权限”:{“is_admin”:假,“is_reviewer”:假,“admin_rights”:[],“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“is_writable”:符合事实的}},“created_at”:“2019-01-08 09:10:46(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”: []}}
检索用户组对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / {group_id} \ /组--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“group_id”:50031,“名称”:“验证”,“权限”:{“is_admin”:假,“is_reviewer”:符合事实的,“admin_rights”:[],“语言”: [{“语言id”:640,“lang_iso”:“en”,“lang_name”:“英语”,“is_writable”:符合事实的}},“created_at”:“2019-01-08 09:15:28(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”: []}
更新组的属性。需要管理就在队伍里。
要求
如果组具有admin权限。可能的值是上传
,活动
,下载
,设置
,create_branches.
,统计数据
,键
,截图
,术语表
,贡献者
,语言
,任务
.
要求
如果组没有管理员权限。
{“名称”:“校对管理员”,“is_reviewer”:符合事实的,“is_admin”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”:{“参考”:[],“contributable”: []}}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / {group_id} \ /组--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“名称”:“校对管理员”、“is_reviewer”:真的,“is_admin”:真的,“admin_rights”:[“上传”、“下载”、“任务”、“贡献者”、“截屏”、“术语表”,“钥匙”,“语言”、“设置”、“活动”,“统计”),“语言”:{“参考”:[],“contributable”:[]}}”
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“校对管理员”,“权限”:{“is_admin”:符合事实的,“is_reviewer”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”: [] },“created_at”:“2019-01-08 09:15:28(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”: []}}
需要管理就在队伍里。
{“项目”:【“598901215 bexxx43dcba74.xxx”]}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} /团体/ {group_id} /项目/添加\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“项目”:[“598901215BEXXX43DCBA74.xxx”]}'
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“校对管理员”,“权限”:{“is_admin”:符合事实的,“is_reviewer”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”: [] },“created_at”:“2019-01-07 14:21:44(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:【“598901215 bexxx43dcba74.xxx”],“成员”: []}}
需要管理就在队伍里。
{“项目”:【“598901215 bexxx43dcba74.xxx”]}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} /团体/ {group_id} /项目/删除\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{“项目”:[“598901215BEXXX43DCBA74.xxx”]}'
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“校对管理员”,“权限”:{“is_admin”:符合事实的,“is_reviewer”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”: [] },“created_at”:“2019-01-07 14:21:44(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”: []}}
需要管理就在队伍里。
{“用户”:【22212]}
curl——request PUT \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} /团体/ {group_id} / /添加\成员--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{“用户”:[22212]}’
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“校对管理员”,“权限”:{“is_admin”:符合事实的,“is_reviewer”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”: [] },“created_at”:“2019-01-07 14:21:44(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”:【22212]}}
需要管理就在队伍里。
{“用户”:【22212]}
curl——request PUT \
——https url://api.lokalise.com/api2/teams/ {team_id} / groups/--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据”{“用户”:[22212]}’
{“team_id”:444.,“集团”:{“group_id”:50031,“名称”:“校对管理员”,“权限”:{“is_admin”:符合事实的,“is_reviewer”:符合事实的,“admin_rights”:【“上传”,“下载”,“任务”,“贡献者”,“截图”,“词汇表”,“钥匙”,“语言”,“设置”,“活动”,“统计”],“语言”: [] },“created_at”:“2019-01-07 14:21:44(等/ UTC)”,“created_at_timestamp”:1546257600,“team_id”:444.,“项目”:[],“成员”: []}}
从小组中删除一个组。需要管理就在队伍里。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / {group_id} \ /组--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“team_id”:444.,“group_deleted”:符合事实的}
is_plural
是符合事实的
.
无效的
如果不是。
检索未分组的项目翻译项列表。
您可能想要请求键资源以获取所有语言的结构化键/翻译对。
1
和0
.
1
和0
.
1
和0
.
1
和0
.
spelling_and_grammar
,占位符
,超文本标记语言
,url_count
,网址
,Email_Count.
,电子邮件
,括号
,数字
,leading_whitespace
,trailing_whitespace
,double_space
,Special_PlaceHolder.
和Unbalanced_Brackets.
.
curl——request GET \
——https url://api.lokalise.com/api2/projects/ {project_id:branch }/translations \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“翻译”: [{“translation_id”:344412,“key_id”:553662,“language_iso”:“恩,我们”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“翻译”:“你好,世界!”,“is_unverified”:符合事实的,“是否已审核”:假,“reviewed_by”:0,“文字”:2,“custom_translation_statuses”: [{“ID”:124,“标题”:“默认状态”,“颜色”:“#ffffff”} ],“任务id”:1182}, ... {“translation_id”:344417,“key_id”:553662,“language_iso”:“汝”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“翻译”:“Привет,мир!”,“is_unverified”:假,“是否已审核”:假,“reviewed_by”:0,“文字”:2,“custom_translation_statuses”:[],“任务id”:无效的}]}
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“翻译”:{“translation_id”:344412,“key_id”:553662,“language_iso”:“恩,我们”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“翻译”:“你好,世界!”,“is_unverified”:符合事实的,“是否已审核”:假,“reviewed_by”:0,“文字”:2,“custom_translation_statuses”:[],“任务id”:无效的}}
更新一个翻译。另外,使用批量密钥更新端点来更新翻译。
{“翻译”:“敏捷的棕色狐狸跳过了懒狗。”,“is_unverified”:假,“是否已审核”:符合事实的}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id}\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据'{"translation":"Quick brown fox jumps over the lazy dog.","is_unverified":false," is_reviewing ":true}' "
{“项目id”:“3002780358964 f9bab5a92.87762498”,“翻译”:{“translation_id”:344412,“key_id”:553662,“language_iso”:“恩,我们”,“modified_at”:“2018-12-31 12:00:00(等\ / UTC)”,“modified_at_timestamp”:1546257600,“modified_by”:420.,“modified_by_email”:“user@mycompany.com”,“翻译”:“敏捷的棕色狐狸跳过了懒狗。”,“is_unverified”:假,“是否已审核”:符合事实的,“reviewed_by”:1357,“文字”:8,“custom_translation_statuses”:[],“任务id”:无效的}}
翻译提供者用于订单.
列出所有翻译提供商。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / translation_providers \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“translation_providers”: [{“provider_id”:1,“名称”:“Gengo”,“鼻涕虫”:“gengo”,“price_pair_min”:“0.00”,“website_url”:“https://gengo.com”,“描述”:“在Gengo,我们的使命是为每个人提供语言服务,连接全球社区。我们的1.8万多名翻译经过测试,符合严格的项目标准。翻译人员分布在世界各地和每个时区,这使我们能够支持超过35种语言,并朝着Gengo的使命努力。”,},…]}
检索翻译服务提供商具有层和可用语言对的对象。
curl——request GET \
——https url:/ / api.lokalise.com/api2/teams/ {team_id} / translation_providers / {provider_id} \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“provider_id”:1,“名称”:“Gengo”,“鼻涕虫”:“gengo”,“price_pair_min”:“0.00”,“website_url”:“https://gengo.com”,“描述”:“在Gengo,我们的使命是为每个人提供语言服务,连接全球社区。我们的1.8万多名翻译经过测试,符合严格的项目标准。翻译人员分布在世界各地和每个时区,这使我们能够支持超过35种语言,并朝着Gengo的使命努力。”,“层”: [{“tier_id”:1,“标题”:“母语人士”},{“tier_id”:2,“标题”:“专业翻译”} ],“对”: [{“tier_id”:1,“from_lang_iso”:“恩,我们”,“from_lang_name”:“英语(美国)”,“到_lang_iso”:“汝”,“给你的名字”:“俄罗斯”,“每字价格”:“0.07”},……]}
自定义翻译状态用于提供更有效的翻译工作流。了解更多.
列出项目中的所有自定义翻译状态。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ custom_translation_statuses \--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“custom_translation_statuses”: [{“状态\u id”:123,“标题”:“默认状态”,“颜色”:“#ffffff”}]}
在项目中创建自定义翻译状态。
{“标题”:“看过的医生”,“颜色”:“# ff9f1a”}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id:分支}/ custom_translation_statuses \--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据“{”称号”:“看过的医生”,“色”:“# ff9f1a”}”
{“项目id”:“20008339586 cded200e0d8.29879849”,“自定义\u翻译\u状态”:{“状态\u id”:124,“标题”:“看过的医生”,“颜色”:“# ff9f1a”}}
检索自定义翻译状态对象。
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/custom\u translation\u status/{status\u id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“自定义\u翻译\u状态”:{“状态\u id”:124,“标题”:“看过的医生”,“颜色”:“# ff9f1a”}}
更新自定义翻译状态。
{“标题”:“由工作人员审查”}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/custom\u translation\u status/{status\u id}\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“标题”:“回顾员工“}”
{“项目id”:“20008339586 cded200e0d8.29879849”,“自定义\u翻译\u状态”:{“状态\u id”:124,“标题”:“由工作人员审查”,“颜色”:“# ff9f1a”}}
删除aa自定义翻译状态。
curl——request DELETE \
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/custom\u translation\u status/{status\u id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“删除”:符合事实的}
检索可分配给自定义翻译状态的可用颜色数组。
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project\u id:branch}/custom\u translation\u status/colors\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“颜色”:【“# 61 bd4f”,“# f2d600”,“# ff9f1a”,“# eb5a46”,“# c377e0”,“#0079BF”,“# 00 c2e0”,“344563 #”,“# ff78cb”]}
X-Secret
与webhook请求一起发送的头信息。
检索已配置的webhooks列表。需要管理设置管理权利。
curl——request GET \
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /人\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“20008339586 cded200e0d8.29879849”,“Webhooks”: [{“webhook_id”:“cb755f36c1a5ec7063cf6dedf056eb5a730e033d”,“url”:“https:\/\/my.domain.com\/webhook”,“分支”:无效的,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”,“事件”:【“Project.Imported”,“project.languages.added”,“project.language.removed”,“project.key.added”,“project.keys.deleted”,“project.key.modified”,“project.translation.updated”],“event_lang_map”: [{“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”{}}, {“webhook_id”:“b9069a53700dd7d1fdbaa7dd96c4d6ad25a0e465”,“url”:“https:\/\/my.domain.com\/webhook”,“分支”:无效的,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”,“事件”:【“project.translation.proofread”],“event_lang_map”: [{“事件”:“project.translation.proofread”,“lang_iso_codes”:【“en”,“en_gb”[}]}]}
检索Webhook对象。需要管理设置管理权利。
curl——request GET \
——https url://api.lokalise.com/api2/projects/{project_id}/webhooks/{webhook_id}\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“600904245C4ECF0EC4A9D4.28360690”,“webhook”:{“webhook_id”:“cb755f36c1a5ec7063cf6dedf056eb5a730e033d”,“url”:“https:\/\/my.domain.com\/webhook”,“分支”:无效的,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”,“事件”:【“Project.Imported”,“project.languages.added”,“project.language.removed”,“project.key.added”,“project.keys.deleted”,“project.key.modified”,“project.translation.updated”],“event_lang_map”: [{“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”[}]}}
在项目中创建一个Webhook。需要管理设置管理权利。看到我们的文档查看可用事件和有效负载示例。
无效的
或者跳过此属性,webhook将应用于所有分支。
project.imported
,project.exported
,project.deleted
,project.snapshot
,project.languages.added
,project.language.project已删除
,project.language.settings\u已更改
,project.key.added
,project.key.modified
,project.keys.deleted
,project.key.comment.added
,project.translation.updated
,project.translation.proofread
,project.contributor.added
,project.contributor.deleted
,project.task.created
,project.task.closed
,project.task.deleted
,project.task.language.closed
,project.branch.added
,project.branch.deleted
,project.branch.merged
,team.order.created
,team.order.completed
,team.order.deleted
.
project.translation.updated
和project.translation.proofread
事件可以用语言进行映射。
{“url”:“https://my.domain.com/webhook”,“事件”:【“project.translation.proofread”,“project.translation.updated”],“event_lang_map”: [{“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”[}]}
curl——请求发布\
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /人\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{“url”:“https://my.domain.com/webhook”,“事件”:“project.translation.proofread”、“project.translation.updated”,“event_lang_map”:[{“事件”:“project.translation.updated”、“lang_iso_codes”:[" en_GB "]}]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“webhook”:{“webhook_id”:“138 c1ffa0ad94848f01f980e7f2f2af19d1bd553”,“url”:“https:\/\/my.domain.com\/webhook”,“分支”:无效的,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”,“事件”:【“project.translation.proofread”,“project.translation.updated”],“event_lang_map”: [{“事件”:“project.translation.proofread”,“lang_iso_codes”:【“en”,“en_gb”,“罗斯”}, {“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”[}]}}
更新项目中已配置的webhook。需要管理设置管理权利。
无效的
或者跳过此属性,webhook将应用于所有分支。
project.translation.updated
和project.translation.proofread
事件可以用语言进行映射。
{“事件”:【“project.translation.proofread”,“project.translation.updated”,“Project.Imported”],“event_lang_map”: [{“事件”:“project.translation.proofread”,“lang_iso_codes”:【“en_gb”}, {“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”[}]}
curl——request PUT \
——https url://api.lokalise.com/api2/projects/{project_id}/webhooks/{webhook_id}\--标题“application / json内容类型:\
--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”\
——数据{”事件”:[“project.translation.proofread”、“project.translation.updated”,“project.imported”),“event_lang_map”:[{“事件”:“project.translation.proofread”、“lang_iso_codes”:[" en_GB "]},{“事件”:“project.translation.updated”、“lang_iso_codes”:[" en_GB "]}]}”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“webhook”:{“webhook_id”:“138 c1ffa0ad94848f01f980e7f2f2af19d1bd553”,“url”:“https:\/\/my.domain.com\/webhook”,“分支”:无效的,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”,“事件”:【“project.translation.proofread”,“project.translation.updated”,“Project.Imported”],“event_lang_map”: [{“事件”:“project.translation.proofread”,“lang_iso_codes”:【“en_gb”}, {“事件”:“project.translation.updated”,“lang_iso_codes”:【“en_gb”[}]}}
删除项目中已配置的webhook。需要管理设置管理权利。
curl——request DELETE \
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /人/ {webhook_id}
{“项目id”:“3002780358964 f9bab5a92.87762498”,“webhook_deleted”:符合事实的}
再生一个webhook秘密。需要管理设置管理权利。
卷曲 - request补丁\
——https url:/ / api.lokalise.com/api2/projects/ {project_id} /人/ {webhook_id} /机密/再生\--标题“x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0”
{“项目id”:“3002780358964 f9bab5a92.87762498”,“秘密”:“CCBE0D72A8377B2C91DB25D628192EADE03158C”}
在大多数情况下,我们将正确地将复数和占位符导出为您选择的文件格式,但是可以覆盖默认值通用占位符转换行为和多种格式导出选项。使用下表指定导出参数。
文件格式 | 兼容的复数形式 | 兼容的占位符格式 |
---|---|---|
android_sdk |
通用的 |
printf |
ios_sdk |
通用的 |
ios |
xml |
通用的 |
printf |
字符串 |
通用的 |
ios |
csv |
json_string,加护病房 |
Printf ios icu net i18n raw |
xlsx |
json_string,加护病房 |
Printf ios icu net i18n raw |
阿宝 |
通用的 |
Printf,ICU,RAW |
性质 |
json_string,加护病房 |
printf,加护病房 |
json |
json_string,ICU,Symfony,Array,I18Next |
Printf, ios, icu, net, symfony, i18n, raw |
xliff |
通用的,json_string, icu |
Printf ios icu raw |
普利斯特 |
json_string,加护病房 |
printf, ios, icu |
Resx. |
json_string,加护病房 |
网 |
js |
json_string,ICU,Symfony,Array,I18Next |
Printf, icu, symfony, i18n, raw |
react_native |
json_string、icu、数组 |
Printf ios icu i18n raw |
symfony_xliff |
json_string icu, symfony |
Printf, icu, symfony, raw |
xlf |
json_string,加护病房 |
Printf,ICU,RAW |
php |
Json_string, icu, symfony,数组 |
Printf, icu, symfony, i18n, raw |
ini |
json_string,加护病房 |
printf,加护病房 |
ruby_yaml |
json_string、icu、数组 |
printf,加护病房 |
yaml |
Json_string, icu, symfony,数组 |
Printf, icu, symfony, i18n, raw |
月31 |
json_string,加护病房 |
printf,加护病房 |
ts |
通用的 |
printf,加护病房 |
arb |
加护病房 |
加护病房 |
通用的 |
选定文件格式的通用复数实现 |
json_string |
{"one":" one user online","other":"%s users online"} |
加护病房 |
{index.hero.title,复数,一个{一个在线用户}其他{%s在线用户} |
数组 |
返回一个数组(如果格式适用) |
i18next |
{“key”:“一个苹果”,“key_plural”:“许多苹果”} |
symfony |
一个苹果|许多苹果 |
示例字符串:我的名字是[%s:name]。我有[%。2f] dollars.
printf |
Printf风格占位符 -“我的名字是%s。我有%.2f美元。”。 |
ios |
iOS-style占位符-“我的名字是%@。我有%。2f dollars." |
加护病房 |
ICU消息格式占位符-“我的名字是{name}。我有{0}美元。” |
网 |
.NET占位符格式“我的名字是{0}。我有{0:0.00}美元。” |
symfony |
Symfony占位符格式 -“我的名字是%name%。我有%placeholder_1%美元。” |
i18n |
I18N占位符格式 -“我的名字是{name}}。我有{{0}}。” |
生 |
不进行处理。 |
文件格式 | 名称 |
---|---|
android_sdk |
本地化Android SDK包 |
ios_sdk |
lockalise iOS SDK包 |
xml |
安卓资源 |
字符串 |
苹果的字符串 |
csv |
逗号分隔值 |
xlsx |
Excel 2007 |
阿宝 |
Gettext |
性质 |
Java属性 |
json |
JSON平和JSON嵌套 |
json_结构 |
结构化的JSON |
xliff |
苹果XLIFF |
普利斯特 |
objective - c /可可属性 |
Resx. |
.NET资源 |
js |
JavaScript对象 |
react_native |
反应本机(I18n库) |
symfony_xliff |
PHP XLIFF交响曲 |
xlf |
Anglular i18n XLIFF |
php_array |
PHP数组 |
php_laravel |
拉威尔酒店 |
ini |
PHP INI |
ruby_yaml |
Ruby YAML |
yaml |
YAML |
月31 |
Salesforce翻译 |
ts |
Qt语言学家 |
多克斯 |
Docx |
超文本标记语言 |
超文本标记语言 |
arb |
ARB |
Lokalise使用传统的HTTP响应代码来指示API请求的成功或失败。一般来说:代码在2 xx
范围显示成功。码的3xx
表明重定向。码的4 xx
Range表示在给定的信息下失败的错误(例如,省略了一个必需的参数,一个电荷失败,等等)。码的5xx
range表示本地化服务器出现错误(这种情况很少见)。
代码 | 原因 |
---|---|
200年好 | 一切正常工作。 |
208 -已报告 | 已添加已发布的资源。 |
400 -错误请求 | 该请求是不可接受的,通常是由于缺少所需参数。 |
401 -未经授权 | 没有提供有效的API密钥。 |
403年被禁止的 | 未授予身份验证用户执行请求操作的权限。 |
404 -未找到 | 请求的资源不存在。 |
406 -不接受 | 发布的资源是畸形的或损坏的。 |
409-冲突 | 请求与另一个请求冲突(可能由于使用相同的幂等键)。 |
423锁定 | 所提供的令牌目前用于处理另一个请求。我们不支持并发请求。 |
429 -太多的请求 | 太多的请求过快地击中了API。我们建议对你的要求作出指数级的让步。 |
500,502, 503, 504 -服务器错误 | 本地化端出了问题。(这些都是罕见的。) |
2021-09-08
2021-08-02
2021-05-24
术语表
(布尔值)到可能的值列表贡献者admin_rights
属性。2021-03-03
翻译:添加任务id
属性。
翻译:添加filter_active_task_id
(数量)参数列出所有翻译端点。过滤属于给定任务ID的翻译。
贡献者:添加create_branches.
(布尔值)到可能的值列表贡献者admin_rights
属性。
团队用户组:添加create_branches.
的可能值列表团队用户组权限{admin_rights}
属性。
2021-02-24
2021-02-10
模糊
在所有端点(用未经证实的
).2021-02-04
处理
价值可能订单状态值列表。2021-02-01
任务:添加auto_close_items
到任务属性列表。
任务:添加auto_close_items
(布尔)参数到创建任务端点。
任务:添加auto_close_items
(布尔)参数到更新任务端点。
2020-11-24
2020-10-01
2020-07-27
php_array
和php_laravel
格式格式
参数下载文件端点。格式php
仍然可以向后兼容。2020-07-20
自定义\u翻译\u状态
(布尔)和custom_translation_statuses_allow_multiple
(布尔)字段设置
属性列表。2020-07-14
订单:增加对谷歌和DeepL机器翻译引擎的支持。
供应商:将谷歌和DeepL机器翻译引擎添加到可用的提供商。
2020-07-01
2020-05-13
键:添加translations_modified_at
和translations_modified_at_timestamp.
属性来键资源。
键:添加修改的
和modified_at_timestamp.
属性来键资源。
2020-05-09
2020-05-08
skip_detect_lang_iso
参数上传一个文件端点。2020-04-03
分支机构:添加target_branch_id
参数合并一个分支端点。
分支机构:改变强制\u冲突\u解决\u使用
参数合并一个分支端点接受新源
和目标
值。旧值主人
和分支
在不使用new的情况下仍然接受向后兼容吗target_branch_id
参数。
2020-03-05
文件夹:添加custom_translation_status_ids
参数上传一个文件端点。
文件夹: 添加custom_translation_status_inserted_keys
(保龄球)参数上传一个文件端点。添加插入键的指定状态。
文件夹: 添加自定义\翻译\状态\更新\密钥
(保龄球)参数上传一个文件端点。向更新的键添加指定的状态。
文件夹: 添加自定义\u翻译\u状态\u跳过\u键
(保龄球)参数上传一个文件终点。将指定状态添加到跳过的键。
键: 添加custom_translation_status_ids
(字符串)参数创建密钥端点。
键: 添加custom_translation_status_ids
(字符串)参数批量更新端点。
键: 添加merge_custom_translation_statuses
(字符串)参数批量更新端点。
2020-02-25
2020-02-03
filter_archived
(字符串)参数列出所有密钥端点。2019-11-04
2019-10-15
2019-10-11
分支机构:添加分支机构资源和端点。
全球:更新端点以支持分支。
2019-07-08
add_newline_eof
参数下载文件端点。2019-06-03
custom_translation_status_ids
参数下载文件端点。2019-05-10
自定义翻译状态:添加自定义翻译状态资源和端点。
翻译:添加自定义\u翻译\u状态
属性。
任务:添加custom_translation_status_ids
属性。
2019-04-14
全球:增加了unix时间戳属性(created_at_timestamp
,modified_at_timestamp.
等等)。
项目对象:添加base_language_id
(数值)属性。
项目对象:添加base_language_iso
(字符串)属性。
翻译:添加filter_fuzzy
(字符串)参数列出所有翻译端点。未验证的过滤器翻译(模糊)。可能的值是1
和0
.
2019-04-04
bundle_description
(字符串)参数下载文件端点。2019-03-07
项目: 添加语言
(数组)的参数创建一个项目端点。一个或多个要添加的项目语言。
项目: 添加base_lang_iso.
(字符串)参数创建一个项目端点。默认(基础)项目语言的语言/地区代码。
项目: 添加project_type
(字符串)参数创建一个项目端点。选择项目类型。
键: 添加filter_untranslated
(数量)参数列出所有密钥端点。通过未翻译的键进行过滤。可能的值是1
和0
.
键: 添加filter_translation_lang_ids
(字符串)参数列出所有密钥端点。一个或多个要过滤的语言ID(用逗号分隔)。将只包括列出的id的翻译。
文件夹: 添加tag_inserted_keys
(保龄球)参数上传一个文件端点。为插入的键添加指定的标记。
文件夹: 添加tag_updated_keys
(保龄球)参数上传一个文件端点。将指定的标记添加到更新的密钥。
文件夹: 添加tag_skipped_keys
(保龄球)参数上传一个文件端点。为跳过的键添加指定的标记。
2019-03-01
项目: 添加filter_names.
(字符串)参数列出所有的项目端点。要筛选的一个或多个项目名称(用逗号分隔)。
项目: 添加include_statistics
(数量)参数列出所有的项目端点。是否包括项目统计。可能的值是1
和0
.
项目: 添加include_settings
(数量)参数列出所有的项目端点。是否包含项目设置。可能的值是1
和0
.
2019-02-28
2019-02-26
2019-02-21
2019-02-14
项目对象:添加设置
(对象)属性。
项目对象:添加统计数据
(对象)属性。
2019-02-07
created_at.
(字符串)属性。创建日期的截图。2019-01-10
closing_tags
(数组)的参数更新任务端点。2019-01-09
2019-01-04
2019-01-02
键:添加filter_qa_issues
(字符串)参数列出所有密钥端点。筛选键至少有一个QA问题(逗号分隔)。可能的值是spelling_and_grammar
,占位符
,超文本标记语言
,url_count
,网址
,Email_Count.
,电子邮件
,括号
,数字
,leading_whitespace
和trailing_whitespace
.
翻译:添加filter_qa_issues
(字符串)参数列出所有翻译端点。过滤至少有一个QA问题(逗号分隔)的翻译。可能的值是spelling_and_grammar
,占位符
,超文本标记语言
,url_count
,网址
,Email_Count.
,电子邮件
,括号
,数字
,leading_whitespace
和trailing_whitespace
.
2018-12-14
键:添加keys_locked
(int)返回参数删除多个键和删除一个关键端点。端点将返回keys_removed
=假
如果所有的键都有锁定翻译。
翻译:添加filter_lang_id
(字符串)参数列出所有翻译端点。仅为显示的语言ID返回翻译。
翻译:添加filter_is_reviewed.
(字符串)参数列出所有翻译端点。过滤被审查的翻译。可能的值是1
和0
.
2018-12-11
是否锁定翻译
(布尔)参数到更新任务端点。2018-12-10
2018-11-29
2018-11-22
任务: 添加task_type
(字符串)参数创建任务终点。可能的值是翻译
或回顾
.
任务: 添加parent_task_id
(字符串)参数创建任务终点。已完成的任务parent_task_id
参数集将排队,直到父任务完成。只能将单个子任务分配给父任务。只能为子任务定义赋值,作用域将从父任务继承。
任务: 添加can_be_parent
(布尔)参数到列出所有任务端点。只有带有此标志的任务才能被使用parent_task_id
参数。
任务: 添加task_type
(字符串)参数列出所有任务终点。可能的值是翻译
或回顾
.
任务: 添加parent_task_id
(数量)参数列出所有任务端点。
任务: 添加can_be_parent
(布尔)参数到检索一个任务端点。
任务: 添加task_type
(字符串)参数检索一个任务终点。可能的值是翻译
或回顾
.
任务: 添加parent_task_id
(数量)参数检索一个任务端点。
任务:修改键
如果不需要(array)参数parent_task_id
参数在创建任务请求。
任务:添加额外的状态
(字符串)参数值排队
.这将是默认状态,如果parent_task_id
在创建任务时指定。