roundedrectangle / SailDiscord

A SailfishOS Discord client
https://forum.sailfishos.org/t/sailcord-thread/20095
GNU General Public License v3.0
5 stars 2 forks source link

Sailcord

Previously SailDiscord

An unofficial SailfishOS Discord client

Very very WIP

By using this, you are breaking Discord Terms of Services! This app might even get you banned! It stores your token in plain text and it is really easy to hack you with it!

TODO

Known issues

Troubleshooting

Nothing loads on 0.4.1

Update to 0.4.2. 0.4.2 might show you that you are using 0.4.1, but that is just a bug which you can safely ignore as long as everything works.

Login page isn't loading!

Check if you are able to open https://discord.com/login in the native browser. If you can't, here are the possible workarounds:

Logging in via token

See discord.py-self docs page for up to date information. In short, you should:

After obtaining you token, in Sailcord top menu, when logging in, choose Login with token. Then paste your token and click Accept.

Screenshots

Server list Server list Server list Server list Server list

Screenshots are for version 0.5.0

Translating

  1. Fork the repo from GitHub UI. When creating the fork, select the "Copy the main branch only" checkmark. Only needed once
  2. If required, click on "Sync fork" on your fork.
  3. (Optional) You can create a new branch with your translation by selecting the main branch you forked -> "View all branches" -> "New branch" and typing whatever branch name you want. I recommend patch-n where n is 1 for the first branch, 2 for the second, etc. Then go to your branch on the GitHub.
  4. Go to folder SailDiscord -> translations.
    • If there is a file with your language code, click on it and select the edit icon
    • If not:
      1. Click on harbour-saildiscord.ts file
      2. Select copy icon (Copy raw file)
      3. Go back, click Add file -> Create new file
      4. Enter harbour-saildiscord-xx.ts replacing xx with your language code as the name. For example, ru for Russian
      5. Paste the copied file in the new file's contents
  5. Make your changes. Note that:

    • Do not update Opal modules translations. They include About page translations, and their context name is prefixed with Opal.. Do it here instead. An example:

      Opal.About ...
    • When translating a string, read its comments if available. They include things which describe the context of the string (where it is used).

    • %1, %2, %3, etc. parts will be replaced with additional data

    • Parts starting with & and ending with ; mean that they'll be replaced with special characters. You can check the full list by googling "html entities list". The most common are: code rendered
      < >
      &gt; <
      &amp &
      &quot; "
      &apos; '
    • To translate a string, modify the lines starting with <translation. Remove type="unfinished" parts and insert your translation between > and < characters. As the source use the lines starting with <source>, which are above the actual translation. Example:

      Original:

       <message>
         <location filename="../qml/pages/FirstPage.qml" line="62"/>
         <location filename="../qml/pages/LoginDialog.qml" line="20"/>
         <source>About</source>
         <comment>App</comment>
         <translation type="unfinished"></translation>

      Modified:

      About App О программе
  6. Click on Commit changes -> Commit changes. Leave the commit options default
  7. Go to the main page of your fork, select your branch if you created it
  8. Click on Contribute -> Open pull request -> Create pull request

Donations

Don't

Build

Removing the debug flag (disabling faster build)

Get Sailfish IDE, open the project, open Other Files -> rpm -> SailDiscord.spec, then replace no in the first line with yes if you want to make a production package. Now just run or build.

Faster build (not to package the library, NOT RECOMMENDED IN PRODUCTION)

If you didn't replace, you'll get faster build but aditional steps needed for phone. This is needed only once. Once the installation is completed, open Terminal from the developer options on your phone and type this command:

python3 -m pip install --user --upgrade "discord.py-self>=2.0" "requests" "Pillow"

Then open the app. If you ever want to switch back to the production version, type this command to undo:

python3 -m pip uninstall discord.py-self

SailJail will NOT work in this case

Some general build issues

Code Design

Credits

The code is based on:

Core functionality:

Developers:

Contributors (translations):