From 38478c0a0750cfcf4c40600559a4dadecce6f724 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Wed, 13 Mar 2019 17:32:27 +0530 Subject: [PATCH 1/5] Mark leading polls instead of first poll since they are no longer sorted. --- poll/poll.py | 4 ++++ poll/public/handlebars/poll_results.handlebars | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/poll/poll.py b/poll/poll.py index ea12af6..fbd0e82 100644 --- a/poll/poll.py +++ b/poll/poll.py @@ -489,8 +489,11 @@ def tally_detail(self): total = 0 self.clean_tally() source_tally = self.tally + highest_count = None for key, value in answers.items(): count = int(source_tally[key]) + if highest_count is None or count > highest_count: + highest_count = count tally.append({ 'count': count, 'answer': value['label'], @@ -508,6 +511,7 @@ def tally_detail(self): answer['choice'] = True try: answer['percent'] = round(answer['count'] / float(total) * 100) + answer['leader'] = answer['count'] == highest_count except ZeroDivisionError: answer['percent'] = 0 diff --git a/poll/public/handlebars/poll_results.handlebars b/poll/public/handlebars/poll_results.handlebars index 2a61ca7..7b18809 100644 --- a/poll/public/handlebars/poll_results.handlebars +++ b/poll/public/handlebars/poll_results.handlebars @@ -23,7 +23,7 @@
- {{percent}}% + {{percent}}%
{{/each}} From 9db17a1cf61d1706aca189cf02310eb178211212 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Wed, 13 Mar 2019 17:44:07 +0530 Subject: [PATCH 2/5] Bump up version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7d83f80..5b6dfa8 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def package_data(pkg, roots): setup( name='xblock-poll', - version='1.8.1', + version='1.8.2', description='An XBlock for polling users.', packages=[ 'poll', From a0132a6d31342aa2a392d57db301569080e4ad22 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Thu, 14 Mar 2019 03:46:21 +0530 Subject: [PATCH 3/5] Update translations to pass validation --- poll/public/js/translations/de_de/textjs.js | 146 ++++++++++++++++ poll/public/js/translations/es_419/textjs.js | 148 ++++++++++++++++ poll/public/js/translations/ja_jp/textjs.js | 158 ++++++++++++++++++ poll/public/js/translations/pt_br/textjs.js | 150 +++++++++++++++++ poll/public/js/translations/zh_cn/textjs.js | 148 ++++++++++++++++ poll/translations/ar/LC_MESSAGES/textjs.mo | Bin 1736 -> 0 bytes poll/translations/de_DE/LC_MESSAGES/textjs.mo | Bin 1456 -> 0 bytes poll/translations/en/LC_MESSAGES/text.po | 46 ++--- poll/translations/en/LC_MESSAGES/textjs.mo | Bin 98 -> 0 bytes poll/translations/eo/LC_MESSAGES/text.mo | Bin 16430 -> 16541 bytes poll/translations/eo/LC_MESSAGES/text.po | 2 +- poll/translations/eo/LC_MESSAGES/textjs.mo | Bin 2750 -> 0 bytes .../translations/es_419/LC_MESSAGES/textjs.mo | Bin 1491 -> 0 bytes poll/translations/fr/LC_MESSAGES/textjs.mo | Bin 1549 -> 0 bytes poll/translations/ja_JP/LC_MESSAGES/textjs.mo | Bin 1576 -> 0 bytes poll/translations/pt_BR/LC_MESSAGES/textjs.mo | Bin 1459 -> 0 bytes poll/translations/zh_CN/LC_MESSAGES/textjs.mo | Bin 1353 -> 0 bytes 17 files changed, 774 insertions(+), 24 deletions(-) create mode 100644 poll/public/js/translations/de_de/textjs.js create mode 100644 poll/public/js/translations/es_419/textjs.js create mode 100644 poll/public/js/translations/ja_jp/textjs.js create mode 100644 poll/public/js/translations/pt_br/textjs.js create mode 100644 poll/public/js/translations/zh_cn/textjs.js delete mode 100644 poll/translations/ar/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/de_DE/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/en/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/eo/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/es_419/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/fr/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/ja_JP/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/pt_BR/LC_MESSAGES/textjs.mo delete mode 100644 poll/translations/zh_CN/LC_MESSAGES/textjs.mo diff --git a/poll/public/js/translations/de_de/textjs.js b/poll/public/js/translations/de_de/textjs.js new file mode 100644 index 0000000..ecf080d --- /dev/null +++ b/poll/public/js/translations/de_de/textjs.js @@ -0,0 +1,146 @@ + + (function(global){ + var PollXBlockI18N = { + init: function() { + + +(function (globals) { + + var django = globals.django || (globals.django = {}); + + + django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; + + + + /* gettext library */ + + django.catalog = { + "Answer": "Antwort", + "Delete": "L\u00f6schen", + "Feedback": "Feedback", + "Image URL": "Bild-URL", + "Image alternative text": "Bild zum alternativen Text", + "Question": "Frage", + "Results": "Ergebnisse", + "Results gathered from {total} respondent.": [ + "Ergebnisse von {total} Befragten.", + "Ergebnisse von {total} Befragten." + ], + "Submit": "Einreichen", + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "Eine Bild-URL oder ein Text oder beides muss hinzugef\u00fcgt sein. Wenn Sie ein Bild hinzuf\u00fcgen, m\u00fcssen Sie auch einen alternativen Text angeben, der das Bild so beschreibt, dass jemand die Umfrage auch dann beantworten kann, wenn das Bild nicht geladen wurde.", + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "Sie k\u00f6nnen Markdown eingeschr\u00e4nkt in Antworttexten verwenden, vorzugsweise nur in fett und kursiv.", + "move poll down": "Umfrage nach unten verschieben", + "move poll up": "Umfrage nach oben verschieben" + }; + + django.gettext = function (msgid) { + var value = django.catalog[msgid]; + if (typeof(value) == 'undefined') { + return msgid; + } else { + return (typeof(value) == 'string') ? value : value[0]; + } + }; + + django.ngettext = function (singular, plural, count) { + var value = django.catalog[singular]; + if (typeof(value) == 'undefined') { + return (count == 1) ? singular : plural; + } else { + return value[django.pluralidx(count)]; + } + }; + + django.gettext_noop = function (msgid) { return msgid; }; + + django.pgettext = function (context, msgid) { + var value = django.gettext(context + '\x04' + msgid); + if (value.indexOf('\x04') != -1) { + value = msgid; + } + return value; + }; + + django.npgettext = function (context, singular, plural, count) { + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); + if (value.indexOf('\x04') != -1) { + value = django.ngettext(singular, plural, count); + } + return value; + }; + + + django.interpolate = function (fmt, obj, named) { + if (named) { + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); + } else { + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); + } + }; + + + /* formatting library */ + + django.formats = { + "DATETIME_FORMAT": "j. F Y H:i", + "DATETIME_INPUT_FORMATS": [ + "%d.%m.%Y %H:%M:%S", + "%d.%m.%Y %H:%M:%S.%f", + "%d.%m.%Y %H:%M", + "%d.%m.%Y", + "%Y-%m-%d %H:%M:%S", + "%Y-%m-%d %H:%M:%S.%f", + "%Y-%m-%d %H:%M", + "%Y-%m-%d" + ], + "DATE_FORMAT": "j. F Y", + "DATE_INPUT_FORMATS": [ + "%d.%m.%Y", + "%d.%m.%y", + "%Y-%m-%d" + ], + "DECIMAL_SEPARATOR": ",", + "FIRST_DAY_OF_WEEK": "1", + "MONTH_DAY_FORMAT": "j. F", + "NUMBER_GROUPING": "3", + "SHORT_DATETIME_FORMAT": "d.m.Y H:i", + "SHORT_DATE_FORMAT": "d.m.Y", + "THOUSAND_SEPARATOR": ".", + "TIME_FORMAT": "H:i", + "TIME_INPUT_FORMATS": [ + "%H:%M:%S", + "%H:%M:%S.%f", + "%H:%M" + ], + "YEAR_MONTH_FORMAT": "F Y" + }; + + django.get_format = function (format_type) { + var value = django.formats[format_type]; + if (typeof(value) == 'undefined') { + return format_type; + } else { + return value; + } + }; + + /* add to global namespace */ + globals.pluralidx = django.pluralidx; + globals.gettext = django.gettext; + globals.ngettext = django.ngettext; + globals.gettext_noop = django.gettext_noop; + globals.pgettext = django.pgettext; + globals.npgettext = django.npgettext; + globals.interpolate = django.interpolate; + globals.get_format = django.get_format; + +}(this)); + + + } + }; + PollXBlockI18N.init(); + global.PollXBlockI18N = PollXBlockI18N; + }(this)); + \ No newline at end of file diff --git a/poll/public/js/translations/es_419/textjs.js b/poll/public/js/translations/es_419/textjs.js new file mode 100644 index 0000000..f8e60d1 --- /dev/null +++ b/poll/public/js/translations/es_419/textjs.js @@ -0,0 +1,148 @@ + + (function(global){ + var PollXBlockI18N = { + init: function() { + + +(function (globals) { + + var django = globals.django || (globals.django = {}); + + + django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; + + + + /* gettext library */ + + django.catalog = { + "Answer": "Respuesta", + "Delete": "Eliminar", + "Feedback": "Feedback", + "Image URL": "URL de la imagen", + "Image alternative text": "Texto alternativo de la imagen", + "Question": "Pregunta", + "Results": "Resultados", + "Results gathered from {total} respondent.": [ + "Resultados recopilados de {total} persona que respondi\u00f3.", + "Resultados recopilados de {total} personas que respondieron." + ], + "Submit": "Enviar", + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "Debe tener una URL o texto de la imagen y puede contener ambos. Si agrega una imagen, tambi\u00e9n debe proporcionar un texto alternativo que describa la imagen de manera que permita a alguien responder al sondeo si no se carg\u00f3 la imagen.", + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "Puede hacer uso limitado del lenguaje Markdown en los textos de respuesta, preferentemente solo en negrita y cursiva.", + "move poll down": "disminuir el sondeo", + "move poll up": "aumentar el sondeo" + }; + + django.gettext = function (msgid) { + var value = django.catalog[msgid]; + if (typeof(value) == 'undefined') { + return msgid; + } else { + return (typeof(value) == 'string') ? value : value[0]; + } + }; + + django.ngettext = function (singular, plural, count) { + var value = django.catalog[singular]; + if (typeof(value) == 'undefined') { + return (count == 1) ? singular : plural; + } else { + return value[django.pluralidx(count)]; + } + }; + + django.gettext_noop = function (msgid) { return msgid; }; + + django.pgettext = function (context, msgid) { + var value = django.gettext(context + '\x04' + msgid); + if (value.indexOf('\x04') != -1) { + value = msgid; + } + return value; + }; + + django.npgettext = function (context, singular, plural, count) { + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); + if (value.indexOf('\x04') != -1) { + value = django.ngettext(singular, plural, count); + } + return value; + }; + + + django.interpolate = function (fmt, obj, named) { + if (named) { + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); + } else { + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); + } + }; + + + /* formatting library */ + + django.formats = { + "DATETIME_FORMAT": "j \\d\\e F \\d\\e Y \\a \\l\\a\\s H:i", + "DATETIME_INPUT_FORMATS": [ + "%d/%m/%Y %H:%M:%S", + "%d/%m/%Y %H:%M:%S.%f", + "%d/%m/%Y %H:%M", + "%d/%m/%y %H:%M:%S", + "%d/%m/%y %H:%M:%S.%f", + "%d/%m/%y %H:%M", + "%Y-%m-%d %H:%M:%S", + "%Y-%m-%d %H:%M:%S.%f", + "%Y-%m-%d %H:%M", + "%Y-%m-%d" + ], + "DATE_FORMAT": "j \\d\\e F \\d\\e Y", + "DATE_INPUT_FORMATS": [ + "%d/%m/%Y", + "%d/%m/%y", + "%Y-%m-%d" + ], + "DECIMAL_SEPARATOR": ",", + "FIRST_DAY_OF_WEEK": "1", + "MONTH_DAY_FORMAT": "j \\d\\e F", + "NUMBER_GROUPING": "3", + "SHORT_DATETIME_FORMAT": "d/m/Y H:i", + "SHORT_DATE_FORMAT": "d/m/Y", + "THOUSAND_SEPARATOR": ".", + "TIME_FORMAT": "H:i", + "TIME_INPUT_FORMATS": [ + "%H:%M:%S", + "%H:%M:%S.%f", + "%H:%M" + ], + "YEAR_MONTH_FORMAT": "F \\d\\e Y" + }; + + django.get_format = function (format_type) { + var value = django.formats[format_type]; + if (typeof(value) == 'undefined') { + return format_type; + } else { + return value; + } + }; + + /* add to global namespace */ + globals.pluralidx = django.pluralidx; + globals.gettext = django.gettext; + globals.ngettext = django.ngettext; + globals.gettext_noop = django.gettext_noop; + globals.pgettext = django.pgettext; + globals.npgettext = django.npgettext; + globals.interpolate = django.interpolate; + globals.get_format = django.get_format; + +}(this)); + + + } + }; + PollXBlockI18N.init(); + global.PollXBlockI18N = PollXBlockI18N; + }(this)); + \ No newline at end of file diff --git a/poll/public/js/translations/ja_jp/textjs.js b/poll/public/js/translations/ja_jp/textjs.js new file mode 100644 index 0000000..7f3b1c6 --- /dev/null +++ b/poll/public/js/translations/ja_jp/textjs.js @@ -0,0 +1,158 @@ + + (function(global){ + var PollXBlockI18N = { + init: function() { + + +(function (globals) { + + var django = globals.django || (globals.django = {}); + + + django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; + + + + /* gettext library */ + + django.catalog = { + "Answer": "\u56de\u7b54", + "Delete": "\u524a\u9664", + "Feedback": "\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af", + "Image URL": "\u753b\u50cfURL", + "Image alternative text": "\u753b\u50cf\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8", + "Question": "\u8cea\u554f", + "Results": "\u7d50\u679c", + "Results gathered from {total} respondent.": [ + "\u56de\u7b54\u8005{total}\u4eba\u304b\u3089\u53ce\u96c6\u3057\u305f\u7d50\u679c\u3002", + "\u56de\u7b54\u8005{total}\u4eba\u304b\u3089\u53ce\u96c6\u3057\u305f\u7d50\u679c\u3002" + ], + "Submit": "\u63d0\u51fa", + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "\u3053\u3053\u306b\u306f\u3001\u753b\u50cfURL\u307e\u305f\u306f\u30c6\u30ad\u30b9\u30c8\u3001\u3042\u308b\u3044\u306f\u305d\u306e\u4e21\u65b9\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u753b\u50cf\u3092\u8ffd\u52a0\u3057\u305f\u5834\u5408\u306f\u3001\u753b\u50cf\u304c\u8aad\u307f\u8fbc\u3081\u306a\u304b\u3063\u305f\u5834\u5408\u3067\u3082\u56de\u7b54\u8005\u304c\u6295\u7968\u8abf\u67fb\u3067\u56de\u7b54\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u753b\u50cf\u3092\u8aac\u660e\u3059\u308b\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3082\u5165\u529b\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002", + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "\u56de\u7b54\u30c6\u30ad\u30b9\u30c8\u3067\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3092\u9650\u5b9a\u7684\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3067\u304d\u308c\u3070\u592a\u5b57\u3068\u30a4\u30bf\u30ea\u30c3\u30af\u4f53\u306e\u307f\u306e\u4f7f\u7528\u3068\u3057\u307e\u3059\u3002", + "move poll down": "\u6295\u7968\u7dcf\u6570\u3092\u4e0b\u3052\u308b", + "move poll up": "\u6295\u7968\u7dcf\u6570\u3092\u4e0a\u3052\u308b" + }; + + django.gettext = function (msgid) { + var value = django.catalog[msgid]; + if (typeof(value) == 'undefined') { + return msgid; + } else { + return (typeof(value) == 'string') ? value : value[0]; + } + }; + + django.ngettext = function (singular, plural, count) { + var value = django.catalog[singular]; + if (typeof(value) == 'undefined') { + return (count == 1) ? singular : plural; + } else { + return value[django.pluralidx(count)]; + } + }; + + django.gettext_noop = function (msgid) { return msgid; }; + + django.pgettext = function (context, msgid) { + var value = django.gettext(context + '\x04' + msgid); + if (value.indexOf('\x04') != -1) { + value = msgid; + } + return value; + }; + + django.npgettext = function (context, singular, plural, count) { + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); + if (value.indexOf('\x04') != -1) { + value = django.ngettext(singular, plural, count); + } + return value; + }; + + + django.interpolate = function (fmt, obj, named) { + if (named) { + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); + } else { + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); + } + }; + + + /* formatting library */ + + django.formats = { + "DATETIME_FORMAT": "Y\u5e74n\u6708j\u65e5G:i", + "DATETIME_INPUT_FORMATS": [ + "%Y-%m-%d %H:%M:%S", + "%Y-%m-%d %H:%M:%S.%f", + "%Y-%m-%d %H:%M", + "%Y-%m-%d", + "%m/%d/%Y %H:%M:%S", + "%m/%d/%Y %H:%M:%S.%f", + "%m/%d/%Y %H:%M", + "%m/%d/%Y", + "%m/%d/%y %H:%M:%S", + "%m/%d/%y %H:%M:%S.%f", + "%m/%d/%y %H:%M", + "%m/%d/%y" + ], + "DATE_FORMAT": "Y\u5e74n\u6708j\u65e5", + "DATE_INPUT_FORMATS": [ + "%Y-%m-%d", + "%m/%d/%Y", + "%m/%d/%y", + "%b %d %Y", + "%b %d, %Y", + "%d %b %Y", + "%d %b, %Y", + "%B %d %Y", + "%B %d, %Y", + "%d %B %Y", + "%d %B, %Y" + ], + "DECIMAL_SEPARATOR": ".", + "FIRST_DAY_OF_WEEK": "0", + "MONTH_DAY_FORMAT": "n\u6708j\u65e5", + "NUMBER_GROUPING": "0", + "SHORT_DATETIME_FORMAT": "Y/m/d G:i", + "SHORT_DATE_FORMAT": "Y/m/d", + "THOUSAND_SEPARATOR": ",", + "TIME_FORMAT": "G:i", + "TIME_INPUT_FORMATS": [ + "%H:%M:%S", + "%H:%M:%S.%f", + "%H:%M" + ], + "YEAR_MONTH_FORMAT": "Y\u5e74n\u6708" + }; + + django.get_format = function (format_type) { + var value = django.formats[format_type]; + if (typeof(value) == 'undefined') { + return format_type; + } else { + return value; + } + }; + + /* add to global namespace */ + globals.pluralidx = django.pluralidx; + globals.gettext = django.gettext; + globals.ngettext = django.ngettext; + globals.gettext_noop = django.gettext_noop; + globals.pgettext = django.pgettext; + globals.npgettext = django.npgettext; + globals.interpolate = django.interpolate; + globals.get_format = django.get_format; + +}(this)); + + + } + }; + PollXBlockI18N.init(); + global.PollXBlockI18N = PollXBlockI18N; + }(this)); + \ No newline at end of file diff --git a/poll/public/js/translations/pt_br/textjs.js b/poll/public/js/translations/pt_br/textjs.js new file mode 100644 index 0000000..302e125 --- /dev/null +++ b/poll/public/js/translations/pt_br/textjs.js @@ -0,0 +1,150 @@ + + (function(global){ + var PollXBlockI18N = { + init: function() { + + +(function (globals) { + + var django = globals.django || (globals.django = {}); + + + django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; + + + + /* gettext library */ + + django.catalog = { + "Answer": "Resposta", + "Delete": "Excluir", + "Feedback": "Feedback", + "Image URL": "URL da imagem", + "Image alternative text": "Texto alternativo da imagem", + "Question": "Pergunta", + "Results": "Resultados", + "Results gathered from {total} respondent.": [ + "Resultados coletados de {total} respondente.", + "Resultados coletados de {total} respondentes." + ], + "Submit": "Enviar", + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "Deve ter um URL ou texto de imagem, podendo ter ambos. Se voc\u00ea adicionar uma imagem, tamb\u00e9m dever\u00e1 fornecer um texto alternativo que descreva a imagem de forma que a pessoa consiga responder \u00e0 pesquisa se a imagem n\u00e3o for carregada.", + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "Voc\u00ea pode fazer uso limitado de Markdown em textos de resposta, de prefer\u00eancia apenas negrito e it\u00e1lico.", + "move poll down": "mover pesquisa para baixo", + "move poll up": "mover pesquisa para cima" + }; + + django.gettext = function (msgid) { + var value = django.catalog[msgid]; + if (typeof(value) == 'undefined') { + return msgid; + } else { + return (typeof(value) == 'string') ? value : value[0]; + } + }; + + django.ngettext = function (singular, plural, count) { + var value = django.catalog[singular]; + if (typeof(value) == 'undefined') { + return (count == 1) ? singular : plural; + } else { + return value[django.pluralidx(count)]; + } + }; + + django.gettext_noop = function (msgid) { return msgid; }; + + django.pgettext = function (context, msgid) { + var value = django.gettext(context + '\x04' + msgid); + if (value.indexOf('\x04') != -1) { + value = msgid; + } + return value; + }; + + django.npgettext = function (context, singular, plural, count) { + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); + if (value.indexOf('\x04') != -1) { + value = django.ngettext(singular, plural, count); + } + return value; + }; + + + django.interpolate = function (fmt, obj, named) { + if (named) { + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); + } else { + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); + } + }; + + + /* formatting library */ + + django.formats = { + "DATETIME_FORMAT": "j \\d\\e F \\d\\e Y \u00e0\\s H:i", + "DATETIME_INPUT_FORMATS": [ + "%d/%m/%Y %H:%M:%S", + "%d/%m/%Y %H:%M:%S.%f", + "%d/%m/%Y %H:%M", + "%d/%m/%Y", + "%d/%m/%y %H:%M:%S", + "%d/%m/%y %H:%M:%S.%f", + "%d/%m/%y %H:%M", + "%d/%m/%y", + "%Y-%m-%d %H:%M:%S", + "%Y-%m-%d %H:%M:%S.%f", + "%Y-%m-%d %H:%M", + "%Y-%m-%d" + ], + "DATE_FORMAT": "j \\d\\e F \\d\\e Y", + "DATE_INPUT_FORMATS": [ + "%d/%m/%Y", + "%d/%m/%y", + "%Y-%m-%d" + ], + "DECIMAL_SEPARATOR": ",", + "FIRST_DAY_OF_WEEK": "0", + "MONTH_DAY_FORMAT": "j \\d\\e F", + "NUMBER_GROUPING": "3", + "SHORT_DATETIME_FORMAT": "d/m/Y H:i", + "SHORT_DATE_FORMAT": "d/m/Y", + "THOUSAND_SEPARATOR": ".", + "TIME_FORMAT": "H:i", + "TIME_INPUT_FORMATS": [ + "%H:%M:%S", + "%H:%M:%S.%f", + "%H:%M" + ], + "YEAR_MONTH_FORMAT": "F \\d\\e Y" + }; + + django.get_format = function (format_type) { + var value = django.formats[format_type]; + if (typeof(value) == 'undefined') { + return format_type; + } else { + return value; + } + }; + + /* add to global namespace */ + globals.pluralidx = django.pluralidx; + globals.gettext = django.gettext; + globals.ngettext = django.ngettext; + globals.gettext_noop = django.gettext_noop; + globals.pgettext = django.pgettext; + globals.npgettext = django.npgettext; + globals.interpolate = django.interpolate; + globals.get_format = django.get_format; + +}(this)); + + + } + }; + PollXBlockI18N.init(); + global.PollXBlockI18N = PollXBlockI18N; + }(this)); + \ No newline at end of file diff --git a/poll/public/js/translations/zh_cn/textjs.js b/poll/public/js/translations/zh_cn/textjs.js new file mode 100644 index 0000000..263f9f0 --- /dev/null +++ b/poll/public/js/translations/zh_cn/textjs.js @@ -0,0 +1,148 @@ + + (function(global){ + var PollXBlockI18N = { + init: function() { + + +(function (globals) { + + var django = globals.django || (globals.django = {}); + + + django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; + + + + /* gettext library */ + + django.catalog = { + "Answer": "\u7b54\u6848", + "Delete": "\u5220\u9664", + "Feedback": "\u53cd\u9988", + "Image URL": "\u56fe\u50cf URL", + "Image alternative text": "\u56fe\u50cf\u66ff\u6362\u6587\u672c", + "Question": "\u95ee\u9898", + "Results": "\u7ed3\u679c", + "Results gathered from {total} respondent.": [ + "\u4ece {total} \u4e2a\u56de\u5e94\u8005\u5904\u6536\u96c6\u7684\u7ed3\u679c\u3002", + "\u4ece {total} \u4e2a\u56de\u5e94\u8005\u5904\u6536\u96c6\u7684\u7ed3\u679c\u3002" + ], + "Submit": "\u63d0\u4ea4", + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "\u5176\u4e2d\u5fc5\u987b\u5305\u542b\u56fe\u50cf URL \u548c/\u6216\u6587\u672c\u3002\u5982\u679c\u60a8\u6dfb\u52a0\u56fe\u50cf\uff0c\u8fd8\u5fc5\u987b\u63d0\u4f9b\u63cf\u8ff0\u8be5\u56fe\u50cf\u7684\u66ff\u6362\u6587\u672c\uff0c\u4ee5\u5141\u8bb8\u7528\u6237\u5728\u672a\u52a0\u8f7d\u8be5\u56fe\u50cf\u7684\u60c5\u51b5\u4e0b\u56de\u7b54\u8c03\u67e5\u95ee\u5377\u3002", + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "Markdown \u5728\u7b54\u6848\u6587\u672c\u4e2d\u7684\u5e94\u7528\u53ef\u80fd\u5f88\u6709\u9650\uff0c\u6700\u597d\u4ec5\u9650\u4e8e\u7c97\u4f53\u548c\u659c\u4f53\u3002", + "move poll down": "\u4e0b\u79fb\u8c03\u67e5\u95ee\u5377", + "move poll up": "\u4e0a\u79fb\u8c03\u67e5\u95ee\u5377" + }; + + django.gettext = function (msgid) { + var value = django.catalog[msgid]; + if (typeof(value) == 'undefined') { + return msgid; + } else { + return (typeof(value) == 'string') ? value : value[0]; + } + }; + + django.ngettext = function (singular, plural, count) { + var value = django.catalog[singular]; + if (typeof(value) == 'undefined') { + return (count == 1) ? singular : plural; + } else { + return value[django.pluralidx(count)]; + } + }; + + django.gettext_noop = function (msgid) { return msgid; }; + + django.pgettext = function (context, msgid) { + var value = django.gettext(context + '\x04' + msgid); + if (value.indexOf('\x04') != -1) { + value = msgid; + } + return value; + }; + + django.npgettext = function (context, singular, plural, count) { + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); + if (value.indexOf('\x04') != -1) { + value = django.ngettext(singular, plural, count); + } + return value; + }; + + + django.interpolate = function (fmt, obj, named) { + if (named) { + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); + } else { + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); + } + }; + + + /* formatting library */ + + django.formats = { + "DATETIME_FORMAT": "Y\u5e74n\u6708j\u65e5 H:i", + "DATETIME_INPUT_FORMATS": [ + "%Y/%m/%d %H:%M", + "%Y-%m-%d %H:%M", + "%Y\u5e74%n\u6708%j\u65e5 %H:%M", + "%Y/%m/%d %H:%M:%S", + "%Y-%m-%d %H:%M:%S", + "%Y\u5e74%n\u6708%j\u65e5 %H:%M:%S", + "%Y/%m/%d %H:%M:%S.%f", + "%Y-%m-%d %H:%M:%S.%f", + "%Y\u5e74%n\u6708%j\u65e5 %H:%n:%S.%f", + "%Y-%m-%d" + ], + "DATE_FORMAT": "Y\u5e74n\u6708j\u65e5", + "DATE_INPUT_FORMATS": [ + "%Y/%m/%d", + "%Y-%m-%d", + "%Y\u5e74%n\u6708%j\u65e5" + ], + "DECIMAL_SEPARATOR": ".", + "FIRST_DAY_OF_WEEK": "1", + "MONTH_DAY_FORMAT": "m\u6708j\u65e5", + "NUMBER_GROUPING": "4", + "SHORT_DATETIME_FORMAT": "Y\u5e74n\u6708j\u65e5 H:i", + "SHORT_DATE_FORMAT": "Y\u5e74n\u6708j\u65e5", + "THOUSAND_SEPARATOR": "", + "TIME_FORMAT": "H:i", + "TIME_INPUT_FORMATS": [ + "%H:%M", + "%H:%M:%S", + "%H:%M:%S.%f" + ], + "YEAR_MONTH_FORMAT": "Y\u5e74n\u6708" + }; + + django.get_format = function (format_type) { + var value = django.formats[format_type]; + if (typeof(value) == 'undefined') { + return format_type; + } else { + return value; + } + }; + + /* add to global namespace */ + globals.pluralidx = django.pluralidx; + globals.gettext = django.gettext; + globals.ngettext = django.ngettext; + globals.gettext_noop = django.gettext_noop; + globals.pgettext = django.pgettext; + globals.npgettext = django.npgettext; + globals.interpolate = django.interpolate; + globals.get_format = django.get_format; + +}(this)); + + + } + }; + PollXBlockI18N.init(); + global.PollXBlockI18N = PollXBlockI18N; + }(this)); + \ No newline at end of file diff --git a/poll/translations/ar/LC_MESSAGES/textjs.mo b/poll/translations/ar/LC_MESSAGES/textjs.mo deleted file mode 100644 index 62c4ae78831ccc87324194d9a15ad4b5f57671bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1736 zcmb_bO^aMb6fHG=#g9bW#!hi+U=iREh=bn42`nMCu zzB3rlW4?@e1M>yUzcFRJ_lPl10GFruA@C{0=YdZHKL@@D{9?M^0X~Vi4_pC$3zYmn zfxiR)0-gu{{OF|StB)D;EaEqTuK~{hj{_5+J!a_%-5R9yjIkJ^YL=V!f}>B)y+8f3NpM+eLwwOua9;-VQQ`6s`_!Cs zd69&ChIGM(hRa+;^~^WvtKfr8E>Y(4mQN#>hRT0FnODrmMYS0Rv(kujY8H8*hJ^r| zQasZ~K2t$USdFNLEj?28p-~}PuG5+?$VSmTX-QX<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7YYo4iJ8k`UH0g9q zoWC!*-TrnF8ft1i$H!i`>EzipEEb|I@sTQ!erBqr=f)URGb^x8s~NhfAlzLO{Fjtu37C@?xzO=t%~=S(`N zZ8FYuN_2;Nc_f3Fw|Yq$%_p9XhLVQ$y4(md!^Vh~B5>o-BkN34b{ZcOElV_v&jhY! zs~29BZQ2Dwr#1BI7eC9=J;OuF_Y1=XN4SQU5vm+f7Idpc%lQ(;xaFLwK\n" "Language-Team: LANGUAGE \n" @@ -90,7 +90,7 @@ msgstr "" msgid "Private results may not be False when Maximum Submissions is not 1." msgstr "" -#: poll/poll.py:446 poll/poll.py:832 +#: poll/poll.py:446 poll/poll.py:837 msgid "Poll" msgstr "" @@ -118,7 +118,7 @@ msgstr "" msgid "The answer options on this poll." msgstr "" -#: poll/poll.py:461 poll/poll.py:858 +#: poll/poll.py:461 poll/poll.py:863 msgid "Total tally of answers from students." msgstr "" @@ -126,81 +126,81 @@ msgstr "" msgid "The student's answer" msgstr "" -#: poll/poll.py:666 poll/poll.py:1137 +#: poll/poll.py:669 poll/poll.py:1142 msgid "You have already voted in this poll." msgstr "" -#: poll/poll.py:671 +#: poll/poll.py:674 msgid "Answer not included with request." msgstr "" #. Translators: {choice} uniquely identifies a specific answer belonging to a poll or survey. -#: poll/poll.py:680 +#: poll/poll.py:683 #, python-brace-format msgid "No key \"{choice}\" in answers table." msgstr "" -#: poll/poll.py:689 poll/poll.py:1145 +#: poll/poll.py:692 poll/poll.py:1150 msgid "You have already voted as many times as you are allowed." msgstr "" -#: poll/poll.py:719 +#: poll/poll.py:722 msgid "You must specify a question." msgstr "" -#: poll/poll.py:722 poll/poll.py:817 poll/poll.py:1199 poll/poll.py:1311 +#: poll/poll.py:725 poll/poll.py:822 poll/poll.py:1204 poll/poll.py:1316 msgid "Answer" msgstr "" -#: poll/poll.py:816 poll/poll.py:1200 poll/poll.py:1310 +#: poll/poll.py:821 poll/poll.py:1205 poll/poll.py:1315 msgid "Question" msgstr "" -#: poll/poll.py:818 poll/poll.py:1312 +#: poll/poll.py:823 poll/poll.py:1317 msgid "Submissions count" msgstr "" -#: poll/poll.py:829 +#: poll/poll.py:834 msgid "Survey" msgstr "" -#: poll/poll.py:835 +#: poll/poll.py:840 msgid "Yes" msgstr "" -#: poll/poll.py:836 +#: poll/poll.py:841 msgid "No" msgstr "" -#: poll/poll.py:837 +#: poll/poll.py:842 msgid "Maybe" msgstr "" -#: poll/poll.py:839 +#: poll/poll.py:844 msgid "Answer choices for this Survey" msgstr "" -#: poll/poll.py:843 +#: poll/poll.py:848 msgid "Are you enjoying the course?" msgstr "" -#: poll/poll.py:845 +#: poll/poll.py:850 msgid "Would you recommend this course to your friends?" msgstr "" -#: poll/poll.py:849 +#: poll/poll.py:854 msgid "Do you think you will learn a lot?" msgstr "" -#: poll/poll.py:851 +#: poll/poll.py:856 msgid "Questions for this Survey" msgstr "" -#: poll/poll.py:860 +#: poll/poll.py:865 msgid "The user's answers" msgstr "" -#: poll/poll.py:1153 +#: poll/poll.py:1158 msgid "" "Not all questions were included, or unknown questions were included. Try " "refreshing and trying again." @@ -208,7 +208,7 @@ msgstr "" #. Translators: {answer_key} uniquely identifies a specific answer belonging to a poll or survey. #. {question_key} uniquely identifies a specific question belonging to a poll or survey. -#: poll/poll.py:1166 +#: poll/poll.py:1171 #, python-brace-format msgid "Found unknown answer '{answer_key}' for question key '{question_key}'" msgstr "" diff --git a/poll/translations/en/LC_MESSAGES/textjs.mo b/poll/translations/en/LC_MESSAGES/textjs.mo deleted file mode 100644 index 4bf2ad8125f4866b2ca0ffb6ecaaf73c451c42d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmca7#4?ou2pEA_28dOFm>Gz5fEWZUfLH^FErA%M1`eF_^GZ_lN_0ai3sS8VN>VFI b^b2wlGxMw!k~0#Eic?E$OH0ypEw~r}8*mWd diff --git a/poll/translations/eo/LC_MESSAGES/text.mo b/poll/translations/eo/LC_MESSAGES/text.mo index 8eb3560111ba2efb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Sjm}iv6^yHx0mPejQ)FZBK5R)#Ir~y8cY-!!@1?;{|Og(dEfzT;DNqIcbdp$ z{D!)~CRU?6?ZJ5lPNJLk+tp+Xf8bfH%d`&PI5MZ?XIW=yJL>pmY(p>VMw7G2|0yc_ z+2(E>N8M@s8nS?ecpnd=_6O&PJj7(I!vNmIB=V`5c!ZJKkF7Y3V_1`CE!fU(ZqZIh zy`Nw6A4}yUR^Ttx33AtounCz)?Kjq2uVodwXnRq2_yQl`6ei>Oe9Io}p#2=Vg%lQu zwBT_Zz%RH9JKG95iBtmEj(2+u{A~q3PVu%ESd8Lxz%$TQ`4Vjr?1Lgu) zhxvMjV=S?ih$FP{bj(6h#Yx0lP4f}yfejT;h&|ER=1H+f=V+QWRa)E@=4(_=UC#nX z!2Dy;pQ=2KcDGUN>9)Hw*_iqMZ^kl${g@?{Z<1;jo{p4y0`|11YHCRY2hIHVDDnNX WPlWkCJKv`o=R7I#u|8WtZ^VB{ikl4p diff --git a/poll/translations/eo/LC_MESSAGES/text.po b/poll/translations/eo/LC_MESSAGES/text.po index 4bb2c12..95c8b04 100644 --- a/poll/translations/eo/LC_MESSAGES/text.po +++ b/poll/translations/eo/LC_MESSAGES/text.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-12-25 21:42+0000\n" +"POT-Creation-Date: 2019-03-13 22:09+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/poll/translations/eo/LC_MESSAGES/textjs.mo b/poll/translations/eo/LC_MESSAGES/textjs.mo deleted file mode 100644 index 0f64214e21f525eb5e709e92028f32efaa282ec9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2750 zcmb_d-)kII6uxS$8h;=PJ_#P#hg#W2^g&8P6lnco#SceEEzJp8-Dvo(KK_ z%mMd+{{a6467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*aofHL+NwJ>8M~;|2c6rtCVjg}N;6K>N^F81OTQLe8RR2$-XgPUseg{Z<#~8AXSb zxPiC@>N1hQW49#rc#O5sfD9Iz+Xnh|3b|_WlHt%Y_hwst!hKxaTlR9LYIv!4Z2eVg zW*nlVuX37P{PI+}ufE(in;V6i=dke!90GyJ@k$tP_CO7-zp;xR{k$7wnmtmjY{RXt zol{<6lSX^%>O0b|-P22m>X{y8Sv$!dJYPHM9U|kAPzmZs=7yhJv~pd>#nK)(l~JNJ zq*aZh%xOsw0i2pD8%}dK);OZOmUxP;xQ16>`YlTMY7d@zbdU7#Sg)bM@4}_Zkp8ep zrL)0kyiv1g*DA~|&wvpMb9n82X z&BFWDX^;-1^)8T zw&uaZN@Fn2)K#98#yafCS7=S+mrT&{2mAZ^t z*MRr1K7B-~7lFS5UjY6M#Bm)`UvkL6^;%CjOMc<-G^XeS%5~ss9Y|ek)y3OBtvIS{ z>^QT!!E9!_Ia5cSo-=)T{OX=h;Iqi_ugph3!A7bDbqrOfc9i}{3ygqXo6is4UTHaEab(M z=%}T2D5Q-!zci^kHJNrPP#?q6nws?gkEFcNnGB~U+8HM-c`R%_X`DkS3tcEk`|bYYHAevmi7egN5d{fqq?pT(!7l*jtuf9R{D#k1HqZo?ovTzS=u& z{TtLQbWEJzD!ILK^^!UsHt1bqbffR1?O>O~&~>=0ZDa+LKqGR0-21L}MV){h^xQe7 zt)~auv;S-}Y{WNOoOAvcHfai5=g@AX+?l86n1Y9>7K~#I^I^lV(Su$~`}ZKqb-xU2 zc?36>Ot6`nDusg_8Nxnx{T^ zvfVel#I7zWS!zRxzSi0%-dE~&0i$69zrh(J2Xi2-I_>T7V`P#L2-0!RQ6p^l0bT%Jc^80!Ug*${{qT{+IIi| diff --git a/poll/translations/ja_JP/LC_MESSAGES/textjs.mo b/poll/translations/ja_JP/LC_MESSAGES/textjs.mo deleted file mode 100644 index ba9f5e42c1a65a3dda4749350e4a3d9eb9a977a7..0000000000000000000000000000000000000000 GIT binary pat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s.mo deleted file mode 100644 index bef2fb0c00c6cf95f975f51a3f41ab0935a7ccd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1459 zcma)5F|Slb6dn~+5G}+Qh$fs$EtaJt24i6m<4ZI_cu2JJ?7e4qhj;Is%go%}_ar3R zSQsjzjg`boDq8BL_a6{DEByr)erNXX@`4SM%zpRG%sJwH{}=F2;6K3Yz(1Z} z_k8yS=T0C#4}1@J5oq-rpw;Pz_%`rW#6JMv0{%3tKL8#_{1Esx@Db4ZojKy%-@tc( zd%!o2I(HiQ9q<(J7a*vVVg0R!4WzqQFs+91usd2`(+8BxKx!E%T{xEDqmY&o-N({M z7WaurJ>hE4?X)}-x_0HW;ftFrF>v+^p)C8^ebGzGUW2B}z@xs4d;f znz^}6QBtR&mXOEKd@_yQ)qc|Y>~`lqQQN0Xa|QtpZt$^yy1do^z&JQWgC~5<(do`#?-fK3JbvYTuwi)98|t zwxR(dDLR_8C9Bh>AwNA-q4qTe&D1E@WA_zE8uym>gc^@KL%==>>6AX_xL4~EcSh5p zBwiqmKwYL1dD0w^2K-FaXg~%J&3y&^T7_Jtxm7q6_MN+^A>%#H?jCeeBoUOp-nj^|Mw)(wAk%h$7J(_9^QXw5(*5wataI=@Sg=E1nO);+J zS{jPlHd7}lDMN;k{EWB%mPo5#ZSQ996BF#P%@3>J)GEL=G0Kc<9=k6KXS)wg`CH=y zdlxf7HtV=`k_<$Xt(Lzgo_A!y+ET0gq4HqcN#I05X3;}5XqH#^U@To5D?Xvtab%jX O-`C=?r*|sc+WiNEIkE)+ diff --git a/poll/translations/zh_CN/LC_MESSAGES/textjs.mo b/poll/translations/zh_CN/LC_MESSAGES/textjs.mo deleted file mode 100644 index ff03f747ba99a94cd4134a932f0db8dfb6161bf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1353 zcmb7?%We}%6o!lI3|EanniY$ZSTKtab_juHF$zLN8l)KrLTEOW-DTXQ-DP!GV**0T z1v4f%ID!x^wz!Feh#`QGAXbc%2VlV)ASAlV_GWki7W~!SWCAOuq~oto`CR^Uy5DVC zeVyQJhHZnDVOwFJVCEcLLC9LLH{l=PkMNIy>%bG>&)})#ehB;l{wUZ7UIk5l3w#g$ z3myaCu8e!`SVhQ2_`AVhz#h=VI|==SXTkNj9|E_4<>dZu!fEg?+|MTdy48ft!~Y31 z{oa5kZ~K~t;S`_dLJIn4dQk^UFblT2p0$1R%i zM2?=5LNez(^|+rGuEky1{oRp%H#rida<(LWS=*<%z?U@3Ab`2l{-TcxFA~&+TZ^Xg zR}_*GGTTjQZ-x$tfHKQkO6rPkqGHVP1}+L>h)EZd^4kkk>(>L$k_(rC}Ieoh@5 zGh=~)&#B1JL(J>9L;*9SX;Knz!0&=|p5Y!#IRjL<_(=&P18cCcb32XwcZ+kxKN1#E-hVsK*}Y$-i~&3F+K;+Ieu3v>Mm+of-)nSC&46u>M$8@2L5S_Fz#x zyr3sub*dLzw=cw@9|nj2XSA-2hx1TXd==Jb)nc)8zoE)SHU7_k0;#%M-la>Eu{N|& z)5DOZhiCL$Lyg{xBR{?_w-;~56-?2Es;*Spi_hE7rs4pITs|Y>!^V^<4z-`wTN5+7 zG^c7ay7m|a+s)=zStCVt@nu-QjKQ(X_VW>acM2O)V{>NSrT2^cc-65`%!8KL6soJr zv-U_+EtGWaQs>qd6`&qCM6xw;nZ?cOzka^xLb? D6*v;0 From 069e5d7d3900b799d038e8e36b49e7a9091abafa Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Thu, 14 Mar 2019 03:48:43 +0530 Subject: [PATCH 4/5] Fixes based on feedback --- poll/poll.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poll/poll.py b/poll/poll.py index fbd0e82..e559015 100644 --- a/poll/poll.py +++ b/poll/poll.py @@ -511,10 +511,11 @@ def tally_detail(self): answer['choice'] = True try: answer['percent'] = round(answer['count'] / float(total) * 100) - answer['leader'] = answer['count'] == highest_count except ZeroDivisionError: answer['percent'] = 0 + answer['leader'] = answer['count'] == highest_count + # This should always be true, but on the off chance there are # no answers... if tally: From 0ae7251b2ad96c12efdb6937550dc04e1c1cc539 Mon Sep 17 00:00:00 2001 From: Kshitij Sobti Date: Thu, 14 Mar 2019 04:32:59 +0530 Subject: [PATCH 5/5] Update translations --- poll/translations/en/LC_MESSAGES/text.po | 46 ++++++++++++------------ poll/translations/eo/LC_MESSAGES/text.po | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/poll/translations/en/LC_MESSAGES/text.po b/poll/translations/en/LC_MESSAGES/text.po index 7e22d93..3fe46e5 100644 --- a/poll/translations/en/LC_MESSAGES/text.po +++ b/poll/translations/en/LC_MESSAGES/text.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-13 22:10+0000\n" +"POT-Creation-Date: 2019-03-13 23:02+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -90,7 +90,7 @@ msgstr "" msgid "Private results may not be False when Maximum Submissions is not 1." msgstr "" -#: poll/poll.py:446 poll/poll.py:837 +#: poll/poll.py:446 poll/poll.py:838 msgid "Poll" msgstr "" @@ -118,7 +118,7 @@ msgstr "" msgid "The answer options on this poll." msgstr "" -#: poll/poll.py:461 poll/poll.py:863 +#: poll/poll.py:461 poll/poll.py:864 msgid "Total tally of answers from students." msgstr "" @@ -126,81 +126,81 @@ msgstr "" msgid "The student's answer" msgstr "" -#: poll/poll.py:669 poll/poll.py:1142 +#: poll/poll.py:670 poll/poll.py:1143 msgid "You have already voted in this poll." msgstr "" -#: poll/poll.py:674 +#: poll/poll.py:675 msgid "Answer not included with request." msgstr "" #. Translators: {choice} uniquely identifies a specific answer belonging to a poll or survey. -#: poll/poll.py:683 +#: poll/poll.py:684 #, python-brace-format msgid "No key \"{choice}\" in answers table." msgstr "" -#: poll/poll.py:692 poll/poll.py:1150 +#: poll/poll.py:693 poll/poll.py:1151 msgid "You have already voted as many times as you are allowed." msgstr "" -#: poll/poll.py:722 +#: poll/poll.py:723 msgid "You must specify a question." msgstr "" -#: poll/poll.py:725 poll/poll.py:822 poll/poll.py:1204 poll/poll.py:1316 +#: poll/poll.py:726 poll/poll.py:823 poll/poll.py:1205 poll/poll.py:1317 msgid "Answer" msgstr "" -#: poll/poll.py:821 poll/poll.py:1205 poll/poll.py:1315 +#: poll/poll.py:822 poll/poll.py:1206 poll/poll.py:1316 msgid "Question" msgstr "" -#: poll/poll.py:823 poll/poll.py:1317 +#: poll/poll.py:824 poll/poll.py:1318 msgid "Submissions count" msgstr "" -#: poll/poll.py:834 +#: poll/poll.py:835 msgid "Survey" msgstr "" -#: poll/poll.py:840 +#: poll/poll.py:841 msgid "Yes" msgstr "" -#: poll/poll.py:841 +#: poll/poll.py:842 msgid "No" msgstr "" -#: poll/poll.py:842 +#: poll/poll.py:843 msgid "Maybe" msgstr "" -#: poll/poll.py:844 +#: poll/poll.py:845 msgid "Answer choices for this Survey" msgstr "" -#: poll/poll.py:848 +#: poll/poll.py:849 msgid "Are you enjoying the course?" msgstr "" -#: poll/poll.py:850 +#: poll/poll.py:851 msgid "Would you recommend this course to your friends?" msgstr "" -#: poll/poll.py:854 +#: poll/poll.py:855 msgid "Do you think you will learn a lot?" msgstr "" -#: poll/poll.py:856 +#: poll/poll.py:857 msgid "Questions for this Survey" msgstr "" -#: poll/poll.py:865 +#: poll/poll.py:866 msgid "The user's answers" msgstr "" -#: poll/poll.py:1158 +#: poll/poll.py:1159 msgid "" "Not all questions were included, or unknown questions were included. Try " "refreshing and trying again." @@ -208,7 +208,7 @@ msgstr "" #. Translators: {answer_key} uniquely identifies a specific answer belonging to a poll or survey. #. {question_key} uniquely identifies a specific question belonging to a poll or survey. -#: poll/poll.py:1171 +#: poll/poll.py:1172 #, python-brace-format msgid "Found unknown answer '{answer_key}' for question key '{question_key}'" msgstr "" diff --git a/poll/translations/eo/LC_MESSAGES/text.po b/poll/translations/eo/LC_MESSAGES/text.po index 95c8b04..01c1f49 100644 --- a/poll/translations/eo/LC_MESSAGES/text.po +++ b/poll/translations/eo/LC_MESSAGES/text.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-13 22:09+0000\n" +"POT-Creation-Date: 2019-03-13 23:02+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"