[cc-commits] [SCM] license.rdf (cc.licenserdf): license RDF files and legaltext. (branch i18noverhaul) updated. 303c56221e70d14ce70cd6d6b19d4fd80b05ed3b

Gitosis User git at gandi0.creativecommons.org
Wed Jan 18 14:34:32 EST 2012


The branch, i18noverhaul has been updated
       via  303c56221e70d14ce70cd6d6b19d4fd80b05ed3b (commit)
      from  1b543c2d1b5bec2064396288e5d42d4a9b2fb6e0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 303c56221e70d14ce70cd6d6b19d4fd80b05ed3b
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date:   Wed Jan 18 13:35:59 2012 -0600

    Switch jurisdiction adding tool to use mappers, fix related test.

-----------------------------------------------------------------------

Summary of changes (followed by patch):
 cc/licenserdf/tests/test_jurisdiction_tool.py |    2 +-
 cc/licenserdf/tools/jurisdiction.py           |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cc/licenserdf/tests/test_jurisdiction_tool.py b/cc/licenserdf/tests/test_jurisdiction_tool.py
index 2689cbf..ab998ff 100644
--- a/cc/licenserdf/tests/test_jurisdiction_tool.py
+++ b/cc/licenserdf/tests/test_jurisdiction_tool.py
@@ -118,7 +118,7 @@ def test_add():
         titles[obj.language] = unicode(obj)
 
     # ensure we have the generated i18n string
-    assert titles['i18n'] == u'${country.it}'
+    assert titles['i18n'] == u'${Italy}'
 
     # ensure that the translations were run
     # (just checking a few should be fine)
diff --git a/cc/licenserdf/tools/jurisdiction.py b/cc/licenserdf/tools/jurisdiction.py
index f595229..1a3b43b 100644
--- a/cc/licenserdf/tools/jurisdiction.py
+++ b/cc/licenserdf/tools/jurisdiction.py
@@ -15,6 +15,7 @@ licensed to the public under the GNU GPL version 2.
 import pkg_resources
 import sys
 import os
+from cc.i18n import mappers
 
 from support import *
 
@@ -162,7 +163,8 @@ def add(opts, __save_graph=save_graph):
     # Add the i18n string
     j_graph.add((
             j_ref, NS_DC['title'],
-            Literal(u"${country.%s}" % jurisdiction[:-1], lang="i18n")))
+            Literal(u"${%s}" % mappers.COUNTRY_MAP[jurisdiction[:-1]],
+                    lang="i18n")))
 
     # add the translated names
     translate_graph(j_graph)


hooks/post-receive
-- 
license.rdf (cc.licenserdf): license RDF files and legaltext.


More information about the cc-commits mailing list