Wiki Translate Tagger is a web tool designed to convert standard wikitext into a format with <translate>
tags, making it ready for translation. This tool simplifies the process of preparing wikitext content for multilingual support, ensuring that translations are correctly tagged and formatted.
- Convert Wikitext: Input wikitext and convert it into a translatable format with
<translate>
tags. - Copy to Clipboard: Easily copy the converted wikitext to your clipboard for use in translation workflows.
- Responsive Design: User-friendly interface that is accessible on both desktop and mobile devices.
- Python 3.x
- Flask
-
Clone the Repository
git clone https://github.com/indictechcom/translatable-wikitext-converter cd wiki-translate-tagger
-
Create a Virtual Environment
python -m venv venv source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Run the Application
python app.py
The application will start on http://127.0.0.1:5000.
- Open the Application: Navigate to
http://127.0.0.1:5000
in your web browser. - Enter Wikitext: Paste your standard wikitext into the input textarea on the left.
- Convert to Translatable Wikitext: Click the "Convert to Translatable Wikitext" button.
- Copy Converted Text: Once the conversion is complete, you can copy the converted text using the "Copy to Clipboard" button.
app.py
: Main application file containing Flask routes and logic.templates/
: Directory containing HTML templates.index.html
: Main template for the web interface.
static/
: Directory for static files (e.g., CSS, JavaScript).requirements.txt
: List of Python dependencies.
We welcome contributions to enhance the Wiki Translate Tagger. If you have suggestions, improvements, or bug fixes, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a pull request on GitHub.
This project is licensed under the MIT License.
Input Wikitext Example:
This is a text with an [[internal link]] and an [https://openstreetmap.org external link].
**Expected Output:**
```<translate>This is a text with an [[<tvar name="1">Special:MyLanguage/internal link</tvar> internal link]] and an [<tvar name="2">https://openstreetmap.org</tvar> external link].</translate>
Notes:
- Links Handling: The tool wraps internal links with tags for better translation support, ensuring they are localized using Special:MyLanguage.
- Template Removal: Templates and other non-translatable elements will be automatically cleaned up for a simpler translation process.