Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucaswerkmeister/tool-translate-link
tool to generate a link to translate a single message into a certain language on TranslateWiki.net
https://github.com/lucaswerkmeister/tool-translate-link
toolforge translatewiki wikimedia
Last synced: about 2 months ago
JSON representation
tool to generate a link to translate a single message into a certain language on TranslateWiki.net
- Host: GitHub
- URL: https://github.com/lucaswerkmeister/tool-translate-link
- Owner: lucaswerkmeister
- License: agpl-3.0
- Created: 2021-05-22T22:00:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T18:34:03.000Z (about 1 year ago)
- Last Synced: 2024-10-08T21:42:33.746Z (4 months ago)
- Topics: toolforge, translatewiki, wikimedia
- Language: Python
- Homepage: https://translate-link.toolforge.org/
- Size: 58.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Translate Link
This tool generates links to translate a single message into a certain language on TranslateWiki.net.
It’s more convenient this way than having to hand-edit a Special:Translate URL, discover the right message group, etc.For more information,
please see the tool’s [on-wiki documentation page](https://meta.wikimedia.org/wiki/User:Lucas_Werkmeister/Translate_Link).## Toolforge setup
On Wikimedia Toolforge, this tool runs under the `translate-link` tool name.
Source code resides in `~/www/python/src/`,
a virtual environment is set up in `~/www/python/venv/`,
logs end up in `~/uwsgi.log`.If the web service is not running for some reason, run the following command:
```
webservice start
```
If it’s acting up, try the same command with `restart` instead of `start`.
Both should pull their config from the `service.template` file,
which is symlinked from the source code directory into the tool home directory.To update the service, run the following commands after becoming the tool account:
```
webservice shell
source ~/www/python/venv/bin/activate
cd ~/www/python/src
git fetch
git diff @ @{u} # inspect changes
git merge --ff-only @{u}
pip-sync
webservice restart
```## Local development setup
You can also run the tool locally, which is much more convenient for development
(for example, Flask will automatically reload the application any time you save a file).```
git clone https://gitlab.wikimedia.org/toolforge-repos/translate-link.git
cd tool-translate-link
pip3 install -r requirements.txt
FLASK_APP=app.py FLASK_ENV=development flask run
```If you want, you can do this inside some virtualenv too.
## Contributing
To send a patch, you can submit a
[pull request on GitHub](https://github.com/lucaswerkmeister/tool-translate-link) or a
[merge request on GitLab](https://gitlab.wikimedia.org/toolforge-repos/translate-link).
(E-mail / patch-based workflows are also acceptable.)## License
The code in this repository is released under the AGPL v3, as provided in the `LICENSE` file.