From f397a4f27df3493f66bc0a6c99bd7f5c66872dbd Mon Sep 17 00:00:00 2001 From: vinyll Date: Fri, 26 Jan 2018 15:44:10 -0600 Subject: [PATCH] renamed to csvi18n --- tcii18n/translator.py => csvi18n/__init__.py | 0 readme.md | 16 ++++++++-------- setup.py | 2 +- tcii18n/__init__.py | 0 test/i18n.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename tcii18n/translator.py => csvi18n/__init__.py (100%) delete mode 100644 tcii18n/__init__.py diff --git a/tcii18n/translator.py b/csvi18n/__init__.py similarity index 100% rename from tcii18n/translator.py rename to csvi18n/__init__.py diff --git a/readme.md b/readme.md index 606f46c..eb6d853 100644 --- a/readme.md +++ b/readme.md @@ -1,14 +1,14 @@ -# TCI Translation Library +# Translation Library with CSV -Translate the TCI interface from CSV translation files. +Translate a content from a CSV translation files. ## Example -TCI-i18n provides translation from CSV files. - ### CSV files format -CSV files can have this format and should be UTF-8 encoded +CSV files can have this format and should be UTF-8 encoded. + +_my-translations-file.csv_: ``` TCI title,Titre ITC @@ -19,8 +19,8 @@ Welcome %(user)s!,Bienvenue %(user)s ! ### Usage ``` -from tcii18n import Translator +from csvi18n import Translator -translator = Translator('my_file.csv') -translator.translate('My string') +translator = Translator('my-translations-file.csv') +translator.translate('TCI title') # => Titre ITC ``` diff --git a/setup.py b/setup.py index 86e8eda..0f80768 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( - name='tcii18n', + name='csv-i18n', version='0.2', author='Vincent Agnano', license='Copyright Anthropedia', diff --git a/tcii18n/__init__.py b/tcii18n/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/i18n.py b/test/i18n.py index 877b03d..0e8e0e8 100644 --- a/test/i18n.py +++ b/test/i18n.py @@ -1,5 +1,5 @@ from unittest import TestCase -from tcii18n.translator import Translator +from csvi18n import Translator class I18nTest(TestCase):