Switch translations to JSON and fix some errors

Issue #41. Should also resolve issue #126.
This commit is contained in:
N-Pex 2021-05-25 11:14:29 +02:00
parent 473cabbc02
commit c9f237d8c1
5 changed files with 190 additions and 190 deletions

View file

@ -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: "<original text>",
download_name: "Download",
}
}

View file

@ -0,0 +1,185 @@
{
"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": "<original text>",
"download_name": "Download"
}
}

View file

@ -308,7 +308,7 @@
>
<v-switch
v-if="currentImageInput && currentImageInput.scaled"
:label="$('message.scale_image')"
:label="$t('message.scale_image')"
v-model="currentImageInput.useScaled"
/>
</div>

View file

@ -40,7 +40,7 @@
</v-card>
<v-card class="account ma-3" flat>
<v-card-title class="h2">{{ $t("room_info.permissions") }})</v-card-title>
<v-card-title class="h2">{{ $t("room_info.permissions") }}</v-card-title>
<v-card-text>
<v-radio-group
v-model="roomJoinRule"
@ -71,7 +71,7 @@
block
class="filled-button"
@click.stop="showPurgeConfirmation = true"
>{{ $("room_info.purge") }}</v-btn
>{{ $t("room_info.purge") }}</v-btn
>
<!-- <div v-if="anyoneCanJoin">
<div>Anyone with a link can join.</div>

View file

@ -10,10 +10,10 @@ function importAll(r) {
// Remove"./"
const parts = res.split("/");
const locale = parts[1].split(".")[0];
messages[locale] = r(res).default;
messages[locale] = r(res);
});
}
importAll(require.context('@/assets/translations/', true, /\.js$/));
importAll(require.context('@/assets/translations/', true, /\.json$/));
export default new VueI18n({