2018-10-11 10:21:26 +02:00
|
|
|
|
//META{"name":"PinDMs"}*//
|
|
|
|
|
|
|
|
|
|
class PinDMs {
|
|
|
|
|
initConstructor () {
|
|
|
|
|
this.pinDMEntryMarkup =
|
|
|
|
|
`<div class="${BDFDB.disCN.contextmenuitem} pindm-item">
|
|
|
|
|
<span>REPLACE_context_pindm_text</span>
|
|
|
|
|
<div class="${BDFDB.disCN.contextmenuhint}"></div>
|
|
|
|
|
</div>`;
|
|
|
|
|
|
2018-11-06 22:48:28 +01:00
|
|
|
|
this.unpinDMEntryMarkup =
|
|
|
|
|
`<div class="${BDFDB.disCN.contextmenuitem} unpindm-item">
|
|
|
|
|
<span>REPLACE_context_unpindm_text</span>
|
|
|
|
|
<div class="${BDFDB.disCN.contextmenuhint}"></div>
|
|
|
|
|
</div>`;
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getName () {return "PinDMs";}
|
|
|
|
|
|
|
|
|
|
getDescription () {return "Allows you to pin DMs, making them appear at the top of your DM-list.";}
|
|
|
|
|
|
2018-12-20 22:42:59 +01:00
|
|
|
|
getVersion () {return "1.2.4";}
|
2018-10-11 10:21:26 +02:00
|
|
|
|
|
|
|
|
|
getAuthor () {return "DevilBro";}
|
|
|
|
|
|
|
|
|
|
//legacy
|
|
|
|
|
load () {}
|
|
|
|
|
|
|
|
|
|
start () {
|
|
|
|
|
var libraryScript = null;
|
|
|
|
|
if (typeof BDFDB !== "object" || typeof BDFDB.isLibraryOutdated !== "function" || BDFDB.isLibraryOutdated()) {
|
|
|
|
|
libraryScript = document.querySelector('head script[src="https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js"]');
|
|
|
|
|
if (libraryScript) libraryScript.remove();
|
|
|
|
|
libraryScript = document.createElement("script");
|
|
|
|
|
libraryScript.setAttribute("type", "text/javascript");
|
|
|
|
|
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js");
|
|
|
|
|
document.head.appendChild(libraryScript);
|
|
|
|
|
}
|
|
|
|
|
this.startTimeout = setTimeout(() => {this.initialize();}, 30000);
|
|
|
|
|
if (typeof BDFDB === "object" && typeof BDFDB.isLibraryOutdated === "function") this.initialize();
|
|
|
|
|
else libraryScript.addEventListener("load", () => {this.initialize();});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initialize () {
|
|
|
|
|
if (typeof BDFDB === "object") {
|
|
|
|
|
BDFDB.loadMessage(this);
|
|
|
|
|
|
2018-12-20 22:54:42 +01:00
|
|
|
|
this.UserStore = BDFDB.WebModules.findByProperties("getUsers", "getUser");
|
|
|
|
|
this.ChannelUtils = BDFDB.WebModules.findByProperties("getDMFromUserId");
|
2018-10-11 10:21:26 +02:00
|
|
|
|
|
|
|
|
|
var observer = null;
|
|
|
|
|
|
|
|
|
|
observer = new MutationObserver((changes, _) => {
|
|
|
|
|
changes.forEach(
|
|
|
|
|
(change, i) => {
|
|
|
|
|
if (change.addedNodes) {
|
|
|
|
|
change.addedNodes.forEach((node) => {
|
|
|
|
|
if (node && node.nodeType == 1 && node.className.includes(BDFDB.disCN.contextmenu)) {
|
|
|
|
|
this.onContextMenu(node);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
BDFDB.addObserver(this, BDFDB.dotCN.appmount, {name:"dmContextObserver",instance:observer}, {childList: true});
|
|
|
|
|
|
2018-11-29 17:33:33 +01:00
|
|
|
|
$(BDFDB.dotCN.appmount)
|
|
|
|
|
.on("click." + this.getName(), BDFDB.dotCNS.dmchannels + BDFDB.dotCNS.dmchannel, (e) => {
|
|
|
|
|
let instance = BDFDB.getReactInstance(e.currentTarget);
|
|
|
|
|
if (instance.return.return.return.memoizedProps.ispin) {
|
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
|
|
|
|
this.oldSrollerPos = dmsscroller.scrollTop;
|
2018-11-30 18:09:47 +01:00
|
|
|
|
setTimeout(() => {this.oldSrollerPos = null;},1000);
|
2018-11-29 17:33:33 +01:00
|
|
|
|
}
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
2018-11-29 17:33:33 +01:00
|
|
|
|
})
|
|
|
|
|
.on("click." + this.getName(), BDFDB.dotCNS.dmchannels + BDFDB.dotCNS.dmchannel + BDFDB.dotCN.dmchannelclose, (e) => {
|
|
|
|
|
let instance = BDFDB.getReactInstance(e.currentTarget);
|
|
|
|
|
if (instance.return.return.return.return.return.memoizedProps.ispin) {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
|
|
|
|
this.removePinnedDM(instance.return.return.return.return.return.memoizedProps.channel.id, BDFDB.getReactInstance(dmsscroller).return.return.return.memoizedProps.children);
|
|
|
|
|
this.forceUpdateScroller(dmsscroller);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2018-10-11 10:21:26 +02:00
|
|
|
|
|
2018-11-29 15:19:09 +01:00
|
|
|
|
setTimeout(() => {this.patchDMsScroller();},1000);
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
console.error(this.getName() + ": Fatal Error: Could not load BD functions!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
stop () {
|
|
|
|
|
if (typeof BDFDB === "object") {
|
2018-11-26 23:36:18 +01:00
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
|
|
|
|
let dms = BDFDB.getReactInstance(dmsscroller).return.return.return.memoizedProps.children;
|
|
|
|
|
let amount = 0;
|
|
|
|
|
let insertpoint = null;
|
|
|
|
|
for (let i in dms) {
|
|
|
|
|
let ele = dms[i];
|
|
|
|
|
if (ele && ele.pinned) {
|
|
|
|
|
delete ele.pinned;
|
|
|
|
|
if (ele.props.ispin) {
|
|
|
|
|
if (ele.type == "header") insertpoint = i;
|
|
|
|
|
amount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dms.splice(insertpoint, amount);
|
|
|
|
|
this.forceUpdateScroller(dmsscroller);
|
|
|
|
|
}
|
2018-10-11 10:21:26 +02:00
|
|
|
|
BDFDB.unloadMessage(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// begin of own functions
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
changeLanguageStrings () {
|
2018-10-11 10:21:26 +02:00
|
|
|
|
this.pinDMEntryMarkup = this.pinDMEntryMarkup.replace("REPLACE_context_pindm_text", this.labels.context_pindm_text);
|
2018-11-06 22:48:28 +01:00
|
|
|
|
|
|
|
|
|
this.unpinDMEntryMarkup = this.unpinDMEntryMarkup.replace("REPLACE_context_unpindm_text", this.labels.context_unpindm_text);
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onContextMenu (context) {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
if (!document.querySelector(BDFDB.dotCNS.guildselected + BDFDB.dotCN.friendsicon) || !context || !context.tagName || !context.parentElement || context.querySelector(".pindm-item") || context.querySelector(".unpindm-item")) return;
|
2018-10-11 10:21:26 +02:00
|
|
|
|
var info = BDFDB.getKeyInformation({"node":context, "key":"user"}), ele = null;
|
|
|
|
|
if (info && BDFDB.getKeyInformation({"node":context, "key":"handleClose"})) {
|
|
|
|
|
ele = context.querySelectorAll(BDFDB.dotCN.contextmenuitem)[3];
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
info = BDFDB.getKeyInformation({"node":context, "key":"channel"});
|
|
|
|
|
if (info && BDFDB.getKeyInformation({"node":context, "key":"handleChangeIcon"})) {
|
|
|
|
|
ele = context.querySelectorAll(BDFDB.dotCN.contextmenuitem)[1];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (ele) {
|
2018-11-27 00:15:10 +01:00
|
|
|
|
let proccesContextMenu = (id) => {
|
|
|
|
|
let pinnedDMs = BDFDB.loadAllData(this, "pinnedDMs");
|
|
|
|
|
if (typeof pinnedDMs[id] == "undefined") {
|
|
|
|
|
$(this.pinDMEntryMarkup).insertBefore(ele)
|
|
|
|
|
.on("click", (e) => {
|
|
|
|
|
$(context).hide();
|
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
|
|
|
|
let dms = BDFDB.getReactInstance(dmsscroller).return.return.return.memoizedProps.children;
|
|
|
|
|
let insertpoint = this.getInsertPoint(dms);
|
|
|
|
|
this.addPinnedDM(id, dms, insertpoint);
|
|
|
|
|
this.forceUpdateScroller(dmsscroller);
|
|
|
|
|
pinnedDMs[id] = Object.keys(pinnedDMs).length;
|
|
|
|
|
BDFDB.saveAllData(pinnedDMs, this, "pinnedDMs");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$(this.unpinDMEntryMarkup).insertBefore(ele)
|
|
|
|
|
.on("click", (e) => {
|
|
|
|
|
$(context).hide();
|
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
|
|
|
|
let dms = BDFDB.getReactInstance(dmsscroller).return.return.return.memoizedProps.children;
|
|
|
|
|
this.removePinnedDM(id, dms);
|
|
|
|
|
this.forceUpdateScroller(dmsscroller);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BDFDB.updateContextPosition(context);
|
|
|
|
|
};
|
|
|
|
|
let id = info.type ? info.id : this.ChannelUtils.getDMFromUserId(info.id);
|
|
|
|
|
if (id) proccesContextMenu(id);
|
|
|
|
|
else this.PrivateChannelUtils.ensurePrivateChannel(BDFDB.myData.id, info.id).then((id) => {proccesContextMenu(id)});
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-27 15:04:38 +01:00
|
|
|
|
patchDMsScroller () {
|
2018-11-29 15:19:09 +01:00
|
|
|
|
let addAllDMs = (dmsarray) => {
|
|
|
|
|
let sortedDMs = this.sortAndUpdate();
|
|
|
|
|
if (sortedDMs.length > 0) {
|
|
|
|
|
let insertpoint = this.getInsertPoint(dmsarray);
|
|
|
|
|
for (let pos in sortedDMs) this.addPinnedDM(sortedDMs[pos], dmsarray, insertpoint);
|
|
|
|
|
}
|
|
|
|
|
};
|
2018-12-20 22:42:59 +01:00
|
|
|
|
BDFDB.WebModules.patch(BDFDB.WebModules.findByName("LazyScroller").prototype, "render", this, {
|
2018-11-29 17:33:33 +01:00
|
|
|
|
before: (e) => {
|
|
|
|
|
if (e.thisObject._reactInternalFiber.return.memoizedProps.privateChannelIds && !e.thisObject.props.PinDMsPatched) {
|
|
|
|
|
e.thisObject.props.PinDMsPatched = true;
|
|
|
|
|
addAllDMs(e.thisObject.props.children);
|
|
|
|
|
}
|
|
|
|
|
if (e.thisObject._reactInternalFiber.return.memoizedProps.privateChannelIds && this.oldSrollerPos != null) {
|
|
|
|
|
e.thisObject.getScrollerNode().scrollTop = this.oldSrollerPos;
|
|
|
|
|
}
|
2018-11-29 15:19:09 +01:00
|
|
|
|
}
|
2018-12-20 22:42:59 +01:00
|
|
|
|
});
|
2018-11-26 23:36:18 +01:00
|
|
|
|
let dmsscroller = document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller);
|
|
|
|
|
if (dmsscroller) {
|
2018-11-29 15:19:09 +01:00
|
|
|
|
addAllDMs(BDFDB.getReactInstance(dmsscroller).return.return.return.memoizedProps.children);
|
|
|
|
|
this.forceUpdateScroller(dmsscroller);
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
getInsertPoint (dms) {
|
|
|
|
|
let insertpoint = null;
|
|
|
|
|
for (let i in dms) {
|
|
|
|
|
let ele = dms[i];
|
|
|
|
|
if (ele && ele.type == "header") {
|
2018-11-27 00:15:10 +01:00
|
|
|
|
insertpoint = parseInt(i);
|
2018-11-26 23:36:18 +01:00
|
|
|
|
if (!ele.pinned && !ele.props.ispin) {
|
|
|
|
|
ele.pinned = true;
|
|
|
|
|
let headerpin = Object.assign({},ele);
|
|
|
|
|
headerpin.key = "pin" + headerpin.key;
|
|
|
|
|
headerpin.props = {children:this.labels.header_pinneddms_text,ispin:true};
|
|
|
|
|
dms.splice(insertpoint,0,headerpin);
|
|
|
|
|
}
|
|
|
|
|
insertpoint++;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
2018-11-26 23:36:18 +01:00
|
|
|
|
return insertpoint;
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
addPinnedDM (id, dms, insertpoint) {
|
|
|
|
|
for (let ele of dms) {
|
|
|
|
|
if (ele && !ele.pinned && id == ele.key) {
|
|
|
|
|
ele.pinned = true;
|
|
|
|
|
let dmpin = Object.assign({ispin:true},ele);
|
|
|
|
|
dmpin.key = "pin" + ele.key;
|
|
|
|
|
dmpin.props = {channel:ele.props.channel,selected:ele.props.selected,ispin:true};
|
|
|
|
|
dms.splice(insertpoint,0,dmpin);
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
removePinnedDM (id, dms) {
|
|
|
|
|
BDFDB.removeData(id, this, "pinnedDMs");
|
2018-12-16 20:31:13 +01:00
|
|
|
|
let existingDMs = this.sortAndUpdate();
|
2018-11-26 23:36:18 +01:00
|
|
|
|
let removepoint = null;
|
|
|
|
|
for (let i in dms) {
|
|
|
|
|
let ele = dms[i];
|
|
|
|
|
if (ele && ele.pinned && (id == ele.key || ("pin" + id) == ele.key)) {
|
|
|
|
|
delete ele.pinned;
|
2018-11-27 00:15:10 +01:00
|
|
|
|
if (ele.props.ispin) removepoint = parseInt(i);
|
2018-11-26 23:36:18 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (removepoint) {
|
2018-12-16 20:31:13 +01:00
|
|
|
|
let offset = existingDMs.length ? 0 : 1;
|
2018-11-27 00:15:10 +01:00
|
|
|
|
if (offset) delete dms[removepoint + offset].pinned;
|
|
|
|
|
dms.splice(removepoint-offset,1+offset);
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
sortAndUpdate () {
|
|
|
|
|
let pinnedDMs = BDFDB.loadAllData(this, "pinnedDMs");
|
|
|
|
|
delete pinnedDMs[""];
|
2018-12-16 20:31:13 +01:00
|
|
|
|
let sortedDMs = [], existingDMs = [], sortDM = (id) => {
|
2018-12-01 11:07:00 +01:00
|
|
|
|
if (typeof sortedDMs[pinnedDMs[id]] == "undefined") sortedDMs[pinnedDMs[id]] = id;
|
2018-11-26 23:36:18 +01:00
|
|
|
|
else sortDM(sortedDMs, pinnedDMs[id]+1, id);
|
|
|
|
|
};
|
|
|
|
|
for (let id in pinnedDMs) sortDM(id);
|
|
|
|
|
sortedDMs = sortedDMs.filter(n => n);
|
2018-12-16 20:31:13 +01:00
|
|
|
|
for (let pos in sortedDMs) {
|
|
|
|
|
pinnedDMs[sortedDMs[pos]] = parseInt(pos);
|
|
|
|
|
if (this.ChannelUtils.getChannel(sortedDMs[pos])) existingDMs.push(sortedDMs[pos]);
|
|
|
|
|
}
|
2018-11-26 23:36:18 +01:00
|
|
|
|
BDFDB.saveAllData(pinnedDMs, this, "pinnedDMs");
|
2018-12-16 20:31:13 +01:00
|
|
|
|
return existingDMs;
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 23:36:18 +01:00
|
|
|
|
forceUpdateScroller (scroller) {
|
|
|
|
|
scroller.scrollTop += 10;
|
|
|
|
|
scroller.scrollTop -= 10;
|
2018-10-11 10:21:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setLabelsByLanguage () {
|
|
|
|
|
switch (BDFDB.getDiscordLanguage().id) {
|
|
|
|
|
case "hr": //croatian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Prikljucite Izravnu Poruku",
|
|
|
|
|
context_unpindm_text: "Otključaj Izravnu Poruku",
|
|
|
|
|
header_pinneddms_text: "Prikvačene Izravne Poruke"
|
2018-10-11 10:21:26 +02:00
|
|
|
|
};
|
|
|
|
|
case "da": //danish
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Fastgør PB",
|
|
|
|
|
context_unpindm_text: "Frigør PB",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Pinned Privat Beskeder"
|
|
|
|
|
};
|
|
|
|
|
case "de": //german
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Direktnachricht anheften",
|
|
|
|
|
context_unpindm_text: "Direktnachricht loslösen",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Gepinnte Direktnachrichten"
|
|
|
|
|
};
|
|
|
|
|
case "es": //spanish
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Anclar MD",
|
|
|
|
|
context_unpindm_text: "Desanclar MD",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Mensajes Directos Fijados"
|
|
|
|
|
};
|
|
|
|
|
case "fr": //french
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "Épingler MP",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "Désépingler MP",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Messages Prives Épinglés"
|
|
|
|
|
};
|
|
|
|
|
case "it": //italian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Fissa il messaggio diretto",
|
|
|
|
|
context_unpindm_text: "Togli il messaggio diretto",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Messaggi Diretti Aggiunti"
|
|
|
|
|
};
|
|
|
|
|
case "nl": //dutch
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "PB pinnen",
|
|
|
|
|
context_unpindm_text: "PB losmaken",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Vastgezette Persoonluke Berichten"
|
|
|
|
|
};
|
|
|
|
|
case "no": //norwegian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Fest DM",
|
|
|
|
|
context_unpindm_text: "Løsne DM",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Pinned Direktemeldinger"
|
|
|
|
|
};
|
|
|
|
|
case "pl": //polish
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "Przypnij PW",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "Odepnij PW",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Prywatne Wiadomości Bezpośrednie"
|
|
|
|
|
};
|
|
|
|
|
case "pt-BR": //portuguese (brazil)
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "Fixar MD",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "Desafixar MD",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Mensagens diretas fixadas"
|
|
|
|
|
};
|
|
|
|
|
case "fi": //finnish
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "Kiinnitä yksityisviestit",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "Poista yksityisviestit",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Liitetyt yksityisviestit"
|
|
|
|
|
};
|
|
|
|
|
case "sv": //swedish
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Fäst DM",
|
|
|
|
|
context_unpindm_text: "Lossa DM",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Inlagda Direktmeddelanden"
|
|
|
|
|
};
|
|
|
|
|
case "tr": //turkish
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "DM'yi Sabitle",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "DM'yi Kaldır",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Direkt Mesajlar Sabitleyin"
|
|
|
|
|
};
|
|
|
|
|
case "cs": //czech
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Připnout PZ",
|
|
|
|
|
context_unpindm_text: "Odepnout PZ",
|
|
|
|
|
header_pinneddms_text: "Připojené Přímá Zpráva"
|
2018-10-11 10:21:26 +02:00
|
|
|
|
};
|
|
|
|
|
case "bg": //bulgarian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Закачени ДС",
|
|
|
|
|
context_unpindm_text: "Откачи ДС",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Свързани директни съобщения"
|
|
|
|
|
};
|
|
|
|
|
case "ru": //russian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Закрепить ЛС",
|
|
|
|
|
context_unpindm_text: "Открепить ЛС",
|
|
|
|
|
header_pinneddms_text: "Прикрепленные Личные Сообщения"
|
2018-10-11 10:21:26 +02:00
|
|
|
|
};
|
|
|
|
|
case "uk": //ukrainian
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "Закріпити ОП",
|
|
|
|
|
context_unpindm_text: "Відкріпити ОП",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Прикріплені oсобисті повідомлення"
|
|
|
|
|
};
|
|
|
|
|
case "ja": //japanese
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "DMピン",
|
|
|
|
|
context_unpindm_text: "DMをピン止めする",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "固定された直接メッセージ"
|
|
|
|
|
};
|
|
|
|
|
case "zh-TW": //chinese (traditional)
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "引腳直接留言",
|
|
|
|
|
context_unpindm_text: "分離直接消息",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "固定私人信息"
|
|
|
|
|
};
|
|
|
|
|
case "ko": //korean
|
|
|
|
|
return {
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_pindm_text: "비공개 메시지 고정",
|
|
|
|
|
context_unpindm_text: "비공개 메시지 고정 해제",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "고정 된 비공개 메시지"
|
|
|
|
|
};
|
|
|
|
|
default: //default: english
|
|
|
|
|
return {
|
|
|
|
|
context_pindm_text: "Pin DM",
|
2018-11-06 22:48:28 +01:00
|
|
|
|
context_unpindm_text: "Unpin DM",
|
2018-10-11 10:21:26 +02:00
|
|
|
|
header_pinneddms_text: "Pinned Direct Messages"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|