lang: translation of profile page
This commit is contained in:
parent
4cff5eed37
commit
7e5628344c
@ -32,7 +32,7 @@ class Profiles
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {String} username
|
* @param {String} username
|
||||||
* @returns {?Profile}
|
* @returns {?Promise<Profile>}
|
||||||
*/
|
*/
|
||||||
async getProfile(username)
|
async getProfile(username)
|
||||||
{
|
{
|
||||||
|
@ -29,5 +29,11 @@
|
|||||||
"registerAlreadyAccount": "Already have an account?",
|
"registerAlreadyAccount": "Already have an account?",
|
||||||
"registerLogin": "Login",
|
"registerLogin": "Login",
|
||||||
"404WindowTitle": "Not Found",
|
"404WindowTitle": "Not Found",
|
||||||
"SearchWindowTitle": "Search"
|
"SearchWindowTitle": "Search",
|
||||||
|
"profileAddFriend": "Ask Friend",
|
||||||
|
"profileRemoveFriend": "Remove Friend",
|
||||||
|
"profileDenyRequest": "Decline Friend",
|
||||||
|
"profileAcceptRequest": "Accept Friend",
|
||||||
|
"profileUnblock": "Unblock",
|
||||||
|
"profileBlock": "Block"
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,11 @@
|
|||||||
"registerAlreadyAccount": "Déjà un compte?",
|
"registerAlreadyAccount": "Déjà un compte?",
|
||||||
"registerLogin": "Connexion",
|
"registerLogin": "Connexion",
|
||||||
"404WindowTitle": "Pas trouvé",
|
"404WindowTitle": "Pas trouvé",
|
||||||
"SearchWindowTitle": "Recherche"
|
"SearchWindowTitle": "Recherche",
|
||||||
|
"profileAddFriend": "Demander en ami",
|
||||||
|
"profileRemoveFriend": "Retirer l'ami",
|
||||||
|
"profileDenyRequest": "Refuser l'ami",
|
||||||
|
"profileAcceptRequest": "Accepter l'ami",
|
||||||
|
"profileUnblock": "Débloquer",
|
||||||
|
"profileBlock": "Bloquer"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import AbstractView from "./abstracts/AbstractView.js";
|
import AbstractView from "./abstracts/AbstractView.js";
|
||||||
import { client } from "../index.js"
|
import { client, lang } from "../index.js"
|
||||||
|
|
||||||
export default class extends AbstractView {
|
export default class extends AbstractView {
|
||||||
constructor(params) {
|
constructor(params) {
|
||||||
@ -65,9 +65,9 @@ export default class extends AbstractView {
|
|||||||
this.blockButton();
|
this.blockButton();
|
||||||
};
|
};
|
||||||
if (this.profile.isBlocked)
|
if (this.profile.isBlocked)
|
||||||
block.textContent = "Deblock";
|
block.textContent = lang.get('profileUnblock', 'Unblock');
|
||||||
else
|
else
|
||||||
block.textContent = "Block";
|
block.textContent = lang.get('profileBlock', 'Block');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,13 +86,13 @@ export default class extends AbstractView {
|
|||||||
friend.remove();
|
friend.remove();
|
||||||
|
|
||||||
yes.id = "yes";
|
yes.id = "yes";
|
||||||
yes.textContent = "Accept Friend";
|
yes.textContent = lang.get('profileAcceptRequest', 'Accept Friend');
|
||||||
yes.onclick = async () => {
|
yes.onclick = async () => {
|
||||||
client.notice.accept_friend(this.user_id);
|
client.notice.accept_friend(this.user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
no.id = "no";
|
no.id = "no";
|
||||||
no.textContent = "Refuse Friend";
|
no.textContent = lang.get('profileDenyRequest', 'Decline Friend');
|
||||||
no.onclick = async () => {
|
no.onclick = async () => {
|
||||||
client.notice.refuse_friend(this.user_id);
|
client.notice.refuse_friend(this.user_id);
|
||||||
}
|
}
|
||||||
@ -117,9 +117,9 @@ export default class extends AbstractView {
|
|||||||
this.friendButton();
|
this.friendButton();
|
||||||
};
|
};
|
||||||
if (this.profile.isFriend)
|
if (this.profile.isFriend)
|
||||||
friend.textContent = "Remove Friend";
|
friend.textContent = lang.get('profileRemoveFriend', 'Remove Friend');
|
||||||
else {
|
else {
|
||||||
friend.textContent = "Ask Friend";
|
friend.textContent = lang.get('profileAddFriend', 'Ask Friend');
|
||||||
}
|
}
|
||||||
this.info.appendChild(friend);
|
this.info.appendChild(friend);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user