From 8edb95ef9341423f9a3bc24fd3140278949dad6a Mon Sep 17 00:00:00 2001 From: Qinglin Date: Thu, 31 Aug 2023 04:34:07 +0800 Subject: [PATCH] zh-CN: translate android/aidl/implementation.md (#1085) Part of #324 --- po/zh-CN.po | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/po/zh-CN.po b/po/zh-CN.po index e86f520a..49081f3f 100644 --- a/po/zh-CN.po +++ b/po/zh-CN.po @@ -12666,15 +12666,15 @@ msgstr "" #: src/android/aidl/implementation.md:1 msgid "Service Implementation" -msgstr "" +msgstr "服务实现" #: src/android/aidl/implementation.md:3 msgid "We can now implement the AIDL service:" -msgstr "" +msgstr "我们现在可以实现AIDL服务:" #: src/android/aidl/implementation.md:5 msgid "_birthday_service/src/lib.rs_:" -msgstr "" +msgstr "_birthday_service/src/lib.rs_:" #: src/android/aidl/implementation.md:7 msgid "" @@ -12700,11 +12700,32 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! 实现了 `IBirthdayService` AIDL 接口。\n" +"use com_example_birthdayservice::aidl::com::example::birthdayservice::" +"IBirthdayService::IBirthdayService;\n" +"use com_example_birthdayservice::binder;\n" +"\n" +"/// `IBirthdayService` 接口的具体实现。\n" +"pub struct BirthdayService;\n" +"\n" +"impl binder::Interface for BirthdayService {}\n" +"\n" +"impl IBirthdayService for BirthdayService {\n" +" fn wishHappyBirthday(&self, name: &str, years: i32) -> binder::" +"Result {\n" +" Ok(format!(\n" +" \"Happy Birthday {name}, congratulations with the {years} years!" +"\"\n" +" ))\n" +" }\n" +"}\n" +"```" #: src/android/aidl/implementation.md:26 src/android/aidl/server.md:28 #: src/android/aidl/client.md:37 msgid "_birthday_service/Android.bp_:" -msgstr "" +msgstr "_birthday_service/Android.bp_:" #: src/android/aidl/implementation.md:28 msgid "" @@ -12720,6 +12741,17 @@ msgid "" "}\n" "```" msgstr "" +"```javascript\n" +"rust_library {\n" +" name: \"libbirthdayservice\",\n" +" srcs: [\"src/lib.rs\"],\n" +" crate_name: \"birthdayservice\",\n" +" rustlibs: [\n" +" \"com.example.birthdayservice-rust\",\n" +" \"libbinder_rs\",\n" +" ],\n" +"}\n" +"```" #: src/android/aidl/server.md:1 msgid "AIDL Server"