diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..6ebcc88 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,9 @@ +LICENSE +README.md +README.txt +setup.py +i18n_helper/__init__.py +i18n_helper/models.py +i18n_helper/tests.py +i18n_helper/views.py +i18n_helper/wraptools.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5533923 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include LICENSE +recursive-include i18n_helper *.py \ No newline at end of file diff --git a/README.md b/README.md index bdf327c..d8f6846 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,23 @@ How does it works Django i18n helper is a common Django app that overriddes Django core functions on load to provide the desired behavior. -The application will automatically detect when tests are being run and don't override any methods to preserve tests integrity. +The application will automatically detect when tests are being run and don't +override any methods in such a case to preserve tests integrity. Installation ------------ -All you need to do is add "django-i18n-helper" to your installed apps and -activate the internationalization debug. In your settings.py make sure to have: +Get it + + pip install django-i18n-helper + +After, all you need to do is add "i18n_helper" to your installed apps and +activate the internationalization debug. In your settings.py, make sure to have: INSTALLED_APPS = ( ..., - 'django-i18n-helper' + 'i18n_helper' ) and @@ -88,7 +93,7 @@ Graphical examples are sometimes the better way to understand how does something Fully translated templates - + @@ -102,7 +107,7 @@ Partially translated templates. Note that it's also possible to see from the adm Disclaimer Notes ---------------- -The application should **only** be used when debugging code translations, since it overrides the default Django HTML scaping mechanism and thus outputs unescaped (possibly undesired) code. +The application should **only** be used when "debugging" code translations, since it overrides the default Django HTML scaping mechanism and thus outputs unescaped (possibly undesired) code. Besides, there are some warnings you should be aware of: * You will see weird HTML within you buttons or inputs if you have things like <input type="text" value="{% trans "Search" %}" ...> Then the wrapping HTML of your translations will be shown _within_ the inputs or buttons. This will happen for sure in the admin site. @@ -118,4 +123,4 @@ Tested with ----------- * Django 1.4 -* Python 2.6.1 \ No newline at end of file +* Python 2.6.1 diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..d8f6846 --- /dev/null +++ b/README.txt @@ -0,0 +1,126 @@ +Django i18n helper +================== + +Provides a simple way to visualize translated strings in Django templates +by wrapping translated content with custom HTML and CSS. Therefore and +most important, helps you to visualize untraslated strings too. + +This is particularly useful when internationalization is being added to a +project. + +Author: Santiago Gabriel Romero + +Contact: sromero@machinalis.com + +How does it works +----------------- + +Django i18n helper is a common Django app that overriddes Django core functions +on load to provide the desired behavior. + +The application will automatically detect when tests are being run and don't +override any methods in such a case to preserve tests integrity. + + +Installation +------------ + +Get it + + pip install django-i18n-helper + +After, all you need to do is add "i18n_helper" to your installed apps and +activate the internationalization debug. In your settings.py, make sure to have: + + INSTALLED_APPS = ( + ..., + 'i18n_helper' + ) + +and + + I18N_HELPER_DEBUG = True + +django-i18n-helper provides a default behavior that consists in wrapping the +translated content with an HTML div with the following properties: + +