Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonk-dev/arch-translator
Useful tools for ArchWiki translators, now written in TypeScript.
https://github.com/bonk-dev/arch-translator
archlinux archwiki i18n internalization javascript translation typescript
Last synced: 6 days ago
JSON representation
Useful tools for ArchWiki translators, now written in TypeScript.
- Host: GitHub
- URL: https://github.com/bonk-dev/arch-translator
- Owner: bonk-dev
- License: mit
- Created: 2024-05-05T13:41:11.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-29T09:52:42.000Z (6 months ago)
- Last Synced: 2024-05-29T12:48:11.674Z (6 months ago)
- Topics: archlinux, archwiki, i18n, internalization, javascript, translation, typescript
- Language: TypeScript
- Homepage: https://greasyfork.org/en/scripts/495960-archtranslator
- Size: 417 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ArchTranslator
![License Badge](https://img.shields.io/github/license/bonk-dev/arch-translator?style=flat-square)Useful tools for ArchWiki translators, now written in TypeScript.
## Usage
- [Install the UserScript](https://greasyfork.org/en/scripts/495960-archtranslator)
- Change the active language (the default is Polish):![Change language tool](assets/change-lang.png)
## Build
You can build the script yourself:Clone the repo:
`git clone https://github.com/bonk-dev/arch-translator.git`Remember to install the dev dependencies:
`npm install`Single build:
`npm run build`Build on change:
`npm run watch`The three (two usable) files will be in the `build/` directory:
- `arch-translator.user.js` - ready to use UserScript
- `arch-translator.srcmap.user.js` - ready to use UserScript but with inlined sourcemap
- `arch-translator.js` - raw output from [esbuild](https://esbuild.github.io/)
(no UserScript header)## Features
- Copies and pastes the original source;
- Inserts the localized {{TranslationStatus}} template;
- Inserts the English interlanguage link;
- Sorts the header elements according to the ArchWiki style;
- Scans the page content for already translated articles.### Translated articles scanner
The script scans the article for links to other articles and checks if these articles have
been already translated to the language of choice.In this [example](https://wiki.archlinux.org/index.php?title=Wireshark_(Polski)&action=edit) we can see that the page content contains many links to English pages.
Pages highlighted in green have a translation page.
![Translated articles scanner UI](assets/translated-articles.png)