您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

64 行
2.3 KiB

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Unity.UIWidgets.foundation;
namespace UIWidgetsSample
{
public abstract class ChatL10n
{
/// Accessibility label (hint) for the attachment button
public readonly string attachmentButtonAccessibilityLabel;
/// Placeholder when there are no messages
public readonly string emptyChatPlaceholder;
/// Accessibility label (hint) for the tap action on file message
public readonly string fileButtonAccessibilityLabel;
/// Placeholder for the text field
public readonly string inputPlaceholder;
/// Accessibility label (hint) for the send button
public readonly string sendButtonAccessibilityLabel;
/// Creates a new chat l10n based on provided copy
public ChatL10n(
string attachmentButtonAccessibilityLabel = null,
string emptyChatPlaceholder = null,
string fileButtonAccessibilityLabel = null,
string inputPlaceholder = null,
string sendButtonAccessibilityLabel = null
)
{
this.inputPlaceholder = inputPlaceholder;
this.attachmentButtonAccessibilityLabel = attachmentButtonAccessibilityLabel;
this.emptyChatPlaceholder = emptyChatPlaceholder;
this.fileButtonAccessibilityLabel = fileButtonAccessibilityLabel;
this.sendButtonAccessibilityLabel = sendButtonAccessibilityLabel;
}
}
/// English l10n which extends [ChatL10n]
public class ChatL10nEn : ChatL10n
{
/// Creates English l10n. Use this constructor if you want to
/// override only a couple of variables, otherwise create a new class
/// which extends [ChatL10n]
public ChatL10nEn(
string attachmentButtonAccessibilityLabel = "Send media",
string emptyChatPlaceholder = "No messages here yet",
string fileButtonAccessibilityLabel = "File",
string inputPlaceholder = "Message",
string sendButtonAccessibilityLabel = "Send"
) : base(
attachmentButtonAccessibilityLabel,
emptyChatPlaceholder,
fileButtonAccessibilityLabel,
inputPlaceholder,
sendButtonAccessibilityLabel
)
{
}
}
}