Merge remote-tracking branch 'upstream/master'

This commit is contained in:
adbenitez
2021-06-17 18:27:41 -04:00
6 changed files with 56 additions and 24 deletions
+3
View File
@@ -687,6 +687,9 @@
<string name="systemmsg_chat_protection_disabled">Защита чата отключена.</string>
<string name="systemmsg_chat_protection_enabled">Защита чата включена</string>
<!-- Some options as "Manage keys" or "Backup" may require the system PIN/Fingerprint/Gesture/Etc. to be entered in a system dialog. This hint is added to the system dialog, below a title as "Manage keys" or "Backup". -->
<string name="enter_system_secret_to_continue">Пожалуйста, введите защитный код вашей системы, чтобы продолжить. </string>
<!-- qr code stuff -->
<string name="qr_code">QR код</string>
<string name="load_qr_code_as_image">Загрузить QR код как изображение</string>
+6
View File
@@ -380,6 +380,9 @@
<string name="puny_code_warning_header">Şüpheli bağlantı algılandı</string>
<!-- placeholder contains the hostname converted to ascii -->
<string name="puny_code_warning_question">%1$s bağlantısını ziyaret etmek istediğinizden emin misiniz?</string>
<!-- this message is shown whenever a link with non-latin characters is clicked. first placeholder is original hostname with special chars, second placeholder is hostname encoded in ascii -->
<string name="puny_code_warning_description">Farklı alfabelerden benzer görünen karakterleri kullanarak karakterleri yanlış temsil edebilecek bir bağlantı izlediniz. %1$s etiketli bağlantıyı takip etmek, Latin olmayan karakterler için normal olan %2$s dönüşümüne yol açacaktır. Bu tür karakterleri beklemiyorsanız, bu bağlantı zararlı olabilir</string>
<!-- search -->
<string name="search">Ara</string>
<string name="search_explain">Sohbetleri, kişileri ve iletileri ara</string>
@@ -660,6 +663,9 @@
<string name="systemmsg_chat_protection_disabled">Sohbet koruması etkisizleştirildi.</string>
<string name="systemmsg_chat_protection_enabled">Sohbet koruması etkinleştirildi.</string>
<!-- Some options as "Manage keys" or "Backup" may require the system PIN/Fingerprint/Gesture/Etc. to be entered in a system dialog. This hint is added to the system dialog, below a title as "Manage keys" or "Backup". -->
<string name="enter_system_secret_to_continue">Sürdürmek için lütfen sistem tanımlı sırrınızı girin.</string>
<!-- qr code stuff -->
<string name="qr_code">QR kod</string>
<string name="load_qr_code_as_image">QR kodu görsel olarak yükle</string>
+3
View File
@@ -687,6 +687,9 @@
<string name="systemmsg_chat_protection_disabled">Захист чату вимкнено.</string>
<string name="systemmsg_chat_protection_enabled">Захист чату увімкнено.</string>
<!-- Some options as "Manage keys" or "Backup" may require the system PIN/Fingerprint/Gesture/Etc. to be entered in a system dialog. This hint is added to the system dialog, below a title as "Manage keys" or "Backup". -->
<string name="enter_system_secret_to_continue">Введіть захисний код, щоб продовжити.</string>
<!-- qr code stuff -->
<string name="qr_code">QR-код</string>
<string name="load_qr_code_as_image">Завантажити зображення QR-коду</string>
+19 -19
View File
@@ -54,7 +54,7 @@
<string name="show_password">显示密码</string>
<string name="hide_password">隐藏密码</string>
<string name="not_now">现在不</string>
<string name="never"></string>
<string name="never"></string>
<string name="one_moment">稍等片刻…</string>
<string name="done">已完成</string>
<string name="undo">撤销</string>
@@ -110,7 +110,7 @@
<string name="reply_noun">回复</string>
<string name="gif">Gif</string>
<string name="images">图像</string>
<string name="audio"></string>
<string name="audio"></string>
<string name="voice_message">语音消息</string>
<string name="forwarded">转发了</string>
<string name="forwarded_message">转发的消息</string>
@@ -119,7 +119,7 @@
<string name="video">视频</string>
<string name="documents">文档</string>
<string name="contact">联系人</string>
<string name="verified_contact">已验证联系人</string>
<string name="verified_contact">已验证联系人</string>
<string name="camera">相机</string>
<!-- "capture" here means "start a video recording" or "take a photo"; eg. the description of the "shutter button" in the camera controls -->
<string name="capture">捕获</string>
@@ -267,7 +267,7 @@
<string name="videochat_tap_to_open">点击来打开</string>
<string name="videochat_instance">视频聊天实例</string>
<string name="videochat_instance_placeholder">您的视频聊天实例</string>
<string name="videochat_instance_explain">定义了视频聊天实例后,您可以在聊天里发起视频聊天。视频聊天的两端都需要有兼容的应用或兼容的浏览器。\n\n示例: https://meet.jit.si/$ROOM 或 basicwebrtc:https://your-server</string>
<string name="videochat_instance_explain">定义了视频聊天实例后,您可以在聊天里发起视频聊天。视频聊天的两端都需要有兼容的应用或兼容的浏览器。\n\n示例: https://meet.jit.si/$ROOM 或 basicwebrtc:https://your-server</string>
<string name="videochat_instance_from_qr">使用“%1$s”邀请其他人加入视频聊天吗?\n\n设置好后,您就可以在聊天里发起视频聊天了。 这会取代之前的视频聊天设置(如果有的话)。</string>
<string name="videochat_invitation">视频聊天邀请</string>
<string name="videochat_invitation_body">您被邀请参加视频聊天,点击 %1$s 来加入。</string>
@@ -283,7 +283,7 @@
</plurals>
<string name="ask_forward">将消息转发给 %1$s</string>
<string name="ask_forward_multiple">转发消息到 %1$d 个聊天?</string>
<string name="ask_export_attachment">导出附件?导出附件将允许您设备上的任意应用程序访问它们。\n\n继续?</string>
<string name="ask_export_attachment">导出附件?导出附件将允许您设备上的任意应用程序访问它们。\n\n是否继续?</string>
<string name="ask_block_contact">屏蔽此联系人?您将不再收到此联系人的消息。</string>
<string name="ask_unblock_contact">取消屏蔽此联系人?您将再次能收到此联系人的消息。</string>
<string name="ask_delete_contacts">删除联系人?\n\n仍有在进行中的聊天的联系人和在系统通讯录中的联系人无法被永久删除。</string>
@@ -325,7 +325,7 @@
<string name="chat_no_chats_yet_hint">您可以与其他 Delta Chat 用户以及任意电子邮件地址聊天。</string>
<string name="chat_all_archived">所有聊天已归档。\n按\"+\"来开始新聊天。</string>
<string name="chat_share_with_title">分享给</string>
<string name="chat_input_placeholder">消息</string>
<string name="chat_input_placeholder">输入消息</string>
<string name="chat_archived_label">已归档</string>
<string name="chat_no_messages">没有消息。</string>
<string name="chat_self_talk_subtitle">发给自己的消息</string>
@@ -353,21 +353,21 @@
<string name="mailing_list_profile_info">邮件列表名称和图像的更改仅适用于此设备。 </string>
<!-- map -->
<string name="filter_map_on_time">显示时间范围内的位置</string>
<string name="filter_map_on_time">显示时间范围内的位置</string>
<string name="show_location_traces">显示轨迹</string>
<string name="add_poi">发送兴趣点</string>
<!-- chat audit log -->
<string name="chat_audit_log_empty_message">此聊天的系统消息会出现在这里</string>
<string name="chat_audit_log_title">%1$s 的聊天审计日志</string>
<string name="chat_audit_log_description">这个视图只显示系统和信息消息。可用于查找最后聊天操作而无需滚动许多普通消息</string>
<string name="chat_audit_log_description">视图只显示系统消息和信息消息。可用于查找最后聊天操作而无需滚动许多普通消息</string>
<!-- punycode warning / labeled links -->
<!-- placeholder is domain/hostname that should be trusted -->
<string name="open_external_url_trust_domain">不再询问 %1$s</string>
<string name="puny_code_warning_header">检测到可疑链接</string>
<!-- placeholder contains the hostname converted to ascii -->
<string name="puny_code_warning_question">确定你想访问 %1$s 吗?</string>
<string name="puny_code_warning_question">确定访问 %1$s 吗?</string>
<!-- this message is shown whenever a link with non-latin characters is clicked. first placeholder is original hostname with special chars, second placeholder is hostname encoded in ascii -->
<string name="puny_code_warning_description">你将被转到一个链接,该链接可能通过使用来自不同字母表的相似字符来错误地表示字符。打开标记为 %1$s 的链接将把你带到以 ascii 码编码的 %2$s。如果这样的字符出乎你的意料,那么这个链接可能是有害的</string>
@@ -464,7 +464,7 @@
<string name="pref_using_default">使用默认值: %s</string>
<string name="pref_profile_info_headline">您的个人资料</string>
<string name="pref_profile_photo">个人资料图片</string>
<string name="pref_blocked_contacts">已屏蔽联系人</string>
<string name="pref_blocked_contacts">已屏蔽联系人</string>
<string name="blocked_empty_hint">被您屏蔽的联系人将显示于此。</string>
<string name="pref_profile_photo_remove_ask">移除个人资料图片?</string>
<string name="pref_password_and_account_settings">密码和账户</string>
@@ -476,7 +476,7 @@
<string name="pref_default_status_text">由我的 Delta Chat Messenger 发送: https://delta.chat</string>
<string name="pref_enter_sends">回车键发送</string>
<string name="pref_enter_sends_explain">按回车键发送文本消息</string>
<string name="pref_outgoing_media_quality">媒体质量</string>
<string name="pref_outgoing_media_quality">媒体质量</string>
<string name="pref_outgoing_balanced">平衡</string>
<string name="pref_outgoing_worse">体积小,但质量更差</string>
<string name="pref_vibrate">振动</string>
@@ -558,7 +558,7 @@
<string name="select_your_new_profile_image">选择新的个人资料图片</string>
<string name="profile_image_delete">删除个人资料图片</string>
<string name="pref_show_tray_icon">显示托盘图标</string>
<string name="pref_edit_profile">编辑概要</string>
<string name="pref_edit_profile">编辑个人资料</string>
<!-- Emoji picker and categories -->
<string name="emoji_search_results">搜索结果</string>
@@ -625,8 +625,8 @@
<string name="systemmsg_member_removed">已移除成员 %1$s </string>
<string name="systemmsg_group_left">已离开群组</string>
<string name="systemmsg_read_receipt_subject">消息已被打开</string>
<string name="systemmsg_read_receipt_body">您发送的“%1$s”消息已在收件人的屏幕上显示过。\n\n这并不保证内容已被阅读。</string>
<string name="systemmsg_cannot_decrypt">此消息无法解密。\n\n• 简单回复此消息要求发件人再次发送该消息可能会有所帮助。\n\n• 如果您在此设备或其他设备上重新安装了 Delta Chat 或其他电子邮件程序,则可能需要从别处发送 Autocrypt 设置消息。</string>
<string name="systemmsg_read_receipt_body">您发送的“%1$s”消息已在接收者的屏幕上显示过。\n\n这并不保证内容已被阅读。</string>
<string name="systemmsg_cannot_decrypt">此消息无法解密。\n\n• 简单回复此消息要求发送者重发该消息可能会有所帮助。\n\n• 如果您在此设备或其他设备上重新安装了 Delta Chat 或其他电子邮件程序,则可能需要从别处发送 Autocrypt 设置消息。</string>
<!-- Translators: %1$s will be replaced by sth. as "member xy added" (trailing full-stop removed). -->
<string name="systemmsg_action_by_me">我 %1$s。</string>
<!-- Translators: %1$s will be replaced by sth. as "member xy added" (trailing full-stop removed). %2$s will be replaced by the name/addr of the person who did this action. -->
@@ -662,11 +662,11 @@
<string name="qrscan_failed">二维码无法被解码</string>
<string name="qrscan_ask_join_group">您要加入群组“%1$s”吗?</string>
<string name="qrscan_fingerprint_mismatch">扫描到的指纹与上次见到的 %1$s 的指纹不匹配。</string>
<string name="qrscan_no_addr_found">此二维码包含指纹但没有电子邮件地址。\n\n对于带外验证,请先与收件人建立加密连接。</string>
<string name="qrscan_no_addr_found">此二维码包含指纹但没有电子邮件地址。\n\n对于带外验证,请先与接收者建立加密连接。</string>
<string name="qrscan_contains_text">已扫描到的二维码文本:\n\n%1$s</string>
<string name="qrscan_contains_url">已扫描到的二维码 URL\n\n%1$s</string>
<string name="qrscan_fingerprint_label">指纹</string>
<string name="qrscan_x_verified_introduce_myself">%1$s 已验证, 自我介绍…</string>
<string name="qrscan_x_verified_introduce_myself">%1$s 已验证, 自我介绍</string>
<string name="qrshow_title">邀请二维码</string>
<string name="qrshow_x_joining">%1$s 加入。</string>
<string name="qrshow_x_verified">%1$s 已验证。</string>
@@ -690,7 +690,7 @@
<string name="copy_qr_data_success">已复制二维码链接到剪贴板</string>
<string name="mailto_dialog_header_select_chat">选择要发送消息的聊天</string>
<!-- first placeholder is the name of the chat -->
<string name="mailto_dialog_confirm_replace_draft">%1$s 已经有一条草稿信息,你想替换它吗?</string>
<string name="mailto_dialog_confirm_replace_draft">%1$s 已经有一条草稿信息,替换它吗?</string>
<string name="mailto_link_could_not_be_decoded">无法解码 mailto 链接:%1$s</string>
<!-- notifications -->
@@ -753,7 +753,7 @@
<string name="global_menu_file_open_desktop">打开 Delta Chat</string>
<string name="global_menu_minimize_to_tray">最小化</string>
<string name="no_chat_selected_suggestion_desktop">选择一个聊天或创建新聊天</string>
<string name="write_message_desktop">消息</string>
<string name="write_message_desktop">输入消息</string>
<string name="encryption_info_title_desktop">加密信息</string>
<string name="contact_detail_title_desktop">联系人详情</string>
<string name="contact_request_title_desktop">联系人请求</string>
@@ -797,7 +797,7 @@
<string name="menu.view.developer.open.log.folder">打开日志文件夹</string>
<string name="menu.view.developer.open.current.log.file">打开当前日志文件</string>
<string name="user_location_permission_explanation">Delta Chat 需要位置权限来显示和分享您的位置。</string>
<string name="explain_desktop_minimized_disabled_tray_pref">托盘图标不能被禁用,因为Delta Chat 启动时带 --minimized 参数</string>
<string name="explain_desktop_minimized_disabled_tray_pref">Delta Chat 带 --minimized 参数启动时,无法禁用托盘图标。</string>
<string name="no_spellcheck_suggestions_found">未找到拼写建议</string>
<string name="show_window">显示窗口</string>
@@ -68,6 +68,7 @@ import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcMsg;
import org.thoughtcrime.securesms.attachments.Attachment;
import org.thoughtcrime.securesms.attachments.UriAttachment;
import org.thoughtcrime.securesms.audio.AudioRecorder;
import org.thoughtcrime.securesms.audio.AudioSlidePlayer;
import org.thoughtcrime.securesms.components.AnimatingToggle;
@@ -87,6 +88,7 @@ import org.thoughtcrime.securesms.components.emoji.MediaKeyboard;
import org.thoughtcrime.securesms.connect.ApplicationDcContext;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.database.AttachmentDatabase;
import org.thoughtcrime.securesms.map.MapActivity;
import org.thoughtcrime.securesms.mms.AttachmentManager;
import org.thoughtcrime.securesms.mms.AttachmentManager.MediaType;
@@ -1356,12 +1358,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
}
// media selected by the system keyboard
@Override
public void onMediaSelected(@NonNull Uri uri, String contentType) {
if (!TextUtils.isEmpty(contentType) && contentType.trim().equals("image/gif")) {
setMedia(uri, MediaType.GIF);
} else if (MediaUtil.isImageType(contentType)) {
setMedia(uri, MediaType.IMAGE);
if (MediaUtil.isImageType(contentType)) {
sendSticker(uri, contentType);
} else if (MediaUtil.isVideoType(contentType)) {
setMedia(uri, MediaType.VIDEO);
} else if (MediaUtil.isAudioType(contentType)) {
@@ -1369,6 +1370,21 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
}
private void sendSticker(@NonNull Uri uri, String contentType) {
Attachment attachment = new UriAttachment(uri, null, contentType,
AttachmentDatabase.TRANSFER_PROGRESS_STARTED, 0, 0, 0, null, null, false);
String path = getRealPathFromAttachment(attachment);
Optional<QuoteModel> quote = inputPanel.getQuote();
inputPanel.clearQuote();
DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_STICKER);
if (quote.isPresent()) {
msg.setQuote(quote.get().getQuotedMsg());
}
msg.setFile(path, null);
dcContext.sendMsg(chatId, msg);
}
private void initializeMediaKeyboardProviders(@NonNull MediaKeyboard mediaKeyboard, boolean stickersAvailable) {
boolean isSystemEmojiPreferred = Prefs.isSystemEmojiPreferred(this);
@@ -126,7 +126,11 @@ public class ComposeText extends EmojiEditText {
if (mediaListener == null) return inputConnection;
if (inputConnection == null) return null;
EditorInfoCompat.setContentMimeTypes(editorInfo, new String[] {"image/jpeg", "image/png", "image/gif"});
// media with mime-types defined by setContentMimeTypes() may be selected in the system keyboard
// and are passed to onCommitContent() then;
// from there we use them as stickers.
EditorInfoCompat.setContentMimeTypes(editorInfo, new String[] {"image/jpeg", "image/png", "image/gif", "image/webp"});
return InputConnectionCompat.createWrapper(inputConnection, editorInfo, new CommitContentListener(mediaListener));
}