Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-12-05 21:46:44 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-12-05 21:46:44 (GMT)
commit78e5ac76f9beed4bb0822c5fd6ee39b2a0b2b65d (patch)
tree47d02148fb5293e2b61fc819e7fcd8099d4b3e25
parentd9eb3274aaa6e1395c86c4dfaa488e493969857b (diff)
ResourceTranslation : Fixed comments and whitespacestring_translation_current
-rw-r--r--tests/translatortests.py3
-rw-r--r--tutorius/localization.py10
-rw-r--r--tutorius/translator.py2
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/translatortests.py b/tests/translatortests.py
index ede7dee..171542c 100644
--- a/tests/translatortests.py
+++ b/tests/translatortests.py
@@ -129,5 +129,6 @@ class ResourceTranslatorTests(unittest.TestCase):
for container in list_action.nested_list:
assert getattr(container, "resource").type == "file", "Element of list was not converted properly"
- def test_string_transation(self):
+ def test_string_translation(self):
+ # TODO : Once we have enough time. ;)
pass
diff --git a/tutorius/localization.py b/tutorius/localization.py
index 864d20a..5c64310 100644
--- a/tutorius/localization.py
+++ b/tutorius/localization.py
@@ -18,13 +18,13 @@
import os
class LocalizationHelper(object):
-
+
@classmethod
def _write_addon_strings_to_file(cls, addon, output_file):
"""
For a given addon, writes a pot file entry for every string property
it has.
-
+
@param addon The addon from which we want to get the string properties
@param output_file The file in which we should write the strings
@return None
@@ -35,13 +35,13 @@ class LocalizationHelper(object):
prop_value = prop_value.replace("\n", "\\n")
prop_value = prop_value.replace("\r", "\\r")
output_file.write('msgid "%s"\nmsgstr ""\n\n'%(prop_value))
-
+
@classmethod
def write_translation_file(cls, tutorial, output_file):
"""
Writes the translation file to the given file, according to the .pot
files specifications, for the given tutorial.
-
+
This will generate a pair of line for each TStringProperty in the following
format :
msgid "<string>"
@@ -49,7 +49,7 @@ class LocalizationHelper(object):
This will enable the translator to create a localization for this tutorial.
- @param tutorial The executable reprensentation of the
+ @param tutorial The executable reprensentation of the tutorial
@param output_file An opened file object to which the strings translation
template will be written
@return Nothing
diff --git a/tutorius/translator.py b/tutorius/translator.py
index f8a3fd7..6b5e5c4 100644
--- a/tutorius/translator.py
+++ b/tutorius/translator.py
@@ -60,7 +60,7 @@ class ResourceTranslator(object):
langs = []
language = os.environ.get("LANGUAGE", None)
if language:
- langs = language.split(':')
+ langs = language.split(':')
# Get the default machine language
lc, encoding = locale.getdefaultlocale()