Skip to content

Commit

Permalink
Merge pull request #77 from SanjaySunil/dev
Browse files Browse the repository at this point in the history
v3.0.0 updates.
  • Loading branch information
SanjaySunil committed Oct 26, 2021
2 parents 2afa7e1 + 00459bf commit 02e893a
Show file tree
Hide file tree
Showing 66 changed files with 10,432 additions and 2,491 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
# insert_final_newline = true
insert_final_newline = true
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assets/libs*
assets/js/discord.12.1.1.min.js*
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"node": true
},
"extends": [
"google"
],
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"require-jsdoc": 0,
"max-len": 0,
"no-invalid-this": 0,
"no-unused-vars": 0,
"prefer-const": 0
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .github/CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

***

## If you encounter any problems, please email sanjaysunil@protonmail.com or message me on [Discord](https://discordapp.com/users/732336924559278181).
#### If you encounter any problems, please create a new issue.
122 changes: 115 additions & 7 deletions .github/TRANSLATION.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,135 @@
# How to translate BetterDiscordPanel
# How to translate BetterDiscordPanel

## 1. Fork the Repository
### Fork the Repository

![fork](../assets/images/contribution/fork.png)

## 2. Add your language
## BetterDiscordPanel

### 1. Open the translation file [locales.js](https://github.com/SanjaySunil/BetterDiscordPanel/blob/master/assets/js/locales.js)
Open the `locales.js` file containing all the translations of the panel.

### 2. Translate
Copy this into the translation file, and start translating.

```js
langCode: {
langCode: "en",
language: "English",
// ========================= PANEL =========================
status: {
loading: "Loading ...",
},
headings: {
profile: "Discord Bot",
guildName: "Chats",
settings: "Settings"
},
"sub-headings": {
about: "About",
tools: "Tools",
info: "Info",
},
navbar: {
profileNav: "Profile",
chatNav: "Chat",
lastMessagesNav: "Last Messages",
infoNav: "Chat / Server Info",
settingsNav: "Settings",
lightDark: "Light / Dark Mode",
logoutTitle: "Logout",
},
text: {
channelNameLabel: "Chat",
fileSent: "sent some file(s)",
attachmentTxt: "Attachments",
privateMessages: "DM",
profileSection: {
name: "Name",
discrim: "Discrim",
id: "ID",
guilds: "Guilds",
createdAt: "Created At"
},
settingsSection: {
createBotInvite: "Create Bot Invite",
eval: "EVAL",
languages: "Languages",
},
},
buttons: {
clearLastMessages: "Clear Last Messages",
editToken: "Logout",
refreshChat: "Refresh chat",
send: "Send",
leave: "Leave server",
invite: "Invite",
},
// ========================= DISCORD =========================
infos: {
owner: "Owner",
members: "Members",
vChannels: "Channels (voice)",
tChannels: "Channels (text)",
roles: "Roles",
channels: "Channels",
emojis: "Emojis",
},
errors: {
error: "ERROR",
dm: "ERROR : DM",
emptyMsg: "Empty Message!",
missingPermissions: "Missing Permissions!",
},
token: {
confirmation: "Are you sure you want to logout?",
invalid: "Token is Invalid. Please try again.",
},
messageType: {
serverJoin: "joined the server.",
pin: "pinned a message.",
channelNews: "added a remote channel news.",
boost: "boosted the server.",
},
fileType: {
unknown: "unknown",
img: "image",
doc: "document",
pdf: "pdf",
video: "video",
audio: "audio",
},
},
```

### 3. Upload Changes

![uploadchanges](../assets/images/contribution/upload.png)

### 4. Make a pull request

![pull-request](../assets/images/contribution/create_pull.png)

## Control Panel (BetterDiscordPanel.cmd)

### 1. Add your language
Create a new folder in the `locales` directory and copy the template.json file.

![addfolder](../assets/images/contribution/openlocales.png)

## 3. Translate
### 2. Translate
Use the English Translation file to help you translate the phrases required for the language.

![translation](../assets/images/contribution/translate.png)

## 4. Upload Changes
### 3. Upload Changes

![uploadchanges](../assets/images/contribution/upload.png)

## 5. Make a pull request
### 4. Make a pull request

![pull-request](../assets/images/contribution/create_pull.png)

***

## If you encounter any problems, please email sanjaysunil@protonmail.com or message me on [Discord](https://discordapp.com/users/732336924559278181).
#### If you encounter any problems, please create a new issue.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/electron"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: dev
target-branch: master
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

Copyright (C) 2020 Sanjay Sunil (sanjaysunil@protonmail.com)
Copyright (C) 2021 Sanjay Sunil (sanjaysunil@protonmail.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

BetterDiscordPanel Copyright (C) 2020 Sanjay Sunil (sanjaysunil@protonmail.com)
BetterDiscordPanel Copyright (C) 2021 Sanjay Sunil (sanjaysunil@protonmail.com)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<a href="https://github.com/SanjaySunil/BetterDiscordPanel/issues/new?assignees=&labels=Bug&template=bug_report.md&title=%5BBUG%5D">Report Bug</a>
<a href="https://github.com/SanjaySunil/BetterDiscordPanel/issues/new?assignees=&labels=Suggestions&template=suggestions.md&title=%5BSUGGESTION%5D">Request Feature</a>
<a href="https://discord.gg/9h822H3">Discord Server</a>
</p>
</h1>
<br/><br/>
Expand Down Expand Up @@ -54,12 +52,20 @@

## 馃洜 Getting Started

This project does not run on any servers and can be self hosted. Simply open
`index.html` to get started or use the control panel by opening `BetterDiscordPanel.cmd` and executing "W" for the web panel.
Simply open
`index.html` to open the web version of BetterDiscordPanel or use the control panel to open the desktop application by running `BetterDiscordPanel.cmd`.
<br/>

<!-- Installation -->

### **Step 1:** Prerequisites
To use the **desktop application** of BetterDiscordPanel, you will need to have the following installed.

- Node.js
- npm

[Instructions](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)

### **Step 2:** Setup / Installation

1. Clone the repository
Expand All @@ -70,9 +76,9 @@ git clone https://github.com/sanjaysunil/betterdiscordpanel

> 鈿狅笍 **NOTE**: The updater only works if you have cloned the repository.
2. Open `login.html` or open `BetterDiscordPanel.cmd` to run the panel.
2. Open `login.html` for the web application or open `BetterDiscordPanel.cmd` to run the desktop application.

3. Login to your Discord Bot.
3. Login to your discord bot using your discord bot token.

4. Start using BetterDiscordPanel!
<br/>
Expand Down Expand Up @@ -115,11 +121,6 @@ View [contribution guide](https://github.com/SanjaySunil/BetterDiscordPanel/blob
[![Forkers repo roster for @sanjaysunil/betterdiscordpanel](https://reporoster.com/forks/sanjaysunil/betterdiscordpanel)](https://github.com/sanjaysunil/betterdiscordpanel/network/members)
<br/>

### Built With

- [Discord.js](https://github.com/discordjs/discord.js)
- [jQuery](https://jquery.com)

## License

Copyright 漏 2021 Sanjay Sunil (sanjaysunil@protonmail.com)
Expand Down
1 change: 1 addition & 0 deletions app/preload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Add code here that requires Node
Loading

0 comments on commit 02e893a

Please sign in to comment.