mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
Add translation support to reply items (#1894)
* Add translation support to reply items - Add translateState and showTranslate fields to ReplyControl - Add translatedText field to ReplyInfo for translation results - Implement TranslateReplyReq message and translateReply API method - Add translation UI with loading state and result display in reply items - Show translation button when showTranslate is true and translateState is 2 * refa Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -148,4 +148,20 @@ abstract final class ReplyGrpc {
|
||||
SearchItemReply.fromBuffer,
|
||||
);
|
||||
}
|
||||
|
||||
static Future<LoadingState<TranslateReplyResp>> translateReply({
|
||||
required Int64 type,
|
||||
required Int64 oid,
|
||||
required Int64 rpid,
|
||||
}) {
|
||||
return GrpcReq.request(
|
||||
GrpcUrl.translateReply,
|
||||
TranslateReplyReq(
|
||||
type: type,
|
||||
oid: oid,
|
||||
rpid: [rpid],
|
||||
),
|
||||
TranslateReplyResp.fromBuffer,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user