Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Introduction

Inlinetrans is a django application that allows the translation of django templates from the rendered html in the browser. Once you have your templates internationalized with inlinetrans, you can click on the untranslated messages in their corresponding web pages to add their translations. This can be of great help for translators, as they will be able to translate the messages right in their intended context.

Features

  • A templatetag, inline_trans, intended as a replacement for django’s trans.

  • A management command, inline_makemessage, intended as a replacement for django’s makemessages.

  • A translation bar to show translatable messages, by default visible only to staff members.

To translate the messages in a web page rendered in your browser, you first find out, through the translation bar, which messages have already been translated (marked light green) and which ones lack translation (marked light red).

Then, you click on a marked message, and are prompted for its translation; on entering the text and clicking OK, the new translation is sent to the server and saved in the correct .po file.

Once you have translated all messages in a page, you can click on “apply changes” on the translation bar. This forces a restart on the server, and the reloading of the page with the translations applied.

Requirements

To use inlinetrans, you need:

  • Jquery-1.2.6

Using inlinetrans

Make sure media from inlinetrans is accessible in path:

{{ MEDIA_URL }}inlinetrans

You need to do a checkout of inlinetrans media on media path of your project or setting property externals on your media path.

svn checkout http://django-inlinetrans.googlecode.com/svn/trunk/inlinetrans/media inlinetrans

Make sure you load inlinetrans in all templates you want to internationalize, by adding the following code:

{% load inlinetrans %}

{% inlinetrans_media %}

Then, you can use:

{% inline_trans "translate this" %}

Instead of:

{% trans "translate this" %}

Inlinetrans adds html code to each translation, so make sure you don’t use inline_trans tags inside html attributes, such as this:

<a href="#" alt="{% inline_trans "translate this" %}"></a>

In these cases you have to use the regular trans tag.

Once your template is internationalized, you run the following command:

$ ./manage.py inline_makemessages

This extracts both inline_trans and trans messages from the templates, and incorporates them to the gettext catalogs, just as makemessages does for trans messages.

Afterwords, you can start your server, navigate to the rendered pages (as a staff member), and, as explained above, translate the messages through the web.

Detailed Documentation

Introduction

Inlinetrans is a django application that allows the translation of django templates from the rendered html in the browser. Once you have your templates internationalized with inlinetrans, you can click on the untranslated messages in their corresponding web pages to add their translations. This can be of great help for translators, as they will be able to translate the messages right in their intended context.

Features

  • A templatetag, inline_trans, intended as a replacement for django’s trans.

  • A management command, inline_makemessage, intended as a replacement for django’s makemessages.

  • A translation bar to show translatable messages, by default visible only to staff members.

To translate the messages in a web page rendered in your browser, you first find out, through the translation bar, which messages have already been translated (marked light green) and which ones lack translation (marked light red).

Then, you click on a marked message, and are prompted for its translation; on entering the text and clicking OK, the new translation is sent to the server and saved in the correct .po file.

Once you have translated all messages in a page, you can click on “apply changes” on the translation bar. This forces a restart on the server, and the reloading of the page with the translations applied.

Requirements

To use inlinetrans, you need:

  • Jquery-1.2.6

Using inlinetrans

Make sure media from inlinetrans is accessible in path:

{{ MEDIA_URL }}inlinetrans

You need to do a checkout of inlinetrans media on media path of your project or setting property externals on your media path.

svn checkout http://django-inlinetrans.googlecode.com/svn/trunk/inlinetrans/media inlinetrans

Make sure you load inlinetrans in all templates you want to internationalize, by adding the following code:

{% load inlinetrans %}

{% inlinetrans_media %}

Then, you can use:

{% inline_trans "translate this" %}

Instead of:

{% trans "translate this" %}

Inlinetrans adds html code to each translation, so make sure you don’t use inline_trans tags inside html attributes, such as this:

<a href="#" alt="{% inline_trans "translate this" %}"></a>

In these cases you have to use the regular trans tag.

Once your template is internationalized, you run the following command:

$ ./manage.py inline_makemessages

This extracts both inline_trans and trans messages from the templates, and incorporates them to the gettext catalogs, just as makemessages does for trans messages.

Afterwords, you can start your server, navigate to the rendered pages (as a staff member), and, as explained above, translate the messages through the web.

Contributors

“Antonio Pérez-Aranda Alcaide”, ant30 “Emilio Sánchez”, emilio.sanchez “Manuel Saelices”, lin

Change history

0.1 (2010-12-21)

  • Adapting to use a egg using basic_package skel

Download

Metadata

Release files for django-inlinetrans 0.1dev-r28

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-inlinetrans 0.1dev-r28
File Interpreter ABI Platform
django_inlinetrans-0.1dev_r28-py2.6.egg Legacy Egg format - - Details

Release files / django_inlinetrans-0.1dev_r28-py2.6.egg

Download URL django_inlinetrans-0.1dev_r28-py2.6.egg
Size 55.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
2d7f2527addf1fa5cd42b324abc5e1aed52acb86386393680a80902b6b0ac4f5
BLAKE2b-256 checksum
How to use checksums
e1ee2b5df64eab75330e4dbbbb88aaf9d0ffdf87c9daf814d70505d01812f1c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-inlinetrans 0.1dev-r28

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page