-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for using Weblate #2611
Conversation
To setup in weblate, you should give me some permission( Here is me). |
I checked this option, see if it is ok. |
It seems ok, will try to setup a demo project later. |
I need your help to continue. I have tested my project/compone settings with weblate docker container on my laptop, which will log the process of updating component, then success to load languages. I have checked the settings of |
How to config Celery? Here is the docker-compose version: '3.8'
services:
weblate:
image: weblate/weblate
tmpfs:
- /app/cache
volumes:
- weblate-data:/app/data
restart: always
depends_on:
- database
- cache
deploy:
placement:
constraints: [node.hostname == panel6]
environment:
- WEBLATE_SITE_DOMAIN=weblate.kuma.pet
- WEBLATE_DEBUG=1
- WEBLATE_LOGLEVEL=DEBUG
- WEBLATE_SITE_TITLE=Uptime Kuma Weblate
- WEBLATE_ADMIN_NAME=Louis Lam
- WEBLATE_ADMIN_EMAIL=<MASKED>
- WEBLATE_ADMIN_PASSWORD=<MASKED>
- WEBLATE_SERVER_EMAIL=<MASKED>
- WEBLATE_DEFAULT_FROM_EMAIL=<MASKED>
- WEBLATE_ALLOWED_HOSTS=*
- WEBLATE_REGISTRATION_OPEN=1
- WEBLATE_EMAIL_HOST=127.0.0.1
- WEBLATE_SOCIAL_AUTH_GITHUB_KEY=<MASKED>
- WEBLATE_SOCIAL_AUTH_GITHUB_SECRET=<MASKED>
- WEBLATE_SOCIAL_AUTH_GITHUB_SCOPE = ["user:email"]
- WEBLATE_ENABLE_HTTPS=1
- WEBLATE_REGISTRATION_ALLOW_BACKENDS = ["github"]
- POSTGRES_PASSWORD=<MASKED>
- POSTGRES_USER=<MASKED>
- POSTGRES_DATABASE=weblate
- POSTGRES_HOST=database
- POSTGRES_PORT=
- REDIS_HOST=cache
- REDIS_PORT=6379
database:
image: postgres:14-alpine
environment:
- POSTGRES_PASSWORD=<MASKED>
- POSTGRES_USER=<MASKED>
- POSTGRES_DATABASE=weblate
- POSTGRES_HOST=database
- POSTGRES_PORT=
volumes:
- postgres-data:/var/lib/postgresql/data
restart: always
deploy:
placement:
constraints: [node.hostname == <MASKED>]
cache:
image: redis:6-alpine
restart: always
command: [redis-server, --save, '60', '1']
deploy:
placement:
constraints: [node.hostname == <MASKED>]
volumes:
- redis-data:/data
environment:
- REDIS_HOST=cache
- REDIS_PORT=6379
cloudflared-tunnel:
image: cloudflare/cloudflared
restart: always
deploy:
placement:
constraints: [node.hostname == <MASKED>]
command: tunnel run
environment:
- TUNNEL_TOKEN=<MASKED>
volumes:
weblate-data: {}
postgres-data: {}
redis-data: {} |
My config: version: '3'
services:
weblate:
image: weblate/weblate
tmpfs:
- /app/cache
volumes:
- weblate-data:/app/data
env_file:
- ./environment
restart: always
depends_on:
- database
- cache
database:
image: postgres:15-alpine
env_file:
- ./environment
volumes:
- postgres-data:/var/lib/postgresql/data
restart: always
cache:
image: redis:7-alpine
restart: always
command: [redis-server, --save, '60', '1']
volumes:
- redis-data:/data
volumes:
weblate-data: {}
postgres-data: {}
redis-data: {} docker-compose.override.yml version: '3'
services:
weblate:
ports:
- 80:8080
environment:
WEBLATE_SITE_DOMAIN: weblate.example.com
WEBLATE_ADMIN_PASSWORD: password
WEBLATE_ADMIN_EMAIL: admin@4o1.to Performance page shows that celery is not running. Edit: missing file of my config:
Actually these files are cloned from https://github.com/WeblateOrg/docker-compose |
Seems noting wrong with your docker-compose.yml, it works on my laptop(just remove github related environments and cloudflare-tunnel service). Celery could start up, and no stuck when adding component. |
Seems ok now, after I set |
Yes, it works now. And push from weblate to github also works. See here
Weblate also support create pull request on github, but need config |
Also, to automatically receiving changes from GitHub, webhook is required. |
I think we need a merge to push things forword, as json file is required in this repo to continue. Docs update and code clean up can be done in another pr. |
It will be the highest priority pr in 1.20.0. But I am now focusing on 1.19.5 first. |
You can merge them, and I 'll update my pr later. |
I would like to use the pull request method. |
Sorry to bother you again, but I can't see I checked the documents again, and figured out that using Anyway, it's my fault that I didn't read their documents carefully. After you merge them, I will commit to sync their language file changes. you can wait a bit before merge my pr. |
I have added GITHUB_CREDENTIALS, but the GitHub option is still not available in the list. I double checked that it should be already set inside the container. Do you have any idea? Plain text:
|
No idea about that, can't see |
After dive into weblate code, I figured out that its docker image use https://github.com/WeblateOrg/weblate/blob/main/weblate/settings_docker.py#L212-L214 edit: checked their docs again, they have mentioned it, but not so obvious. https://docs.weblate.org/en/latest/admin/install/docker.html#docker-environment-variables |
Lol, it is so confusing. Thank you for your help. I see the GitHub option now. |
Ok, It works! 401U#1 |
Want to test one more thing, try to use |
It won't work, as it should match the github token. |
Oh, maybe I open a new github account for that. |
With a new github account, you should add the ssh key of weblate platform to it's ssh keys (https://github.com/settings/keys), and the pr would be open from fork. A webhook to fetch github changes is required, url is I'll start without push method firstly. |
I cannot add it. It said |
Deleted from my repo deploy key, you can try again. Or consider create a new one on weblate. |
Ok now, added. |
Focus on #2662 |
Description
As mentioned in #1591 , we decided to try weblate as translation platform.
I have converted the translation file to json format, and it works with
vue-i18n
.Following tasks:
close #1034
close #1873
Type of change
Checklist
(including JSDoc for methods)