Update BetterFriendList.plugin.js

This commit is contained in:
Mirco Wittrien 2021-08-02 21:23:52 +02:00
parent 25bda92120
commit ea30cb205b
1 changed files with 140 additions and 25 deletions

View File

@ -2,7 +2,7 @@
* @name BetterFriendList * @name BetterFriendList
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 1.3.7 * @version 1.3.8
* @description Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount * @description Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,12 +17,12 @@ module.exports = (_ => {
"info": { "info": {
"name": "BetterFriendList", "name": "BetterFriendList",
"author": "DevilBro", "author": "DevilBro",
"version": "1.3.7", "version": "1.3.8",
"description": "Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount" "description": "Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount"
}, },
"changeLog": { "changeLog": {
"fixed": { "fixed": {
"Refresh": "No longer need to switch pages to refresh search/sort" "Favorites": "Added new Favorites Category, similar to hidden category but doesn't hide favorized friend from the other entries"
} }
} }
}; };
@ -75,11 +75,12 @@ module.exports = (_ => {
} : (([Plugin, BDFDB]) => { } : (([Plugin, BDFDB]) => {
var rerenderTimeout, sortKey, sortReversed, searchQuery, searchTimeout; var rerenderTimeout, sortKey, sortReversed, searchQuery, searchTimeout;
const favorizedFriendsSection = "FAVORIZED_FRIENDS";
const hiddenFriendsSection = "HIDDEN_FRIENDS"; const hiddenFriendsSection = "HIDDEN_FRIENDS";
const placeHolderId = "PLACEHOLDER_BETTERFRIENDLIST"; const placeHolderId = "PLACEHOLDER_BETTERFRIENDLIST";
var hiddenFriends = []; var favorizedFriends = [], hiddenFriends = [];
var currentSection, isHiddenSelected = false; var currentSection, isFavoritesSelected = false, isHiddenSelected = false;
const statusSortOrder = { const statusSortOrder = {
online: 0, online: 0,
@ -95,11 +96,12 @@ module.exports = (_ => {
onLoad () { onLoad () {
this.defaults = { this.defaults = {
general: { general: {
addTotalAmount: {value: true, description: "Adds total Amount for All/Requested/Blocked"}, addTotalAmount: {value: true, description: "Adds total Amount for All/Requested/Blocked"},
addHiddenCategory: {value: true, description: "Adds Hidden Category"}, addFavorizedCategory: {value: true, description: "Adds Favorites Category"},
addSortOptions: {value: true, description: "Adds Sort Options"}, addHiddenCategory: {value: true, description: "Adds Hidden Category"},
addSearchbar: {value: true, description: "Adds a Searchbar"}, addSortOptions: {value: true, description: "Adds Sort Options"},
addMutualGuild: {value: true, description: "Adds mutual Servers in Friend List"} addSearchbar: {value: true, description: "Adds a Searchbar"},
addMutualGuild: {value: true, description: "Adds mutual Servers in Friend List"}
} }
}; };
@ -148,14 +150,8 @@ module.exports = (_ => {
sortKey = null; sortKey = null;
sortReversed = false; sortReversed = false;
searchQuery = ""; searchQuery = "";
isFavoritesSelected = false;
isHiddenSelected = false; isHiddenSelected = false;
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.StatusMetaUtils, "getOnlineFriendCount", {after: e => {
if (this.settings.general.addHiddenCategory) for (let id of hiddenFriends) if (BDFDB.LibraryModules.RelationshipStore.isFriend(id)) {
const status = BDFDB.UserUtils.getStatus(id);
if (status && status != BDFDB.DiscordConstants.StatusTypes.OFFLINE && e.returnValue > 0) e.returnValue--;
}
}});
this.forceUpdateAll(); this.forceUpdateAll();
} }
@ -192,6 +188,8 @@ module.exports = (_ => {
} }
forceUpdateAll () { forceUpdateAll () {
favorizedFriends = BDFDB.DataUtils.load(this, "favorizedFriends");
favorizedFriends = !BDFDB.ArrayUtils.is(favorizedFriends) ? [] : favorizedFriends;
hiddenFriends = BDFDB.DataUtils.load(this, "hiddenFriends"); hiddenFriends = BDFDB.DataUtils.load(this, "hiddenFriends");
hiddenFriends = !BDFDB.ArrayUtils.is(hiddenFriends) ? [] : hiddenFriends; hiddenFriends = !BDFDB.ArrayUtils.is(hiddenFriends) ? [] : hiddenFriends;
@ -200,15 +198,33 @@ module.exports = (_ => {
} }
onUserContextMenu (e) { onUserContextMenu (e) {
if (this.settings.general.addHiddenCategory && e.instance.props.user) { if (e.instance.props.user) {
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "remove-friend"}); let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "remove-friend"});
let favorized = favorizedFriends.indexOf(e.instance.props.user.id) > -1;
let hidden = hiddenFriends.indexOf(e.instance.props.user.id) > -1; let hidden = hiddenFriends.indexOf(e.instance.props.user.id) > -1;
if (index > -1) children.splice(index + 1, 0, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { if (index > -1) children.splice(index + 1, 0, this.settings.general.addFavorizedCategory && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: favorized ? this.labels.context_unfavorizefriend : this.labels.context_favorizefriend,
id: BDFDB.ContextMenuUtils.createItemId(this.name, favorized ? "unfavorize-friend" : "favorize-friend"),
action: _ => {
if (favorized) BDFDB.ArrayUtils.remove(favorizedFriends, e.instance.props.user.id, true);
else {
favorizedFriends.push(e.instance.props.user.id);
BDFDB.ArrayUtils.remove(hiddenFriends, e.instance.props.user.id, true);
}
BDFDB.DataUtils.save(favorizedFriends, this, "favorizedFriends");
BDFDB.DataUtils.save(hiddenFriends, this, "hiddenFriends");
this.rerenderList();
}
}), this.settings.general.addHiddenCategory && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: hidden ? this.labels.context_unhidefriend : this.labels.context_hidefriend, label: hidden ? this.labels.context_unhidefriend : this.labels.context_hidefriend,
id: BDFDB.ContextMenuUtils.createItemId(this.name, hidden ? "unhide-friend" : "hide-friend"), id: BDFDB.ContextMenuUtils.createItemId(this.name, hidden ? "unhide-friend" : "hide-friend"),
action: _ => { action: _ => {
if (hidden) BDFDB.ArrayUtils.remove(hiddenFriends, e.instance.props.user.id, true); if (hidden) BDFDB.ArrayUtils.remove(hiddenFriends, e.instance.props.user.id, true);
else hiddenFriends.push(e.instance.props.user.id); else {
BDFDB.ArrayUtils.remove(favorizedFriends, e.instance.props.user.id, true);
hiddenFriends.push(e.instance.props.user.id);
}
BDFDB.DataUtils.save(favorizedFriends, this, "favorizedFriends");
BDFDB.DataUtils.save(hiddenFriends, this, "hiddenFriends"); BDFDB.DataUtils.save(hiddenFriends, this, "hiddenFriends");
this.rerenderList(); this.rerenderList();
} }
@ -219,9 +235,15 @@ module.exports = (_ => {
processTabBar (e) { processTabBar (e) {
if (e.instance.props.children && e.instance.props.children.some(c => c && c.props.id == BDFDB.DiscordConstants.FriendsSections.ADD_FRIEND)) { if (e.instance.props.children && e.instance.props.children.some(c => c && c.props.id == BDFDB.DiscordConstants.FriendsSections.ADD_FRIEND)) {
currentSection = e.instance.props.selectedItem; currentSection = e.instance.props.selectedItem;
isHiddenSelected = e.instance.props.selectedItem == hiddenFriendsSection; isFavoritesSelected = currentSection == favorizedFriendsSection;
isHiddenSelected = currentSection == hiddenFriendsSection;
if (!e.returnvalue) { if (!e.returnvalue) {
e.instance.props.children = e.instance.props.children.filter(c => c && c.props.id != hiddenFriendsSection); e.instance.props.children = e.instance.props.children.filter(c => c && c.props.id != favorizedFriendsSection && c.props.id != hiddenFriendsSection);
if (this.settings.general.addFavorizedCategory) e.instance.props.children.splice(e.instance.props.children.findIndex(c => c && c.props.id == BDFDB.DiscordConstants.FriendsSections.ONLINE) + 1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TabBar.Item, {
id: favorizedFriendsSection,
className: BDFDB.disCN.peoplestabbaritem,
children: this.labels.favorites
}));
if (this.settings.general.addHiddenCategory) e.instance.props.children.splice(e.instance.props.children.findIndex(c => c && c.props.id == BDFDB.DiscordConstants.FriendsSections.BLOCKED) + 1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TabBar.Item, { if (this.settings.general.addHiddenCategory) e.instance.props.children.splice(e.instance.props.children.findIndex(c => c && c.props.id == BDFDB.DiscordConstants.FriendsSections.BLOCKED) + 1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TabBar.Item, {
id: hiddenFriendsSection, id: hiddenFriendsSection,
className: BDFDB.disCN.peoplestabbaritem, className: BDFDB.disCN.peoplestabbaritem,
@ -239,8 +261,11 @@ module.exports = (_ => {
case BDFDB.DiscordConstants.FriendsSections.ALL: case BDFDB.DiscordConstants.FriendsSections.ALL:
newChildren.push(this.createBadge(relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.FRIEND])); newChildren.push(this.createBadge(relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.FRIEND]));
break; break;
case favorizedFriendsSection:
newChildren.push(this.createBadge(favorizedFriends.filter(id => relationships[id] == BDFDB.DiscordConstants.RelationshipTypes.FRIEND).length));
break;
case BDFDB.DiscordConstants.FriendsSections.ONLINE: case BDFDB.DiscordConstants.FriendsSections.ONLINE:
newChildren.push(this.createBadge(BDFDB.LibraryModules.StatusMetaUtils.getOnlineFriendCount())); newChildren.push(this.createBadge(Object.entries(relationships).filter(n => n[1] == BDFDB.DiscordConstants.RelationshipTypes.FRIEND && !(this.settings.general.addHiddenCategory && hiddenFriends.indexOf(n[0]) > -1) && BDFDB.LibraryModules.StatusMetaUtils.getStatus(n[0]) != BDFDB.DiscordConstants.StatusTypes.OFFLINE).length));
break; break;
case BDFDB.DiscordConstants.FriendsSections.PENDING: case BDFDB.DiscordConstants.FriendsSections.PENDING:
newChildren.push(this.createBadge(relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.PENDING_INCOMING], this.labels.incoming, relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.PENDING_INCOMING] > 0)); newChildren.push(this.createBadge(relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.PENDING_INCOMING], this.labels.incoming, relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.PENDING_INCOMING] > 0));
@ -261,6 +286,9 @@ module.exports = (_ => {
} }
processPeopleListSectionedLazy (e) { processPeopleListSectionedLazy (e) {
if (this.settings.general.addFavorizedCategory) {
if (isFavoritesSelected) e.instance.props.statusSections = [].concat(e.instance.props.statusSections).map(section => [].concat(section).filter(entry => entry && entry.user && favorizedFriends.indexOf(entry.user.id) > -1));
}
if (this.settings.general.addHiddenCategory) { if (this.settings.general.addHiddenCategory) {
if (isHiddenSelected) e.instance.props.statusSections = [].concat(e.instance.props.statusSections).map(section => [].concat(section).filter(entry => entry && entry.user && hiddenFriends.indexOf(entry.user.id) > -1)); if (isHiddenSelected) e.instance.props.statusSections = [].concat(e.instance.props.statusSections).map(section => [].concat(section).filter(entry => entry && entry.user && hiddenFriends.indexOf(entry.user.id) > -1));
else if (([].concat(e.instance.props.statusSections).flat(10)[0] || {}).type == BDFDB.DiscordConstants.RelationshipTypes.FRIEND) e.instance.props.statusSections = [].concat(e.instance.props.statusSections).map(section => [].concat(section).filter(entry => entry && entry.user && hiddenFriends.indexOf(entry.user.id) == -1)); else if (([].concat(e.instance.props.statusSections).flat(10)[0] || {}).type == BDFDB.DiscordConstants.RelationshipTypes.FRIEND) e.instance.props.statusSections = [].concat(e.instance.props.statusSections).map(section => [].concat(section).filter(entry => entry && entry.user && hiddenFriends.indexOf(entry.user.id) == -1));
@ -303,7 +331,7 @@ module.exports = (_ => {
children: [ children: [
BDFDB.ReactUtils.createElement("div", { BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN._betterfriendlisttitle, className: BDFDB.disCN._betterfriendlisttitle,
children: this.settings.general.addHiddenCategory && isHiddenSelected ? `${this.labels.hidden} - ${users.filter(u => u && u.key != placeHolderId).length}` : e2.returnValue.replace(users.length, users.filter(u => u && u.key != placeHolderId).length) children: this.settings.general.addFavorizedCategory && isFavoritesSelected ? `${this.labels.favorites} - ${users.filter(u => u && u.key != placeHolderId).length}` : this.settings.general.addHiddenCategory && isHiddenSelected ? `${this.labels.hidden} - ${users.filter(u => u && u.key != placeHolderId).length}` : e2.returnValue.replace(users.length, users.filter(u => u && u.key != placeHolderId).length)
}), }),
this.settings.general.addSortOptions && [ this.settings.general.addSortOptions && [
{key: "usernameLower", label: BDFDB.LanguageUtils.LanguageStrings.FRIENDS_COLUMN_NAME}, {key: "usernameLower", label: BDFDB.LanguageUtils.LanguageStrings.FRIENDS_COLUMN_NAME},
@ -358,7 +386,7 @@ module.exports = (_ => {
if (e.returnvalue && !e.instance.props.statusSections.flat(10).length) e.returnvalue.props.children = BDFDB.ReactUtils.createElement("div", { if (e.returnvalue && !e.instance.props.statusSections.flat(10).length) e.returnvalue.props.children = BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.peopleslistempty, className: BDFDB.disCN.peopleslistempty,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FriendsEmptyState, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FriendsEmptyState, {
type: !currentSection || currentSection == hiddenFriendsSection ? BDFDB.DiscordConstants.FriendsSections.ALL : currentSection type: !currentSection || !Object.entries(BDFDB.DiscordConstants.FriendsSections).find(n => n[1] == currentSection) ? BDFDB.DiscordConstants.FriendsSections.ALL : currentSection
}) })
}); });
} }
@ -434,232 +462,319 @@ module.exports = (_ => {
switch (BDFDB.LanguageUtils.getLanguage().id) { switch (BDFDB.LanguageUtils.getLanguage().id) {
case "bg": // Bulgarian case "bg": // Bulgarian
return { return {
context_favorizefriend: "Добавете приятел към любими",
context_hidefriend: "Скрий приятел", context_hidefriend: "Скрий приятел",
context_unfavorizefriend: "Премахване на приятел от любимите",
context_unhidefriend: "Разкрий приятел", context_unhidefriend: "Разкрий приятел",
favorites: "Любими",
hidden: "Скрити", hidden: "Скрити",
incoming: "Входящи", incoming: "Входящи",
outgoing: "Изходящи" outgoing: "Изходящи"
}; };
case "cs": // Czech case "cs": // Czech
return { return {
context_favorizefriend: "Přidat přítele do oblíbených",
context_hidefriend: "Skrýt přítele", context_hidefriend: "Skrýt přítele",
context_unfavorizefriend: "Odebrat přítele z oblíbených",
context_unhidefriend: "Odkrýt přítele", context_unhidefriend: "Odkrýt přítele",
favorites: "Oblíbené",
hidden: "Skrytý", hidden: "Skrytý",
incoming: "Přicházející", incoming: "Přicházející",
outgoing: "Odchozí" outgoing: "Odchozí"
}; };
case "da": // Danish case "da": // Danish
return { return {
context_favorizefriend: "Føj ven til favoritter",
context_hidefriend: "Skjul ven", context_hidefriend: "Skjul ven",
context_unfavorizefriend: "Fjern ven fra favoritter",
context_unhidefriend: "Skjul ven", context_unhidefriend: "Skjul ven",
favorites: "Favoritter",
hidden: "Skjult", hidden: "Skjult",
incoming: "Indgående", incoming: "Indgående",
outgoing: "Udgående" outgoing: "Udgående"
}; };
case "de": // German case "de": // German
return { return {
context_favorizefriend: "Freund zu Favoriten hinzufügen",
context_hidefriend: "Freund ausblenden", context_hidefriend: "Freund ausblenden",
context_unfavorizefriend: "Freund aus Favoriten entfernen",
context_unhidefriend: "Freund einblenden", context_unhidefriend: "Freund einblenden",
favorites: "Favoriten",
hidden: "Versteckt", hidden: "Versteckt",
incoming: "Eingehend", incoming: "Eingehend",
outgoing: "Ausgehend" outgoing: "Ausgehend"
}; };
case "el": // Greek case "el": // Greek
return { return {
context_favorizefriend: "Προσθήκη φίλου στα αγαπημένα",
context_hidefriend: "Απόκρυψη φίλου", context_hidefriend: "Απόκρυψη φίλου",
context_unfavorizefriend: "Κατάργηση φίλου από τα αγαπημένα",
context_unhidefriend: "Απόκρυψη φίλου", context_unhidefriend: "Απόκρυψη φίλου",
favorites: "Αγαπημένα",
hidden: "Κρυμμένος", hidden: "Κρυμμένος",
incoming: "Εισερχόμενος", incoming: "Εισερχόμενος",
outgoing: "Εξερχόμενος" outgoing: "Εξερχόμενος"
}; };
case "es": // Spanish case "es": // Spanish
return { return {
context_favorizefriend: "Agregar amigo a favoritos",
context_hidefriend: "Ocultar amigo", context_hidefriend: "Ocultar amigo",
context_unfavorizefriend: "Quitar amigo de favoritos",
context_unhidefriend: "Mostrar amigo", context_unhidefriend: "Mostrar amigo",
favorites: "Favoritos",
hidden: "Oculto", hidden: "Oculto",
incoming: "Entrante", incoming: "Entrante",
outgoing: "Saliente" outgoing: "Saliente"
}; };
case "fi": // Finnish case "fi": // Finnish
return { return {
context_favorizefriend: "Lisää ystävä suosikkeihin",
context_hidefriend: "Piilota ystävä", context_hidefriend: "Piilota ystävä",
context_unfavorizefriend: "Poista ystävä suosikeista",
context_unhidefriend: "Näytä ystävä", context_unhidefriend: "Näytä ystävä",
favorites: "Suosikit",
hidden: "Piilotettu", hidden: "Piilotettu",
incoming: "Saapuva", incoming: "Saapuva",
outgoing: "Lähtevä" outgoing: "Lähtevä"
}; };
case "fr": // French case "fr": // French
return { return {
context_favorizefriend: "Ajouter un ami aux favoris",
context_hidefriend: "Masquer l'ami", context_hidefriend: "Masquer l'ami",
context_unfavorizefriend: "Supprimer un ami des favoris",
context_unhidefriend: "Afficher l'ami", context_unhidefriend: "Afficher l'ami",
favorites: "Favoris",
hidden: "Caché", hidden: "Caché",
incoming: "Entrant", incoming: "Entrant",
outgoing: "Sortant" outgoing: "Sortant"
}; };
case "hi": // Hindi case "hi": // Hindi
return { return {
context_favorizefriend: "मित्र को पसंदीदा में जोड़ें",
context_hidefriend: "दोस्त छुपाएं", context_hidefriend: "दोस्त छुपाएं",
context_unfavorizefriend: "मित्र को पसंदीदा से हटाएं",
context_unhidefriend: "मित्र दिखाएँ", context_unhidefriend: "मित्र दिखाएँ",
favorites: "पसंदीदा",
hidden: "छिपा हुआ", hidden: "छिपा हुआ",
incoming: "आने वाली", incoming: "आने वाली",
outgoing: "निवर्तमान" outgoing: "निवर्तमान"
}; };
case "hr": // Croatian case "hr": // Croatian
return { return {
context_favorizefriend: "Dodaj prijatelja u favorite",
context_hidefriend: "Sakrij prijatelja", context_hidefriend: "Sakrij prijatelja",
context_unfavorizefriend: "Ukloni prijatelja iz omiljenih",
context_unhidefriend: "Otkrij prijatelja", context_unhidefriend: "Otkrij prijatelja",
favorites: "Favoriti",
hidden: "Skriven", hidden: "Skriven",
incoming: "Dolazni", incoming: "Dolazni",
outgoing: "Odlazni" outgoing: "Odlazni"
}; };
case "hu": // Hungarian case "hu": // Hungarian
return { return {
context_favorizefriend: "Ismerős hozzáadása a kedvencekhez",
context_hidefriend: "Barát elrejtése", context_hidefriend: "Barát elrejtése",
context_unfavorizefriend: "Ismerős eltávolítása a kedvencekből",
context_unhidefriend: "Barát megjelenítése", context_unhidefriend: "Barát megjelenítése",
favorites: "Kedvencek",
hidden: "Rejtett", hidden: "Rejtett",
incoming: "Beérkező", incoming: "Beérkező",
outgoing: "Kimenő" outgoing: "Kimenő"
}; };
case "it": // Italian case "it": // Italian
return { return {
context_favorizefriend: "Aggiungi amico ai preferiti",
context_hidefriend: "Nascondi amico", context_hidefriend: "Nascondi amico",
context_unfavorizefriend: "Rimuovi amico dai preferiti",
context_unhidefriend: "Scopri amico", context_unhidefriend: "Scopri amico",
favorites: "Preferiti",
hidden: "Nascosto", hidden: "Nascosto",
incoming: "In arrivo", incoming: "In arrivo",
outgoing: "Estroverso" outgoing: "Estroverso"
}; };
case "ja": // Japanese case "ja": // Japanese
return { return {
context_favorizefriend: "お気に入りに友達を追加する",
context_hidefriend: "友達を隠す", context_hidefriend: "友達を隠す",
context_unfavorizefriend: "お気に入りから友達を削除する",
context_unhidefriend: "友達を再表示", context_unhidefriend: "友達を再表示",
favorites: "お気に入り",
hidden: "隠し", hidden: "隠し",
incoming: "着信", incoming: "着信",
outgoing: "発信" outgoing: "発信"
}; };
case "ko": // Korean case "ko": // Korean
return { return {
context_favorizefriend: "즐겨찾기에 친구 추가",
context_hidefriend: "친구 숨기기", context_hidefriend: "친구 숨기기",
context_unfavorizefriend: "즐겨찾기에서 친구 제거",
context_unhidefriend: "친구 숨기기 해제", context_unhidefriend: "친구 숨기기 해제",
favorites: "즐겨찾기",
hidden: "숨겨진", hidden: "숨겨진",
incoming: "들어오는", incoming: "들어오는",
outgoing: "나가는" outgoing: "나가는"
}; };
case "lt": // Lithuanian case "lt": // Lithuanian
return { return {
context_favorizefriend: "Pridėti draugą prie mėgstamiausių",
context_hidefriend: "Slėpti draugą", context_hidefriend: "Slėpti draugą",
context_unfavorizefriend: "Pašalinti draugą iš mėgstamiausių",
context_unhidefriend: "Nerodyti draugo", context_unhidefriend: "Nerodyti draugo",
favorites: "Mėgstamiausi",
hidden: "Paslėpta", hidden: "Paslėpta",
incoming: "Gaunamasis", incoming: "Gaunamasis",
outgoing: "Išeinantis" outgoing: "Išeinantis"
}; };
case "nl": // Dutch case "nl": // Dutch
return { return {
context_favorizefriend: "Vriend toevoegen aan favorieten",
context_hidefriend: "Vriend verbergen", context_hidefriend: "Vriend verbergen",
context_unfavorizefriend: "Vriend uit favorieten verwijderen",
context_unhidefriend: "Vriend zichtbaar maken", context_unhidefriend: "Vriend zichtbaar maken",
favorites: "Favorieten",
hidden: "Verborgen", hidden: "Verborgen",
incoming: "Inkomend", incoming: "Inkomend",
outgoing: "Uitgaand" outgoing: "Uitgaand"
}; };
case "no": // Norwegian case "no": // Norwegian
return { return {
context_favorizefriend: "Legg til en venn i favoritter",
context_hidefriend: "Skjul venn", context_hidefriend: "Skjul venn",
context_unfavorizefriend: "Fjern venn fra favoritter",
context_unhidefriend: "Skjul venn", context_unhidefriend: "Skjul venn",
favorites: "Favoritter",
hidden: "Skjult", hidden: "Skjult",
incoming: "Innkommende", incoming: "Innkommende",
outgoing: "Utgående" outgoing: "Utgående"
}; };
case "pl": // Polish case "pl": // Polish
return { return {
context_favorizefriend: "Dodaj przyjaciela do ulubionych",
context_hidefriend: "Ukryj przyjaciela", context_hidefriend: "Ukryj przyjaciela",
context_unfavorizefriend: "Usuń przyjaciela z ulubionych",
context_unhidefriend: "Odkryj przyjaciela", context_unhidefriend: "Odkryj przyjaciela",
favorites: "Ulubione",
hidden: "Ukryty", hidden: "Ukryty",
incoming: "Przychodzący", incoming: "Przychodzący",
outgoing: "Towarzyski" outgoing: "Towarzyski"
}; };
case "pt-BR": // Portuguese (Brazil) case "pt-BR": // Portuguese (Brazil)
return { return {
context_favorizefriend: "Adicionar amigo aos favoritos",
context_hidefriend: "Esconder Amigo", context_hidefriend: "Esconder Amigo",
context_unfavorizefriend: "Remover amigo dos favoritos",
context_unhidefriend: "Reexibir amigo", context_unhidefriend: "Reexibir amigo",
favorites: "Favoritos",
hidden: "Escondido", hidden: "Escondido",
incoming: "Entrada", incoming: "Entrada",
outgoing: "Extrovertido" outgoing: "Extrovertido"
}; };
case "ro": // Romanian case "ro": // Romanian
return { return {
context_favorizefriend: "Adaugă prieten la favorite",
context_hidefriend: "Ascunde prietenul", context_hidefriend: "Ascunde prietenul",
context_unfavorizefriend: "Scoateți prietenul din favorite",
context_unhidefriend: "Afișează prietenul", context_unhidefriend: "Afișează prietenul",
favorites: "Favorite",
hidden: "Ascuns", hidden: "Ascuns",
incoming: "Primite", incoming: "Primite",
outgoing: "De ieșire" outgoing: "De ieșire"
}; };
case "ru": // Russian case "ru": // Russian
return { return {
context_favorizefriend: "Добавить друга в избранное",
context_hidefriend: "Скрыть друга", context_hidefriend: "Скрыть друга",
context_unfavorizefriend: "Удалить друга из избранного",
context_unhidefriend: "Показать друга", context_unhidefriend: "Показать друга",
favorites: "Избранное",
hidden: "Скрытый", hidden: "Скрытый",
incoming: "Входящий", incoming: "Входящий",
outgoing: "Исходящий" outgoing: "Исходящий"
}; };
case "sv": // Swedish case "sv": // Swedish
return { return {
context_favorizefriend: "Lägg till vän till favoriter",
context_hidefriend: "Dölj vän", context_hidefriend: "Dölj vän",
context_unfavorizefriend: "Ta bort vän från favoriter",
context_unhidefriend: "Göm din vän", context_unhidefriend: "Göm din vän",
favorites: "Favoriter",
hidden: "Dold", hidden: "Dold",
incoming: "Inkommande", incoming: "Inkommande",
outgoing: "Utgående" outgoing: "Utgående"
}; };
case "th": // Thai case "th": // Thai
return { return {
context_favorizefriend: "เพิ่มเพื่อนในรายการโปรด",
context_hidefriend: "ซ่อนเพื่อน", context_hidefriend: "ซ่อนเพื่อน",
context_unfavorizefriend: "ลบเพื่อนออกจากรายการโปรด",
context_unhidefriend: "เลิกซ่อนเพื่อน", context_unhidefriend: "เลิกซ่อนเพื่อน",
favorites: "รายการโปรด",
hidden: "ซ่อนเร้น", hidden: "ซ่อนเร้น",
incoming: "ขาเข้า", incoming: "ขาเข้า",
outgoing: "ขาออก" outgoing: "ขาออก"
}; };
case "tr": // Turkish case "tr": // Turkish
return { return {
context_favorizefriend: "Favorilere arkadaş ekle",
context_hidefriend: "Arkadaşı Gizle", context_hidefriend: "Arkadaşı Gizle",
context_unfavorizefriend: "Arkadaşını favorilerden kaldır",
context_unhidefriend: "Arkadaşı Göster", context_unhidefriend: "Arkadaşı Göster",
favorites: "Favoriler",
hidden: "Gizli", hidden: "Gizli",
incoming: "Gelen", incoming: "Gelen",
outgoing: "Dışa dönük" outgoing: "Dışa dönük"
}; };
case "uk": // Ukrainian case "uk": // Ukrainian
return { return {
context_favorizefriend: "Додати друга у вибране",
context_hidefriend: "Сховати друга", context_hidefriend: "Сховати друга",
context_unfavorizefriend: "Видалити друга з вибраного",
context_unhidefriend: "Показати друга", context_unhidefriend: "Показати друга",
favorites: "Вибране",
hidden: "Прихований", hidden: "Прихований",
incoming: "Вхідні", incoming: "Вхідні",
outgoing: "Вихідний" outgoing: "Вихідний"
}; };
case "vi": // Vietnamese case "vi": // Vietnamese
return { return {
context_favorizefriend: "Thêm bạn bè vào danh sách yêu thích",
context_hidefriend: "Ẩn bạn bè", context_hidefriend: "Ẩn bạn bè",
context_unfavorizefriend: "Xóa bạn bè khỏi danh sách yêu thích",
context_unhidefriend: "Bỏ ẩn bạn bè", context_unhidefriend: "Bỏ ẩn bạn bè",
favorites: "Yêu thích",
hidden: "Ẩn", hidden: "Ẩn",
incoming: "Mới đến", incoming: "Mới đến",
outgoing: "Hướng ngoaị" outgoing: "Hướng ngoaị"
}; };
case "zh-CN": // Chinese (China) case "zh-CN": // Chinese (China)
return { return {
context_favorizefriend: "将朋友添加到收藏夹",
context_hidefriend: "隐藏朋友", context_hidefriend: "隐藏朋友",
context_unfavorizefriend: "从收藏夹中删除朋友",
context_unhidefriend: "取消隐藏好友", context_unhidefriend: "取消隐藏好友",
favorites: "收藏夹",
hidden: "隐", hidden: "隐",
incoming: "进来的", incoming: "进来的",
outgoing: "外向" outgoing: "外向"
}; };
case "zh-TW": // Chinese (Taiwan) case "zh-TW": // Chinese (Taiwan)
return { return {
context_favorizefriend: "將朋友添加到收藏夾",
context_hidefriend: "隱藏朋友", context_hidefriend: "隱藏朋友",
context_unfavorizefriend: "從收藏夾中刪除朋友",
context_unhidefriend: "取消隱藏好友", context_unhidefriend: "取消隱藏好友",
favorites: "收藏夾",
hidden: "隱", hidden: "隱",
incoming: "傳入", incoming: "傳入",
outgoing: "外向" outgoing: "外向"
}; };
default: // English default: // English
return { return {
context_favorizefriend: "Add Friend to Favorites",
context_hidefriend: "Hide Friend", context_hidefriend: "Hide Friend",
context_unfavorizefriend: "Remove Friend from Favorites",
context_unhidefriend: "Unhide Friend", context_unhidefriend: "Unhide Friend",
favorites: "Favorites",
hidden: "Hidden", hidden: "Hidden",
incoming: "Incoming", incoming: "Incoming",
outgoing: "Outgoing" outgoing: "Outgoing"