Coder Social home page Coder Social logo

weblate_ynh's Introduction

Weblate for YunoHost

Integration level Working status Maintenance status

Install Weblate with YunoHost

Read this README in other languages.

This package allows you to install Weblate quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Weblate is a libre web-based translation tool with tight version control integration. It provides two user interfaces, propagation of translations across components, quality checks and automatic linking to source files.

Shipped version: 5.4.3~ynh1

Demo: https://hosted.weblate.org/

Screenshots

Screenshot of Weblate

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that:

sudo yunohost app install https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug
or
sudo yunohost app upgrade weblate -u https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps

weblate_ynh's People

Contributors

alexaubin avatar ericgaspar avatar jibec avatar kay0u avatar maniackcrudelis avatar oniricorpe avatar psycojoker avatar salamandar avatar thovi98 avatar tituspijean avatar yalh76 avatar yunohost-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

weblate_ynh's Issues

Restore script fails

Describe the bug

After failing the most recent update (see issue #84 ), I tried to restore the pre-upgrade backup of my Weblate instance, which failed, for apparently two reasons:

  1. Failure on postgre backup restore command execution:
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql

Returned:

ERROR: must be owner of extension pg_trgm

Which is due to not giving proper postgresql rights to user 'weblate' used in the command.

  1. Failure on weblate service start backup restore command execution:
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/weblate.log" --line_match="spawned uWSGI"

Returned:

uwsgi[3721077]: open("/etc/uwsgi/apps-available/weblate.ini"): Permission denied [core/io.c line 525]

Which is due to not properly setting access rights to the file.

Context

  • Hardware: Dedicated server
  • YunoHost version: 11.1.18
  • I have access to my server: Through SSH & through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: Latest
  • If upgrading, current package version: 4.15.2~ynh1

Steps to reproduce

Restoring from either the web admin interface or through the 'yunohost backup restore' command through SSH will yield the same problem.

Expected behavior

App gets back up and running =) .

Logs

Relevant log lines shared at the top.

Conclusion:

I succeeded in restoring my backup archive by untaring, editing the restore script so that:

  1. The first command for postgre is now surrounded by commands to set 'weblate' user as superuser before calling the db script, and undoing this after (not best way to deal with the problem maybe, but does the job fine):
ynh_psql_execute_as_root --sql="alter role weblate superuser;" --database=$db_name
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
ynh_psql_execute_as_root --sql="alter role weblate nosuperuser;" --database=$db_name
  1. Chmoding the problematic file to allow read by all others, before the service start lines, so that
chmod a+r /etc/uwsgi/apps-available/weblate.ini
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/weblate.log" --line_match="spawned uWSGI"

I could make a pull request with these changes if that can help ;)

Can not login with existing yunohost users

Apparently, user connection (LDAP integration) is not working. I can not login with the existing user credentials. Do I need to perform additional steps?

Using YunoHost 2.7.10 (stable) on Rasperry PI.

buster failed install

Describe the bug

Weblate no more install on buster.

CI logs:

https://ci-apps.yunohost.org/ci/logs/weblate_amd64_stable_complete.log or https://ci-apps.yunohost.org/ci/job/8554
# include "xxhash.c" /* include xxhash function bodies as static, for inlining */

Seems that the issue comes from borgbackup, that requires libxxhash >= 0.8.1 https://borgbackup.readthedocs.io/en/stable/installation.html#pyinstaller-binary

Installation goes fine when building xxhash from source: https://github.com/Cyan4973/xxHash

so two options:

  1. make the package requires bullseye
  2. build xxhash from sources

what we do ?

Is there a reason github token is required?

This is a pure curiosity question: I plan to install this app on my yunohost instance, but I’m stuck at setup, due to the github token requirement. However, as all my git repository are stored elsewhere, I don’t plan to use github integration, thus this requirement sounds superfluous to me. As you can see, I do have a github account, thus I could create such token, but I’m just curious about the necessity of it.

Email errors / account creation impossible

Hello,
I just installed a fresh WebLate on my YunoHost, without any problem.
I've read that the LDAP integration does not exists and that's fine for me.
So, I tried to create an account, but I never received the mail.

