diff --git a/package.json b/package.json index 4aa8d5e..9e39d5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keanuapp-weblite", - "version": "0.1.7", + "version": "0.1.8", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/package.json.bak b/package.json.bak index 0a05bd1..4aa8d5e 100644 --- a/package.json.bak +++ b/package.json.bak @@ -1,6 +1,6 @@ { "name": "keanuapp-weblite", - "version": "0.1.6", + "version": "0.1.7", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/assets/translations/en.js b/src/assets/translations/en.js deleted file mode 100644 index 55bb54c..0000000 --- a/src/assets/translations/en.js +++ /dev/null @@ -1,185 +0,0 @@ -export default { - "Keanu Weblite": "Keanu Weblite", - menu: { - start_private_chat: "Private chat with this user", - reply: "Reply", - edit: "Edit", - delete: "Delete", - download: "Download", - ok: "Ok", - cancel: "Cancel", - send: "Send", - back: "BACK", - login: "Login", - logout: "Logout", - }, - message: { - you: "You", - user_created_room: "{user} created the room", - user_aliased_room: "{user} made the room alias {alias}", - user_changed_display_name: "{user} changed display name to {displayName}", - user_changed_avatar: "{user} changed the avatar", - user_changed_room_avatar: "{user} changed the room avatar", - user_encrypted_room: "{user} made the room encrypted", - user_was_invited: "{user} was invited to the chat...", - user_joined: "{user} joined the chat", - user_left: "{user} left the chat", - user_said: "{user} said:", - file_prefix: "File: ", - edited: "(edited)", - download_progress: "{percentage}% downloaded", - upload_progress: "Uploaded {count}", - upload_progress_with_total: "Uploaded {count} of {total}", - user_changed_room_history: "{user} made room history {type}", - room_history_world_readable: "readable by anyone", - room_history_shared: "readable to all members in the room", - room_history_invited: "readable to members from when they were invited", - room_history_joined: "readable to members from when they joined", - user_changed_join_rules: "{user} made the room {type}", - room_joinrule_invite: "invite only", - room_joinrule_public: "public", - user_changed_room_name: "{user} changed room name to {name}", - user_changed_room_topic: "{user} changed room topic to {topic}", - unread_messages: "Unread messages", - replying_to_event: "REPLYING TO EVENT: {message}", - your_message: "Your message...", - scale_image: "Scale image", - user_is_typing: "{user} is typing", - users_are_typing: "{count} members are typing", - room_powerlevel_change: "{user} changed powerlevel of {changes}", - user_powerlevel_change_from_to: "{user} from {powerOld} to {powerNew}" - }, - room: { - members: "no members | 1 member | {count} members", - leave: "Leave" - }, - room_welcome: { - welcome: "Welcome!", - info: "Here are a few things to know about your group:", - join_public: "Anyone can join by opening this link: {link}", - join_invite: "Only people you invite can join.", - info_permissions: "You can change 'join permissions' and 'message history' at any time in the group settings.", - got_it: "Got it", - }, - new_room: { - new_room: "New Group", - done: "Done", - next: "Next", - name_room: "Name group", - join_permissions: "Join permissions", - set_join_permissions: "Set Join Permissions", - join_permissions_info: "These permissions determine how people can join the group and how easily others can be invited. They can be changed anytime.", - get_link: "Get link", - add_people: "Add people", - link_copied: "Link copied!", - public_info: "Anyone with a link", - public_description: "Get a link to share", - invite_info: "Only people added", - invite_description: "Choose from a list or search by account ID", - status_creating: "Creating room", - status_avatar_total: "Uploading avatar: {count} of {total}", - status_avatar: "Uploading avatar: {count}", - }, - device_list: { - title: "DEVICES", - blocked: "Blocked", - verified: "Verified", - not_verified: "Not verified", - }, - login: { - title: "Login", - username: "Username", - password: "Password", - username_required: "Username is required", - password_required: "Password is required", - login: "Login" - }, - profile: { - title: "My Profile", - temporary_identity: "This identity is temporary. Set a password to use it again", - set_password: "Set password", - change_name: "Change name", - change_password: "Change password", - password_old: "Old password", - password_new: "New password", - password_repeat: "Repeat new password", - display_name: "Display name", - - }, - join: { - title: "Welcome to {roomName}", - user_name_label: "User name", - shared_computer: "Using a shared computer", - joining_as: "You are joining as:", - join: "Join room", - join_guest: "Join as guest", - status_logging_in: "Logging in...", - status_joining: "Joining room...", - }, - invite: { - title: "Add Friends", - done: "Done", - send_invites_to: "Send invites to", - status_inviting: "Inviting friend {index} of {count}", - status_error: "Failed to invite one or or more friends!", - }, - leave: { - title_public: "Goodbye, {user}", - text_public: "You can always join this room again if you know the link.", - text_public_lastroom: "If you want to join this group again, you can join under a new identity. To keep {user}, {action}.", - title_invite: "Are you sure you want to leave?", - text_invite: "This group is locked. You cannot rejoin without a special permission.", - create_account: "create an account", - go_back: "Go back", - leave: "Leave" - }, - purge_room: { - title: "Purge room?", - info: "This operation will close the room for all members. It cannot be undone.", - button: "Purge room" - }, - room_info: { - title: "Info", - created_by: "Created by {user}", - permissions: "Permissions", - join_invite: "Room can be joined by invitation only", - join_public: "Anyone with the link can join", - link_copied: "Link copied!", - purge: "Purge room", - members: "Members", - user: "{user}", - user_you: "{user} (you)", - hide_all: "Hide", - show_all: "Show all", - my_profile: "My Profile", - identity: "You are logged in as {displayName}.", - identity_temporary: "Your identity {displayName} is temporary. You can change your name or set a password to keep it.", - view_profile: "View", - leave_room: "Leave group", - leave_room_info: "Note: This step cannot be undone. Make sure you want to logout and delete the chat forever.", - version_info: "Powered by Guardian Project. Version: {version}", - }, - room_info_sheet: { - this_room: "This group", - view_details: "View details", - create_room: "Create group" - }, - voice_recorder: { - swipe_to_cancel: "Swipe to cancel", - release_to_cancel: "Release to cancel", - failed_to_record: "Failed to record audio" - }, - power_level: { - admin: "administrator", - moderator: "moderator", - default: "default", - custom: "custom ({level})", - restricted: "restricted" - }, - fallbacks: { - audio_file: "Audio file", - video_file: "Video file", - original_text: "", - download_name: "Download", - } -} \ No newline at end of file diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json new file mode 100644 index 0000000..660c89b --- /dev/null +++ b/src/assets/translations/en.json @@ -0,0 +1,187 @@ +{ + "Keanu Weblite": "Keanu Weblite", + "menu": { + "start_private_chat": "Private chat with this user", + "reply": "Reply", + "edit": "Edit", + "delete": "Delete", + "download": "Download", + "ok": "Ok", + "cancel": "Cancel", + "send": "Send", + "back": "BACK", + "login": "Login", + "logout": "Logout" + }, + "message": { + "you": "You", + "user_created_room": "{user} created the room", + "user_aliased_room": "{user} made the room alias {alias}", + "user_changed_display_name": "{user} changed display name to {displayName}", + "user_changed_avatar": "{user} changed the avatar", + "user_changed_room_avatar": "{user} changed the room avatar", + "user_encrypted_room": "{user} made the room encrypted", + "user_was_invited": "{user} was invited to the chat...", + "user_joined": "{user} joined the chat", + "user_left": "{user} left the chat", + "user_said": "{user} said:", + "file_prefix": "File: ", + "edited": "(edited)", + "download_progress": "{percentage}% downloaded", + "upload_progress": "Uploaded {count}", + "upload_progress_with_total": "Uploaded {count} of {total}", + "user_changed_room_history": "{user} made room history {type}", + "room_history_world_readable": "readable by anyone", + "room_history_shared": "readable to all members in the room", + "room_history_invited": "readable to members from when they were invited", + "room_history_joined": "readable to members from when they joined", + "user_changed_join_rules": "{user} made the room {type}", + "room_joinrule_invite": "invite only", + "room_joinrule_public": "public", + "user_changed_room_name": "{user} changed room name to {name}", + "user_changed_room_topic": "{user} changed room topic to {topic}", + "unread_messages": "Unread messages", + "replying_to_event": "REPLYING TO EVENT: {message}", + "your_message": "Your message...", + "scale_image": "Scale image", + "user_is_typing": "{user} is typing", + "users_are_typing": "{count} members are typing", + "room_powerlevel_change": "{user} changed powerlevel of {changes}", + "user_powerlevel_change_from_to": "{user} from {powerOld} to {powerNew}" + }, + "room": { + "members": "no members | 1 member | {count} members", + "leave": "Leave" + }, + "room_welcome": { + "welcome": "Welcome!", + "info": "Here are a few things to know about your group:", + "join_public": "Anyone can join by opening this link: {link}", + "join_invite": "Only people you invite can join.", + "info_permissions": "You can change 'join permissions' and 'message history' at any time in the group settings.", + "got_it": "Got it" + }, + "new_room": { + "new_room": "New Group", + "done": "Done", + "next": "Next", + "name_room": "Name group", + "join_permissions": "Join permissions", + "set_join_permissions": "Set Join Permissions", + "join_permissions_info": "These permissions determine how people can join the group and how easily others can be invited. They can be changed anytime.", + "get_link": "Get link", + "add_people": "Add people", + "link_copied": "Link copied!", + "public_info": "Anyone with a link", + "public_description": "Get a link to share", + "invite_info": "Only people added", + "invite_description": "Choose from a list or search by account ID", + "status_creating": "Creating room", + "status_avatar_total": "Uploading avatar: {count} of {total}", + "status_avatar": "Uploading avatar: {count}" + }, + "device_list": { + "title": "DEVICES", + "blocked": "Blocked", + "verified": "Verified", + "not_verified": "Not verified" + }, + "login": { + "title": "Login", + "username": "Username", + "password": "Password", + "username_required": "Username is required", + "password_required": "Password is required", + "login": "Login" + }, + "profile": { + "title": "My Profile", + "temporary_identity": "This identity is temporary. Set a password to use it again", + "set_password": "Set password", + "change_name": "Change name", + "change_password": "Change password", + "password_old": "Old password", + "password_new": "New password", + "password_repeat": "Repeat new password", + "display_name": "Display name" + + }, + "join": { + "title": "Welcome to {roomName}", + "user_name_label": "User name", + "shared_computer": "Using a shared computer", + "joining_as": "You are joining as:", + "join": "Join room", + "join_guest": "Join as guest", + "status_logging_in": "Logging in...", + "status_joining": "Joining room..." + }, + "invite": { + "title": "Add Friends", + "done": "Done", + "send_invites_to": "Send invites to", + "status_inviting": "Inviting friend {index} of {count}", + "status_error": "Failed to invite one or or more friends!" + }, + "leave": { + "title_public": "Goodbye, {user}", + "text_public": "You can always join this room again if you know the link.", + "text_public_lastroom": "If you want to join this group again, you can join under a new identity. To keep {user}, {action}.", + "title_invite": "Are you sure you want to leave?", + "text_invite": "This group is locked. You cannot rejoin without a special permission.", + "create_account": "create an account", + "go_back": "Go back", + "leave": "Leave" + }, + "purge_room": { + "title": "Purge room?", + "info": "This operation will close the room for all members. It cannot be undone.", + "button": "Purge room" + }, + "room_info": { + "title": "Info", + "created_by": "Created by {user}", + "permissions": "Permissions", + "join_invite": "Room can be joined by invitation only", + "join_public": "Anyone with the link can join", + "link_copied": "Link copied!", + "purge": "Purge room", + "members": "Members", + "user": "{user}", + "user_you": "{user} (you)", + "hide_all": "Hide", + "show_all": "Show all", + "my_profile": "My Profile", + "identity": "You are logged in as {displayName}.", + "identity_temporary": "Your identity {displayName} is temporary. You can change your name or set a password to keep it.", + "view_profile": "View", + "leave_room": "Leave group", + "leave_room_info": "Note: This step cannot be undone. Make sure you want to logout and delete the chat forever.", + "version_info": "Powered by Guardian Project. Version: {version}" + }, + "room_info_sheet": { + "this_room": "This group", + "view_details": "View details", + "create_room": "Create group" + }, + "voice_recorder": { + "swipe_to_cancel": "Swipe to cancel", + "release_to_cancel": "Release to cancel", + "failed_to_record": "Failed to record audio", + "not_supported_title": "Not supported", + "not_supported_text": "Unfortunately, this browser does not support audio recording." + }, + "power_level": { + "admin": "administrator", + "moderator": "moderator", + "default": "default", + "custom": "custom ({level})", + "restricted": "restricted" + }, + "fallbacks": { + "audio_file": "Audio file", + "video_file": "Video file", + "original_text": "", + "download_name": "Download" + } +} \ No newline at end of file diff --git a/src/components/Chat.vue b/src/components/Chat.vue index c69fc4f..2a792e5 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -135,7 +135,11 @@
- {{$t('message.replying_to_event',{message: replyToEvent.getContent().body}) }} + {{ + $t("message.replying_to_event", { + message: replyToEvent.getContent().body, + }) + }}
@@ -185,6 +189,7 @@ v-if="!currentInput || currentInput.length == 0 || showRecorder" > mic + + mic +
- +
@@ -318,25 +339,23 @@ - {{$t('menu.cancel')}} + {{ + $t("menu.cancel") + }} {{$t('menu.send')}}{{ $t("menu.send") }} - + + + + + + {{ $t("voice_recorder.not_supported_title") }} + {{ $t("voice_recorder.not_supported_text") }} + + + + + {{ $t("menu.ok") }} + + + @@ -523,6 +565,7 @@ export default { selectedEvent: null, editedEvent: null, replyToEvent: null, + showNoRecordingAvailableDialog: false, showContextMenu: false, showContextMenuAnchor: null, showAvatarMenu: false, @@ -628,9 +671,11 @@ export default { typingMembersString() { const count = this.typingMembers.length; if (count > 1) { - return this.$t('message.users_are_typing',{count: count}); + return this.$t("message.users_are_typing", { count: count }); } else if (count > 0) { - return this.$t('message.user_is_typing',{user: this.typingMembers[0].name}); + return this.$t("message.user_is_typing", { + user: this.typingMembers[0].name, + }); } else { return ""; } @@ -1002,7 +1047,7 @@ export default { return RoomJoinRules; case "m.room.power_levels": - return RoomPowerLevelsChanged; + return RoomPowerLevelsChanged; case "m.room.encryption": return RoomEncrypted; @@ -1193,10 +1238,14 @@ export default { onUploadProgress(p) { if (p.total) { - this.currentSendProgress = - this.$t('message.upload_progress_with_total',{count: (p.loaded || 0), total: p.total}); + this.currentSendProgress = this.$t( + "message.upload_progress_with_total", + { count: p.loaded || 0, total: p.total } + ); } else { - this.currentSendProgress = this.$t('message.upload_progress',{count: (p.loaded || 0)}); + this.currentSendProgress = this.$t("message.upload_progress", { + count: p.loaded || 0, + }); } }, @@ -1382,7 +1431,8 @@ export default { const link = document.createElement("a"); link.href = url; link.target = "_blank"; - link.download = event.getContent().body || this.$t('fallbacks.download_name'); + link.download = + event.getContent().body || this.$t("fallbacks.download_name"); link.click(); URL.revokeObjectURL(url); }) diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 5e0b321..ab4a906 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -40,7 +40,7 @@