From ac1ac2d93d297d8544c81916f7fdce57e9c1b4d6 Mon Sep 17 00:00:00 2001
From: Adam Palay
Date: Thu, 1 Aug 2013 13:23:37 -0400
Subject: [PATCH 1/2] i18n template fixes
syntax fix
---
lms/templates/contact.html | 4 ++--
lms/templates/help_modal.html | 2 +-
lms/templates/name_changes.html | 4 ++--
lms/templates/test_center_register.html | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lms/templates/contact.html b/lms/templates/contact.html
index cb35aca359..c23e74c19a 100644
--- a/lms/templates/contact.html
+++ b/lms/templates/contact.html
@@ -26,7 +26,7 @@
contact_email=settings.CONTACT_EMAIL,
faq_link_start=''.format(url=reverse('faq_edx')),
faq_link_end='',
- fb_link_start=''.
+ fb_link_start='',
fb_link_end=''
)}
@@ -45,7 +45,7 @@
)}
${_("Universities")}
- ${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.'.format(email='university@edx.org', platform_name="edX")}
+ ${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.').format(email='university@edx.org', platform_name="edX")}
diff --git a/lms/templates/help_modal.html b/lms/templates/help_modal.html
index abec5cd21d..6692d02d09 100644
--- a/lms/templates/help_modal.html
+++ b/lms/templates/help_modal.html
@@ -15,7 +15,7 @@
- ${_('{span_start}{platform_name}{span_end} Help').format(span_start='', span_end='').format(platform_name=settings.PLATFORM_NAME)}
+ ${_('{span_start}{platform_name}{span_end} Help').format(span_start='', span_end='', platform_name=settings.PLATFORM_NAME)}
diff --git a/lms/templates/name_changes.html b/lms/templates/name_changes.html
index d6f109a69e..58ea7db9be 100644
--- a/lms/templates/name_changes.html
+++ b/lms/templates/name_changes.html
@@ -8,7 +8,7 @@ function name_confirm(id) {
if(data.success){
$("#div"+id).html(${_("Accepted")});
} else {
- alert(${_('Error'));
+ alert(${_('Error')});
} }
});
}
@@ -19,7 +19,7 @@ function name_deny(id) {
if(data.success){
$("#div"+id).html(${_("Rejected")});
} else {
- alert(${_('Error'));
+ alert(${_('Error')});
} }
});
}
diff --git a/lms/templates/test_center_register.html b/lms/templates/test_center_register.html
index 8dae603832..df6845e577 100644
--- a/lms/templates/test_center_register.html
+++ b/lms/templates/test_center_register.html
@@ -476,7 +476,7 @@
From 3be155bd88b3efc50104e7fb83468cd42c28aede Mon Sep 17 00:00:00 2001
From: Adam Palay
Date: Thu, 1 Aug 2013 13:42:39 -0400
Subject: [PATCH 2/2] fix tests, remove zh_CN from config until we have support
---
conf/locale/config | 2 +-
i18n/tests/test_generate.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/locale/config b/conf/locale/config
index 3a0b04adbb..67252b1fa0 100644
--- a/conf/locale/config
+++ b/conf/locale/config
@@ -1,4 +1,4 @@
{
- "locales" : ["en", "zh_CN"],
+ "locales" : ["en"],
"dummy-locale" : "fr"
}
diff --git a/i18n/tests/test_generate.py b/i18n/tests/test_generate.py
index b9a36ada33..f18dff0320 100644
--- a/i18n/tests/test_generate.py
+++ b/i18n/tests/test_generate.py
@@ -46,7 +46,7 @@ class TestGenerate(TestCase):
path = os.path.join(CONFIGURATION.get_messages_dir(locale), mofile)
exists = os.path.exists(path)
self.assertTrue(exists, msg='Missing file in locale %s: %s' % (locale, mofile))
- self.assertTrue(datetime.fromtimestamp(os.path.getmtime(path)) >= self.start_time,
+ self.assertTrue(datetime.fromtimestamp(os.path.getmtime(path), UTC) >= self.start_time,
msg='File not recently modified: %s' % path)
self.assert_merge_headers(locale)