]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix docstring for locale.load_translations.
authorBen Darnell <ben@bendarnell.com>
Sat, 16 Mar 2013 05:25:22 +0000 (01:25 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 16 Mar 2013 05:25:22 +0000 (01:25 -0400)
When unicode strings started using the u() function, this string
was no longer considered a docstring.

tornado/locale.py

index e4e1a154453c37e192413be57fc01bf2dd7f93f1..522e51e084dc1dc3e56f778599777a544e0a9742 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-#
+# -*- coding: utf-8 -*-
 # Copyright 2009 Facebook
 #
 # Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -85,7 +85,7 @@ def set_default_locale(code):
 
 
 def load_translations(directory):
-    u("""Loads translations from CSV files in a directory.
+    """Loads translations from CSV files in a directory.
 
     Translations are strings with optional Python-style named placeholders
     (e.g., "My name is %(name)s") and their associated translations.
@@ -104,13 +104,13 @@ def load_translations(directory):
     The file is read using the csv module in the default "excel" dialect.
     In this format there should not be spaces after the commas.
 
-    Example translation es_LA.csv:
+    Example translation es_LA.csv::
 
         "I love you","Te amo"
-        "%(name)s liked this","A %(name)s les gust\u00f3 esto","plural"
-        "%(name)s liked this","A %(name)s le gust\u00f3 esto","singular"
+        "%(name)s liked this","A %(name)s les gustó esto","plural"
+        "%(name)s liked this","A %(name)s le gustó esto","singular"
 
-    """)
+    """
     global _translations
     global _supported_locales
     _translations = {}