Then, I tried to contact tho administrator (via weblate), and there is a server error whenn I send the message.

3rd thing I tried : log in with my YunoHost login/pass : error
But when I tried to create an account with the user I set to bi the admin, I have a message that it already exists (but with which password ?).

Some time after, I received a few mails from weblate, but not the account creation or the message sent, they were mails about a server error.

There was no error log on the server (maybe somewhere else than /var/log/weblate/ ?) so there is the content of one of the mails : https://paste.yunohost.org/ejewuketam.http
(each mail came in pair, one fulltext, and one in HTML)
They seems to contain similar content so I copied the fulltext one.

django good practice to save local settings

could you append a thing like:

try:
    import * from .local_settings
except ImportError:
    pass

at the end of the settings.py? it will allow user to override only the values they want to change in a local_settings.py files next to the settings.py file.

Update to 4.6.1

Hello,

Thank you for this Weblate package for Yunohost, it really is one of the easiest ways available to get it running quickly. So far, it works like a charm !

Weblate notified me of the latest version available today when I opened it, and I thought it would be a good idea to open an issue here to keep track of the update of the Yunohost package ;-).

I was also wondering if there was a patreon/whatever set up to encourage the maintenance efforts of this app that I find particularly useful.

Wish you a very nice day !

[Critical Bug] Update to 4.14

Describe the bug

Encountered an internal server error 500 whenever trying to go a translation page for any language on my project. Same error on performance dashboard. Checked logs and found the error described in this mainstream issue : WeblateOrg/weblate#7841.

The fix to this issue has been published in the 4.14 version of Weblate - I applied it manually on my server for the moment and can confirm it works. Could you please update this packaged version for Yunohost ?

Configuring a self-hosted/non-BigTech forge

As a developer using YunoHost to self-host my software forge (currently ynh:gitlab, considering switching to ynh:forgejo), I want to configure Weblate to connect to my forge.

Context

Currently the Weblate installer appears to require me to select either github.com or gitlab.com, but I am using yunohost in order to get away from those. It makes me feel this is not for me.

Now I understand from a comment in #60 that it's possible to put in garbage values to get past this and then do a manual configuration.

I would like to enter the config details of my own forge in the weblate setup. The easier the better, but it does not have to be completely done in the GUI. The most important thing in my opinion is to make it clear that the two options currently offered are optional helpers and make it clear that that many other options are possible, even if they require manual config file editing.

Expected behavior

Some possible solutions:

  • a comprehensive GUI :-) (not really expecting this)
  • an additional option, "other forge" with sufficient parameters to cover a range of the possible supported forges
  • an additional option, "neither/none of those, please: I will configure it manually"
  • a plain text config file editor (having this functionality in the install/config GUI would be useful for many other apps too)

Notes: the Weblate documentation is pretty solid and understandable. Displaying a link directly to this section would also be helpful.

Installation is failing on YunoHost 2.7.10 (stable)

Running on Raspberry Pi.

Seems like installation is failing at weblate migrate --noinput.

Traceback (please read from bottom to top):

ImportError: No module named phply.phpparse
from phply.phpparse import make_parser
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/translate/storage/php.py", line 63, in
from translate.storage import php, po
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/translate/convert/po2php.py", line 31, in
from translate.convert import po2php
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/weblate/trans/formats.py", line 37, in
from weblate.trans.formats import FILE_FORMAT_CHOICES, FILE_FORMATS, ParseError
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/weblate/trans/models/subproject.py", line 42, in
from weblate.trans.models.subproject import SubProject
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/weblate/trans/models/__init__.py", line 36, in
__import__(name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
self.models_module = import_module(models_module_name)
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
app_config.import_models()
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
apps.populate(settings.INSTALLED_APPS)
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
django.setup()
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
utility.execute()
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
execute_from_command_line(argv)
File "/var/www/weblate/venv/local/lib/python2.7/site-packages/weblate/runner.py", line 33, in main
load_entry_point('Weblate==2.17.1', 'console_scripts', 'weblate')()
File "/var/www/weblate/venv/bin/weblate", line 9, in
Traceback (most recent call last):
+ weblate migrate --noinput

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.