diff --git a/Makefile b/Makefile index ee10bea..f3e6503 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,5 @@ WORKING_DIR := recommender -EXTRACT_DIR := $(WORKING_DIR)/conf/locale/en/LC_MESSAGES -EXTRACTED_DJANGO_PARTIAL := $(EXTRACT_DIR)/django-partial.po -EXTRACTED_DJANGOJS_PARTIAL := $(EXTRACT_DIR)/djangojs-partial.po -EXTRACTED_DJANGO := $(EXTRACT_DIR)/django.po +JS_TARGET := $(WORKING_DIR)/public/js/translations COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt .PHONY: $(COMMON_CONSTRAINTS_TXT) @@ -22,12 +19,8 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with pip-compile --upgrade -o requirements/ci.txt requirements/ci.in extract_translations: ## extract strings to be translated, outputting .po files - cd $(WORKING_DIR) && i18n_tool extract - mv $(EXTRACTED_DJANGO_PARTIAL) $(EXTRACTED_DJANGO) - # Safely concatenate djangojs if it exists - if test -f $(EXTRACTED_DJANGOJS_PARTIAL); then \ - msgcat $(EXTRACTED_DJANGO) $(EXTRACTED_DJANGOJS_PARTIAL) -o $(EXTRACTED_DJANGO) && \ - rm $(EXTRACTED_DJANGOJS_PARTIAL); \ - fi - sed -i'' -e 's/nplurals=INTEGER/nplurals=2/' $(EXTRACTED_DJANGO) - sed -i'' -e 's/plural=EXPRESSION/plural=\(n != 1\)/' $(EXTRACTED_DJANGO) + cd $(WORKING_DIR) && i18n_tool extract --no-segment --merge-po-files + +compile_translations: ## compile translation files, outputting .mo files for each supported language + cd $(WORKING_DIR) && i18n_tool generate -v + python manage.py compilejsi18n --namespace RecommenderXBlockI18N --output $(JS_TARGET) diff --git a/dev_settings.py b/dev_settings.py new file mode 100644 index 0000000..acc9d54 --- /dev/null +++ b/dev_settings.py @@ -0,0 +1,92 @@ +""" +Django settings for xblock-drag-and-drop-v2 project. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +from __future__ import absolute_import +import os +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +# This is just a container for running tests, it's okay to allow it to be +# defaulted here if not present in environment settings +SECRET_KEY = os.environ.get('SECRET_KEY', '&=@m=qyqg#l!f99ouuuinpbsv0ah001unk@q^7)bkr^^n5@q1=') + +# SECURITY WARNING: don't run with debug turned on in production! +# This is just a container for running tests +DEBUG = True + +TEMPLATE_DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = ( + 'statici18n', + 'recommender', +) + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' + +# statici18n +# http://django-statici18n.readthedocs.io/en/latest/settings.html + +LANGUAGES = [ + ('ar', 'Arabic'), + ('de', 'German'), + ('en', 'English - Source Language'), + ('eo', 'Esperanto'), + ('es_419', 'Spanish (Latin America)'), + ('fr', 'French'), + ('he', 'Hebrew'), + ('hi', 'Hindi'), + ('it', 'Italian'), + ('ja', 'Japanese'), + ('ko', 'Korean (Korea)'), + ('nl', 'Dutch'), + ('pl', 'Polski'), + ('pt_BR', 'Portuguese (Brazil)'), + ('pt_PT', 'Portuguese (Portugal)'), + ('ru', 'Russian'), + ('tr', 'Turkish'), + ('zh_CN', 'Chinese (China)'), +] + +LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")] + +STATICI18N_DOMAIN = 'text' +STATICI18N_NAMESPACE = 'RecommenderXBlockI18N' +STATICI18N_PACKAGES = ( + 'recommender', +) +STATICI18N_ROOT = 'recommender/public/js' +STATICI18N_OUTPUT_DIR = 'translations' diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..44a316e --- /dev/null +++ b/manage.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +import os +import sys +from django.core.management import execute_from_command_line + +if __name__ == "__main__": + os.environ.setdefault( + "DJANGO_SETTINGS_MODULE", + "dev_settings" + ) + + execute_from_command_line(sys.argv) diff --git a/recommender/__init__.py b/recommender/__init__.py index 6e5ec82..40dad5f 100644 --- a/recommender/__init__.py +++ b/recommender/__init__.py @@ -2,6 +2,8 @@ This XBlock will show a set of recommended resources which may be helpful to students solving a given problem. """ -from .recommender import RecommenderXBlock +# We avoid importing RecommenderXBlock here, because it's importing Filesystem from xblock.reference.plugins +# which is not loaded when running `manage.py` commands (which is used by `make compile_translations`) +# from .recommender import RecommenderXBlock __version__ = '2.1.0' diff --git a/recommender/conf/locale/config.yaml b/recommender/conf/locale/config.yaml index a968d94..c0fb690 100644 --- a/recommender/conf/locale/config.yaml +++ b/recommender/conf/locale/config.yaml @@ -2,3 +2,6 @@ locales: - en # English - Source Language + +ignore_dirs: + - public diff --git a/recommender/conf/locale/en/LC_MESSAGES/django.po b/recommender/conf/locale/en/LC_MESSAGES/django.po index 4eccdb1..7392522 100644 --- a/recommender/conf/locale/en/LC_MESSAGES/django.po +++ b/recommender/conf/locale/en/LC_MESSAGES/django.po @@ -1,54 +1,468 @@ +# edX translation file. +# Copyright (C) 2023 EdX +# This file is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE. +# EdX Team , 2023. +# msgid "" msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-05-27 11:04+0500\n" +"Project-Id-Version: 0.1a\n" +"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n" +"POT-Creation-Date: 2023-06-13 08:00+0000\n" +"PO-Revision-Date: 2023-06-13 09:00+0000\n" "Last-Translator: \n" -"Language-Team: \n" +"Language-Team: openedx-translation \n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: recommender.py +#: recommender.py:310 +msgid "Invalid location URL provided" +msgstr "" + +#: recommender.py:321 msgid "The resource you are attempting to provide already exists" msgstr "" -#: recommender.py +#: recommender.py:334 msgid "" "The resource you are attempting to provide has been disallowed by the staff. " "Reason: " msgstr "" -#: recommender.py +#: recommender.py:351 msgid "The selected resource does not exist" msgstr "" -#: recommender.py +#: recommender.py:399 msgid "Size of uploaded file exceeds threshold" msgstr "" -#: recommender.py +#: recommender.py:410 msgid "The configuration of pyfs is not properly set" msgstr "" -#: recommender.py:729 +#: recommender.py:749 msgid "Endorse resource without permission" msgstr "" -#: recommender.py +#: recommender.py:793 msgid "You don't have the permission to remove this resource" msgstr "" -#: recommender.py +#: recommender.py:844 msgid "Only staff can import resources" msgstr "" -#: recommender.py +#: recommender.py:855 recommender.py:882 msgid "Please submit the JSON file obtained with the download resources button" msgstr "" -#: recommender.py +#: recommender.py:895 msgid "Tried to access flagged resources without staff permission" msgstr "" + +#: templates/recommender.html:83 +msgid "This is a list of recommended resources. If you\\" +msgstr "" + +#: templates/recommender.html:84 static/js/src/cats.js:158 +msgid "Show related resources" +msgstr "" + +#: templates/recommender.html:91 +msgid "" +"This will be a list of resources your fellow students thought might be " +"helpful, but it is empty currently. If you find useful resources, either on " +"edx.org or elsewhere, please add it." +msgstr "" + +#: templates/recommender.html:118 +msgid "Add new resource >>" +msgstr "" + +#: templates/recommender.html:119 +msgid "Download resources" +msgstr "" + +#: templates/recommender.html:120 templates/recommender.html:146 +msgid "Upload resources" +msgstr "" + +#: templates/recommender.html:122 +msgid "mode" +msgstr "" + +#: templates/recommender.html:131 +msgid "" +"This is a list of resources your fellow students thought might be helpful. " +"If you find another useful resource, either on edx.org or elsewhere, please " +"add it. If you can improve the description or preview of a resource, please " +"do so as well. If you find a resource helpful, upvote it. If it’s not " +"so helpful, downvote it. If it has issues (illegal material, incorrect, " +"etc.), please flag it and let us know the reason." +msgstr "" + +#: templates/recommender.html:139 +msgid "cancel and go back to resource list" +msgstr "" + +#: templates/recommender.html:139 +msgid "< Related resources" +msgstr "" + +#: templates/recommender.html:145 +msgid "Resources (in JSON format):" +msgstr "" + +#: templates/recommender.html:145 +msgid "Provide a file of resource list in JSON format" +msgstr "" + +#: templates/recommender.html:151 templates/recommender.html:161 +#: templates/recommender.html:171 +msgid "Reason" +msgstr "" + +#: templates/recommender.html:155 +msgid "Reason for why this resource should be removed" +msgstr "" + +#: templates/recommender.html:165 +msgid "Reason for why this resource should be endorsed" +msgstr "" + +#: templates/recommender.html:175 +msgid "Reason for why this resource should be flagged" +msgstr "" + +#: templates/recommender.html:181 templates/recommender.html:206 +msgid "Title" +msgstr "" + +#: templates/recommender.html:183 templates/recommender.html:208 +msgid "Provide a resource title, required" +msgstr "" + +#: templates/recommender.html:185 templates/recommender.html:210 +msgid "" +"Provide a meaningful title so other students know whether this is useful to " +"them" +msgstr "" + +#: templates/recommender.html:187 +msgid "Location" +msgstr "" + +#: templates/recommender.html:189 templates/recommender.html:214 +msgid "Provide a resource location in url, required" +msgstr "" + +#: templates/recommender.html:193 templates/recommender.html:218 +msgid "Description" +msgstr "" + +#: templates/recommender.html:197 templates/recommender.html:222 +msgid "" +"Provide a meaningful description so other students know whether this is " +"useful to them" +msgstr "" + +#: templates/recommender.html:200 +msgid "Preview screenshot:" +msgstr "" + +#: templates/recommender.html:200 +msgid "Provide a resource screenshot" +msgstr "" + +#: templates/recommender.html:201 +msgid "Save change" +msgstr "" + +#: templates/recommender.html:220 +msgid "Provide a resource description" +msgstr "" + +#: templates/recommender.html:225 +msgid "Provide a file of resource screenshot" +msgstr "" + +#: templates/recommender.html:226 +msgid "Add resource" +msgstr "" + +#: templates/recommenderstudio.html:6 +msgid "Configuration setting" +msgstr "" + +#: templates/recommenderstudio.html:9 +msgid "Set the student-view, client side configurations for RecommenderXblock." +msgstr "" + +#: templates/recommenderstudio.html:12 templates/recommenderstudio.html:18 +msgid "Yes" +msgstr "" + +#: templates/recommenderstudio.html:13 templates/recommenderstudio.html:19 +msgid "No" +msgstr "" + +#: templates/recommenderstudio.html:14 +msgid "" +"Do you want to take users on a little tour when they see the " +"RecommenderXBlock first time?" +msgstr "" + +#: templates/recommenderstudio.html:21 +msgid "Do you want to disable the UX functions which are under development?" +msgstr "" + +#: templates/recommenderstudio.html:36 +msgid "How many resources you want to show in each page of the resource list?" +msgstr "" + +#: templates/recommenderstudio.html:46 +msgid "" +"How many page icons in pagination control (i.e., page range)? The icons for " +"pages from (current page - page range) to (current page + page range) will " +"be shown." +msgstr "" + +#: static/js/src/cats.js:65 +msgid "" +"Recommend a new resource which may be helpful to other students solving this " +"problem" +msgstr "" + +#: static/js/src/cats.js:66 +msgid "Edit this resource" +msgstr "" + +#: static/js/src/cats.js:67 +msgid "Upvote if the resource is helpful" +msgstr "" + +#: static/js/src/cats.js:68 +msgid "Downvote if the resource is not helpful" +msgstr "" + +#: static/js/src/cats.js:69 +msgid "Votes" +msgstr "" + +#: static/js/src/cats.js:70 +msgid "Resource title" +msgstr "" + +#: static/js/src/cats.js:71 +msgid "Remove this resource and give the reason why you do that" +msgstr "" + +#: static/js/src/cats.js:72 +msgid "Preview image (typically, a screenshot)" +msgstr "" + +#: static/js/src/cats.js:73 static/js/src/cats.js:77 +msgid "" +"Give a short (1-3 sentence) summary of the resource; ideally, this should be " +"concise, but give enough detail to let students know whether this resources " +"is useful to them" +msgstr "" + +#: static/js/src/cats.js:74 static/js/src/cats.js:78 +msgid "Cut-and-paste the URL of the resource." +msgstr "" + +#: static/js/src/cats.js:75 static/js/src/cats.js:79 +msgid "" +"Give a paragraph of summary of the resource; the summary should be more " +"detailed than you gave in Title" +msgstr "" + +#: static/js/src/cats.js:76 static/js/src/cats.js:80 +msgid "" +"Upload a preview screenshot (in GIF/PNG/JPG) of the resource; ideally, this " +"should let students know whether this resources is useful to them" +msgstr "" + +#: static/js/src/cats.js:81 +msgid "Go back to the main list" +msgstr "" + +#: static/js/src/cats.js:82 +msgid "Give a meaningful reason for why this resource should be removed" +msgstr "" + +#: static/js/src/cats.js:83 +msgid "Flag this resource as problematic and give your reason" +msgstr "" + +#: static/js/src/cats.js:84 +msgid "Delete this resource" +msgstr "" + +#: static/js/src/cats.js:85 +msgid "Show a list of student-recommented related resources" +msgstr "" + +#: static/js/src/cats.js:86 +msgid "Hide the recommendations list" +msgstr "" + +#: static/js/src/cats.js:87 +msgid "Check the icon to endorse this resource" +msgstr "" + +#: static/js/src/cats.js:88 +msgid "This resource is endorsed by staff" +msgstr "" + +#: static/js/src/cats.js:89 +msgid "Click to view resources for removal" +msgstr "" + +#: static/js/src/cats.js:90 +msgid "Click to view resources in ordinary decreasing-vote order" +msgstr "" + +#: static/js/src/cats.js:93 +msgid "Here is a list of reasons why students think this resource problematic:" +msgstr "" + +#: static/js/src/cats.js:94 +msgid "The reason why it is endorsed is:" +msgstr "" + +#: static/js/src/cats.js:95 +msgid "Resource: " +msgstr "" + +#: static/js/src/cats.js:96 +msgid "votes" +msgstr "" + +#: static/js/src/cats.js:104 +msgid "" +"The content you typed has not been submitted yet. Are you sure to go back?" +msgstr "" + +#: static/js/src/cats.js:107 static/js/src/cats.js:199 +msgid "Import resources" +msgstr "" + +#: static/js/src/cats.js:108 +msgid "Suggest resource" +msgstr "" + +#: static/js/src/cats.js:109 static/js/src/cats.js:207 +msgid "Edit existing resource" +msgstr "" + +#: static/js/src/cats.js:110 +msgid "Flag Resource" +msgstr "" + +#: static/js/src/cats.js:111 +msgid "Endorse Resource" +msgstr "" + +#: static/js/src/cats.js:112 +msgid "Remove Resource" +msgstr "" + +#: static/js/src/cats.js:116 +msgid "Upload resources in JSON format to the database." +msgstr "" + +#: static/js/src/cats.js:117 +msgid "" +"Suggest a resource which can help other students with this problem. Please " +"do not give the answer directly." +msgstr "" + +#: static/js/src/cats.js:118 +msgid "" +"Edit the resource and make it more helpful for other students with this " +"problem. Please do not give the answer directly." +msgstr "" + +#: static/js/src/cats.js:119 +msgid "" +"Why would you like to flag this resource? The staff will review all flagged " +"resources, and remove inappropriate ones (spam, incorrect, abusive, etc.). " +"Giving a clear reason will help us do this efficiently." +msgstr "" + +#: static/js/src/cats.js:120 +msgid "Endorse this resource and give the reason why you do that." +msgstr "" + +#: static/js/src/cats.js:121 +msgid "Remove this resource and give the reason why you do that." +msgstr "" + +#: static/js/src/cats.js:157 +msgid "Hide related resources" +msgstr "" + +#: static/js/src/cats.js:191 +msgid "From page {fromPage} To page {toPage}" +msgstr "" + +#: static/js/src/cats.js:196 +msgid "Export resources" +msgstr "" + +#: static/js/src/cats.js:198 +msgid "Entering import resource mode" +msgstr "" + +#: static/js/src/cats.js:202 +msgid "Entering add resource mode" +msgstr "" + +#: static/js/src/cats.js:203 +msgid "Add new resource" +msgstr "" + +#: static/js/src/cats.js:206 +msgid "Entering edit resource mode" +msgstr "" + +#: static/js/src/cats.js:210 +msgid "Entering flag resource mode" +msgstr "" + +#: static/js/src/cats.js:211 +msgid "Flag resource" +msgstr "" + +#: static/js/src/cats.js:212 +msgid "Unflag resource" +msgstr "" + +#: static/js/src/cats.js:215 +msgid "Endorse resource" +msgstr "" + +#: static/js/src/cats.js:216 +msgid "Unendorse resource" +msgstr "" + +#: static/js/src/cats.js:218 +msgid "Remove resource" +msgstr "" + +#: static/js/src/cats.js:219 +msgid "Hovering resource" +msgstr "" + +#: static/js/src/cats.js:220 +msgid "A resource was clicked" +msgstr "" + +#: static/js/src/cats.js:221 +msgid "Back to resource list mode" +msgstr "" diff --git a/recommender/recommender.py b/recommender/recommender.py index 9173beb..d1e2ad2 100644 --- a/recommender/recommender.py +++ b/recommender/recommender.py @@ -18,6 +18,7 @@ import bleach from webob.response import Response +from django.utils import translation from xblock.core import XBlock from xblock.exceptions import JsonHandlerError @@ -944,6 +945,21 @@ def _construct_view_resource(self, resource): return result + @staticmethod + def _get_statici18n_js_url(): # pragma: no cover + """ + Returns the Javascript translation file for the currently selected language, if any found by `pkg_resources` + """ + lang_code = translation.get_language() + if not lang_code: + return None + text_js = 'public/js/translations/{lang_code}/text.js' + country_code = lang_code.split('-')[0] + for code in (translation.to_locale(lang_code), lang_code, country_code): + if pkg_resources.resource_exists(resource_loader.module_name, text_js.format(lang_code=code)): + return text_js.format(lang_code=code) + return None + def student_view(self, _context=None): # pylint: disable=unused-argument """ The primary view of the RecommenderXBlock, shown to students @@ -990,6 +1006,9 @@ def student_view(self, _context=None): # pylint: disable=unused-argument frag.add_css(self.resource_string("static/css/recommender.css")) frag.add_css(self.resource_string("static/css/introjs.css")) frag.add_javascript(self.resource_string("static/js/src/jquery.tooltipster.min.js")) + statici18n_js_url = self._get_statici18n_js_url() + if statici18n_js_url: + frag.add_javascript(self.resource_string(statici18n_js_url)) frag.add_javascript(self.resource_string("static/js/src/cats.js")) frag.add_javascript(self.resource_string("static/js/src/recommender.js")) frag.initialize_js('RecommenderXBlock', self.get_client_configuration()) @@ -1007,6 +1026,9 @@ def studio_view(self, _context=None): # pylint: disable=unused-argument )) frag.add_css(load("static/css/recommenderstudio.css")) frag.add_javascript_url("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js") + statici18n_js_url = self._get_statici18n_js_url() + if statici18n_js_url: + frag.add_javascript(self.resource_string(statici18n_js_url)) frag.add_javascript(load("static/js/src/recommenderstudio.js")) frag.initialize_js('RecommenderXBlock') return frag diff --git a/recommender/static/js/src/cats.js b/recommender/static/js/src/cats.js index 8e58a0e..7d77f87 100644 --- a/recommender/static/js/src/cats.js +++ b/recommender/static/js/src/cats.js @@ -3,10 +3,26 @@ // // Note: The global `window.*` variables should be converted into local ones to avoid over-using global variables. This is a 2014-era legacy XBlock coding standard that should be refactored -- @OmarIthawi at Apr 4, 2023 // - var gettext = window.gettext || (function (string) { - // Shim Django's `gettext` if unavailable. - return string; - }); + var gettext; + if ('RecommenderXBlockI18N' in window) { + // Use Recommender's local translations + gettext = function(string) { + var translated = window.RecommenderXBlockI18N.gettext(string); + // if Recommender's translation is the same as the input, check if global has a different value + // This is useful for overriding the XBlock's string by themes (only for English) + if (string === translated && 'gettext' in window) { + translated = window.gettext(string); + } + return translated; + }; + } else if ('gettext' in window) { + // Use edxapp's global translations + gettext = window.gettext; + } + if (typeof gettext == "undefined") { + // No translations -- used by test environment + gettext = function(string) { return string; }; + } var span = function(text) { // Surround text with a span. diff --git a/requirements/base.in b/requirements/base.in index f3ca6f6..7a8fbb9 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -8,3 +8,4 @@ mako simplejson webob web_fragments +edx-i18n-tools diff --git a/requirements/base.txt b/requirements/base.txt index 804ca0b..6b7d50c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,21 +6,43 @@ # appdirs==1.4.4 # via fs -bleach==6.0.0 +asgiref==3.7.2 + # via django +bleach==6.1.0 + # via -r requirements/base.in +django==3.2.22 + # via + # -c requirements/common_constraints.txt + # edx-i18n-tools +edx-i18n-tools==1.3.0 # via -r requirements/base.in fs==2.4.16 # via -r requirements/base.in +lxml==4.9.3 + # via edx-i18n-tools mako==1.2.4 # via -r requirements/base.in markupsafe==2.1.3 # via mako -simplejson==3.19.1 +path==16.7.1 + # via edx-i18n-tools +polib==1.2.0 + # via edx-i18n-tools +pytz==2023.3.post1 + # via django +pyyaml==6.0.1 + # via edx-i18n-tools +simplejson==3.19.2 # via -r requirements/base.in six==1.16.0 # via # bleach # fs -web-fragments==2.0.0 +sqlparse==0.4.4 + # via django +typing-extensions==4.8.0 + # via asgiref +web-fragments==2.1.0 # via -r requirements/base.in webencodings==0.5.1 # via bleach diff --git a/requirements/ci.txt b/requirements/ci.txt index 5285a01..9ce47fc 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -8,26 +8,65 @@ appdirs==1.4.4 # via # -r requirements/test.txt # fs -bleach==6.0.0 +asgiref==3.7.2 + # via + # -r requirements/test.txt + # django +bleach==6.1.0 + # via -r requirements/test.txt +django==3.2.22 + # via + # -c requirements/common_constraints.txt + # -r requirements/test.txt + # edx-i18n-tools +edx-i18n-tools==1.3.0 # via -r requirements/test.txt fs==2.4.16 # via -r requirements/test.txt +lxml==4.9.3 + # via + # -r requirements/test.txt + # edx-i18n-tools mako==1.2.4 # via -r requirements/test.txt markupsafe==2.1.3 # via # -r requirements/test.txt # mako -pycodestyle==2.10.0 +path==16.7.1 + # via + # -r requirements/test.txt + # edx-i18n-tools +polib==1.2.0 + # via + # -r requirements/test.txt + # edx-i18n-tools +pycodestyle==2.11.0 # via -r requirements/test.txt -simplejson==3.19.1 +pytz==2023.3.post1 + # via + # -r requirements/test.txt + # django +pyyaml==6.0.1 + # via + # -r requirements/test.txt + # edx-i18n-tools +simplejson==3.19.2 # via -r requirements/test.txt six==1.16.0 # via # -r requirements/test.txt # bleach # fs -web-fragments==2.0.0 +sqlparse==0.4.4 + # via + # -r requirements/test.txt + # django +typing-extensions==4.8.0 + # via + # -r requirements/test.txt + # asgiref +web-fragments==2.1.0 # via -r requirements/test.txt webencodings==0.5.1 # via diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 7e39123..afe6aa8 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -25,8 +25,3 @@ django-simple-history==3.0.0 # tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos. # Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810 tox<4.0.0 - -# edx-sphinx-theme is not compatible with latest Sphinx==6.0.0 version -# Pinning Sphinx version unless the compatibility issue gets resolved -# For details, see issue https://github.com/openedx/edx-sphinx-theme/issues/197 -sphinx<6.0.0 diff --git a/requirements/pip.txt b/requirements/pip.txt index c9cbf00..3e7d8f4 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -wheel==0.40.0 +wheel==0.41.2 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.1.2 +pip==23.2.1 # via -r requirements/pip.in -setuptools==67.8.0 +setuptools==68.2.2 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 86c333e..fed3370 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,23 +1,30 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -build==0.10.0 +build==1.0.3 # via pip-tools -click==8.1.3 +click==8.1.7 # via pip-tools -packaging==23.1 +importlib-metadata==6.8.0 # via build -pip-tools==6.13.0 +packaging==23.2 + # via build +pip-tools==7.3.0 # via -r requirements/pip_tools.in pyproject-hooks==1.0.0 # via build tomli==2.0.1 - # via build -wheel==0.40.0 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.41.2 # via pip-tools +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/test.txt b/requirements/test.txt index 5089e85..8cbf13c 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -8,26 +8,65 @@ appdirs==1.4.4 # via # -r requirements/base.txt # fs -bleach==6.0.0 +asgiref==3.7.2 + # via + # -r requirements/base.txt + # django +bleach==6.1.0 + # via -r requirements/base.txt +django==3.2.22 + # via + # -c requirements/common_constraints.txt + # -r requirements/base.txt + # edx-i18n-tools +edx-i18n-tools==1.3.0 # via -r requirements/base.txt fs==2.4.16 # via -r requirements/base.txt +lxml==4.9.3 + # via + # -r requirements/base.txt + # edx-i18n-tools mako==1.2.4 # via -r requirements/base.txt markupsafe==2.1.3 # via # -r requirements/base.txt # mako -pycodestyle==2.10.0 +path==16.7.1 + # via + # -r requirements/base.txt + # edx-i18n-tools +polib==1.2.0 + # via + # -r requirements/base.txt + # edx-i18n-tools +pycodestyle==2.11.0 # via -r requirements/test.in -simplejson==3.19.1 +pytz==2023.3.post1 + # via + # -r requirements/base.txt + # django +pyyaml==6.0.1 + # via + # -r requirements/base.txt + # edx-i18n-tools +simplejson==3.19.2 # via -r requirements/base.txt six==1.16.0 # via # -r requirements/base.txt # bleach # fs -web-fragments==2.0.0 +sqlparse==0.4.4 + # via + # -r requirements/base.txt + # django +typing-extensions==4.8.0 + # via + # -r requirements/base.txt + # asgiref +web-fragments==2.1.0 # via -r requirements/base.txt webencodings==0.5.1 # via diff --git a/setup.py b/setup.py index 0da9bb8..a8dc26c 100644 --- a/setup.py +++ b/setup.py @@ -78,10 +78,10 @@ def get_version(file_path): license='AGPL 3.0', entry_points={ 'xblock.v1': [ - 'recommender = recommender:RecommenderXBlock', + 'recommender = recommender.recommender:RecommenderXBlock', ] }, - package_data=package_data("recommender", ["static", "templates", "translations"]), + package_data=package_data("recommender", ["static", "templates", "translations", "public"]), cmdclass={ 'install': XBlockInstall, },