author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
701,855
23.11.2017 13:00:58
-46,800
8c6c512fc55be224bc95d29650b2da6ac065713e
PR requested content changes
[ { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/arrows.md", "new_path": "csunplugged/resources/content/en/arrows.md", "diff": "# Arrows\n-This resource contains printouts for geometry activities.\n+This resource contains different arrows for Kidbots activities.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/left-right-cards.md", "new_path": "csunplugged/resources/content/en/left-right-cards.md", "diff": "# Left and Right Cards\n-This resource contains printouts for geometry activities.\n+This resource contains printouts for Kidbots activities.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/parity-cards.md", "new_path": "csunplugged/resources/content/en/parity-cards.md", "diff": "# Parity Cards\nThis resource contains printouts for parity card activities. To use this resource:\n+\n- Print the PDF double sided.\n- Printing on 120 gsm card also can be useful.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/piano-keys.md", "new_path": "csunplugged/resources/content/en/piano-keys.md", "diff": "# Piano Keys\n-This resource contains printouts for the Piano Keys activity\n+This resource contains printouts for the modulo activities.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/searching-cards.md", "new_path": "csunplugged/resources/content/en/searching-cards.md", "diff": "# Searching Cards\n-This resource contains printouts for the Searching Cards activity\n+This resource contains printouts for searching algorithms activities.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/train-stations.md", "new_path": "csunplugged/resources/content/en/train-stations.md", "diff": "# Train Stations\n-This resource contains printouts for the Train Stations activity\n+This resource contains printouts for the modulo activities.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/en/treasure-hunt.md", "new_path": "csunplugged/resources/content/en/treasure-hunt.md", "diff": "# Treasure Hunt\n-This resource contains printouts for the Treasure Hunt activity\n+This resource contains printouts for searching algorithms activities.\n" } ]
Python
MIT License
uccser/cs-unplugged
PR requested content changes
701,855
23.11.2017 13:16:44
-46,800
2c32abaeebcf09e2eaa52c023ff3ce8c2a29134a
Fix bool values not being tested in run_parameter_smoke_tests
[ { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/generators/utils.py", "new_path": "csunplugged/tests/resources/generators/utils.py", "diff": "@@ -58,9 +58,9 @@ class BaseGeneratorTest(BaseTest):\n]\nelif isinstance(option, BoolResourceParameter):\ntest_values = [True, False]\n-\nfor value in test_values:\n- generator.options[option_name].value = value\n+ option = generator.options[option_name]\n+ option.value = option.process_value(value)\ntry:\ndata = generator.data() # Smoke test\nexcept Exception as e:\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix bool values not being tested in run_parameter_smoke_tests
701,855
23.11.2017 14:02:29
-46,800
702e0dcd7c24ee30efaaf39b04593937d512b76b
Remove unrequired test functions
[ { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/utils/test_BaseResourceGenerator.py", "new_path": "csunplugged/tests/resources/utils/test_BaseResourceGenerator.py", "diff": "@@ -177,15 +177,3 @@ class BaseResourceGeneratorTest(BaseTestWithDB):\nself.assertListEqual(options_order, list(local_options))\nfor option in local_options.values():\nself.assertIsInstance(option, ResourceParameter)\n-\n- def test_process_requested_options_valid(self):\n- pass\n-\n- def test_process_requested_options_invalid(self):\n- pass\n-\n- def test_process_requested_options_missing_required(self):\n- pass\n-\n- def test_process_requested_options_subclass_additional_options(self):\n- pass\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove unrequired test functions
701,855
23.11.2017 14:41:49
-46,800
21669b7fe3e1b45ff43b40218418a36fc0aa13fd
More unit tests to improve coverage
[ { "change_type": "MODIFY", "old_path": "csunplugged/resources/views.py", "new_path": "csunplugged/resources/views.py", "diff": "@@ -70,11 +70,9 @@ def generate_resource(request, resource_slug):\nraise Http404(\"No parameters given for resource generation.\")\ntry:\ngenerator = get_resource_generator(resource.generator_module, request.GET)\n- except QueryParameterMissingError as e:\n- raise Http404(e) from e\n- except QueryParameterInvalidError as e:\n- raise Http404(e) from e\n- except QueryParameterMultipleValuesError as e:\n+ except (QueryParameterMissingError,\n+ QueryParameterInvalidError,\n+ QueryParameterMultipleValuesError) as e:\nraise Http404(e) from e\n# TODO: Weasyprint handling in production\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/views/test_generate_resource.py", "new_path": "csunplugged/tests/resources/views/test_generate_resource.py", "diff": "@@ -90,3 +90,18 @@ class GenerateResourceTest(BaseTestWithDB):\nurl += query_string(get_parameters)\nresponse = self.client.get(url)\nself.assertEqual(HTTPStatus.NOT_FOUND, response.status_code)\n+\n+ def test_generate_view_valid_slug_multiple_parameter(self):\n+ resource = self.test_data.create_resource(\n+ \"grid\",\n+ \"Grid\",\n+ \"resources/grid.html\",\n+ \"GridResourceGenerator\",\n+ )\n+ kwargs = {\n+ \"resource_slug\": resource.slug,\n+ }\n+ url = reverse(\"resources:generate\", kwargs=kwargs)\n+ url += \"?paper_size=a4&paper_size=letter\"\n+ response = self.client.get(url)\n+ self.assertEqual(HTTPStatus.NOT_FOUND, response.status_code)\n" } ]
Python
MIT License
uccser/cs-unplugged
More unit tests to improve coverage
701,855
23.11.2017 15:16:38
-46,800
52891eac343bd73a8af5a78e0a637ded6ad51a56
Update docs for new resource options structure
[ { "change_type": "MODIFY", "old_path": "docs/source/developer/resources.rst", "new_path": "docs/source/developer/resources.rst", "diff": "@@ -15,7 +15,7 @@ Resource Specification\nEach resource requires the following:\n- Definition in YAML file.\n-- Custom HTML form to allow user generation.\n+- Markdown file containing name/description.\n- Python module for creating the resource pages.\n- Thumbnail image.\n@@ -23,20 +23,17 @@ Each of these are explained in further detail below.\nWe recommend looking at existing resources to get a clearer picture of how new\nresources should look.\n+\nYAML file definition\n------------------------------------------------------------------------------\nEach resource is defined in the YAML file located at:\n-``csunplugged/resources/content/resources.yaml``.\n+``csunplugged/resources/content/structure/resources.yaml``.\nEach resource requires the following:\n- ``<resource-key>``: This is the key for the resource.\n- - ``name``: English name of the resource.\n- - ``webpage-template``: Template file for the HTML form, relative from\n- ``csunplugged/templates/``\n- (for example: ``resources/sorting-network.html``).\n- ``generator-module``: Python module for generating resource, relative from\n``csunplugged/resources/generators/`` (for example: ``SortingNetworkResourceGenerator``).\n- ``thumbnail-static-path``: Thumbnail image for the resource, relative from\n@@ -46,19 +43,15 @@ Each resource requires the following:\nIf each resource is exactly the same, then the value should be set\nto ``false``.)\n-HTML form\n-------------------------------------------------------------------------------\n-\n-Each resource has a HTML form to allow the user to customise the resulting\n-generated resource.\n-The HTML form file is specified in the YAML definition.\n-The template should extend ``resources/resource.html``, and contain two blocks:\n+Markdown file\n+------------------------------------------------------------------------------\n-1. ``block description``: This should contain a paragraph describing the resource.\n+Every resource must have a markdown file containing the name and description\n+of the resource. This will be parsed by Verto, and must begin with a top level\n+heading which will be used as the resource name. This file must be named\n+``<resource-key>.md`` and located in ``csunplugged/resources/content/en``.\n-2. ``block generation_form`` (optional): This should contain any additional\n-inputs for the generation form (paper size and custom header are already provided).\nPython module\n------------------------------------------------------------------------------\n@@ -85,17 +78,44 @@ The generator class must contain the following method definition:\npage), one of the dictionaries must have the key ``thumbnail`` set to ``True``.\nThis is used to determine which page is used to create the resource thumbnails.\n-If required, the generator class can contain the class variable ``additional_valid_options`` containing the dictionary of parameter options for the resource.\n-For example, a resource may contain the following:\n+If specific user options are required for resource generation, the generator class\n+can implement a function ``get_additional_options(self)`` which must return a dictionary\n+mapping an option identifier to a ``ResourceParameter`` instance.\n+For example, a resource subclass may implement the following:\n.. code-block:: python\n- additional_valid_options = {\n- \"display_numbers\": [True, False],\n- \"black_back\": [True, False],\n- }\n-\n-If ``additional_valid_options`` are given, the ``subtitle`` property method should be overridden.\n+ @classmethod\n+ def get_additional_options(cls):\n+ \"\"\"Additional options for BinaryCardsSmallResourceGenerator.\"\"\"\n+ return {\n+ \"number_bits\": EnumResourceParameter(\n+ name=\"number_bits\",\n+ description=_(\"Number of Bits\"),\n+ values= {\n+ \"4\": _(\"Four (1 to 8)\"),\n+ \"8\": _(\"Eight (1 to 128)\"),\n+ \"12\": _(\"Twelve (1 to 2048)\")\n+ },\n+ default=\"4\"\n+ ),\n+ \"dot_counts\": BoolResourceParameter(\n+ name=\"dot_counts\",\n+ description=_(\"Display Dot Counts\"),\n+ default=True,\n+ ),\n+\n+The following ResourceParameter subclasses are available:\n+\n+ - EnumResourceParameter - One from a set of predefined values\n+ - BoolResourceParameter - True/False values\n+ - TextResourceParameter - Freeform text value\n+ - IntegerResourceParameter - Integer value\n+\n+Each ResourceParameter class has configurable options which are documented on in the class docstring.\n+We recommend looking at existing resources to see how the various ResourceParameter classes can be used.\n+\n+If ``get_additional_options`` is implemented, the ``subtitle`` property method should be overridden.\nThe method should display the additional options and also call the parent's subtitle result:\n.. note::\n@@ -111,7 +131,7 @@ The method should display the additional options and also call the parent's subt\n:rtype: Text for subtitle (str).\n-For example, the subtitle method for the ``additional_valid_options`` above could be:\n+For example, a resource with options ``display_numbers`` and ``black_back`` might implement the following subtitle method\n.. code-block:: python\n@@ -142,6 +162,8 @@ For example, the subtitle method for the ``additional_valid_options`` above coul\n)\nreturn text\n+If copies are required for the resource, ``COPIES = True`` should be added as a class constant on the subclass.\n+\nIf custom thumbnails are to be displayed for each resource combination, the ``save_thumbnail`` method can be overridden.\nThumbnail image\n" } ]
Python
MIT License
uccser/cs-unplugged
Update docs for new resource options structure
701,855
23.11.2017 16:36:14
-46,800
528596a5f58033b17eaf160ee4fe5fa3cbaab9df
Add tests for QueryParameterMultipleValuesError
[ { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/tests/utils/errors/test_QueryParameterMultipleValuesError.py", "diff": "+\"\"\"Test class for QueryParameterMissingError error.\"\"\"\n+\n+from django.test import SimpleTestCase\n+from utils.errors.QueryParameterMultipleValuesError import QueryParameterMultipleValuesError\n+\n+\n+class QueryParameterMultipleValuesErrorTest(SimpleTestCase):\n+ \"\"\"Test class for QueryParameterMissingError error.\n+\n+ Note: Tests to check if these were raised appropriately\n+ are located where this exception is used.\n+ \"\"\"\n+\n+ def test_attributes(self):\n+ exception = QueryParameterMultipleValuesError(\"parameter\", [\"value1\", \"value2\"])\n+ self.assertEqual(exception.parameter, \"parameter\")\n+ self.assertEqual(exception.values, [\"value1\", \"value2\"])\n+\n+ def test_string(self):\n+ exception = QueryParameterMultipleValuesError(\"parameter\", [\"value1\", \"value2\"])\n+ self.assertEqual(\n+ exception.__str__(),\n+ \"Parameter 'parameter' must only have one value, but multiple were given (['value1', 'value2']).\"\n+ )\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/utils/errors/QueryParameterMultipleValuesError.py", "new_path": "csunplugged/utils/errors/QueryParameterMultipleValuesError.py", "diff": "@@ -21,4 +21,4 @@ class QueryParameterMultipleValuesError(Exception):\nError message for empty config file.\n\"\"\"\ntext = \"Parameter '{}' must only have one value, but multiple were given ({}).\"\n- return text.format(self.parameter, self.value)\n+ return text.format(self.parameter, self.values)\n" } ]
Python
MIT License
uccser/cs-unplugged
Add tests for QueryParameterMultipleValuesError
701,855
23.11.2017 16:36:54
-46,800
2a95570413761f5a5b83722045d0bc413c297dde
Add unit tests for PixelPainterResourceGenerator.get_pixel_label
[ { "change_type": "MODIFY", "old_path": "csunplugged/resources/generators/PixelPainterResourceGenerator.py", "new_path": "csunplugged/resources/generators/PixelPainterResourceGenerator.py", "diff": "@@ -292,6 +292,7 @@ class PixelPainterResourceGenerator(BaseResourceGenerator):\ncolumn += 1\nrow += 1\n+ @classmethod\ndef get_pixel_label(cls, image, coords, image_name, method):\n\"\"\"Return label of specific pixel on given image.\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/generators/test_pixel_painter.py", "new_path": "csunplugged/tests/resources/generators/test_pixel_painter.py", "diff": "@@ -5,6 +5,7 @@ from filecmp import cmp\nfrom utils.errors.QueryParameterInvalidError import QueryParameterInvalidError\nimport os\nfrom tests.resources.generators.utils import BaseGeneratorTest\n+from PIL import Image\n@tag(\"resource\")\n@@ -324,3 +325,30 @@ class PixelPainterResourceGeneratorTest(BaseGeneratorTest):\ngenerator.subtitle,\n\"Hot air balloon - Colour - letter\"\n)\n+\n+ def test_get_pixel_label_valid(self):\n+ image = Image.frombytes(\"L\", (1, 2), bytes([255, 0]))\n+ label = PixelPainterResourceGenerator.get_pixel_label(\n+ image,\n+ (0, 0),\n+ \"name\",\n+ \"black-white\"\n+ )\n+ self.assertEqual('0', label)\n+ label = PixelPainterResourceGenerator.get_pixel_label(\n+ image,\n+ (0, 1),\n+ \"name\",\n+ \"black-white\"\n+ )\n+ self.assertEqual('1', label)\n+\n+ def test_get_pixel_label_invalid(self):\n+ image = Image.frombytes(\"L\", (1, 1), bytes([127]))\n+ with self.assertRaises(ValueError):\n+ PixelPainterResourceGenerator.get_pixel_label(\n+ image,\n+ (0, 0),\n+ \"name\",\n+ \"black-white\"\n+ )\n" } ]
Python
MIT License
uccser/cs-unplugged
Add unit tests for PixelPainterResourceGenerator.get_pixel_label
701,860
23.11.2017 17:29:44
-46,800
ae434b1399c275356267dc5a3f72c0dfe9411e73
creates new initial navbar for interface redesign
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/logo-white.png", "new_path": "csunplugged/static/img/logo-white.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/logo-white.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -183,19 +183,21 @@ $rounded-corner-radius: 0.5rem;\n}\n.navbar {\n- background-color: $white;\n- border-bottom: 2px $red solid;\n+ background: linear-gradient(90deg, darken($red, 10%), $red, $red);\n+ // border-bottom: 2px $red solid;\n#navbar-brand-logo {\n- height: 2.5rem;\n+ height: 2rem;\n}\n.navbar-nav .nav-link {\n- font-weight: 500;\n- border: 1px $white solid;\n- border-radius: 0.3rem;\n+ // font-weight: 500;\n+ // border: 1px $white solid;\n+ // border-radius: 0.3rem;\n+ color: $white;\n&:hover {\n- border-color: $red;\n+ color: $white;\n+ text-decoration: underline;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<span class=\"navbar-toggler-icon\"></span>\n</button>\n<a class=\"navbar-brand\" href=\"{% url 'general:home' %}\">\n- <img src=\"{% static 'img/logo-small.png' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n- <a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge badge-red\">{{ VERSION_NUMBER_ENGLISH }}</a>\n+ <img src=\"{% static 'img/logo-white.png' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n+ <a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge\">{{ VERSION_NUMBER_ENGLISH }}</a>\n</a>\n<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n<div class=\"navbar-nav ml-auto text-center\">\n" } ]
Python
MIT License
uccser/cs-unplugged
creates new initial navbar for interface redesign (#698)
701,855
23.11.2017 19:03:29
-46,800
9a9aed1bf9dac30c761ec11f12efa453b94b3d32
Update resource commands tests to use test generator package
[ { "change_type": "MODIFY", "old_path": "csunplugged/config/settings/base.py", "new_path": "csunplugged/config/settings/base.py", "diff": "@@ -221,6 +221,7 @@ DJANGO_PRODUCTION = env.bool(\"DJANGO_PRODUCTION\")\nTOPICS_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"topics\")), \"content\")\nRESOURCES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"resources\")), \"content\")\nRESOURCE_GENERATION_LOCATION = os.path.join(str(ROOT_DIR.path(\"staticfiles\")), \"resources\")\n+RESOURCE_GENERATORS_PACKAGE = \"resources.generators\"\nRESOURCE_COPY_AMOUNT = 20\nSCRATCH_GENERATION_LOCATION = str(ROOT_DIR.path(\"temp\"))\nCUSTOM_VERTO_TEMPLATES = os.path.join(str(ROOT_DIR.path(\"utils\")), \"custom_converter_templates\", \"\")\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/generators/__init__.py", "new_path": "csunplugged/resources/generators/__init__.py", "diff": "\"\"\"Views for the resource application.\"\"\"\n+\n+# Disable unused import warnings for this file\n+# flake8: noqa: F401\n+\n+from .ArrowsResourceGenerator import ArrowsResourceGenerator\n+from .BarcodeChecksumPosterResourceGenerator import BarcodeChecksumPosterResourceGenerator\n+from .BinaryCardsResourceGenerator import BinaryCardsResourceGenerator\n+from .BinaryCardsSmallResourceGenerator import BinaryCardsSmallResourceGenerator\n+from .BinaryToAlphabetResourceGenerator import BinaryToAlphabetResourceGenerator\n+from .BinaryWindowsResourceGenerator import BinaryWindowsResourceGenerator\n+from .GridResourceGenerator import GridResourceGenerator\n+from .JobBadgesResourceGenerator import JobBadgesResourceGenerator\n+from .LeftRightCardsResourceGenerator import LeftRightCardsResourceGenerator\n+from .ModuloClockResourceGenerator import ModuloClockResourceGenerator\n+from .ParityCardsResourceGenerator import ParityCardsResourceGenerator\n+from .PianoKeysResourceGenerator import PianoKeysResourceGenerator\n+from .PixelPainterResourceGenerator import PixelPainterResourceGenerator\n+from .SearchingCardsResourceGenerator import SearchingCardsResourceGenerator\n+from .SortingNetworkCardsResourceGenerator import SortingNetworkCardsResourceGenerator\n+from .SortingNetworkResourceGenerator import SortingNetworkResourceGenerator\n+from .TrainStationsResourceGenerator import TrainStationsResourceGenerator\n+from .TreasureHuntResourceGenerator import TreasureHuntResourceGenerator\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/utils/get_resource_generator.py", "new_path": "csunplugged/resources/utils/get_resource_generator.py", "diff": "\"\"\"Module for importing a resource view module.\"\"\"\nimport importlib\n+from django.conf import settings\ndef get_resource_generator(generator_module, requested_options=None):\n@@ -14,8 +15,7 @@ def get_resource_generator(generator_module, requested_options=None):\nInstance of resource generator for given resource.\n\"\"\"\ngenerator_class_name = generator_module\n- module_path = \"resources.generators.{}\".format(generator_class_name)\n- module = importlib.import_module(module_path)\n+ module = importlib.import_module(settings.RESOURCE_GENERATORS_PACKAGE)\ngenerator_class = getattr(module, generator_class_name)\ngenerator = generator_class(requested_options)\nreturn generator\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/BareResourceGenerator.py", "new_path": "csunplugged/tests/resources/BareResourceGenerator.py", "diff": "@@ -13,8 +13,6 @@ class BareResourceGenerator(BaseResourceGenerator):\nArgs:\nrequested_options: QueryDict of requested_options (QueryDict).\n\"\"\"\n- # Use deepcopy to avoid successive generators from sharing the same\n- # valid_options dictionary.\nsuper().__init__(requested_options)\ndef data(self):\n@@ -30,3 +28,18 @@ class BareResourceGeneratorWithCopies(BareResourceGenerator):\n\"\"\"Class for bare resource generator with copies.\"\"\"\ncopies = True\n+\n+\n+class BareResourceGeneratorMultiPage(BareResourceGenerator):\n+ \"\"\"Class for bare resource generator with two pages.\"\"\"\n+\n+ def data(self):\n+ \"\"\"Create data for a copy of the resource.\n+\n+ Returns:\n+ A list of two dictionaries, one for each page of the resource.\n+ \"\"\"\n+ return [\n+ {\"type\": \"html\", \"data\": \"Page 1\"},\n+ {\"type\": \"html\", \"data\": \"Page 2\"}\n+ ]\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/ResourcesTestDataGenerator.py", "new_path": "csunplugged/tests/resources/ResourcesTestDataGenerator.py", "diff": "@@ -19,8 +19,8 @@ class ResourcesTestDataGenerator:\nResource object.\n\"\"\"\nresource = Resource(\n- slug=\"resource-{}\".format(slug),\n- name=\"Resource {}\".format(name),\n+ slug=slug,\n+ name=name,\ncontent=content,\ngenerator_module=generator_module,\ncopies=copies,\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/tests/resources/management/test_generators/__init__.py", "diff": "+\"\"\"Test generators package for management commands tests.\"\"\"\n+\n+# Disable unused import warnings for this file\n+# flake8: noqa: F401\n+\n+from tests.resources.BareResourceGenerator import (\n+ BareResourceGenerator,\n+ BareResourceGeneratorMultiPage,\n+ BareResourceGeneratorWithCopies,\n+)\n+from resources.utils.resource_parameters import TextResourceParameter\n+\n+class BareResourceGeneratorWithNonEnumerableOptions(BareResourceGenerator):\n+ \"\"\"Class to simulate a resource generator with options that can't be enumerated.\"\"\"\n+\n+ def get_additional_options(self):\n+ \"\"\"Add option that is not an EnumResourceParameter.\"\"\"\n+ return {\n+ \"header_text\": TextResourceParameter(\n+ name=\"header_text\",\n+ description=\"Header Text\",\n+ placeholder=\"Example School: Room Four\",\n+ required=False\n+ ),\n+ }\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/management/test_makeresources_command.py", "new_path": "csunplugged/tests/resources/management/test_makeresources_command.py", "diff": "@@ -7,12 +7,14 @@ from tests.resources.ResourcesTestDataGenerator import ResourcesTestDataGenerato\nfrom PyPDF2 import PdfFileReader\nimport os.path\nimport shutil\n+from resources.models import Resource\nRESOURCE_PATH = \"temp/resources/\"\n@tag(\"management\")\n@override_settings(RESOURCE_GENERATION_LOCATION=RESOURCE_PATH)\n+@override_settings(RESOURCE_GENERATORS_PACKAGE=\"tests.resources.management.test_generators\")\nclass MakeResourcesCommandTest(BaseTestWithDB):\ndef __init__(self, *args, **kwargs):\n@@ -26,124 +28,93 @@ class MakeResourcesCommandTest(BaseTestWithDB):\ndef test_makeresources_command_single_resource(self):\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGenerator\",\n)\nmanagement.call_command(\"makeresources\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (a4).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (letter).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (letter).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\ndef test_makeresources_command_multiple_resources(self):\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGenerator\",\n)\nself.test_data.create_resource(\n- \"arrows\",\n- \"Arrows\",\n- \"resources/arrows.html\",\n- \"ArrowsResourceGenerator\",\n+ \"resource2\",\n+ \"Resource 2\",\n+ \"Description of resource 2\",\n+ \"BareResourceGenerator\",\n)\nmanagement.call_command(\"makeresources\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (a4).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (letter).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (letter).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Arrows (a4).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 2 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Arrows (letter).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 2 (letter).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 1)\ndef test_makeresources_command_single_resource_with_copies(self):\nself.test_data.create_resource(\n- \"sortingnetwork\",\n- \"Sorting Network\",\n- \"Sorting network content\",\n- \"SortingNetworkResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGeneratorWithCopies\",\ncopies=True\n)\nmanagement.call_command(\"makeresources\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Sorting Network (1 to 9 - a4).pdf\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 20)\n- def test_makeresources_command_single_resource_single_parameter(self):\n+ def test_makeresources_command_valid_parameter(self):\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n- )\n- management.call_command(\"makeresources\", \"Resource Grid\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (a4).pdf\")\n- pdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (letter).pdf\")\n- pdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n-\n- def test_makeresources_command_multiple_resources_single_parameter(self):\n- self.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n- )\n- self.test_data.create_resource(\n- \"arrows\",\n- \"Arrows\",\n- \"resources/arrows.html\",\n- \"ArrowsResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGeneratorWithCopies\",\n+ copies=True\n)\n- management.call_command(\"makeresources\", \"Resource Grid\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (a4).pdf\")\n- pdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (letter).pdf\")\n+ management.call_command(\"makeresources\", \"Resource 1\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Arrows (a4).pdf\")\n- self.assertFalse(os.path.isfile(filepath))\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Arrows (letter).pdf\")\n- self.assertFalse(os.path.isfile(filepath))\n+ self.assertEqual(pdf.getNumPages(), 20)\n- def test_makeresources_command_single_resource_with_copies_single_parameter(self):\n+ def test_makeresources_command_invalid_parameter(self):\nself.test_data.create_resource(\n- \"sortingnetwork\",\n- \"Sorting Network\",\n- \"Sorting network content\",\n- \"SortingNetworkResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGenerator\",\ncopies=True\n)\n- management.call_command(\"makeresources\", \"Resource Sorting Network\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Sorting Network (1 to 9 - a4).pdf\")\n- pdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 20)\n+ with self.assertRaises(Resource.DoesNotExist):\n+ management.call_command(\"makeresources\", \"Invalid Resource\")\ndef test_makeresources_command_single_resource_existing_folder(self):\nos.makedirs(os.path.dirname(RESOURCE_PATH))\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"Grid content\",\n- \"GridResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGeneratorWithCopies\",\n+ copies=True\n)\n- management.call_command(\"makeresources\")\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (a4).pdf\")\n- pdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n- filepath = os.path.join(RESOURCE_PATH, \"Resource Grid (letter).pdf\")\n+ management.call_command(\"makeresources\", \"Resource 1\")\n+ filepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\n- self.assertEqual(pdf.getNumPages(), 1)\n+ self.assertEqual(pdf.getNumPages(), 20)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/management/test_makeresourcethumbnails_command.py", "new_path": "csunplugged/tests/resources/management/test_makeresourcethumbnails_command.py", "diff": "from tests.BaseTestWithDB import BaseTestWithDB\nfrom django.core import management\n-from django.test import tag\n+from django.test import tag, override_settings\nfrom tests.resources.ResourcesTestDataGenerator import ResourcesTestDataGenerator\n@tag(\"management\")\n+@override_settings(RESOURCE_GENERATORS_PACKAGE=\"tests.resources.management.test_generators\")\nclass MakeResourceThumnbailsCommandTest(BaseTestWithDB):\ndef __init__(self, *args, **kwargs):\n@@ -17,32 +18,32 @@ class MakeResourceThumnbailsCommandTest(BaseTestWithDB):\ndef test_makeresourcethumbnails_command_single_resource(self):\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGenerator\",\n)\n# TODO: Fix these tests, they shouldn't be writing files into the build directory\nmanagement.call_command(\"makeresourcethumbnails\")\n- open(self.THUMBNAIL_PATH.format(\"resource-grid\", \"resource-grid-paper_size-a4.png\"))\n- open(self.THUMBNAIL_PATH.format(\"resource-grid\", \"resource-grid-paper_size-letter.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource1\", \"resource1-paper_size-a4.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource1\", \"resource1-paper_size-letter.png\"))\ndef test_makeresourcethumbnails_command_multiple_resources(self):\nself.test_data.create_resource(\n- \"grid\",\n- \"Grid\",\n- \"resources/grid.html\",\n- \"GridResourceGenerator\",\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGenerator\",\n)\nself.test_data.create_resource(\n- \"arrows\",\n- \"Arrows\",\n- \"resources/arrows.html\",\n- \"ArrowsResourceGenerator\",\n+ \"resource2\",\n+ \"Resource 2\",\n+ \"Description of resource 2\",\n+ \"BareResourceGenerator\",\n)\n# TODO: Fix these tests, they shouldn't be writing files into the build directory\nmanagement.call_command(\"makeresourcethumbnails\")\n- open(self.THUMBNAIL_PATH.format(\"resource-grid\", \"resource-grid-paper_size-a4.png\"))\n- open(self.THUMBNAIL_PATH.format(\"resource-grid\", \"resource-grid-paper_size-letter.png\"))\n- open(self.THUMBNAIL_PATH.format(\"resource-arrows\", \"resource-arrows-paper_size-a4.png\"))\n- open(self.THUMBNAIL_PATH.format(\"resource-arrows\", \"resource-arrows-paper_size-letter.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource1\", \"resource1-paper_size-a4.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource1\", \"resource1-paper_size-letter.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource2\", \"resource2-paper_size-a4.png\"))\n+ open(self.THUMBNAIL_PATH.format(\"resource2\", \"resource2-paper_size-letter.png\"))\n" } ]
Python
MIT License
uccser/cs-unplugged
Update resource commands tests to use test generator package
701,855
23.11.2017 19:36:25
-46,800
f6532e0c850bc60d01af61c56e55834ad6ed50be
Remove "resource-" prefix from uses of ResourcesTestDataGenerator
[ { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/loaders/test_resource_loader.py", "new_path": "csunplugged/tests/resources/loaders/test_resource_loader.py", "diff": "@@ -71,7 +71,7 @@ class ResourceLoaderTest(BaseTestWithDB):\nconfig_file = \"invalid-module.yaml\"\nresource_loader = ResourcesLoader(structure_filename=config_file, base_path=self.BASE_PATH)\nself.assertRaises(\n- ModuleNotFoundError,\n+ AttributeError,\nresource_loader.load,\n)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/utils/test_resource_cache_redirect.py", "new_path": "csunplugged/tests/resources/utils/test_resource_cache_redirect.py", "diff": "@@ -27,5 +27,5 @@ class CacheRedirectTest(BaseTestWithDB):\nself.assertEqual(response.status_code, HTTPStatus.FOUND)\nself.assertEqual(\nresponse.url,\n- \"/staticfiles/resources/Resource%20Grid%20(a4).pdf\"\n+ \"/staticfiles/resources/Grid%20(a4).pdf\"\n)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/views/test_generate_resource.py", "new_path": "csunplugged/tests/resources/views/test_generate_resource.py", "diff": "@@ -33,7 +33,7 @@ class GenerateResourceTest(BaseTestWithDB):\nself.assertEqual(HTTPStatus.OK, response.status_code)\nself.assertEqual(\nresponse.get(\"Content-Disposition\"),\n- 'attachment; filename=\"Resource Grid (a4).pdf\"'\n+ 'attachment; filename=\"Grid (a4).pdf\"'\n)\n@override_settings(DJANGO_PRODUCTION=True)\n@@ -56,7 +56,7 @@ class GenerateResourceTest(BaseTestWithDB):\nself.assertEqual(HTTPStatus.FOUND, response.status_code)\nself.assertEqual(\nresponse.url,\n- \"/staticfiles/resources/Resource%20Grid%20(a4).pdf\"\n+ \"/staticfiles/resources/Grid%20(a4).pdf\"\n)\ndef test_generate_view_valid_slug_missing_parameter(self):\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/views/test_index_view.py", "new_path": "csunplugged/tests/resources/views/test_index_view.py", "diff": "@@ -31,7 +31,7 @@ class IndexViewTest(BaseTestWithDB):\nself.assertEqual(HTTPStatus.OK, response.status_code)\nself.assertQuerysetEqual(\nresponse.context[\"all_resources\"],\n- [\"<Resource: Resource Binary Cards>\"]\n+ [\"<Resource: Binary Cards>\"]\n)\ndef test_resources_index_with_multiple_resources(self):\n@@ -53,7 +53,7 @@ class IndexViewTest(BaseTestWithDB):\nself.assertQuerysetEqual(\nresponse.context[\"all_resources\"],\n[\n- \"<Resource: Resource Binary Cards>\",\n- \"<Resource: Resource Sorting Network>\",\n+ \"<Resource: Binary Cards>\",\n+ \"<Resource: Sorting Network>\",\n]\n)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/views/test_resource_view.py", "new_path": "csunplugged/tests/resources/views/test_resource_view.py", "diff": "@@ -63,7 +63,7 @@ class ResourceViewTest(BaseTestWithDB):\nself.assertFalse(response.context[\"debug\"])\nself.assertEqual(\nresponse.context[\"resource_thumbnail_base\"],\n- \"/staticfiles/img/resources/resource-grid/thumbnails/\"\n+ \"/staticfiles/img/resources/grid/thumbnails/\"\n)\nself.assertFalse(response.context[\"grouped_lessons\"])\nself.assertEqual(\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources-description-empty.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources-description-empty.yaml", "diff": "lesson-3:\nnumber: 3\ngenerated-resources:\n- - resource-grid\n+ - grid\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources-description-missing.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources-description-missing.yaml", "diff": "lesson-2:\nnumber: 3\ngenerated-resources:\n- - resource-grid\n+ - grid\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/lessons/structure/generated-resources.yaml", "diff": "lesson-1:\nnumber: 1\ngenerated-resources:\n- - resource-grid\n- - resource-arrows\n+ - grid\n+ - arrows\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/test_lessons_loader.py", "new_path": "csunplugged/tests/topics/loaders/test_lessons_loader.py", "diff": "@@ -627,13 +627,13 @@ class LessonsLoaderTest(BaseTestWithDB):\nself.resource_test_data.create_resource(\n\"grid\",\n\"Grid\",\n- \"resources/grid.html\",\n+ \"Grid description\",\n\"GridResourceGenerator\",\n)\nself.resource_test_data.create_resource(\n\"arrows\",\n\"Arrows\",\n- \"resources/arrows.html\",\n+ \"Arrows description\",\n\"ArrowsResourceGenerator\",\n)\nlesson_loader = LessonsLoader(\n@@ -646,8 +646,8 @@ class LessonsLoaderTest(BaseTestWithDB):\nself.assertQuerysetEqual(\nLesson.objects.get(slug=\"lesson-1\").generated_resources.order_by(\"name\"),\n[\n- \"<Resource: Resource Arrows>\",\n- \"<Resource: Resource Grid>\",\n+ \"<Resource: Arrows>\",\n+ \"<Resource: Grid>\",\n],\n)\n@@ -672,7 +672,7 @@ class LessonsLoaderTest(BaseTestWithDB):\nself.resource_test_data.create_resource(\n\"grid\",\n\"Grid\",\n- \"resources/grid.html\",\n+ \"Grid description\",\n\"GridResourceGenerator\",\n)\nlesson_loader = LessonsLoader(\n@@ -693,7 +693,7 @@ class LessonsLoaderTest(BaseTestWithDB):\nself.resource_test_data.create_resource(\n\"grid\",\n\"Grid\",\n- \"resources/grid.html\",\n+ \"Grid description\",\n\"GridResourceGenerator\",\n)\nlesson_loader = LessonsLoader(\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/views/test_lesson_view.py", "new_path": "csunplugged/tests/topics/views/test_lesson_view.py", "diff": "@@ -333,8 +333,8 @@ class LessonViewTest(BaseTestWithDB):\n[\n{\n\"description\": \"Description 1\",\n- \"slug\": \"resource-grid\",\n- \"name\": \"Resource Grid\",\n+ \"slug\": \"grid\",\n+ \"name\": \"Grid\",\n\"thumbnail\": \"static/images/thumbnail-grid\",\n}\n]\n@@ -376,14 +376,14 @@ class LessonViewTest(BaseTestWithDB):\n[\n{\n\"description\": \"Description 2\",\n- \"slug\": \"resource-arrows\",\n- \"name\": \"Resource Arrows\",\n+ \"slug\": \"arrows\",\n+ \"name\": \"Arrows\",\n\"thumbnail\": \"static/images/thumbnail-arrows\",\n},\n{\n\"description\": \"Description 1\",\n- \"slug\": \"resource-grid\",\n- \"name\": \"Resource Grid\",\n+ \"slug\": \"grid\",\n+ \"name\": \"Grid\",\n\"thumbnail\": \"static/images/thumbnail-grid\",\n},\n]\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/views/test_topic_view.py", "new_path": "csunplugged/tests/topics/views/test_topic_view.py", "diff": "@@ -133,8 +133,8 @@ class TopicViewTest(BaseTestWithDB):\nself.assertQuerysetEqual(\nresponse.context[\"resources\"],\n[\n- \"<Resource: Resource Binary Windows>\",\n- \"<Resource: Resource Binary Cards (small)>\",\n+ \"<Resource: Binary Windows>\",\n+ \"<Resource: Binary Cards (small)>\",\n],\nordered=False,\n)\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove "resource-" prefix from uses of ResourcesTestDataGenerator
701,855
23.11.2017 19:57:53
-46,800
35a45a8f681fdcd943eb26cf319268aa4a3da347
Add tests for exception raised if non-enum generator option present
[ { "change_type": "MODIFY", "old_path": "csunplugged/resources/management/commands/makeresources.py", "new_path": "csunplugged/resources/management/commands/makeresources.py", "diff": "@@ -45,7 +45,7 @@ class Command(BaseCommand):\nempty_generator = get_resource_generator(resource.generator_module)\nif not all([isinstance(option, EnumResourceParameter)\nfor option in empty_generator.get_options().values()]):\n- raise Exception(\"Only EnumResourceParameters are supported for pre-generation\")\n+ raise TypeError(\"Only EnumResourceParameters are supported for pre-generation\")\nvalid_options = {option.name: list(option.valid_values.keys())\nfor option in empty_generator.get_options().values()}\ncombinations = resource_valid_configurations(valid_options)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/resources/management/commands/makeresourcethumbnails.py", "new_path": "csunplugged/resources/management/commands/makeresourcethumbnails.py", "diff": "@@ -34,7 +34,7 @@ class Command(BaseCommand):\nif not all([isinstance(option, EnumResourceParameter)\nfor option in empty_generator.get_options().values()]):\n- raise Exception(\"Only EnumResourceParameters are supported for pre-generation\")\n+ raise TypeError(\"Only EnumResourceParameters are supported for pre-generation\")\nvalid_options = {option.name: list(option.valid_values.keys())\nfor option in empty_generator.get_options().values()}\ncombinations = resource_valid_configurations(valid_options)\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/management/test_generators/__init__.py", "new_path": "csunplugged/tests/resources/management/test_generators/__init__.py", "diff": "@@ -13,7 +13,8 @@ from resources.utils.resource_parameters import TextResourceParameter\nclass BareResourceGeneratorWithNonEnumerableOptions(BareResourceGenerator):\n\"\"\"Class to simulate a resource generator with options that can't be enumerated.\"\"\"\n- def get_additional_options(self):\n+ @classmethod\n+ def get_additional_options(cls):\n\"\"\"Add option that is not an EnumResourceParameter.\"\"\"\nreturn {\n\"header_text\": TextResourceParameter(\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/management/test_makeresources_command.py", "new_path": "csunplugged/tests/resources/management/test_makeresources_command.py", "diff": "@@ -118,3 +118,14 @@ class MakeResourcesCommandTest(BaseTestWithDB):\nfilepath = os.path.join(RESOURCE_PATH, \"Resource 1 (a4).pdf\")\npdf = PdfFileReader(open(filepath, \"rb\"))\nself.assertEqual(pdf.getNumPages(), 20)\n+\n+\n+ def test_makeresources_command_resource_generator_has_non_enum_options(self):\n+ self.test_data.create_resource(\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGeneratorWithNonEnumerableOptions\",\n+ )\n+ with self.assertRaises(TypeError):\n+ management.call_command(\"makeresources\")\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/resources/management/test_makeresourcethumbnails_command.py", "new_path": "csunplugged/tests/resources/management/test_makeresourcethumbnails_command.py", "diff": "@@ -47,3 +47,13 @@ class MakeResourceThumnbailsCommandTest(BaseTestWithDB):\nopen(self.THUMBNAIL_PATH.format(\"resource1\", \"resource1-paper_size-letter.png\"))\nopen(self.THUMBNAIL_PATH.format(\"resource2\", \"resource2-paper_size-a4.png\"))\nopen(self.THUMBNAIL_PATH.format(\"resource2\", \"resource2-paper_size-letter.png\"))\n+\n+ def test_makeresourcethumbnails_command_resource_generator_has_non_enum_options(self):\n+ self.test_data.create_resource(\n+ \"resource1\",\n+ \"Resource 1\",\n+ \"Description of resource 1\",\n+ \"BareResourceGeneratorWithNonEnumerableOptions\",\n+ )\n+ with self.assertRaises(TypeError):\n+ management.call_command(\"makeresourcethumbnails\")\n" } ]
Python
MIT License
uccser/cs-unplugged
Add tests for exception raised if non-enum generator option present
701,855
24.11.2017 11:46:50
-46,800
87e747107970803c2db6f386445cc110752df55d
Clean up crowdin_bot python package, add/improve docstrings
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/__init__.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/__init__.py", "diff": "+\"\"\"Module for crowdin bot package.\"\"\"\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/api.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/api.py", "diff": "+\"\"\"Module for interacting with the crowdin API.\"\"\"\n+\nimport lxml.etree\nimport json\nimport os\n@@ -8,6 +10,11 @@ API_URL = \"https://api.crowdin.com/api/project/cs-unplugged/{method}\"\ndef api_call_text(method, **params):\n+ \"\"\"Call a given api method and return text content.\n+\n+ Returns:\n+ Text content of the response (str).\n+ \"\"\"\nparams[\"key\"] = API_KEY\nresponse = requests.get(\nAPI_URL.format(method=method),\n@@ -17,10 +24,12 @@ def api_call_text(method, **params):\ndef api_call_xml(method, **params):\n+ \"\"\"Call a given api method and return XML tree.\"\"\"\nresponse_text = api_call_text(method, **params)\nxml = lxml.etree.fromstring(response_text.encode())\nreturn xml\ndef api_call_json(method, **params):\n+ \"\"\"Call a given api method and return JSON dictionary.\"\"\"\nresponse_text = api_call_text(method, json=True, **params)\nreturn json.loads(response_text)\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/download_xliff.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/download_xliff.py", "diff": "+\"\"\"Script for downloading XLIFF translation files for in-context pseudo-language.\"\"\"\n+\nimport os\nfrom crowdin_bot import api\n@@ -9,6 +11,13 @@ XLIFF_DIR = os.path.join(CONTENT_ROOT, 'xliff')\ndef download_xliff(source_filename, dest_filename, language=INCONTEXT_L10N_PSEUDOLANGUAGE_CROWDIN):\n+ \"\"\"Download xliff translation file for given source file and language.\n+\n+ Args:\n+ source_filename: (str) Path to english source file from csunplugged root\n+ dest_filename: (str) Path to save xliff file\n+ language: (str) Crowdin language code of the translation file to download\n+ \"\"\"\nparams = {\n\"file\": source_filename,\n\"language\": language,\n@@ -19,6 +28,7 @@ def download_xliff(source_filename, dest_filename, language=INCONTEXT_L10N_PSEUD\nwith open(dest_filename, 'w') as f:\nf.write(xliff_content)\n+\nif __name__ == \"__main__\":\nif not os.path.exists(XLIFF_DIR):\nos.mkdir(XLIFF_DIR)\n@@ -30,6 +40,4 @@ if __name__ == \"__main__\":\nxliff_path = os.path.join(XLIFF_DIR, path_from_language_root)\nxliff_path = os.path.splitext(xliff_path)[0] + \".xliff\"\nos.makedirs(os.path.split(xliff_path)[0], exist_ok=True)\n- # path = os.path.join(root, name)\n- # xliff_path = os.path.splitext(path)[0] + \".xliff\"\ndownload_xliff(source_path, xliff_path)\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_complete_translations.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_complete_translations.py", "diff": "+\"\"\"Script to print list of file paths of all completely translated files for a given language.\"\"\"\n+\nimport os\nimport argparse\n@@ -6,12 +8,24 @@ from crowdin_bot import api\nSOURCE_LANGUAGE = \"en\"\ndef get_language_info(language):\n+ \"\"\"Get xml tree from language info api call.\"\"\"\nreturn api.api_call_xml(\n\"language-status\",\nlanguage=language\n)\ndef process_item(item, parent_path=None, csu_language_code=None):\n+ \"\"\"Return list of completely translated file paths in a given directory tree node.\n+\n+ Args:\n+ item: (etree.Element): itemm node in language-status xml tree\n+ (see https://support.crowdin.com/api/language-status/)\n+ parent_path: (str) path to the translated file node (None if the current item is\n+ the root of the directory tree).\n+ csu_language_code: (str) Language code (in locale format) on CSU end\n+ (may differ from crowdin language code according to language mapping\n+ in yaml file)\n+ \"\"\"\nif item.find(\"node_type\").text == \"file\":\nfilename = item.find(\"name\").text\nif parent_path:\n@@ -45,8 +59,6 @@ def process_item(item, parent_path=None, csu_language_code=None):\nif __name__ == \"__main__\":\nparser = argparse.ArgumentParser()\n- # parser.add_argument('--crowdin-code', required=True,\n- # help='Crowdin language code')\nparser.add_argument('--crowdin-code', required=True,\nhelp='Crowdin language code for target language')\nparser.add_argument('--csu-code', required=True,\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_files.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_files.py", "diff": "+\"\"\"Script to print list of all source file paths on crowdin.\"\"\"\n+\nimport os\nfrom crowdin_bot import api\ndef get_project_info():\n+ \"\"\"Get xml containing all crowdin files (from api).\"\"\"\nreturn api.api_call_xml(\"info\")\ndef process_item(item, parent_path=\"/\"):\n+ \"\"\"Return list of paths to all files under a given node\n+\n+ Args:\n+ item: (etree.Element): itemm node in info xml tree\n+ (see https://support.crowdin.com/api/info/)\n+ parent_path: (str) path to the file/folder node \"item\".\"\"\"\nif item.find(\"node_type\").text == \"file\":\nfilename = item.find(\"name\").text\npath = os.path.join(parent_path, filename)\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_languages.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_languages.py", "diff": "+\"\"\"Script to print list of all crowdin language codes for project.\"\"\"\n+\nfrom crowdin_bot import api\nNS_DICT = {\n@@ -5,6 +7,7 @@ NS_DICT = {\n}\ndef get_project_languages():\n+ \"\"\"Get list of crowdin language codes.\"\"\"\ninfo_xml = api.api_call_xml(\"info\")\nlanguages = info_xml.find('languages')\ntranslatable_languages = []\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_language_map.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_language_map.py", "diff": "+\"\"\"Script to get json mapping from crowdin language codes to CSU language codes.\"\"\"\n+\nimport argparse\nimport json\nfrom crowdin_bot import api\nimport yaml\nimport re\n-# import sys\n-#\n-# # In general, this is crowdin-osx-locale -> crowdin-code, except for some\n-# # special cases like Simplified/Traditional Chinese, which also need to be\n-# # overriden in the crowdin.yaml file, using the language mapping parameter\n-#\n-# # The base list was generated from https://api.crowdin.com/api/supported-languages?json=True\n-#\n-# FROM_CROWDIN_MAP = {\n-# \"aa\": \"aa\",\n-# \"ach\": \"ach\",\n-# \"ae\": \"ae\",\n-# \"af\": \"af\",\n-# \"ak\": \"ak\",\n-# \"am\": \"am\",\n-# \"an\": \"an\",\n-# \"ar\": \"ar\",\n-# \"ar-BH\": \"ar_BH\",\n-# \"ar-EG\": \"ar_EG\",\n-# \"ar-SA\": \"ar_SA\",\n-# \"ar-YE\": \"ar_YE\",\n-# \"arn\": \"arn\",\n-# \"as\": \"as\",\n-# \"ast\": \"ast\",\n-# \"av\": \"av\",\n-# \"ay\": \"ay\",\n-# \"az\": \"az\",\n-# \"ba\": \"ba\",\n-# \"bal\": \"bal\",\n-# \"ban\": \"ban\",\n-# \"be\": \"be\",\n-# \"ber\": \"ber\",\n-# \"bfo\": \"bfo\",\n-# \"bg\": \"bg\",\n-# \"bh\": \"bh\",\n-# \"bi\": \"bi\",\n-# \"bm\": \"bm\",\n-# \"bn\": \"bn\",\n-# \"bn-IN\": \"bn_IN\",\n-# \"bo-BT\": \"bo\",\n-# \"br-FR\": \"br\",\n-# \"bs\": \"bs\",\n-# \"ca\": \"ca\",\n-# \"ce\": \"ce\",\n-# \"ceb\": \"ceb\",\n-# \"ch\": \"ch\",\n-# \"chr\": \"chr\",\n-# \"ckb\": \"ckb\",\n-# \"co\": \"co\",\n-# \"cr\": \"cr\",\n-# \"crs\": \"crs\",\n-# \"cs\": \"cs\",\n-# \"csb\": \"csb\",\n-# \"cv\": \"cv\",\n-# \"cy\": \"cy\",\n-# \"da\": \"da\",\n-# \"de\": \"de\",\n-# \"de-AT\": \"de_AT\",\n-# \"de-BE\": \"de_BE\",\n-# \"de-CH\": \"de_CH\",\n-# \"de-LI\": \"de_LI\",\n-# \"de-LU\": \"de_LU\",\n-# \"dsb-DE\": \"dsb\",\n-# \"dv\": \"dv\",\n-# \"dz\": \"dz\",\n-# \"ee\": \"ee\",\n-# \"el\": \"el\",\n-# \"el-CY\": \"el_CY\",\n-# \"en\": \"en\",\n-# \"en-AR\": \"en_AR\",\n-# \"en-AU\": \"en_AU\",\n-# \"en-BZ\": \"en_BZ\",\n-# \"en-CA\": \"en_CA\",\n-# \"en-CB\": \"en_CB\",\n-# \"en-CN\": \"en_CN\",\n-# \"en-DK\": \"en_DK\",\n-# \"en-GB\": \"en_GB\",\n-# \"en-HK\": \"en_HK\",\n-# \"en-ID\": \"en_ID\",\n-# \"en-IE\": \"en_IE\",\n-# \"en-IN\": \"en_IN\",\n-# \"en-JA\": \"en_JA\",\n-# \"en-JM\": \"en_JM\",\n-# \"en-MY\": \"en_MY\",\n-# \"en-NO\": \"en_NO\",\n-# \"en-NZ\": \"en_NZ\",\n-# \"en-PH\": \"en_PH\",\n-# \"en-PR\": \"en_PR\",\n-# \"en-PT\": \"en_PT\",\n-# \"en-SE\": \"en_SE\",\n-# \"en-SG\": \"en_SG\",\n-# \"en-UD\": \"xx_LR\", # Modified, for the in context translation pseudo language\n-# \"en-US\": \"en_US\",\n-# \"en-ZA\": \"en_ZA\",\n-# \"en-ZW\": \"en_ZW\",\n-# \"eo\": \"eo\",\n-# \"es-AR\": \"es_AR\",\n-# \"es-BO\": \"es_BO\",\n-# \"es-CL\": \"es_CL\",\n-# \"es-CO\": \"es_CO\",\n-# \"es-CR\": \"es_CR\",\n-# \"es-DO\": \"es_DO\",\n-# \"es-EC\": \"es_EC\",\n-# \"es-EM\": \"es_EM\",\n-# \"es-ES\": \"es\",\n-# \"es-GT\": \"es_GT\",\n-# \"es-HN\": \"es_HN\",\n-# \"es-MX\": \"es_MX\",\n-# \"es-NI\": \"es_NI\",\n-# \"es-PA\": \"es_PA\",\n-# \"es-PE\": \"es_PE\",\n-# \"es-PR\": \"es_PR\",\n-# \"es-PY\": \"es_PY\",\n-# \"es-SV\": \"es_SV\",\n-# \"es-US\": \"es_US\",\n-# \"es-UY\": \"es_UY\",\n-# \"es-VE\": \"es_VE\",\n-# \"et\": \"et\",\n-# \"eu\": \"eu\",\n-# \"fa\": \"fa\",\n-# \"fa-AF\": \"fa_AF\",\n-# \"ff\": \"ff\",\n-# \"fi\": \"fi\",\n-# \"fil\": \"fil\",\n-# \"fj\": \"fj\",\n-# \"fo\": \"fo\",\n-# \"fr\": \"fr\",\n-# \"fr-BE\": \"fr_BE\",\n-# \"fr-CA\": \"fr_CA\",\n-# \"fr-CH\": \"fr_CH\",\n-# \"fr-LU\": \"fr_LU\",\n-# \"fr-QC\": \"fr_QC\",\n-# \"fra-DE\": \"fra\",\n-# \"frp\": \"frp\",\n-# \"fur-IT\": \"fur\",\n-# \"fy-NL\": \"fy\",\n-# \"ga-IE\": \"ga\",\n-# \"gaa\": \"gaa\",\n-# \"gd\": \"gd\",\n-# \"gl\": \"gl\",\n-# \"gn\": \"gn\",\n-# \"got\": \"got\",\n-# \"gu-IN\": \"gu\",\n-# \"gv\": \"gv\",\n-# \"ha\": \"ha\",\n-# \"haw\": \"haw\",\n-# \"he\": \"he\",\n-# \"hi\": \"hi\",\n-# \"hil\": \"hil\",\n-# \"hmn\": \"hmn\",\n-# \"ho\": \"ho\",\n-# \"hr\": \"hr\",\n-# \"hsb-DE\": \"hsb\",\n-# \"ht\": \"ht\",\n-# \"hu\": \"hu\",\n-# \"hy-AM\": \"hy\",\n-# \"hz\": \"hz\",\n-# \"id\": \"id\",\n-# \"ido\": \"ido\",\n-# \"ig\": \"ig\",\n-# \"ii\": \"ii\",\n-# \"ilo\": \"ilo\",\n-# \"is\": \"is\",\n-# \"it\": \"it\",\n-# \"it-CH\": \"it_CH\",\n-# \"iu\": \"iu\",\n-# \"ja\": \"ja\",\n-# \"jbo\": \"jbo\",\n-# \"jv\": \"jv\",\n-# \"ka\": \"ka\",\n-# \"kab\": \"kab\",\n-# \"kdh\": \"kdh\",\n-# \"kg\": \"kg\",\n-# \"kj\": \"kj\",\n-# \"kk\": \"kk\",\n-# \"kl\": \"kl\",\n-# \"km\": \"km\",\n-# \"kmr\": \"kmr\",\n-# \"kn\": \"kn\",\n-# \"ko\": \"ko\",\n-# \"kok\": \"kok\",\n-# \"ks\": \"ks\",\n-# \"ks-PK\": \"ks_PK\",\n-# \"ku\": \"ku\",\n-# \"kv\": \"kv\",\n-# \"kw\": \"kw\",\n-# \"ky\": \"ky\",\n-# \"la-LA\": \"la\",\n-# \"lb\": \"lb\",\n-# \"lg\": \"lg\",\n-# \"li\": \"li\",\n-# \"lij\": \"lij\",\n-# \"ln\": \"ln\",\n-# \"lo\": \"lo\",\n-# \"lol\": \"lol\",\n-# \"lt\": \"lt\",\n-# \"luy\": \"luy\",\n-# \"lv\": \"lv\",\n-# \"mai\": \"mai\",\n-# \"me\": \"me\",\n-# \"mg\": \"mg\",\n-# \"mh\": \"mh\",\n-# \"mi\": \"mi\",\n-# \"mk\": \"mk\",\n-# \"ml-IN\": \"ml\",\n-# \"mn\": \"mn\",\n-# \"moh\": \"moh\",\n-# \"mos\": \"mos\",\n-# \"mr\": \"mr\",\n-# \"ms\": \"ms\",\n-# \"ms-BN\": \"ms_BN\",\n-# \"mt\": \"mt\",\n-# \"my\": \"my\",\n-# \"na\": \"na\",\n-# \"nb\": \"nb\",\n-# \"nds\": \"nds\",\n-# \"ne-IN\": \"ne_IN\",\n-# \"ne-NP\": \"ne\",\n-# \"ng\": \"ng\",\n-# \"nl\": \"nl\",\n-# \"nl-BE\": \"nl_BE\",\n-# \"nl-SR\": \"nl_SR\",\n-# \"nn-NO\": \"nn_NO\",\n-# \"no\": \"no\",\n-# \"nr\": \"nr\",\n-# \"nso\": \"nso\",\n-# \"ny\": \"ny\",\n-# \"oc\": \"oc\",\n-# \"oj\": \"oj\",\n-# \"om\": \"om\",\n-# \"or\": \"or\",\n-# \"os\": \"os\",\n-# \"pa-IN\": \"pa\",\n-# \"pa-PK\": \"pa_PK\",\n-# \"pam\": \"pam\",\n-# \"pap\": \"pap\",\n-# \"pcm\": \"pcm\",\n-# \"pi\": \"pi\",\n-# \"pl\": \"pl\",\n-# \"ps\": \"ps\",\n-# \"pt-BR\": \"pt_BR\",\n-# \"pt-PT\": \"pt\",\n-# \"qu\": \"qu\",\n-# \"quc\": \"quc\",\n-# \"qya-AA\": \"qya\",\n-# \"rm-CH\": \"rm\",\n-# \"rn\": \"rn\",\n-# \"ro\": \"ro\",\n-# \"ru\": \"ru\",\n-# \"ru-BY\": \"ru_BY\",\n-# \"ru-MD\": \"ru_MD\",\n-# \"ru-UA\": \"ru_UA\",\n-# \"rw\": \"rw\",\n-# \"ry-UA\": \"ry\",\n-# \"sa\": \"sa\",\n-# \"sah\": \"sah\",\n-# \"sat\": \"sat\",\n-# \"sc\": \"sc\",\n-# \"sco\": \"sco\",\n-# \"sd\": \"sd\",\n-# \"se\": \"se\",\n-# \"sg\": \"sg\",\n-# \"sh\": \"sh\",\n-# \"si-LK\": \"si\",\n-# \"sk\": \"sk\",\n-# \"sl\": \"sl\",\n-# \"sma\": \"sma\",\n-# \"sn\": \"sn\",\n-# \"so\": \"so\",\n-# \"son\": \"son\",\n-# \"sq\": \"sq\",\n-# \"sr\": \"sr\",\n-# \"sr-CS\": \"sr_CS\",\n-# \"sr-Cyrl-ME\": \"sr_Cyrl_ME\",\n-# \"ss\": \"ss\",\n-# \"st\": \"st\",\n-# \"su\": \"su\",\n-# \"sv-FI\": \"sv_FI\",\n-# \"sv-SE\": \"sv\",\n-# \"sw\": \"sw\",\n-# \"sw-KE\": \"sw_KE\",\n-# \"sw-TZ\": \"sw_TZ\",\n-# \"syc\": \"syc\",\n-# \"ta\": \"ta\",\n-# \"tay\": \"tay\",\n-# \"te\": \"te\",\n-# \"tg\": \"tg\",\n-# \"th\": \"th\",\n-# \"ti\": \"ti\",\n-# \"tk\": \"tk\",\n-# \"tl\": \"tl\",\n-# \"tlh-AA\": \"tlh\",\n-# \"tn\": \"tn\",\n-# \"tr\": \"tr\",\n-# \"tr-CY\": \"tr_CY\",\n-# \"ts\": \"ts\",\n-# \"tt-RU\": \"tt\",\n-# \"tw\": \"tw\",\n-# \"ty\": \"ty\",\n-# \"tzl\": \"tzl\",\n-# \"ug\": \"ug\",\n-# \"uk\": \"uk\",\n-# \"ur-IN\": \"ur_IN\",\n-# \"ur-PK\": \"ur\",\n-# \"uz\": \"uz\",\n-# \"val-ES\": \"val\",\n-# \"ve\": \"ve\",\n-# \"vec\": \"vec\",\n-# \"vi\": \"vi\",\n-# \"vls-BE\": \"vls\",\n-# \"wa\": \"wa\",\n-# \"wo\": \"wo\",\n-# \"xh\": \"xh\",\n-# \"yi\": \"yi\",\n-# \"yo\": \"yo\",\n-# \"zea\": \"zea\",\n-# \"zh-CN\": \"zh_Hans\", # Modified\n-# \"zh-HK\": \"zh_HK\",\n-# \"zh-MO\": \"zh_MO\",\n-# \"zh-SG\": \"zh_SG\",\n-# \"zh-TW\": \"zh-Hant\", # Modified\n-# \"zu\": \"zu\"\n-# }\ndef get_osx_locale_mapping():\n+ \"\"\"Get dictionary mapping crowdin language codes to osx_locale_codes.\n+\n+ See https://support.crowdin.com/api/supported-languages/\n+ \"\"\"\nlanguages_json = api.api_call_json(\"supported-languages\")\nreturn {\nlanguage[\"crowdin_code\"]: language[\"osx_locale\"] for language in languages_json\n@@ -336,6 +19,17 @@ def get_osx_locale_mapping():\ndef validate_config(config):\n+ \"\"\"Validate that this script can be used with the current crowdin config file.\n+\n+ Requirements:\n+ - must contain at least one entry under the 'files' key\n+ - File patterns must contain %osx_locale% and %original_file_name%\n+ placeholders, and no others.\n+ - If a language_mapping is used to override certain osx_locale codes,\n+ this mapping must be the same for all files configurations.\n+ Args:\n+ config: Dictionary of config yaml file\n+ \"\"\"\nfiles = config.get(\"files\", [])\nif len(files) == 0:\nraise Exception(\"Crowdin config must contain at least one file config\")\n@@ -353,12 +47,12 @@ def validate_config(config):\ndef get_overrides(config):\n+ \"\"\"Get the language mapping dictionary for the %osx_locale% code from config file.\"\"\"\n+ # This is guaranteed to be the same for all files, so just use the first one.\nreturn config[\"files\"][0].get(\"languages_mapping\").get(\"osx_locale\", {})\nif __name__ == \"__main__\":\nparser = argparse.ArgumentParser()\n- # parser.add_argument('--crowdin-code', required=True,\n- # help='Crowdin language code')\nparser.add_argument('--crowdin-config', required=True,\nhelp='Path to crowdin config yaml file')\nargs = parser.parse_args()\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/modify_pseudo_translations.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/modify_pseudo_translations.py", "diff": "+\"\"\"Script to modify pseudo translation markdown files to make parseable by Verto.\n+\n+Crowdin in-context translation works by replacing all strings in the file with\n+placeholder identifiers. On the front end, these are then substituted with the\n+translated versions of the strings. However this means that verto tags are not\n+available at time of deployment (as they are treated as normal source strings).\n+\n+The current workaround is this script, which identifies all source strings which\n+are verto block tags, and inserts them back into the markdown file. It also\n+retains the identifier, to allow for editing of the verto tag on the front end,\n+although the effects of these changes will not be seen in real time.\n+\"\"\"\n+\nfrom verto import Verto\nimport re\nimport os\n@@ -16,6 +29,16 @@ NS_DICT = {\nXLIFF_PARSER = etree.XMLParser()\ndef get_xliff_trans(path):\n+ \"\"\"Get xml 'body' element for first file node in the xliff file.\n+\n+ Note that this should be the only file node in the file, as one xliff\n+ file is downloaded per source file\n+\n+ Args:\n+ path (str) path to xliff file\n+ Returns:\n+ etree.Element for 'body' element\n+ \"\"\"\nwith open(xliff_path, 'r') as f:\nxliff = etree.parse(f, XLIFF_PARSER)\nxliff_trans = xliff.xpath(\n@@ -26,6 +49,7 @@ def get_xliff_trans(path):\ndef get_verto_block_patterns():\n+ \"\"\"Get list of compiled regex patterns for verto block tags.\"\"\"\nconvertor = Verto()\next = convertor.verto_extension\nblock_pattern = ext.processor_info['style']['block_pattern']\n@@ -37,12 +61,30 @@ def get_verto_block_patterns():\nreturn patterns\ndef is_block(string, patterns):\n+ \"\"\"Determine whether the given source string is a verto block tag.\n+\n+ Args:\n+ string: (str) source string\n+ patterns: (list) compiled regex patterns for verto block tags\n+ Returns:\n+ bool\n+ \"\"\"\nfor pattern in patterns:\nif pattern.search(string):\nreturn True\nreturn False\ndef update_markdown_file(md_path, blocks, no_translate):\n+ \"\"\"Update given markdown file by replacing certain string identifiers with their source string.\n+\n+ Args:\n+ md_path: (str) path to markdown file\n+ blocks: (dict) {crowdin_string_id: original_verto_tag, ...} mapping of\n+ all string identifiers to replace with original verto tag\n+ no_translate: (dict) {crowdin_string_id: source_string, ...} mapping of\n+ all string identifiers to replace with source string, for strings\n+ that crowdin has identified should not be translated.\n+ \"\"\"\nwith open(md_path, 'r') as f:\nmd = f.read()\n@@ -56,7 +98,6 @@ def update_markdown_file(md_path, blocks, no_translate):\nfor string_id, string in no_translate.items():\npattern = r'crwdns{0}:0(.*?)crwdne{0}:0'.format(string_id)\nc = re.compile(pattern)\n- # new_str = \"crwdns{id}:0crwdne{id}:0*\\n\\n\\\\1{content}\".format(id=url_id, content=url)\nmd = re.sub(c, string, md)\nprint(\"{} - {}\".format(string_id, string))\n@@ -66,10 +107,7 @@ def update_markdown_file(md_path, blocks, no_translate):\nif __name__ == \"__main__\":\n-\n- # for root, files in ((\"csunplugged/topics/content/en/\", (\"unplugged-programming/programming-challenges/draw-different-types-of-triangles/extra-challenge.md\",)),):\nfor root, dirs, files in os.walk(EN_DIR):\n-\nfor name in files:\nif name.endswith(\".md\"):\nsource_md_path = os.path.join(root, name)\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/setup.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/setup.py", "diff": "+\"\"\"Setup crowdin_bot python package.\"\"\"\n+\nfrom distutils.core import setup\n+\nsetup(\nname='crowdin_bot',\nversion='1.0',\n" } ]
Python
MIT License
uccser/cs-unplugged
Clean up crowdin_bot python package, add/improve docstrings
701,855
24.11.2017 12:04:33
-46,800
34f0cd0621ca555df362450b7d69bc92634f3104
Improve documentation in crowdin_bot scripts
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "diff": "#!/usr/bin/env bash\n+# Configuration for crowdin-bot\n+\n# CS Unplugged repo\nREPO=\"git@github.com:uccser/cs-unplugged.git\"\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-list-unused.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-list-unused.sh", "diff": "#!/usr/bin/env bash\n+# Script to list files present on crowdin that are not uploaded/download\n+# using the current configuration file in TRANSLATION_SOURCE_BRANCH\n+\nset -e\nset -x\nset -o pipefail\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "diff": "#!/usr/bin/env bash\n+# Script to pull in-context pseudo-language translation files from crowdin,\n+# And update them to restore verto tags and non-translatable strings.\n+# If the resulting files differ from the current state of IN_CONTEXT_L10N_TARGET_BRANCH,\n+# the changes are pushed to a branch \"IN_CONTEXT_L10N_TARGET_BRANCH-in-context-l10n\",\n+# and a pull request opened to merge into IN_CONTEXT_L10N_TARGET_BRANCH\n+\nset -e\nset -x\nset -o pipefail\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "diff": "#!/usr/bin/env bash\n+# Script to pull translation files from crowdin.\n+# If the resulting files differ from the current state of TRANSLATION_TARGET_BRANCH,\n+# the changes are pushed to a branch \"TRANSLATION_TARGET_BRANCH-translations\",\n+# and a pull request opened to merge into TRANSLATION_TARGET_BRANCH\n+\nset -e\nset -x\nset -o pipefail\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-push-source.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-push-source.sh", "diff": "#!/usr/bin/env bash\n+# Script to push source files from crowdin.\n+# Source files are uploaded from the current state of branch TRANSLATION_SOURCE_BRANCH.\n+\nset -e\nset -x\nset -o pipefail\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "diff": "#!/usr/bin/env bash\n+# Function to reset a repo to a like-checkout state\n+# End result similar to 'git clone -b <branch> <remote_repo>'\n+# Usage: reset_repo <repo_dir> <branch>\n+# repo_dir: path to repository to reset\n+# branch: The branch to be on after the reset.\n+# This branch must exist on origin, and will be checked out to the\n+# current origin state.\n+# All other local branches will be deleted.\nreset_repo() {\nrepo_dir=$1\nbranch=$2\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/deploy.sh", "new_path": "infrastructure/crowdin/deploy.sh", "diff": "+# Script to deploy crowdin bot to GCE\n+\nset -e\nPROJECT=\"cs-unplugged-dev\"\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/setup-instance.sh", "new_path": "infrastructure/crowdin/setup-instance.sh", "diff": "+# Script to setup crowdin_bot on a GCE instance\n+\nset -e\nSECRETS_DIR=\"crowdin_bot_secrets\"\n" } ]
Python
MIT License
uccser/cs-unplugged
Improve documentation in crowdin_bot scripts
701,855
24.11.2017 12:05:48
-46,800
d784ca764ce4cc95c8ca2a383487bee53e3246af
Point crowdin_bot at develop branch
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "diff": "REPO=\"git@github.com:uccser/cs-unplugged.git\"\n# Branch for upload of source content to crowdin\n-TRANSLATION_SOURCE_BRANCH=\"translation-pipeline\"\n+TRANSLATION_SOURCE_BRANCH=\"develop\"\n# Branch that new translations will be merged into\n-TRANSLATION_TARGET_BRANCH=\"translation-pipeline\"\n+TRANSLATION_TARGET_BRANCH=\"develop\"\n# Branch that new metadata for in context localisation will be merged into\n-IN_CONTEXT_L10N_TARGET_BRANCH=\"translation-pipeline\"\n+IN_CONTEXT_L10N_TARGET_BRANCH=\"develop\"\n# Name of crowdin config file\nCROWDIN_CONFIG_FILE=\"crowdin_content.yaml\"\n" } ]
Python
MIT License
uccser/cs-unplugged
Point crowdin_bot at develop branch
701,855
24.11.2017 12:06:33
-46,800
081ff119c835274bb25aa5dd9afc242443862031
Remove redirection to test repo, point all scripts at main csunplugged repo
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "diff": "@@ -13,7 +13,6 @@ set -o pipefail\nsource crowdin-bot-config.sh\nsource crowdin-bot-utils.sh\n-REPO=\"git@github.com:jordangriffiths01/crowdin_testing.git\"\nCLONED_REPO_DIR=\"incontext-download-cloned-repo\"\nIN_CONTEXT_L10N_PR_BRANCH=\"${IN_CONTEXT_L10N_TARGET_BRANCH}-in-context-l10n\"\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "diff": "@@ -12,7 +12,6 @@ set -o pipefail\nsource crowdin-bot-config.sh\nsource crowdin-bot-utils.sh\n-REPO=\"git@github.com:jordangriffiths01/crowdin_testing.git\"\nCLONED_REPO_DIR=\"update-completed-translations-cloned-repo\"\nTRANSLATION_PR_BRANCH_BASE=\"${TRANSLATION_TARGET_BRANCH}-translations\"\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove redirection to test repo, point all scripts at main csunplugged repo
701,855
24.11.2017 12:25:03
-46,800
72ef828ce2238d04a15b9e813403e3336996146a
Change RTL pseudo language code because it's being a pain
[ { "change_type": "MODIFY", "old_path": "csunplugged/config/settings/base.py", "new_path": "csunplugged/config/settings/base.py", "diff": "@@ -107,7 +107,7 @@ TIME_ZONE = \"UTC\"\nLANGUAGE_CODE = \"en\"\nINCONTEXT_L10N_PSEUDOLANGUAGE = \"xx-lr\"\n-INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = \"xx-rl\"\n+INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = \"yy-rl\"\nINCONTEXT_L10N_PSEUDOLANGUAGES = (\nINCONTEXT_L10N_PSEUDOLANGUAGE,\nINCONTEXT_L10N_PSEUDOLANGUAGE_BIDI\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/locale/xx_LR/LC_MESSAGES/django.po", "new_path": "csunplugged/locale/xx_LR/LC_MESSAGES/django.po", "diff": "@@ -1134,4 +1134,3 @@ msgstr \"crwdns15904:0crwdne15904:0\"\n#: templates/topics/unit-plan.html:30 templates/topics/unit-plan.html:53\nmsgid \"Lessons\"\nmsgstr \"crwdns15905:0crwdne15905:0\"\n-\n" }, { "change_type": "RENAME", "old_path": "csunplugged/locale/xx_RL", "new_path": "csunplugged/locale/yy_RL", "diff": "" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<!-- Required meta tags -->\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n- {% if LANGUAGE_CODE == \"xx-lr\" or LANGUAGE_CODE == \"xx-rl\" %}\n+ {% if LANGUAGE_CODE == \"xx-lr\" or LANGUAGE_CODE == \"yy-rl\" %}\n<script type=\"text/javascript\">\nvar _jipt = [];\n_jipt.push(['project', 'cs-unplugged']);\n" }, { "change_type": "RENAME", "old_path": "csunplugged/topics/content/xx-rl", "new_path": "csunplugged/topics/content/yy-rl", "diff": "" } ]
Python
MIT License
uccser/cs-unplugged
Change RTL pseudo language code because it's being a pain
701,855
24.11.2017 12:26:57
-46,800
471b76842241310e9988695ae4e6470fe3501086
Disable in-context localisation by default
[ { "change_type": "MODIFY", "old_path": "csunplugged/config/settings/base.py", "new_path": "csunplugged/config/settings/base.py", "diff": "@@ -117,7 +117,7 @@ LANGUAGES = (\n(\"en\", \"English\"),\n)\n-if env.bool(\"INCLUDE_INCONTEXT_L10N\", True):\n+if env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\nEXTRA_LANGUAGES = [\n(INCONTEXT_L10N_PSEUDOLANGUAGE, \"In-context translations\"),\n(INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, \"In-context translations (Bidi)\"),\n" } ]
Python
MIT License
uccser/cs-unplugged
Disable in-context localisation by default
701,860
24.11.2017 13:08:37
-46,800
b446353e63276a2b26c90342f329dc3f3fa5138b
Update navbar and footer Navbar has been changed to flat $red. Proper logo has replaced the temp logo. Footer has been redesigned.
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/logo-mono.png", "new_path": "csunplugged/static/img/logo-mono.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/logo-mono.png differ\n" }, { "change_type": "DELETE", "old_path": "csunplugged/static/img/logo-white.png", "new_path": "csunplugged/static/img/logo-white.png", "diff": "Binary files a/csunplugged/static/img/logo-white.png and /dev/null differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -183,7 +183,7 @@ $rounded-corner-radius: 0.5rem;\n}\n.navbar {\n- background: linear-gradient(90deg, darken($red, 10%), $red, $red);\n+ background-color: $red;\n// border-bottom: 2px $red solid;\n#navbar-brand-logo {\n@@ -206,6 +206,10 @@ $rounded-corner-radius: 0.5rem;\nborder-top: 2px $red solid;\n}\n+.footer-statement {\n+ border-top: 1px $white solid;\n+}\n+\n#page-footer {\nbackground-color: $red;\ncolor: rgba($white, 0.6);\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<span class=\"navbar-toggler-icon\"></span>\n</button>\n<a class=\"navbar-brand\" href=\"{% url 'general:home' %}\">\n- <img src=\"{% static 'img/logo-white.png' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n+ <img src=\"{% static 'img/logo-mono.png' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n<a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge\">{{ VERSION_NUMBER_ENGLISH }}</a>\n</a>\n<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n{% endblock body_container %}\n</div>\n- <div class=\"container white-footer mt-5 py-5 text-center\">\n+ <div class=\"container white-footer mt-5 py-5\">\n<div class=\"row align-items-center justify-content-center\">\n<div class=\"col-4 col-lg-3\">\n<a href=\"http://www.cosc.canterbury.ac.nz/research/RG/CSE/\">\n</a>\n</div>\n</div>\n+ </div>\n+\n+ <footer id=\"page-footer\">\n+ <div class=\"container background-csfg py-3 w-100 text-center\">\n+ <p class=\"mb-0\">\n+ {% blocktrans trimmed %}\n+ Looking for something for high schools?\n+ Check out the <a href=\"http://csfieldguide.org.nz/\">Computer Science Field Guide</a>.\n+ {% endblocktrans %}\n+ </p>\n+ </div>\n+\n+ <div class=\"container py-3\">\n+ <div class=\"row justify-content-center mt-4\">\n+ <div class=\"col-6\">\n+ <p>\n+ {% blocktrans trimmed %}\n+ The primary goal of the Unplugged project is to promote Computer Science (and computing in general) to young people as an interesting, engaging, and intellectually stimulating discipline.\n+ {% endblocktrans %}\n+ </p>\n+ <p>\n+ {% blocktrans trimmed %}\n+ See more about our principles <a href=\"\">here</a>.\n+ {% endblocktrans %}\n+ </p>\n+ </div>\n- <div class=\"row justify-content-center mt-5\">\n- <div class=\"col-3\">\n+ <div class=\"col-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Useful Links\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n</li>\n</ul>\n</div>\n- <div class=\"col-3\">\n+ <div class=\"col-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Community\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n</li>\n</ul>\n</div>\n- <div class=\"col-3\">\n+ <div class=\"col-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Help\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n</div>\n</div>\n- <footer id=\"page-footer\" class=\"text-center\">\n- <div class=\"container background-csfg py-3 w-100\">\n- <p class=\"mb-0\">\n- {% blocktrans trimmed %}\n- Looking for something for high schools?\n- Check out the <a href=\"http://csfieldguide.org.nz/\">Computer Science Field Guide</a>.\n- {% endblocktrans %}\n- </p>\n- </div>\n- <div class=\"container py-3\">\n+ <div class=\"container py-3 footer-statement text-center\">\n<p>\n{% blocktrans trimmed %}\nThe CS Unplugged material is open source on <a href=\"https://github.com/uccser/cs-unplugged\">GitHub</a>, and this website's content is shared under a <a href=\"https://creativecommons.org/licenses/by-sa/4.0/\">Creative Commons Attribution-ShareAlike 4.0 International license</a>.\n" } ]
Python
MIT License
uccser/cs-unplugged
Update navbar and footer Navbar has been changed to flat $red. Proper logo has replaced the temp logo. Footer has been redesigned.
701,855
24.11.2017 14:09:54
-46,800
a7db710f362abd528ae93bde394f98badd61ada9
Add custom environment variables to develop/production deployments
[ { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/app-dev.yaml", "new_path": "infrastructure/dev-deploy/app-dev.yaml", "diff": "@@ -5,11 +5,13 @@ beta_settings:\ncloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}\nenv_variables:\n+ INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}\nDJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}\nGOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}\nGOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}\nGOOGLE_CLOUD_SQL_CONNECTION_NAME: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}\nGOOGLE_CLOUD_STORAGE_BUCKET_NAME: cs-unplugged-dev.appspot.com\n+\nmanual_scaling:\ninstances: 1\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-app.sh", "new_path": "infrastructure/dev-deploy/deploy-app.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Deploys the application to Google App Engine\n# Install Google Cloud SDK\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-1.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-1.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-2.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-2.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-3.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-3.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-static-files.sh", "new_path": "infrastructure/dev-deploy/deploy-static-files.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Deploy static files to the development static file server.\n./csu start\n" }, { "change_type": "ADD", "old_path": null, "new_path": "infrastructure/dev-deploy/load-dev-deploy-config-envs.sh", "diff": "+# Configuration options for development deployment\n+\n+export INCLUDE_INCONTEXT_L10N=true\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/update-database.sh", "new_path": "infrastructure/dev-deploy/update-database.sh", "diff": "#!/bin/bash\n+source ./load-dev-deploy-config-envs.sh\n+\n# Updates the database for the development system\nmv ./infrastructure/cloud-sql-proxy/docker-compose.yml ./docker-compose.yml\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/app-prod.yaml", "new_path": "infrastructure/prod-deploy/app-prod.yaml", "diff": "@@ -5,6 +5,7 @@ beta_settings:\ncloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}\nenv_variables:\n+ INCLUDE_INCONTEXT_L10N: ${INCLUDE_INCONTEXT_L10N}\nDJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}\nGOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}\nGOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-app.sh", "new_path": "infrastructure/prod-deploy/deploy-app.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Deploys the application to Google App Engine\n# Install Google Cloud SDK\n@@ -20,6 +22,7 @@ ssh-keygen -q -N \"\" -f ~/.ssh/google_compute_engine\n# Load environment variables.\nsource ./load-prod-deploy-envs.sh\n+source ./load-prod-deploy-config-envs.sh\n# Create app-prod.yaml file using environment variables.\npython ./infrastructure/replace_envs.py ./infrastructure/prod-deploy/app-prod.yaml\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-1.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-1.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n@@ -22,6 +24,8 @@ docker-compose exec django /docker_venv/bin/python3 ./manage.py makeresources \"L\n# Decrypt secret files archive that contain credentials.\n./infrastructure/prod-deploy/decrypt-prod-secrets.sh\n+source ./load-prod-deploy-config-envs.sh\n+\n# Authenticate with gcloud tool using the decrypted service account credentials.\n# See: https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account\ngcloud auth activate-service-account --key-file continuous-deployment-prod.json\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-2.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-2.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-3.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-3.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Deploy generated resource files to the development static file server.\n./csu start\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-static-files.sh", "new_path": "infrastructure/prod-deploy/deploy-static-files.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Deploy static files to the development static file server.\n./csu start\n" }, { "change_type": "ADD", "old_path": null, "new_path": "infrastructure/prod-deploy/load-prod-deploy-config-envs.sh", "diff": "+# Configuration options for production deployment\n+\n+export INCLUDE_INCONTEXT_L10N=false\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/update-database.sh", "new_path": "infrastructure/prod-deploy/update-database.sh", "diff": "#!/bin/bash\n+source ./load-prod-deploy-config-envs.sh\n+\n# Updates the database for the development system\nmv ./infrastructure/cloud-sql-proxy/docker-compose.yml ./docker-compose.yml\n" } ]
Python
MIT License
uccser/cs-unplugged
Add custom environment variables to develop/production deployments
701,860
24.11.2017 14:54:26
-46,800
982762e7e32abd77b7dc598e2ee3fea69760e670
Update logo png to svg file
[ { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/static/img/logo-mono-small.svg", "diff": "+<svg id=\"Layer_1\" data-name=\"Layer 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 267.17 74.97\"><defs><style>.cls-1{fill:#fff;}</style></defs><title>logo-mono-small</title><path class=\"cls-1\" d=\"M263.48,86.14l-6.7,2.27a0.87,0.87,0,0,1-1.1-.54l-0.58-1.71a0.87,0.87,0,0,1,.54-1.1l6.7-2.27Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M267.08,96.77L260.39,99a0.87,0.87,0,0,1-1.1-.54l-0.58-1.71a0.87,0.87,0,0,1,.54-1.1l6.7-2.27Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M298.68,56.09A23,23,0,0,0,287.08,42c-16.79-9-45.19-1.8-56.62,1.69a250.1,250.1,0,0,0-23.76,9.13c-19.72,8.33-40.1,16.94-60,12l-1.14-.29a10.1,10.1,0,0,1-1.81-.71l0,0a14.73,14.73,0,0,0,5.68-12,12.7,12.7,0,0,0-7.71-11.14,11.34,11.34,0,0,0-13.24,3.77c-3.3,4.71-2,11,.74,15.22a20.93,20.93,0,0,0,2.06,2.64,0.46,0.46,0,0,1-.22.76c-12.09,2.79-26.17,3.12-42,1l-0.9-.12a11.82,11.82,0,0,1-.68-3.69V35.88a10,10,0,0,0-.63-3.4c-0.34-.77-3.07-1.4-4.17-1.4H37.25a10,10,0,0,0-3.4.63c-0.77.34-1.4,3.07-1.4,4.17V64.5a10,10,0,0,0,.63,3.4c0.34,0.77,3.07,1.4,4.17,1.4H86.76c18,2.57,33.94,2.13,47.52-1.33,1-.25,2-0.52,3-0.86a0.44,0.44,0,0,1,.35,0,31.85,31.85,0,0,0,7.78,3C167,75.63,188.3,66.65,208.85,58A246.45,246.45,0,0,1,232.08,49c8.4-2.57,37-10.32,52.4-2.1a17.41,17.41,0,0,1,8.9,10.77c2.25,7.44-.88,16-7.13,19.81l-0.21.13a10.67,10.67,0,0,0,1,2.22l0.3,0.54a10.19,10.19,0,0,0,1.39,2.05l0.22-.13C297.39,77.32,301.64,65.91,298.68,56.09ZM59.58,58.6a11.29,11.29,0,0,1-2.1,1.4,11.74,11.74,0,0,1-2.49.94,11.09,11.09,0,0,1-2.79.35,11.38,11.38,0,0,1-4.38-.82,10.13,10.13,0,0,1-3.42-2.28,10.28,10.28,0,0,1-2.22-3.47,12.56,12.56,0,0,1,0-8.76,10.33,10.33,0,0,1,5.66-5.89,11,11,0,0,1,4.43-.87,11.53,11.53,0,0,1,5.12,1.07,8.31,8.31,0,0,1,2.29,1.61,2.06,2.06,0,0,1-.09,2.86l-0.36.35A1.88,1.88,0,0,1,56.47,45a7.88,7.88,0,0,0-.93-0.61,5.73,5.73,0,0,0-3.09-.8,6,6,0,0,0-2.55.52A5.55,5.55,0,0,0,48,45.51a6.56,6.56,0,0,0-1.21,2.13,8,8,0,0,0,0,5.15A6.22,6.22,0,0,0,48,54.87a5.63,5.63,0,0,0,1.89,1.39,5.92,5.92,0,0,0,2.49.5,7.3,7.3,0,0,0,2-.24,5.93,5.93,0,0,0,1.48-.63A5.78,5.78,0,0,0,57,55l0.33-.35c0.35-.39,1.31-0.1,2.12.64l0.29,0.27a1.93,1.93,0,0,1,.5,2.53Zm18.34-1.24a6.66,6.66,0,0,1-1.72,2.08,8,8,0,0,1-2.55,1.37,10,10,0,0,1-3.17.49,12.69,12.69,0,0,1-2.87-.3,11.69,11.69,0,0,1-2.33-.79,10.58,10.58,0,0,1-1.87-1.12l-0.56-.42c-0.48-.48-0.27-1.53.48-2.34L63.67,56c0.75-.81,1.62-1.2,2-0.88L66,55.39a8.11,8.11,0,0,0,1.23.83,7.21,7.21,0,0,0,1.48.61,6.06,6.06,0,0,0,1.72.24,3.8,3.8,0,0,0,1.07-.16,3.47,3.47,0,0,0,1-.46,2.44,2.44,0,0,0,.71-0.72,1.78,1.78,0,0,0,.27-1A2,2,0,0,0,72.31,53a15.53,15.53,0,0,0-3.59-1.28,9.47,9.47,0,0,1-2.22-.82,7,7,0,0,1-1.76-1.29,5.48,5.48,0,0,1-1.15-1.73,5.55,5.55,0,0,1-.41-2.17,6.57,6.57,0,0,1,.47-2.49,5.77,5.77,0,0,1,1.43-2.06,6.89,6.89,0,0,1,2.39-1.42,9.92,9.92,0,0,1,3.39-.52,11,11,0,0,1,2.84.33,10.23,10.23,0,0,1,2.1.79,7.25,7.25,0,0,1,1.42.95l0.37,0.33c0.26,0.25-.14,1.11-0.87,1.93l-0.06.06c-0.74.82-1.57,1.3-1.84,1.09l-0.3-.22a7.33,7.33,0,0,0-1-.61,7,7,0,0,0-1.25-.47,5.3,5.3,0,0,0-1.43-.19,3.21,3.21,0,0,0-1,.16,3.46,3.46,0,0,0-.88.42,2.24,2.24,0,0,0-.63.63,1.38,1.38,0,0,0-.24.77,2,2,0,0,0,1.13,1.73A11.09,11.09,0,0,0,72.31,48a14,14,0,0,1,2.29.77,7.51,7.51,0,0,1,2,1.28A5.91,5.91,0,0,1,78,52a6.58,6.58,0,0,1,.54,2.79A5.53,5.53,0,0,1,77.92,57.36Zm62.51,2.08a12.3,12.3,0,0,1-2.1,1.31,0.48,0.48,0,0,1-.5,0,16.72,16.72,0,0,1-3.89-4.09c-1.67-2.53-2.64-6.43-.84-9a5.66,5.66,0,0,1,4.59-2.19,5.57,5.57,0,0,1,2.07.38A7.18,7.18,0,0,1,144,52.06,9.12,9.12,0,0,1,140.42,59.44Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M32.45,78.47a2.32,2.32,0,0,1,2.31-2.31h2a2.32,2.32,0,0,1,2.31,2.31V91.08c0,1.27,0,3.14.09,4.14L39.36,96a5.11,5.11,0,0,0,.94,2A4.3,4.3,0,0,0,42,99.27a6.72,6.72,0,0,0,2.64.46,6.59,6.59,0,0,0,2.6-.46A4.31,4.31,0,0,0,49,98a5.15,5.15,0,0,0,.94-2l0.19-.77c0.05-1,.09-2.87.09-4.14V78.47a2.32,2.32,0,0,1,2.31-2.31h2a2.32,2.32,0,0,1,2.31,2.31V91.91c0,1.27-.09,3.35-0.2,4.62A9.93,9.93,0,0,1,56,99a10.41,10.41,0,0,1-2.44,3.73,11.25,11.25,0,0,1-3.86,2.42,14,14,0,0,1-5.06.87,14.33,14.33,0,0,1-5.06-.85,10.83,10.83,0,0,1-3.86-2.42A10.6,10.6,0,0,1,33.3,99a9.91,9.91,0,0,1-.66-2.5c-0.11-1.27-.2-3.35-0.2-4.62V78.47Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M62.34,78.47a2.32,2.32,0,0,1,2.31-2.31h1.66a4.85,4.85,0,0,1,3.6,1.92l10,15c0.71,1.06,1.28.88,1.28-.39V78.47a2.32,2.32,0,0,1,2.31-2.31h1.87a2.32,2.32,0,0,1,2.31,2.31V103a2.32,2.32,0,0,1-2.31,2.31H84.08a4.87,4.87,0,0,1-3.6-1.92L70.13,87.94c-0.71-1.06-1.29-.88-1.29.39V103a2.32,2.32,0,0,1-2.31,2.31H64.66A2.32,2.32,0,0,1,62.34,103V78.47Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M93.42,78.47a2.32,2.32,0,0,1,2.31-2.31h6c1.27,0,3.35.08,4.62,0.18a8.56,8.56,0,0,1,2.32.61A9.15,9.15,0,0,1,111.81,79a8,8,0,0,1,1.83,3,10.73,10.73,0,0,1,.59,3.54,9.85,9.85,0,0,1-.81,4.12,8.45,8.45,0,0,1-2.18,2.95,9.58,9.58,0,0,1-3.16,1.79,8.81,8.81,0,0,1-1.45.43c-1.27.1-3.32,0.18-4.55,0.18a2.29,2.29,0,0,0-2.25,2.31V103a2.32,2.32,0,0,1-2.31,2.31H95.73A2.32,2.32,0,0,1,93.42,103V78.47Zm8.34,11.22a29.91,29.91,0,0,0,4.11-.37l0.71-.74a4,4,0,0,0,1.07-2.9,4.18,4.18,0,0,0-1.09-3l-0.73-.77a28.84,28.84,0,0,0-4.1-.39,2.14,2.14,0,0,0-1.9,2.31v3.53A2.15,2.15,0,0,0,101.75,89.69Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M118.64,78.47A2.32,2.32,0,0,1,121,76.16h2a2.32,2.32,0,0,1,2.31,2.31V97.11a2.32,2.32,0,0,0,2.31,2.31h9.29a2.32,2.32,0,0,1,2.31,2.31V103a2.32,2.32,0,0,1-2.31,2.31H121a2.32,2.32,0,0,1-2.31-2.31V78.47Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M142.38,78.47a2.32,2.32,0,0,1,2.31-2.31h2A2.32,2.32,0,0,1,149,78.47V91.08c0,1.27,0,3.14.09,4.14L149.3,96a5.12,5.12,0,0,0,.94,2A4.3,4.3,0,0,0,152,99.27a6.72,6.72,0,0,0,2.64.46,6.59,6.59,0,0,0,2.6-.46A4.32,4.32,0,0,0,158.92,98a5.15,5.15,0,0,0,.94-2l0.19-.77c0.05-1,.09-2.87.09-4.14V78.47a2.32,2.32,0,0,1,2.31-2.31h2a2.32,2.32,0,0,1,2.31,2.31V91.91c0,1.27-.09,3.35-0.2,4.62A9.93,9.93,0,0,1,166,99a10.39,10.39,0,0,1-2.44,3.73,11.24,11.24,0,0,1-3.86,2.42,14,14,0,0,1-5.06.87,14.33,14.33,0,0,1-5.06-.85,10.83,10.83,0,0,1-3.86-2.42A10.61,10.61,0,0,1,143.23,99a9.93,9.93,0,0,1-.66-2.5c-0.11-1.27-.2-3.35-0.2-4.62V78.47Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M187.33,91.56a2.32,2.32,0,0,1,2.31-2.31h6.59a2.32,2.32,0,0,1,2.31,2.31v8a5,5,0,0,1-1.89,3.65,15.32,15.32,0,0,1-3.41,1.7,20.76,20.76,0,0,1-6.92,1.07,17.27,17.27,0,0,1-6.39-1.11,13.54,13.54,0,0,1-4.78-3.12,13.32,13.32,0,0,1-3-4.8,17.71,17.71,0,0,1-1-6.15,16.52,16.52,0,0,1,1.09-6.07,14.36,14.36,0,0,1,7.86-8.12,15.37,15.37,0,0,1,6.11-1.18,15.68,15.68,0,0,1,7,1.46,13.09,13.09,0,0,1,3.36,2.41,2.32,2.32,0,0,1-.08,3.27l-1.1,1a2.36,2.36,0,0,1-3.29-.06,8.86,8.86,0,0,0-1.46-1,7.65,7.65,0,0,0-4.12-1,8.28,8.28,0,0,0-3.58.74,8,8,0,0,0-2.66,2,8.69,8.69,0,0,0-1.66,3,11.38,11.38,0,0,0-.57,3.62,10.51,10.51,0,0,0,.65,3.8,8.39,8.39,0,0,0,1.83,2.9,8.18,8.18,0,0,0,2.77,1.85,9,9,0,0,0,3.47.66,11.44,11.44,0,0,0,3.19-.42l1-.28a3.89,3.89,0,0,0,1.61-2.89,2.12,2.12,0,0,0-2.31-1.83h-0.52a2.32,2.32,0,0,1-2.31-2.31v-0.7Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M218.89,91.56a2.32,2.32,0,0,1,2.31-2.31h6.59a2.32,2.32,0,0,1,2.31,2.31v8a5,5,0,0,1-1.89,3.65,15.32,15.32,0,0,1-3.41,1.7,20.77,20.77,0,0,1-6.92,1.07,17.27,17.27,0,0,1-6.39-1.11,13.56,13.56,0,0,1-4.78-3.12,13.33,13.33,0,0,1-3-4.8,17.71,17.71,0,0,1-1-6.15,16.52,16.52,0,0,1,1.09-6.07,14.36,14.36,0,0,1,7.86-8.12,15.36,15.36,0,0,1,6.11-1.18,15.68,15.68,0,0,1,7,1.46,13.1,13.1,0,0,1,3.36,2.41,2.32,2.32,0,0,1-.08,3.27l-1.1,1a2.36,2.36,0,0,1-3.29-.06,8.84,8.84,0,0,0-1.46-1,7.65,7.65,0,0,0-4.12-1,8.28,8.28,0,0,0-3.58.74,7.94,7.94,0,0,0-2.66,2,8.69,8.69,0,0,0-1.66,3,11.41,11.41,0,0,0-.57,3.62,10.49,10.49,0,0,0,.66,3.8,8.39,8.39,0,0,0,1.83,2.9,8.19,8.19,0,0,0,2.77,1.85,9,9,0,0,0,3.47.66,11.44,11.44,0,0,0,3.19-.42l1-.28A3.89,3.89,0,0,0,224,96.41a2.12,2.12,0,0,0-2.31-1.83H221.2a2.32,2.32,0,0,1-2.31-2.31v-0.7Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M235.39,78.47a2.32,2.32,0,0,1,2.31-2.31H253a2.32,2.32,0,0,1,2.31,2.31V79.6A2.32,2.32,0,0,1,253,81.92h-8.68A2.32,2.32,0,0,0,242,84.23v1a2.32,2.32,0,0,0,2.31,2.31H250a2.32,2.32,0,0,1,2.31,2.31v1A2.32,2.32,0,0,1,250,93.18h-5.72A2.32,2.32,0,0,0,242,95.49v1.66a2.32,2.32,0,0,0,2.31,2.31h9.64a2.32,2.32,0,0,1,2.31,2.31V103a2.32,2.32,0,0,1-2.31,2.31H237.7a2.32,2.32,0,0,1-2.31-2.31V78.47Z\" transform=\"translate(-32.45 -31.08)\"/><path class=\"cls-1\" d=\"M260.84,78.38a2.32,2.32,0,0,1,1.45-2.93l6-2c1.21-.41,3.2-1,4.43-1.34a19.9,19.9,0,0,1,3.93-.58,13.46,13.46,0,0,1,5.53.94,12,12,0,0,1,4.53,3.3A17.18,17.18,0,0,1,290,81.59a15.6,15.6,0,0,1,.91,6.35,12.6,12.6,0,0,1-1.64,5.3,13.53,13.53,0,0,1-3.8,4.15,19.48,19.48,0,0,1-3.47,2c-1.17.49-3.12,1.23-4.33,1.64l-6,2a2.32,2.32,0,0,1-2.93-1.45Zm14.87,17.07a35.57,35.57,0,0,0,4-1.7,9.37,9.37,0,0,0,3.57-3.27,8.39,8.39,0,0,0,.2-6.73,11.5,11.5,0,0,0-1.69-3.27,7.27,7.27,0,0,0-2.47-2.11,7.44,7.44,0,0,0-3.24-.79,7.17,7.17,0,0,0-1.81.12c-1.23.32-3.09,0.87-4.14,1.23a2.18,2.18,0,0,0-1.16,2.84l4.12,12.15A2.18,2.18,0,0,0,275.72,95.45Z\" transform=\"translate(-32.45 -31.08)\"/></svg>\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<span class=\"navbar-toggler-icon\"></span>\n</button>\n<a class=\"navbar-brand\" href=\"{% url 'general:home' %}\">\n- <img src=\"{% static 'img/logo-mono.png' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n+ <img src=\"{% static 'img/logo-mono-small.svg' %}\" id=\"navbar-brand-logo\" class=\"d-inline-block align-top\" alt=\"CS Unplugged logo\">\n<a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge\">{{ VERSION_NUMBER_ENGLISH }}</a>\n</a>\n<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n<div class=\"container py-3\">\n<div class=\"row justify-content-center mt-4\">\n- <div class=\"col-6\">\n+ <div class=\"col-12 col-md-6\">\n<p>\n{% blocktrans trimmed %}\nThe primary goal of the Unplugged project is to promote Computer Science (and computing in general) to young people as an interesting, engaging, and intellectually stimulating discipline.\n</p>\n</div>\n- <div class=\"col-2\">\n+ <div class=\"col-6 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Useful Links\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n</li>\n</ul>\n</div>\n- <div class=\"col-2\">\n+ <div class=\"col-6 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Community\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n</li>\n</ul>\n</div>\n- <div class=\"col-2\">\n+ <div class=\"col-12 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Help\" %}</p>\n<ul class=\"list-unstyled\">\n<li>\n" } ]
Python
MIT License
uccser/cs-unplugged
Update logo png to svg file
701,860
24.11.2017 15:28:05
-46,800
ef890b6bf1cbc51875d5a874de767ac890ee31a9
Update overrides Changes hamburger icon to white without border. Overrides navbar links to white.
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/bootstrap-overrides.scss", "new_path": "csunplugged/static/scss/bootstrap-overrides.scss", "diff": "@@ -72,10 +72,8 @@ $link-hover-decoration: underline;\n// Navbar\n-\n-$navbar-light-color: $red;\n-$navbar-light-hover-color: $red;\n-$navbar-light-active-color: $red;\n-$navbar-light-disabled-color: rgba($red, .5);\n-$navbar-light-toggler-bg: str-replace(url(\"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E\"), \"#\", \"%23\");\n-$navbar-light-toggler-border: rgba($red,.4);\n+//\n+$navbar-dark-color: $white;\n+$navbar-dark-hover-color: $white;\n+$navbar-dark-toggler-icon-bg: str-replace(url(\"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E\"), \"#\", \"%23\");\n+$navbar-dark-toggler-border-color: $red;\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -232,14 +232,10 @@ $rounded-corner-radius: 0.5rem;\nheight: 2rem;\n}\n- .navbar-nav .nav-link {\n- color: $white;\n- &:hover {\n- color: $white;\n+ .navbar-nav .nav-link:hover {\ntext-decoration: underline;\n}\n}\n-}\n.white-footer {\nborder-top: 2px $red solid;\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<meta name=\"theme-color\" content=\"#ffffff\">\n</head>\n<body>\n- <nav class=\"navbar fixed-top navbar-expand-md navbar-light py-1\">\n+ <nav class=\"navbar fixed-top navbar-expand-md navbar-dark py-1\">\n<div class=\"container px-0\">\n<button class=\"navbar-toggler navbar-toggler-right\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNav\" aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n<span class=\"navbar-toggler-icon\"></span>\n" } ]
Python
MIT License
uccser/cs-unplugged
Update overrides Changes hamburger icon to white without border. Overrides navbar links to white.
701,860
24.11.2017 16:27:31
-46,800
73ea4088841f19ff589f971e710de8c2155b63f8
Link to correct principles page in footer
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "</p>\n<p>\n{% blocktrans trimmed %}\n- See more about our principles <a href=\"\">here</a>.\n+ See more about our principles\n{% endblocktrans %}\n+ <a href=\"{% url 'general:principles' %}\">\n+ {% trans \"here\" %}.\n+ </a>\n+\n</p>\n</div>\n" } ]
Python
MIT License
uccser/cs-unplugged
Link to correct principles page in footer
701,855
24.11.2017 17:03:59
-46,800
2d9e4f331de8f00f18f18779ee86b08ef093af3b
Add in-context l10n env variable to local dockerfile
[ { "change_type": "MODIFY", "old_path": "Dockerfile-local", "new_path": "Dockerfile-local", "diff": "@@ -9,6 +9,7 @@ LABEL maintainer=\"csse-education-research@canterbury.ac.nz\"\nARG DEBIAN_FRONTEND=noninteractive\nENV DJANGO_PRODUCTION=False\n+ENV INCLUDE_INCONTEXT_L10N=True\nEXPOSE 8080\n# Copy and create virtual environment\n" } ]
Python
MIT License
uccser/cs-unplugged
Add in-context l10n env variable to local dockerfile
701,860
24.11.2017 17:38:05
-46,800
1d5bb9331fc26463c0f94e46e8f2321e01a188a9
Fix link for principles in footer
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "{% endblocktrans %}\n</p>\n<p>\n+ {% url 'general:principles' as principles_url %}\n{% blocktrans trimmed %}\n- See more about our principles\n+ Read more about <a href=\"{{ principles_url }}\">our principles here</a>.\n{% endblocktrans %}\n- <a href=\"{% url 'general:principles' %}\">\n- {% trans \"here\" %}.\n- </a>\n-\n</p>\n</div>\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix link for principles in footer
701,855
27.11.2017 08:55:43
-46,800
6e1b04f888e6f748923d9961faa59f0e627606d3
Move local in-context env var Dockerfile->docker-compose.yaml
[ { "change_type": "MODIFY", "old_path": "Dockerfile-local", "new_path": "Dockerfile-local", "diff": "@@ -9,7 +9,6 @@ LABEL maintainer=\"csse-education-research@canterbury.ac.nz\"\nARG DEBIAN_FRONTEND=noninteractive\nENV DJANGO_PRODUCTION=False\n-ENV INCLUDE_INCONTEXT_L10N=True\nEXPOSE 8080\n# Copy and create virtual environment\n" }, { "change_type": "MODIFY", "old_path": "docker-compose.yml", "new_path": "docker-compose.yml", "diff": "@@ -18,6 +18,7 @@ services:\n- USE_DOCKER=yes\n- DATABASE_URL=postgres://postgres@postgres:5434/postgres\n- DJANGO_SETTINGS_MODULE=config.settings.local\n+ - INCLUDE_INCONTEXT_L10N=True\ndepends_on:\n- postgres\n" } ]
Python
MIT License
uccser/cs-unplugged
Move local in-context env var Dockerfile->docker-compose.yaml
701,855
27.11.2017 09:05:59
-46,800
2a5f1e321ef12c3dcd3ca95dc79a9c9025f2b840
Reset branch migrations
[ { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/resources/migrations/0011_auto_20171126_2001.py", "diff": "+# -*- coding: utf-8 -*-\n+# Generated by Django 1.11.5 on 2017-11-26 20:01\n+from __future__ import unicode_literals\n+\n+import django.contrib.postgres.fields\n+from django.db import migrations, models\n+\n+\n+class Migration(migrations.Migration):\n+\n+ dependencies = [\n+ ('resources', '0010_auto_20171121_2304'),\n+ ]\n+\n+ operations = [\n+ migrations.AddField(\n+ model_name='resource',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='resource',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='resource',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='resource',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AlterField(\n+ model_name='resource',\n+ name='languages',\n+ field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), default=[], size=None),\n+ ),\n+ ]\n" }, { "change_type": "DELETE", "old_path": "csunplugged/topics/migrations/0087_auto_20171115_0551.py", "new_path": null, "diff": "-# -*- coding: utf-8 -*-\n-# Generated by Django 1.11.5 on 2017-11-15 05:51\n-from __future__ import unicode_literals\n-\n-import django.contrib.postgres.fields\n-import django.contrib.postgres.fields.jsonb\n-from django.db import migrations, models\n-\n-\n-class Migration(migrations.Migration):\n-\n- dependencies = [\n- ('topics', '0086_auto_20171108_0840'),\n- ]\n-\n- operations = [\n- migrations.RemoveField(\n- model_name='agegroup',\n- name='description_de',\n- ),\n- migrations.RemoveField(\n- model_name='agegroup',\n- name='description_fr',\n- ),\n- migrations.RemoveField(\n- model_name='classroomresource',\n- name='description_de',\n- ),\n- migrations.RemoveField(\n- model_name='classroomresource',\n- name='description_fr',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumarea',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumarea',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumintegration',\n- name='content_de',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumintegration',\n- name='content_fr',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumintegration',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='curriculumintegration',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='glossaryterm',\n- name='definition_de',\n- ),\n- migrations.RemoveField(\n- model_name='glossaryterm',\n- name='definition_fr',\n- ),\n- migrations.RemoveField(\n- model_name='glossaryterm',\n- name='term_de',\n- ),\n- migrations.RemoveField(\n- model_name='glossaryterm',\n- name='term_fr',\n- ),\n- migrations.RemoveField(\n- model_name='learningoutcome',\n- name='text_de',\n- ),\n- migrations.RemoveField(\n- model_name='learningoutcome',\n- name='text_fr',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='computational_thinking_links_de',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='computational_thinking_links_fr',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='content_de',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='content_fr',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='heading_tree_de',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='heading_tree_fr',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='programming_challenges_description_de',\n- ),\n- migrations.RemoveField(\n- model_name='lesson',\n- name='programming_challenges_description_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='content_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='content_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='extra_challenge_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='extra_challenge_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallenge',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengedifficulty',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengedifficulty',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='expected_result_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='expected_result_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='hints_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='hints_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='solution_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengeimplementation',\n- name='solution_fr',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengelanguage',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='programmingchallengelanguage',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='resourcedescription',\n- name='description_de',\n- ),\n- migrations.RemoveField(\n- model_name='resourcedescription',\n- name='description_fr',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='content_de',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='content_fr',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='name_fr',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='other_resources_de',\n- ),\n- migrations.RemoveField(\n- model_name='topic',\n- name='other_resources_fr',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='computational_thinking_links_de',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='computational_thinking_links_fr',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='content_de',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='content_fr',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='heading_tree_de',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='heading_tree_fr',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='name_de',\n- ),\n- migrations.RemoveField(\n- model_name='unitplan',\n- name='name_fr',\n- ),\n- migrations.AddField(\n- model_name='agegroup',\n- name='description_xx_lr',\n- field=models.CharField(default='', max_length=500, null=True),\n- ),\n- migrations.AddField(\n- model_name='agegroup',\n- name='description_xx_rl',\n- field=models.CharField(default='', max_length=500, null=True),\n- ),\n- migrations.AddField(\n- model_name='classroomresource',\n- name='description_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='classroomresource',\n- name='description_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumarea',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumarea',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumintegration',\n- name='content_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumintegration',\n- name='content_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumintegration',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='curriculumintegration',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='glossaryterm',\n- name='definition_xx_lr',\n- field=models.TextField(null=True),\n- ),\n- migrations.AddField(\n- model_name='glossaryterm',\n- name='definition_xx_rl',\n- field=models.TextField(null=True),\n- ),\n- migrations.AddField(\n- model_name='glossaryterm',\n- name='term_xx_lr',\n- field=models.CharField(max_length=200, null=True, unique=True),\n- ),\n- migrations.AddField(\n- model_name='glossaryterm',\n- name='term_xx_rl',\n- field=models.CharField(max_length=200, null=True, unique=True),\n- ),\n- migrations.AddField(\n- model_name='learningoutcome',\n- name='text_xx_lr',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='learningoutcome',\n- name='text_xx_rl',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='computational_thinking_links_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='computational_thinking_links_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='content_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='content_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='heading_tree_xx_lr',\n- field=django.contrib.postgres.fields.jsonb.JSONField(default=list, null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='heading_tree_xx_rl',\n- field=django.contrib.postgres.fields.jsonb.JSONField(default=list, null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='programming_challenges_description_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='lesson',\n- name='programming_challenges_description_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='content_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='content_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='extra_challenge_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='extra_challenge_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallenge',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengedifficulty',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengedifficulty',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='expected_result_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='expected_result_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='hints_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='hints_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='solution_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengeimplementation',\n- name='solution_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengelanguage',\n- name='name_xx_lr',\n- field=models.CharField(max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='programmingchallengelanguage',\n- name='name_xx_rl',\n- field=models.CharField(max_length=200, null=True),\n- ),\n- migrations.AddField(\n- model_name='resourcedescription',\n- name='description_xx_lr',\n- field=models.CharField(default='', max_length=300, null=True),\n- ),\n- migrations.AddField(\n- model_name='resourcedescription',\n- name='description_xx_rl',\n- field=models.CharField(default='', max_length=300, null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='content_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='content_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='other_resources_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='topic',\n- name='other_resources_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='computational_thinking_links_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='computational_thinking_links_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='content_xx_lr',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='content_xx_rl',\n- field=models.TextField(default='', null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='heading_tree_xx_lr',\n- field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='heading_tree_xx_rl',\n- field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='name_xx_lr',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AddField(\n- model_name='unitplan',\n- name='name_xx_rl',\n- field=models.CharField(default='', max_length=100, null=True),\n- ),\n- migrations.AlterField(\n- model_name='agegroup',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='classroomresource',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='curriculumarea',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='curriculumintegration',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='glossaryterm',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='learningoutcome',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='lesson',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='programmingchallenge',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='programmingchallengedifficulty',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='programmingchallengeimplementation',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='programmingchallengelanguage',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='resourcedescription',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='topic',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- migrations.AlterField(\n- model_name='unitplan',\n- name='languages',\n- field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=5), default=[], size=None),\n- ),\n- ]\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/topics/migrations/0088_auto_20171126_2001.py", "diff": "+# -*- coding: utf-8 -*-\n+# Generated by Django 1.11.5 on 2017-11-26 20:01\n+from __future__ import unicode_literals\n+\n+import django.contrib.postgres.fields.jsonb\n+from django.db import migrations, models\n+\n+\n+class Migration(migrations.Migration):\n+\n+ dependencies = [\n+ ('topics', '0087_auto_20171122_0324'),\n+ ]\n+\n+ operations = [\n+ migrations.AddField(\n+ model_name='agegroup',\n+ name='description_xx_lr',\n+ field=models.CharField(default='', max_length=500, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='agegroup',\n+ name='description_yy_rl',\n+ field=models.CharField(default='', max_length=500, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='classroomresource',\n+ name='description_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='classroomresource',\n+ name='description_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumarea',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumarea',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumintegration',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumintegration',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumintegration',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='curriculumintegration',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='glossaryterm',\n+ name='definition_xx_lr',\n+ field=models.TextField(null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='glossaryterm',\n+ name='definition_yy_rl',\n+ field=models.TextField(null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='glossaryterm',\n+ name='term_xx_lr',\n+ field=models.CharField(max_length=200, null=True, unique=True),\n+ ),\n+ migrations.AddField(\n+ model_name='glossaryterm',\n+ name='term_yy_rl',\n+ field=models.CharField(max_length=200, null=True, unique=True),\n+ ),\n+ migrations.AddField(\n+ model_name='learningoutcome',\n+ name='text_xx_lr',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='learningoutcome',\n+ name='text_yy_rl',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='computational_thinking_links_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='computational_thinking_links_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='heading_tree_xx_lr',\n+ field=django.contrib.postgres.fields.jsonb.JSONField(default=list, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='heading_tree_yy_rl',\n+ field=django.contrib.postgres.fields.jsonb.JSONField(default=list, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='programming_challenges_description_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='lesson',\n+ name='programming_challenges_description_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='extra_challenge_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='extra_challenge_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallenge',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengedifficulty',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengedifficulty',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='expected_result_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='expected_result_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='hints_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='hints_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='solution_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengeimplementation',\n+ name='solution_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengelanguage',\n+ name='name_xx_lr',\n+ field=models.CharField(max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='programmingchallengelanguage',\n+ name='name_yy_rl',\n+ field=models.CharField(max_length=200, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='resourcedescription',\n+ name='description_xx_lr',\n+ field=models.CharField(default='', max_length=300, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='resourcedescription',\n+ name='description_yy_rl',\n+ field=models.CharField(default='', max_length=300, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='other_resources_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='topic',\n+ name='other_resources_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='computational_thinking_links_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='computational_thinking_links_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='content_xx_lr',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='content_yy_rl',\n+ field=models.TextField(default='', null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='heading_tree_xx_lr',\n+ field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='heading_tree_yy_rl',\n+ field=django.contrib.postgres.fields.jsonb.JSONField(default=dict, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='name_xx_lr',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ migrations.AddField(\n+ model_name='unitplan',\n+ name='name_yy_rl',\n+ field=models.CharField(default='', max_length=100, null=True),\n+ ),\n+ ]\n" } ]
Python
MIT License
uccser/cs-unplugged
Reset branch migrations
701,855
27.11.2017 09:47:27
-46,800
739579bd068289c382d04c22ac9fd645518bf9b2
Remove all settings files from codecov
[ { "change_type": "MODIFY", "old_path": ".coveragerc", "new_path": ".coveragerc", "diff": "@@ -12,12 +12,9 @@ source =\nomit =\n# Omit migration files\n*/migrations/*\n- # Omit database proxy file used with Google Cloud SQL Proxy\n- */config/settings/database_proxy.py\n# Omit settings files for local and production environments\n# TODO: Add integration tests for local and production environments\n- */config/settings/production.py\n- */config/settings/local.py\n+ */config/settings/*\n# Omit pregenerated files\n*/config/wsgi.py\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove all settings files from codecov
701,855
27.11.2017 10:08:36
-46,800
fe60713e36f8eb6b9bc2e017eda1d8c10cf9cee3
Improve readability of config file
[ { "change_type": "MODIFY", "old_path": "csunplugged/config/settings/base.py", "new_path": "csunplugged/config/settings/base.py", "diff": "@@ -123,8 +123,6 @@ if env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\n(INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, \"In-context translations (Bidi)\"),\n]\n- LANGUAGES += tuple(EXTRA_LANGUAGES)\n-\nEXTRA_LANG_INFO = {\nINCONTEXT_L10N_PSEUDOLANGUAGE: {\n'bidi': False,\n@@ -141,7 +139,11 @@ if env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\n}\ndjango.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)\n+ # Add new languages to the list of all django languages\nglobal_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES\n+ # Add new languages to the list of languages used for this project\n+ LANGUAGES += tuple(EXTRA_LANGUAGES)\n+\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id\nSITE_ID = 1\n" } ]
Python
MIT License
uccser/cs-unplugged
Improve readability of config file
701,855
27.11.2017 11:55:10
-46,800
9d10e35c445deb31f077bc92bb6942fb53f0e7e4
Fix loading of configuration environment variables during deployment
[ { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-app.sh", "new_path": "infrastructure/dev-deploy/deploy-app.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Deploys the application to Google App Engine\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-1.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-1.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-2.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-2.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-resources-3.sh", "new_path": "infrastructure/dev-deploy/deploy-resources-3.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-static-files.sh", "new_path": "infrastructure/dev-deploy/deploy-static-files.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Deploy static files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/update-database.sh", "new_path": "infrastructure/dev-deploy/update-database.sh", "diff": "#!/bin/bash\n-source ./load-dev-deploy-config-envs.sh\n+source ./infrastructure/dev-deploy/load-dev-deploy-config-envs.sh\n# Updates the database for the development system\nmv ./infrastructure/cloud-sql-proxy/docker-compose.yml ./docker-compose.yml\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-app.sh", "new_path": "infrastructure/prod-deploy/deploy-app.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Deploys the application to Google App Engine\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-1.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-1.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-2.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-2.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-resources-3.sh", "new_path": "infrastructure/prod-deploy/deploy-resources-3.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Deploy generated resource files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-static-files.sh", "new_path": "infrastructure/prod-deploy/deploy-static-files.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Deploy static files to the development static file server.\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/update-database.sh", "new_path": "infrastructure/prod-deploy/update-database.sh", "diff": "#!/bin/bash\n-source ./load-prod-deploy-config-envs.sh\n+source ./infrastructure/prod-deploy/load-prod-deploy-config-envs.sh\n# Updates the database for the development system\nmv ./infrastructure/cloud-sql-proxy/docker-compose.yml ./docker-compose.yml\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/replace_envs.py", "new_path": "infrastructure/replace_envs.py", "diff": "@@ -6,7 +6,7 @@ import os\nimport re\nimport sys\n-REGEX = re.compile(\"\\$\\{([A-Z_]+)\\}\")\n+REGEX = re.compile(\"\\$\\{([a-zA-Z_][a-zA-Z0-9_]*)\\}\")\ndef get_filename():\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix loading of configuration environment variables during deployment
701,855
27.11.2017 12:16:28
-46,800
a3ef851af10dd52ea0842b14a0e16feaf1889328
Add compilemessages command to deployment
[ { "change_type": "MODIFY", "old_path": "Dockerfile", "new_path": "Dockerfile", "diff": "@@ -18,4 +18,8 @@ COPY requirements /requirements\nRUN /docker_venv/bin/pip3 install -r /requirements/production.txt\nADD ./csunplugged /csunplugged/\n+\n+# Compile locale message files\n+CMD /docker_venv/bin/python3 ./manage.py compilemessages\n+\nCMD /docker_venv/bin/gunicorn -c gunicorn.conf.py -b :8080 config.wsgi\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/docker-development-entrypoint.sh", "new_path": "csunplugged/docker-development-entrypoint.sh", "diff": "@@ -19,6 +19,9 @@ done\n>&2 echo \"Postgres is up - continuing...\"\n+echo \"Compiling message files\"\n+/docker_venv/bin/python3 ./manage.py compilemessages\n+\n# Start gunicorn service\necho \"Starting gunicorn\"\n/docker_venv/bin/gunicorn -c ./gunicorn.conf.py -b :$PORT config.wsgi --reload\n" } ]
Python
MIT License
uccser/cs-unplugged
Add compilemessages command to deployment
701,855
27.11.2017 12:17:26
-46,800
1e8ed390ac2ab34a480e2792afe28084adae4597
Remove erraneous source line in deployment script
[ { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-app.sh", "new_path": "infrastructure/prod-deploy/deploy-app.sh", "diff": "@@ -22,7 +22,6 @@ ssh-keygen -q -N \"\" -f ~/.ssh/google_compute_engine\n# Load environment variables.\nsource ./load-prod-deploy-envs.sh\n-source ./load-prod-deploy-config-envs.sh\n# Create app-prod.yaml file using environment variables.\npython ./infrastructure/replace_envs.py ./infrastructure/prod-deploy/app-prod.yaml\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove erraneous source line in deployment script
701,855
27.11.2017 12:37:54
-46,800
d974d3f6417b3c67787c3dd0bb587aa51276b3d7
Modify BaseLoader to use local code for translation directories
[ { "change_type": "DELETE", "old_path": "csunplugged/topics/content/yy-rl", "new_path": null, "diff": "-xx-lr\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/topics/content/yy_RL", "diff": "+xx_LR\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/utils/BaseLoader.py", "new_path": "csunplugged/utils/BaseLoader.py", "diff": "@@ -10,6 +10,7 @@ from os import listdir\nfrom verto import Verto\nfrom verto.errors.StyleError import StyleError\nfrom django.conf import settings\n+from django.utils.translation import to_locale\nfrom .check_required_files import check_converter_required_files\nfrom .check_glossary_links import check_converter_glossary_links\nfrom utils.errors.CouldNotFindMarkdownFileError import CouldNotFindMarkdownFileError\n@@ -65,7 +66,7 @@ class BaseLoader():\n\"\"\"\nreturn os.path.join(\nself.base_path,\n- language,\n+ to_locale(language),\nself.content_path\n)\n" } ]
Python
MIT License
uccser/cs-unplugged
Modify BaseLoader to use local code for translation directories
701,855
27.11.2017 14:57:29
-46,800
e634a44d1d10fe6089b842249dd9664214678371
Use string values for difficulties in yaml (Fixes
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml", "new_path": "csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml", "diff": "-0:\n+\"0\":\nname: Try it out\n-1:\n+\"1\":\nname: Beginner\n-2:\n+\"2\":\nname: Growing experience\n-3:\n+\"3\":\nname: Ready to expand\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/structure/programming-challenges-structure.yaml", "new_path": "csunplugged/topics/content/structure/programming-challenges-structure.yaml", "diff": "@@ -9,7 +9,7 @@ languages:\nicon: img/python-logo.png\ndifficulties:\n- - 0\n- - 1\n- - 2\n- - 3\n+ - \"0\"\n+ - \"1\"\n+ - \"2\"\n+ - \"3\"\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py", "new_path": "csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py", "diff": "@@ -89,7 +89,7 @@ class ProgrammingChallengesStructureLoader(TranslatableModelLoader):\nfor difficulty in difficulty_levels:\nnew_difficulty = ProgrammingChallengeDifficulty(\n- level=difficulty,\n+ level=int(difficulty),\n)\ntranslations = difficulties_translations.get(difficulty, dict())\n" } ]
Python
MIT License
uccser/cs-unplugged
Use string values for difficulties in yaml (Fixes #716)
701,855
27.11.2017 16:16:51
-46,800
4a090947dedb1c003c6f36402ef74ab44f7c2c5a
Use non-integer keys for prog challenge difficulties (fixes
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml", "new_path": "csunplugged/topics/content/en/programming-challenges-structure-difficulties.yaml", "diff": "-\"0\":\n+difficulty-0:\nname: Try it out\n-\"1\":\n+difficulty-1:\nname: Beginner\n-\"2\":\n+difficulty-2:\nname: Growing experience\n-\"3\":\n+difficulty-3:\nname: Ready to expand\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/structure/programming-challenges-structure.yaml", "new_path": "csunplugged/topics/content/structure/programming-challenges-structure.yaml", "diff": "@@ -9,7 +9,7 @@ languages:\nicon: img/python-logo.png\ndifficulties:\n- - \"0\"\n- - \"1\"\n- - \"2\"\n- - \"3\"\n+ - difficulty-0\n+ - difficulty-1\n+ - difficulty-2\n+ - difficulty-3\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py", "new_path": "csunplugged/topics/management/commands/_ProgrammingChallengesStructureLoader.py", "diff": "@@ -86,13 +86,13 @@ class ProgrammingChallengesStructureLoader(TranslatableModelLoader):\nrequired_fields=[\"name\"],\n)\n- for difficulty in difficulty_levels:\n+ for level, difficulty_slug in enumerate(difficulty_levels):\nnew_difficulty = ProgrammingChallengeDifficulty(\n- level=int(difficulty),\n+ level=level,\n)\n- translations = difficulties_translations.get(difficulty, dict())\n+ translations = difficulties_translations.get(difficulty_slug, dict())\nself.populate_translations(new_difficulty, translations)\nself.mark_translation_availability(new_difficulty, required_fields=[\"name\"])\nnew_difficulty.save()\n" } ]
Python
MIT License
uccser/cs-unplugged
Use non-integer keys for prog challenge difficulties (fixes #716)
701,855
27.11.2017 16:18:04
-46,800
55ba9af897e18cb511ba6310b504f31d2293e9f5
Fix pull-incontext script to pull all content paths
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "diff": "@@ -40,7 +40,11 @@ crowdin -c \"${CROWDIN_CONFIG_FILE}\" -l \"${CROWDIN_PSEUDO_LANGUAGE}\" download\npython3 -m crowdin_bot.download_xliff\npython3 -m crowdin_bot.modify_pseudo_translations\n-git add \"csunplugged/topics/content/${CSU_PSEUDO_LANGUAGE}\"\n+\n+for content_path in \"${CONTENT_PATHS[@]}\"; do\n+ git add \"${content_path}/${CSU_PSEUDO_LANGUAGE}\"\n+done\n+\n# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\nif [[ $(git diff --cached) ]]; then\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix pull-incontext script to pull all content paths
701,855
27.11.2017 16:50:37
-46,800
61cbd6e2b172921e8356b42af4fd2ca3267e516f
Update tests for prog challenge structure loader
[ { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/de/translation-difficulties.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/de/translation-difficulties.yaml", "diff": "-1:\n+difficulty-1:\nname: German difficulty 1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/basic-config-difficulties.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/basic-config-difficulties.yaml", "diff": "-1:\n+difficulty-1:\nname: Level 1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/empty-difficulties-name-difficulties.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/empty-difficulties-name-difficulties.yaml", "diff": "-1:\n+difficulty-1:\nname:\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/translation-difficulties.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/en/translation-difficulties.yaml", "diff": "-1:\n+difficulty-1:\nname: English difficulty 1\n-2:\n+difficulty-2:\nname: English difficulty 2\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/basic-config.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/basic-config.yaml", "diff": "@@ -3,4 +3,4 @@ languages:\nnumber: 1\ndifficulties:\n- - 1\n+ - difficulty-1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-difficulties-name.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-difficulties-name.yaml", "diff": "@@ -3,4 +3,4 @@ languages:\nnumber: 1\ndifficulties:\n- - 1\n+ - difficulty-1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-languages-data.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-languages-data.yaml", "diff": "@@ -2,4 +2,4 @@ languages:\nlanguage-1:\ndifficulties:\n- - 1\n+ - difficulty-1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-languages-number.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/empty-languages-number.yaml", "diff": "@@ -3,4 +3,4 @@ languages:\nnumber:\ndifficulties:\n- - 1\n+ - difficulty-1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/missing-languages.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/missing-languages.yaml", "diff": "difficulties:\n- 1:\n+ - difficulty-1\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/translation.yaml", "new_path": "csunplugged/tests/topics/loaders/assets/programming_challenges_structure/structure/translation.yaml", "diff": "@@ -5,5 +5,5 @@ languages:\nnumber: 2\ndifficulties:\n- - 1\n- - 2\n+ - difficulty-1\n+ - difficulty-2\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/tests/topics/loaders/test_programming_challenges_structure_loader.py", "new_path": "csunplugged/tests/topics/loaders/test_programming_challenges_structure_loader.py", "diff": "@@ -108,7 +108,7 @@ class ProgrammingChallengesStructureLoaderTest(BaseTestWithDB):\nwith translation.override(\"de\"):\nself.assertEqual(\"German language 1\", translated_lang.name)\n- translated_difficulty = ProgrammingChallengeDifficulty.objects.get(level=1)\n+ translated_difficulty = ProgrammingChallengeDifficulty.objects.get(level=0)\nself.assertSetEqual(set([\"en\", \"de\"]), set(translated_difficulty.languages))\nself.assertEqual(\"English difficulty 1\", translated_difficulty.name)\nwith translation.override(\"de\"):\n@@ -127,7 +127,7 @@ class ProgrammingChallengesStructureLoaderTest(BaseTestWithDB):\nwith translation.override(\"de\"):\nself.assertEqual(\"English language 2\", untranslated_lang.name)\n- untranslated_difficulty = ProgrammingChallengeDifficulty.objects.get(level=2)\n+ untranslated_difficulty = ProgrammingChallengeDifficulty.objects.get(level=1)\nself.assertSetEqual(set([\"en\"]), set(untranslated_difficulty.languages))\nself.assertEqual(\"English difficulty 2\", untranslated_difficulty.name)\n# Check name does not fall back to english for missing translation\n" } ]
Python
MIT License
uccser/cs-unplugged
Update tests for prog challenge structure loader
701,855
27.11.2017 21:26:20
-46,800
4644506ac9bde16d7cdb6f5ee8a685d2abfc79d2
Fix compilemessages step in Dockerfile (CMD can't be repeated)
[ { "change_type": "MODIFY", "old_path": "Dockerfile", "new_path": "Dockerfile", "diff": "@@ -19,7 +19,4 @@ RUN /docker_venv/bin/pip3 install -r /requirements/production.txt\nADD ./csunplugged /csunplugged/\n-# Compile locale message files\n-CMD /docker_venv/bin/python3 ./manage.py compilemessages\n-\n-CMD /docker_venv/bin/gunicorn -c gunicorn.conf.py -b :8080 config.wsgi\n+CMD /csunplugged/docker-production-entrypoint.sh\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/docker-production-entrypoint.sh", "diff": "+export DJANGO_SETTINGS_MODULE=\"config.settings.production\"\n+\n+echo \"Compiling message files\"\n+/docker_venv/bin/python3 ./manage.py compilemessages\n+\n+# Start gunicorn service\n+echo \"Starting gunicorn\"\n+/docker_venv/bin/gunicorn -c ./gunicorn.conf.py -b :$PORT config.wsgi --reload\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix compilemessages step in Dockerfile (CMD can't be repeated)
701,855
27.11.2017 22:54:53
-46,800
d306fedc5805924c02dc73d1f667ed9ef2809ec6
Materialize locale symbolic link to allow embedding in dockerfile
[ { "change_type": "MODIFY", "old_path": "infrastructure/dev-deploy/deploy-app.sh", "new_path": "infrastructure/dev-deploy/deploy-app.sh", "diff": "@@ -37,6 +37,10 @@ source ./load-dev-deploy-envs.sh\n# Create app-dev.yaml file using environment variables.\npython ./infrastructure/replace_envs.py ./infrastructure/dev-deploy/app-dev.yaml\n+# Symlinks aren't added into a docker image, so replace symlink with actual directory\n+rm -rf csunplugged/locale/yy_RL\n+cp -r csunplugged/locale/xx_LR csunplugged/locale/yy_RL\n+\n# Publish Django system to Google App Engine.\n#\n# This deploys using the 'app-develop.yaml' decrypted earlier that contains\n" } ]
Python
MIT License
uccser/cs-unplugged
Materialize locale symbolic link to allow embedding in dockerfile
701,855
28.11.2017 09:00:06
-46,800
eb061e80c1fad8c328d7bec5c15c565a5787aada
Add same symbolic link chanages to prod deployment
[ { "change_type": "MODIFY", "old_path": "infrastructure/prod-deploy/deploy-app.sh", "new_path": "infrastructure/prod-deploy/deploy-app.sh", "diff": "@@ -26,6 +26,10 @@ source ./load-prod-deploy-envs.sh\n# Create app-prod.yaml file using environment variables.\npython ./infrastructure/replace_envs.py ./infrastructure/prod-deploy/app-prod.yaml\n+# Symlinks aren't added into a docker image, so replace symlink with actual directory\n+rm -rf csunplugged/locale/yy_RL\n+cp -r csunplugged/locale/xx_LR csunplugged/locale/yy_RL\n+\n# Publish Django system to Google App Engine.\n#\n# This deploys using the 'app-develop.yaml' decrypted earlier that contains\n" } ]
Python
MIT License
uccser/cs-unplugged
Add same symbolic link chanages to prod deployment
701,855
28.11.2017 14:03:09
-46,800
6a75cd8433c5455629ac28861025fdb4a244d3f0
Modify pull-translations to commit all .po files onto single, separate branch
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_complete_translations.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_complete_translations.py", "diff": "@@ -43,9 +43,9 @@ def process_item(item, parent_path=None, csu_language_code=None):\nelse:\npath = filename\n- # Skip full translated check for *.po - they can always be included\n+ # Skip *.po - they are handled separately\nif filename.endswith(\".po\"):\n- return [path]\n+ return []\nif item.find(\"phrases\").text == item.find(\"approved\").text:\nreturn [path]\n@@ -79,4 +79,5 @@ if __name__ == \"__main__\":\ncompleted = []\nfor item in files:\ncompleted += process_item(item, csu_language_code=args.csu_code)\n- print('\\n'.join(completed))\n+ for path in completed:\n+ print(path)\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "diff": "@@ -98,3 +98,42 @@ for language in ${languages[@]}; do\ngit clean -fdx\ndone\n+\n+# Next handle *.PO files together on their own branch\n+\n+# The branch for new .po file translations\n+PO_TRANSLATION_PR_BRANCH=\"${TRANSLATION_PR_BRANCH_BASE}-message-files\"\n+\n+# Checkout the translation branch, creating if off $TRANSLATION_TARGET_BRANCH if it didn't already exist\n+git checkout $PO_TRANSLATION_PR_BRANCH || git checkout -b $PO_TRANSLATION_PR_BRANCH $TRANSLATION_TARGET_BRANCH\n+\n+# Merge if required\n+git merge $TRANSLATION_TARGET_BRANCH --quiet --no-edit\n+\n+# Boolean flag indicating whether changes are made that should be pushed\n+changes=0\n+\n+for language in ${languages[@]}; do\n+ crowdin -c \"${CROWDIN_CONFIG_FILE}\" -l \"${language}\" download\n+\n+ git add csunplugged/locale >/dev/null 2>&1 || true\n+ if [[ $(git diff --cached) ]]; then\n+ git commit -m \"Update ${language} message file (django.po)\"\n+ changes=1\n+ fi\n+\n+ # Return repo to clean state for next language\n+ git reset --hard\n+ git clean -fdx\n+done\n+\n+# If any changes were made, push to github\n+if [[ $changes -eq 1 ]]; then\n+ git push -q origin $PO_TRANSLATION_PR_BRANCH > /dev/null\n+fi\n+\n+# If branch differs from target branch, open pull request\n+if [[ $(git diff $PO_TRANSLATION_PR_BRANCH origin/$TRANSLATION_TARGET_BRANCH) ]]; then\n+ hub pull-request -m \"Update translation message files (django.po)\" -b \"${TRANSLATION_TARGET_BRANCH}\" -h \"${PO_TRANSLATION_PR_BRANCH}\" || \\\n+ echo \"Could not create pull request - perhaps one already exists?\"\n+fi\n" } ]
Python
MIT License
uccser/cs-unplugged
Modify pull-translations to commit all .po files onto single, separate branch
701,855
28.11.2017 14:04:13
-46,800
66963aca673c9f66e114a27d2601b92cc965b2ac
Add functionality to automatically update source .po file (fixes
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-config.sh", "diff": "@@ -14,6 +14,9 @@ TRANSLATION_TARGET_BRANCH=\"develop\"\n# Branch that new metadata for in context localisation will be merged into\nIN_CONTEXT_L10N_TARGET_BRANCH=\"develop\"\n+# Branch that updated english message files will be merged into\n+UPDATE_MESSAGES_TARGET_BRANCH=\"develop\"\n+\n# Name of crowdin config file\nCROWDIN_CONFIG_FILE=\"crowdin_content.yaml\"\n" }, { "change_type": "ADD", "old_path": null, "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-update-messages.sh", "diff": "+set -e\n+set -x\n+set -o pipefail\n+\n+source crowdin-bot-config.sh\n+source crowdin-bot-utils.sh\n+\n+CLONED_REPO_DIR=\"update-messages-cloned-repo\"\n+UPDATE_MESSAGES_PR_BRANCH=\"${UPDATE_MESSAGES_TARGET_BRANCH}-update-messages\"\n+\n+# Clone repo, deleting old clone if exists\n+if [ -d \"${CLONED_REPO_DIR}\" ]; then\n+ reset_repo \"${CLONED_REPO_DIR}\" \"${UPDATE_MESSAGES_TARGET_BRANCH}\"\n+else\n+ git clone \"${REPO}\" \"${CLONED_REPO_DIR}\" --branch ${UPDATE_MESSAGES_TARGET_BRANCH}\n+fi\n+\n+# Change into the working repo\n+cd \"${CLONED_REPO_DIR}\"\n+\n+# Set up git bot parameters\n+git config user.name \"${GITHUB_BOT_NAME}\"\n+git config user.email \"${GITHUB_BOT_EMAIL}\"\n+\n+git checkout $UPDATE_MESSAGES_PR_BRANCH || git checkout -b $UPDATE_MESSAGES_PR_BRANCH $UPDATE_MESSAGES_TARGET_BRANCH\n+\n+# Merge if required\n+git merge origin/$UPDATE_MESSAGES_TARGET_BRANCH --quiet --no-edit\n+\n+cd csunplugged\n+\n+python3 manage.py makemessages -l en\n+\n+git add -A\n+\n+# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\n+if [[ $(git diff --cached) ]]; then\n+ git commit -m \"Update en message file (django.po)\"\n+ git push -q origin $UPDATE_MESSAGES_PR_BRANCH > /dev/null\n+fi\n+\n+# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\n+if [[ $(git diff $UPDATE_MESSAGES_PR_BRANCH origin/$UPDATE_MESSAGES_TARGET_BRANCH) ]]; then\n+ hub pull-request -m \"Update source message file (django.po)\" -b \"${UPDATE_MESSAGES_TARGET_BRANCH}\" -h \"${UPDATE_MESSAGES_PR_BRANCH}\" || \\\n+ echo \"Could not create pull request - perhaps one already exists?\"\n+fi\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/setup-instance.sh", "new_path": "infrastructure/crowdin/setup-instance.sh", "diff": "@@ -8,11 +8,14 @@ PYTHON_PACKAGE_DIR=\"crowdin_bot_python_package\"\n# Install packages\nsudo apt-get install git --yes\n+sudo apt-get install gettext --yes\nsudo apt-get install default-jre --yes # Java, for crowdin cli\nsudo apt-get install python3-pip --yes\nsudo apt-get install python3-lxml --yes # Install here instead of pip3 because compilation uses too much RAM\nsudo pip3 install -U pip setuptools\nsudo pip3 install verto pyyaml\n+sudo pip3 install django\n+sudo pip3 install django-environ\n# Install crowdin cli\nwget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -\n@@ -72,7 +75,8 @@ sudo pip3 install \"${PYTHON_PACKAGE_DIR}\"/\n# Setup crontab\ncrontab << EOF\nSHELL=/bin/bash\n-4 12 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-push-source.sh > crowdin-bot-push-source.log 2> crowdin-bot-push-source.err\n-4 13 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-pull-translations.sh > crowdin-bot-pull-translations.log 2> crowdin-bot-pull-translations.err\n-4 14 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-pull-incontext.sh > crowdin-bot-pull-incontext.log 2> crowdin-bot-pull-incontext.err\n+4 12 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-update-messages.sh > crowdin-bot-update-messages.log 2> crowdin-bot-update-messages.err\n+4 13 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-push-source.sh > crowdin-bot-push-source.log 2> crowdin-bot-push-source.err\n+4 14 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-pull-translations.sh > crowdin-bot-pull-translations.log 2> crowdin-bot-pull-translations.err\n+4 15 * * * PATH=\\$PATH:/usr/local/bin; source crowdin-bot-env-secrets.sh; crowdin-bot-pull-incontext.sh > crowdin-bot-pull-incontext.log 2> crowdin-bot-pull-incontext.err\nEOF\n" } ]
Python
MIT License
uccser/cs-unplugged
Add functionality to automatically update source .po file (fixes #621)
701,855
28.11.2017 16:51:49
-46,800
faa0e5fd214151e8b0bb8fb18772807aa020c4bf
Modify crowdin_bot to only include languages that have >0 translations
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_languages.py", "new_path": "infrastructure/crowdin/crowdin_bot_python_package/crowdin_bot/get_crowdin_languages.py", "diff": "@@ -12,14 +12,14 @@ def get_project_languages():\nReturns:\n(list) list of project crowdin language codes\n\"\"\"\n- info_xml = api.api_call_xml(\"info\")\n- languages = info_xml.find('languages')\n- translatable_languages = []\n- for language in languages:\n- # Check it's not the incontext pseudo language\n- if language.find(\"can_translate\").text == \"1\":\n- translatable_languages.append(language.find('code').text)\n- return translatable_languages\n+ active_languages = []\n+ trans_status = api.api_call_json(\"status\")\n+ for language in trans_status:\n+ # Check language has actually had some translation done\n+ if int(language[\"words_approved\"]) > 0:\n+ active_languages.append(language[\"code\"])\n+ return active_languages\nif __name__ == \"__main__\":\n- print('\\n'.join(get_project_languages()))\n+ for language in get_project_languages():\n+ print(language)\n" } ]
Python
MIT License
uccser/cs-unplugged
Modify crowdin_bot to only include languages that have >0 translations
701,855
28.11.2017 19:12:50
-46,800
55ed459442851de843fd8a4a88a07f0f2ed619b4
(WIP) Various improvements for support for RTL languages
[ { "change_type": "MODIFY", "old_path": "csunplugged/config/settings/base.py", "new_path": "csunplugged/config/settings/base.py", "diff": "@@ -43,6 +43,7 @@ DJANGO_APPS = [\nTHIRD_PARTY_APPS = [\n\"django_bootstrap_breadcrumbs\",\n\"modeltranslation\",\n+ \"bidiutils\",\n]\n# Apps specific for this project go here.\n@@ -142,8 +143,10 @@ if env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\ndjango.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)\n# Add new languages to the list of all django languages\nglobal_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES\n+ global_settings.LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI + [INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI.split('-')[0]]\n# Add new languages to the list of languages used for this project\nLANGUAGES += tuple(EXTRA_LANGUAGES)\n+ LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id\n@@ -193,6 +196,7 @@ TEMPLATES = [\n\"django.contrib.messages.context_processors.messages\",\n\"config.context_processors.version_number.version_number\",\n\"config.context_processors.deployed.deployed\",\n+ \"bidiutils.context_processors.bidi\",\n],\n\"libraries\": {\n\"render_html_field\": \"config.templatetags.render_html_field\",\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/config/templatetags/render_html_field.py", "new_path": "csunplugged/config/templatetags/render_html_field.py", "diff": "\"\"\"Module for the custom render_html_field template tag.\"\"\"\nfrom django import template\n-from django.template import Template, Variable, Context, TemplateSyntaxError\n+from django.template import Template, Variable, Context, RequestContext, TemplateSyntaxError\n+from bidiutils.context_processors import bidi\nINVALID_ATTRIBUTE_MESSAGE = \"The 'render_html_field' tag was given an \" \\\n\"attribute that could not be converted to a string.\"\n@@ -23,6 +24,8 @@ class RenderHTMLFieldNode(template.Node):\nReturns:\nRendered string of text, or raise an exception.\n\"\"\"\n+ # bidi_context = bidi(None)\n+ # context.update(bidi_context)\ntry:\nhtml = self.item_to_be_rendered.resolve(context)\nreturn render_html_with_static(html, context)\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/static/scss/directional.scss", "diff": "+// directional-scss | Author: Tyson Matanich (http://matanich.com), 2013 | License: MIT\n+$dir: ltr !default;\n+\n+// Default $dir if not valid\n+@if $dir != ltr and $dir != rtl {\n+ $dir: ltr;\n+}\n+\n+@function if-ltr($if, $else: null) {\n+ @if $dir != rtl {\n+ @return $if;\n+ }\n+ @else {\n+ @return $else;\n+ }\n+}\n+\n+@function if-rtl($if, $else: null) {\n+ @return if-ltr($else, $if);\n+}\n+\n+$left: if-ltr(left, right);\n+$right: if-ltr(right, left);\n+\n+@function side-values($values) {\n+ @if $dir == rtl and length($values) >= 4 {\n+ // Reorder right and left positions in list\n+ @return nth($values, 1) nth($values, 4) nth($values, 3) nth($values, 2);\n+ }\n+ @else {\n+ @return $values;\n+ }\n+}\n+\n+@function corner-values($values) {\n+ @if $dir == rtl and length($values) > 1 {\n+ // Reorder right and left positions in list\n+ @if length($values) == 2 {\n+ @return nth($values, 2) nth($values, 1);\n+ }\n+ @else if length($values) == 3 {\n+ @return nth($values, 2) nth($values, 1) nth($values, 2) nth($values, 3);\n+ }\n+ @else {\n+ @return nth($values, 2) nth($values, 1) nth($values, 4) nth($values, 3);\n+ }\n+ }\n+ @else {\n+ @return $values;\n+ }\n+}\n+\n+@mixin if-ltr {\n+ @if $dir != rtl {\n+ @content;\n+ }\n+}\n+\n+@mixin if-rtl {\n+ @if $dir == rtl {\n+ @content;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@import \"sticky-state\";\n@import url('https://fonts.googleapis.com/css?family=Patrick+Hand');\n+$dir: rtl;\n+@import \"directional\";\n+\n$body-space-from-top: 72px;\n$ct-abstraction: #E30613;\n$ct-algorithm: #0B983A;\n@@ -173,15 +176,15 @@ $rounded-corner-radius: 0.5rem;\nbackground-color: rgba($black, 0.2);\n}\n.badge-language-unavailable {\n- margin-right: auto;\n+ margin-#{$right}: auto;\nmargin-bottom: auto;\nmargin-top: 0;\n- margin-left: 0;\n+ margin-#{$left}: 0;\n}\n}\n.badge-language-unavailable {\n- margin-right: auto;\n+ margin-#{$right}: auto;\nmargin-bottom: auto;\nmargin: 0.5em;\n}\n@@ -273,7 +276,7 @@ $rounded-corner-radius: 0.5rem;\n}\n.boxed-text-indented {\n- margin-left: 1em;\n+ margin-#{$left}: 1em;\n}\n@mixin detail-colour-variant($color) {\n@@ -281,7 +284,10 @@ $rounded-corner-radius: 0.5rem;\nbackground-color: hsl(hue($color), saturation($color), 90%);\ncolor: $color !important;\n.inline-image {\n- margin: 0.2rem 0.2rem 0.2rem auto;\n+ margin-top: 0.2rem;\n+ margin-bottom: 0.2rem;\n+ margin-#{$left}: auto;\n+ margin-#{$right}: 0.2rem;\n}\n&:hover {\nbackground-color: hsl(hue($color), saturation($color), 85%);\n@@ -484,9 +490,24 @@ ol, ul {\n}\n}\n.badge-language-unavailable {\n- margin-right: auto;\n+ margin-#{$right}: auto;\nmargin-bottom: auto;\nmargin-top: 0;\n- margin-left: 0;\n+ margin-#{$left}: 0;\n+ }\n+}\n+\n+.crowdin_jipt_untranslated {\n+ unicode-bidi: bidi-override;\n+ direction: ltr;\n}\n+\n+.list-unstyled {\n+ padding-#{$left}: 0;\n+ padding-#{$right}: auto;\n+}\n+\n+.navbar-nav-margins {\n+ margin-#{$right}: auto !important;\n+ margin-#{$left}: 0 !important;\n}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<!DOCTYPE html>\n-<html lang=\"{{ LANGUAGE_CODE }}\" {% if current_language.bidi %}dir=\"rtl\"{% endif %}>\n+<html lang=\"{{ LANGUAGE_CODE }}\" dir=\"{{LANGUAGE_DIRECTION}}\">\n<head>\n<!-- Required meta tags -->\n<meta charset=\"utf-8\">\n<meta name=\"msapplication-config\" content=\"{% static 'img/browserconfig.xml' %}\">\n<meta name=\"theme-color\" content=\"#ffffff\">\n</head>\n- <body>\n+ <body style=\"text-align: {{LANGUAGE_START}};\">\n<nav class=\"navbar fixed-top navbar-expand-md navbar-dark py-1\">\n<div class=\"container px-0\">\n- <button class=\"navbar-toggler navbar-toggler-right\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNav\" aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n+ <button class=\"navbar-toggler navbar-toggler-{{LANGUAGE_START}}\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNav\" aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n<span class=\"navbar-toggler-icon\"></span>\n</button>\n<a class=\"navbar-brand\" href=\"{% url 'general:home' %}\">\n<a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge\">{{ VERSION_NUMBER_ENGLISH }}</a>\n</a>\n<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n- <div class=\"navbar-nav mr-auto\">\n+ <div class=\"navbar-nav mr-auto navbar-nav-margins\">\n<a class=\"nav-item nav-link\" href=\"{% url 'topics:index' %}\">{% trans \"Topics\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Resources\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'general:about' %}\">{% trans \"About\" %}</a>\n<div class=\"navbar-nav\">\n<div class=\"nav-item dropdown\">\n<a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarLanguageSelector\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">{{ current_language.name_local|capfirst }}</a>\n- <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"navbarLanguageSelector\">\n+ <div class=\"dropdown-menu dropdown-menu-{{LANGUAGE_START}}\" aria-labelledby=\"navbarLanguageSelector\">\n{% for language in LANGUAGES %}\n{% get_language_info for language.0 as lang %}\n<a class=\"dropdown-item\" href=\"{% translate_url language.0 %}\">{{ lang.name_local|capfirst }}</a>\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/computational-thinking.html", "new_path": "csunplugged/templates/general/computational-thinking.html", "diff": "<details class=\"panel-ct-algorithm\" open=\"open\">\n<summary>\n<strong>{% trans \"Algorithmic thinking\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-algorithm.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-algorithm.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n<details class=\"panel-ct-abstraction\" open=\"open\">\n<summary>\n<strong>{% trans \"Abstraction\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-abstraction.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-abstraction.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n<details class=\"panel-ct-decomposition\" open=\"open\">\n<summary>\n<strong>{% trans \"Decomposition\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-decomposition.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-decomposition.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n<details class=\"panel-ct-pattern\" open=\"open\">\n<summary>\n<strong>{% trans \"Generalising and patterns\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-pattern.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-pattern.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n<details class=\"panel-ct-evaluation\" open=\"open\">\n<summary>\n<strong>{% trans \"Evaluation\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-evaluation.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-evaluation.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n<details class=\"panel-ct-logic\" open=\"open\">\n<summary>\n<strong>{% trans \"Logic\" %}</strong>\n- <img class=\"inline-image float-right\" src=\"{% static 'img/general/ct-logic.png' %}\">\n+ <img class=\"inline-image float-{{LANGUAGE_END}}\" src=\"{% static 'img/general/ct-logic.png' %}\">\n</summary>\n<div class=\"boxed-text-content\">\n<p>\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/topics/computational-thinking-links.html", "new_path": "csunplugged/templates/topics/computational-thinking-links.html", "diff": "For more background information on what our definition of Computational Thinking <a href=\"{{ ct_url }}\">see our notes about computational thinking</a>.\n{% endblocktrans %}\n</p>\n-\n{% render_html_field computational_thinking_links %}\n{% endif %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/topics/index.html", "new_path": "csunplugged/templates/topics/index.html", "diff": "{% include \"topics/not-available-badge.html\" %}\n{% endif %}\n</div>\n- <div class=\"col-12 col-md-8 text-center text-md-left\">\n+ <div class=\"col-12 col-md-8 text-center text-md-{{LANGUAGE_START}}\">\n<h2>{{ topic.name }}</h2>\n<ul class=\"list-unstyled text-muted mb-0\">\n{% if topic.lessons.exists %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/utils/custom_converter_templates/image.html", "new_path": "csunplugged/utils/custom_converter_templates/image.html", "diff": "-<figure class=\"figure{% if alignment == 'left' %} float-md-left{% elif alignment =='right' %} float-md-right{% else %} d-block text-center{% endif %}\">\n+<figure class=\"figure{% if alignment == 'left' %} float-md-{{ '{{' }}LANGUAGE_START{{ '}}' }}{% elif alignment =='right' %} float-md-{{ '{{' }}LANGUAGE_END{{ '}}' }}{% else %} d-block text-center{% endif %}\">\n<img src=\"{{ file_path }}\"\nclass=\"content-image figure-img img-fluid\"\n{% if alt %} alt=\"{{ alt }}\"{% endif %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/utils/custom_converter_templates/panel.html", "new_path": "csunplugged/utils/custom_converter_templates/panel.html", "diff": "(type == 'ct-pattern') or\n(type == 'ct-logic') or\n(type == 'ct-evaluation') %}\n-<img class=\"inline-image float-right\" src=\"{{ \"{% static '\" }}img/general/{{ type }}.png{{ \"' %}\" }}\">\n+<img class=\"inline-image float-{{ '{{' }}LANGUAGE_END{{ '}}' }}\" src=\"{{ \"{% static '\" }}img/general/{{ type }}.png{{ \"' %}\" }}\">\n{% endif %}\n</summary>\n<div class=\"boxed-text-content\">\n" }, { "change_type": "MODIFY", "old_path": "requirements/base.txt", "new_path": "requirements/base.txt", "diff": "@@ -29,3 +29,4 @@ lxml==4.1.1\nuniseg==0.7.1\npython-bidi==0.4.0\narabic-reshaper==2.0.11\n+django-bidi-utils==1.0\n" } ]
Python
MIT License
uccser/cs-unplugged
(WIP) Various improvements for support for RTL languages
701,855
29.11.2017 09:26:59
-46,800
5b0eff407b7204a24442d69e6e199e38b4637162
Add new scss sheet for rtl, general tidy up
[ { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/static/scss/website-rtl.scss", "diff": "+$dir: rtl;\n+@import \"website\"\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@import \"pygments-colorful\";\n@import \"sticky-state\";\n@import url('https://fonts.googleapis.com/css?family=Patrick+Hand');\n-\n-$dir: rtl;\n@import \"directional\";\n$body-space-from-top: 72px;\n@@ -497,17 +495,12 @@ ol, ul {\n}\n}\n-.crowdin_jipt_untranslated {\n- unicode-bidi: bidi-override;\n- direction: ltr;\n-}\n-\n-.list-unstyled {\n+.list-unstyled-i18n {\npadding-#{$left}: 0;\npadding-#{$right}: auto;\n}\n-.navbar-nav-margins {\n+.navbar-nav-i18n {\nmargin-#{$right}: auto !important;\nmargin-#{$left}: 0 !important;\n}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<meta name=\"description\" content=\"\">\n<meta name=\"author\" content=\"\">\n<link href=\"//fonts.googleapis.com/css?family=Raleway:400,300,600\" rel=\"stylesheet\" type=\"text/css\">\n+ {% if LANGUAGE_BIDI %}\n+ <link rel=\"stylesheet\" href=\"{% static 'css/website-rtl.css' %}\">\n+ {% else %}\n<link rel=\"stylesheet\" href=\"{% static 'css/website.css' %}\">\n+ {% endif %}\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"{% static 'img/apple-touch-icon.png' %}\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"{% static 'img/favicon-32x32.png' %}\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"{% static 'img/favicon-16x16.png' %}\">\n<a href=\"http://cs-unplugged.readthedocs.io/en/latest/changelog.html\" class=\"badge\">{{ VERSION_NUMBER_ENGLISH }}</a>\n</a>\n<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n- <div class=\"navbar-nav mr-auto navbar-nav-margins\">\n+ <div class=\"navbar-nav navbar-nav-i18n mr-auto\">\n<a class=\"nav-item nav-link\" href=\"{% url 'topics:index' %}\">{% trans \"Topics\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Resources\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'general:about' %}\">{% trans \"About\" %}</a>\n<div class=\"col-6 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Useful Links\" %}</p>\n- <ul class=\"list-unstyled\">\n+ <ul class=\"list-unstyled list-unstyled-i18n\">\n<li>\n<a href=\"{% url 'general:about' %}\">\n{% trans \"About\" %}\n</div>\n<div class=\"col-6 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Community\" %}</p>\n- <ul class=\"list-unstyled\">\n+ <ul class=\"list-unstyled list-unstyled-i18n\">\n<li>\n<a href=\"https://twitter.com/UCCSEd\">\n{% trans \"Twitter\" %}\n</div>\n<div class=\"col-12 col-md-2\">\n<p class=\"mb-1 font-weight-bold\">{% trans \"Help\" %}</p>\n- <ul class=\"list-unstyled\">\n+ <ul class=\"list-unstyled list-unstyled-i18n\">\n<li>\n<a href=\"{% url 'topics:glossary' %}\">\n{% trans \"Glossary\" %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/topics/index.html", "new_path": "csunplugged/templates/topics/index.html", "diff": "</div>\n<div class=\"col-12 col-md-8 text-center text-md-{{LANGUAGE_START}}\">\n<h2>{{ topic.name }}</h2>\n- <ul class=\"list-unstyled text-muted mb-0\">\n+ <ul class=\"list-unstyled list-unstyled-i18n text-muted mb-0\">\n{% if topic.lessons.exists %}\n<li>\n<strong>\n" } ]
Python
MIT License
uccser/cs-unplugged
Add new scss sheet for rtl, general tidy up
701,855
29.11.2017 09:43:03
-46,800
ee0fc56a967f1573282c528911362c33c01ac750
Add license for directional-scss
[ { "change_type": "MODIFY", "old_path": "LICENCE-THIRD-PARTY", "new_path": "LICENCE-THIRD-PARTY", "diff": "@@ -40,6 +40,15 @@ Licensed under MIT License.\nthird-party-licenses/details-element-polyfill.txt\n==============================================================================\n+==============================================================================\n+directional-scss\n+------------------------------------------------------------------------------\n+https://github.com/tysonmatanich/directional-scss\n+Copyright (c) 2013 Tyson Matanich\n+Licensed under MIT License.\n+third-party-licenses/directional-scss.txt\n+==============================================================================\n+\n==============================================================================\nDjango\n------------------------------------------------------------------------------\n" }, { "change_type": "ADD", "old_path": null, "new_path": "third-party-licences/directional-scss.txt", "diff": "+MIT License\n+\n+Copyright (c) 2013 Tyson Matanich\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n" } ]
Python
MIT License
uccser/cs-unplugged
Add license for directional-scss
701,855
29.11.2017 11:33:15
-46,800
4a914f8c6ed6e3d2bc93a430150bb571624ef2d2
Move crowdin-bot requirements to requirements.txt file
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/deploy.sh", "new_path": "infrastructure/crowdin/deploy.sh", "diff": "@@ -22,7 +22,7 @@ gcloud compute --project \"${PROJECT}\" instances create \"${INSTANCE_NAME}\" \\\n# Transfer files to instance\nsource_tarball=crowdin-bot.tar.gz\necho \"Creating tarball ${source_tarball}\"\n-tar cvzf \"${source_tarball}\" crowdin_bot_python_package crowdin_bot_scripts crowdin_bot_secrets\n+tar cvzf \"${source_tarball}\" crowdin_bot_python_package crowdin_bot_scripts crowdin_bot_secrets requirements.txt\nfor i in $(seq 1 10); do\necho \"Copying ${source_tarball} to /tmp on ${INSTANCE_NAME}\"\ngcloud beta compute scp setup-instance.sh \"${source_tarball}\" \"${INSTANCE_NAME}:/tmp\" --zone=\"${ZONE}\" && break\n" }, { "change_type": "ADD", "old_path": null, "new_path": "infrastructure/crowdin/requirements.txt", "diff": "+verto==0.6.1\n+PyYAML==3.12\n+django==1.11.7\n+django-environ==0.4.4\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/setup-instance.sh", "new_path": "infrastructure/crowdin/setup-instance.sh", "diff": "@@ -6,6 +6,9 @@ SECRETS_DIR=\"crowdin_bot_secrets\"\nSCRIPTS_DIR=\"crowdin_bot_scripts\"\nPYTHON_PACKAGE_DIR=\"crowdin_bot_python_package\"\n+# Unzip crowdin-bot source\n+tar -xvzf crowdin-bot.tar.gz\n+\n# Install packages\nsudo apt-get install git --yes\nsudo apt-get install gettext --yes\n@@ -13,9 +16,7 @@ sudo apt-get install default-jre --yes # Java, for crowdin cli\nsudo apt-get install python3-pip --yes\nsudo apt-get install python3-lxml --yes # Install here instead of pip3 because compilation uses too much RAM\nsudo pip3 install -U pip setuptools\n-sudo pip3 install verto pyyaml\n-sudo pip3 install django\n-sudo pip3 install django-environ\n+sudo pip3 install -r requirements.txt\n# Install crowdin cli\nwget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -\n@@ -29,9 +30,6 @@ tar zvxvf hub-linux-amd64-2.2.5.tgz\nsudo ./hub-linux-amd64-2.2.5/install\nrm -rf hub-linux-amd64-2.2.5\n-# Unzip crowdin-bot source\n-tar -xvzf crowdin-bot.tar.gz\n-\n# Move into secrets directory\ncd \"${SECRETS_DIR}\"\n" } ]
Python
MIT License
uccser/cs-unplugged
Move crowdin-bot requirements to requirements.txt file
701,855
29.11.2017 16:10:37
-46,800
393acc6f60698c944ae9e5a825489ee9a416d0cb
Modify crowdin-bot to ignore trivial timestamp changes in .po files Also add --no-location flag to makemessages command to prevent context lines from being generated. This is to prevent file updates every time those line numbers change.
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-incontext.sh", "diff": "@@ -45,6 +45,7 @@ for content_path in \"${CONTENT_PATHS[@]}\"; do\ngit add \"${content_path}/${CSU_PSEUDO_LANGUAGE}\"\ndone\n+reset_po_files_timestamp_only\n# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\nif [[ $(git diff --cached) ]]; then\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-pull-translations.sh", "diff": "@@ -117,6 +117,8 @@ for language in ${languages[@]}; do\ncrowdin -c \"${CROWDIN_CONFIG_FILE}\" -l \"${language}\" download\ngit add csunplugged/locale >/dev/null 2>&1 || true\n+ reset_po_files_timestamp_only\n+\nif [[ $(git diff --cached) ]]; then\ngit commit -m \"Update ${language} message file (django.po)\"\nchanges=1\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-update-messages.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-update-messages.sh", "diff": "@@ -28,10 +28,11 @@ git checkout $UPDATE_MESSAGES_PR_BRANCH || git checkout -b $UPDATE_MESSAGES_PR_B\ngit merge origin/$UPDATE_MESSAGES_TARGET_BRANCH --quiet --no-edit\ncd csunplugged\n+python3 manage.py makemessages -l en --no-location\n-python3 manage.py makemessages -l en\n+git add locale/en/LC_MESSAGES/django.po\n-git add -A\n+reset_po_files_timestamp_only\n# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\nif [[ $(git diff --cached) ]]; then\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "diff": "@@ -24,3 +24,24 @@ reset_repo() {\ngit -C \"${repo_dir}\" branch | grep -v \"^*\" | xargs git -C \"${repo_dir}\" branch -D\nfi\n}\n+\n+# Function to unstage any staged .po files that only have trivial changes\n+# to timestamp metadata.\n+# This is achieved by checking the diff with HEAD, excluding any lines starting\n+# with PO-Revision-Date or POT-Creation-Date\n+reset_po_files_timestamp_only() {\n+ # Loop through each .po file:\n+ while read path; do\n+ # Diff check to see whether staged .po file only has trivial changes to timestamp metadata\n+ diff -I '^\\\"\\(PO-Revision-Date\\)\\|\\(POT-Creation-Date\\)' <(git show :${path}) <(git show HEAD:${path}) >/dev/null 2>&1 && result=$? || result=$?\n+ if [[ $result -eq 0 ]]; then\n+ echo \"File ${path} only has timestamp changes, unstaging\"\n+ git reset HEAD ${path}\n+ elif [[ $result -eq 1 ]]; then\n+ echo \"File ${path} has non-trivial changes, so it will remain staged\"\n+ else\n+ # Diff command failed, abort\n+ false\n+ fi\n+ done < <(git diff --cached --name-only | grep django.po)\n+}\n" } ]
Python
MIT License
uccser/cs-unplugged
Modify crowdin-bot to ignore trivial timestamp changes in .po files Also add --no-location flag to makemessages command to prevent context lines from being generated. This is to prevent file updates every time those line numbers change.
701,855
30.11.2017 11:03:19
-46,800
891e35255e0bc2506949758ade5f5552909330ea
Fix failed reset_po_files_timestamp_only call from update-messages
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-update-messages.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-update-messages.sh", "diff": "@@ -29,8 +29,9 @@ git merge origin/$UPDATE_MESSAGES_TARGET_BRANCH --quiet --no-edit\ncd csunplugged\npython3 manage.py makemessages -l en --no-location\n+cd ..\n-git add locale/en/LC_MESSAGES/django.po\n+git add csunplugged/locale/en/LC_MESSAGES/django.po\nreset_po_files_timestamp_only\n" }, { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "new_path": "infrastructure/crowdin/crowdin_bot_scripts/crowdin-bot-utils.sh", "diff": "@@ -29,7 +29,17 @@ reset_repo() {\n# to timestamp metadata.\n# This is achieved by checking the diff with HEAD, excluding any lines starting\n# with PO-Revision-Date or POT-Creation-Date\n+# NB: Must be run from the repo root directory\nreset_po_files_timestamp_only() {\n+\n+ if ! [[ $(git rev-parse --show-toplevel 2>/dev/null) = \"$PWD\" ]]; then\n+ echo \"Error: reset_po_files_timestamp_only must be run from the repository root directory\"\n+ echo \"Root: $(git rev-parse --show-toplevel 2>/dev/null)\"\n+ echo \"Current: $(pwd)\"\n+ echo \"Aborting....\"\n+ return 1\n+ fi\n+\n# Loop through each .po file:\nwhile read path; do\n# Diff check to see whether staged .po file only has trivial changes to timestamp metadata\n@@ -40,8 +50,8 @@ reset_po_files_timestamp_only() {\nelif [[ $result -eq 1 ]]; then\necho \"File ${path} has non-trivial changes, so it will remain staged\"\nelse\n- # Diff command failed, abort\n- false\n+ echo \"Diff command failed, aborting...\"\n+ return 1\nfi\ndone < <(git diff --cached --name-only | grep django.po)\n}\n" } ]
Python
MIT License
uccser/cs-unplugged
Fix failed reset_po_files_timestamp_only call from update-messages
701,855
30.11.2017 14:25:10
-46,800
58f12ab706ea3375f1cce21b64fec03e7b42d648
Update package lists before installing packages
[ { "change_type": "MODIFY", "old_path": "infrastructure/crowdin/setup-instance.sh", "new_path": "infrastructure/crowdin/setup-instance.sh", "diff": "@@ -10,6 +10,7 @@ PYTHON_PACKAGE_DIR=\"crowdin_bot_python_package\"\ntar -xvzf crowdin-bot.tar.gz\n# Install packages\n+sudo apt-get update\nsudo apt-get install git --yes\nsudo apt-get install gettext --yes\nsudo apt-get install default-jre --yes # Java, for crowdin cli\n" } ]
Python
MIT License
uccser/cs-unplugged
Update package lists before installing packages
701,855
30.11.2017 19:06:16
-46,800
7a9eec162bdf1bc0f65bd5ce973733aabf65ef2c
WIP - Documentation for translation infrastructure
[ { "change_type": "ADD", "old_path": "docs/source/_static/img/translation_pipeline_overview.png", "new_path": "docs/source/_static/img/translation_pipeline_overview.png", "diff": "Binary files /dev/null and b/docs/source/_static/img/translation_pipeline_overview.png differ\n" }, { "change_type": "MODIFY", "old_path": "docs/source/author/translations.rst", "new_path": "docs/source/author/translations.rst", "diff": "Translations\n##############################################################################\n-Currently translations are not supported with the Django system, but this will\n-be implemented for the ``1.0.0`` release in late 2017.\n+Getting Started\n+==============================================================================\n+\n+In-Context Localisation\n+==============================================================================\n+\n+Translation notes\n+==============================================================================\n+\n+.. note::\n+\n+ On Crowdin, markdown files are translated on a per-sentence basis. There may\n+ be some cases where this is not desirable, and some paragraph level restructuring\n+ is required to convey a concept in a given language.\n+\n+ In these cases, it's possible to work around this with tricks such as\n+\n+ - translating one sentence into the translation box for another.\n+ - translating a sentence into a blank string.\n+\n+ These techniques are highly discouraged as they fight against many aspects of\n+ the Crowdin system including\n+\n+ - QA checks that ensure translations match the structure of the source strings.\n+ - Translation memory.\n+ - In context localisation.\n" }, { "change_type": "MODIFY", "old_path": "docs/source/developer/index.rst", "new_path": "docs/source/developer/index.rst", "diff": "@@ -17,3 +17,4 @@ The following pages are for those wanting to develop the CS Unplugged system.\ndev\ndeployment\ntest_suite\n+ translations\n" }, { "change_type": "ADD", "old_path": null, "new_path": "docs/source/developer/localisation.rst", "diff": "+Localisation (L10n)\n+##############################################################################\n" }, { "change_type": "ADD", "old_path": null, "new_path": "docs/source/developer/translations.rst", "diff": "+Translation Infrastructure\n+##############################################################################\n+\n+Crowdin\n+==============================================================================\n+We use a localisation management platform called Crowdin for translation of CS Unplugged.\n+\n+https://crowdin.com/project/cs-unplugged\n+\n+The project is public, so anyone can create an account and contribute translations.\n+\n+Currently, the following languages are available for translation:\n+\n+ - Hebrew\n+ - Maori\n+ - Polish\n+\n+These languages serve as a test bed for internationalisation of CS Unplugged.\n+Further languages will be added over time once the developers are satisfied\n+that the system is robust\n+\n+\n+\n+Translatable Files\n+==============================================================================\n+There are 3 types of files that contain translatable content:\n+\n+- Content markdown files\n+- Content yaml files containg translatable model strings\n+- ``django.po`` file containing translatable system strings\n+\n+Translatable source files must always reside under an ``en`` directory tree.\n+Translated files are downloaded into a directory named with the language's\n+locale code, and with the same structure as the source tree.\n+\n+.. note::\n+ The locale code differs from the language code in format - where a language\n+ code is of form ``ab-cd``, the locale code will be ``ab_CD``. Directories must be named\n+ using the locale code recognised by django for that language.\n+\n+ For more information, see\n+\n+ - https://docs.djangoproject.com/en/1.11/topics/i18n/\n+ - https://github.com/django/django/tree/master/django/conf/locale\n+ - https://github.com/django/django/blob/master/django/utils/translation/trans_real.py#L59\n+\n+The configuration specifying which files should be uploaded for translation is\n+stored in the file ``crowdin_content.yaml`` in the repository root. For details\n+about the structure of this file, see https://support.crowdin.com/configuration-file/\n+\n+.. note::\n+ The crowdin placeholder ``osx_locale`` matches the django locale code\n+ in almost all cases, and should be used for every entry in the config file.\n+ In any cases where the osx_locale code does not match the django locale code,\n+ use the ``language_mapping`` option.\n+\n+ See:\n+\n+ - https://api.crowdin.com/api/supported-languages\n+ - https://support.crowdin.com/configuration-file/#language-mapping\n+\n+ Due to the various automated components in the translation pipeline, the\n+ following restrictions are imposed on the config file:\n+\n+ - The ``%osx_locale%`` and ``%original_file_name%`` placeholders must be used.\n+ - No other placeholders may be used.\n+ - If a language_mapping is provided for ``osx_locale``, it must be the same for\n+ all ``files`` entries.\n+\n+\n+\n+Review Process\n+==============================================================================\n+For a translation of any given string to make it to production release, it must\n+pass the following stages of review:\n+\n+1. (Crowdin) Translation Proofread - Review by a second translator with 'proofreader' status in the target language.\n+2. (Crowdin) Tech Review - Review by a member of the CS Unplugged technical team to catch technical errors (i.e. with Verto tags, links, markdown syntax etc).\n+3. (GitHub) PR Review - Final review of completed translation files being merged into develop. Automated testing on travis will also occur at this stage.\n+\n+The first two review phases are enforced by a custom workflow on Crowdin.\n+See their documentation at https://support.crowdin.com/advanced-workflows/\n+\n+\n+In-Context Translation\n+==============================================================================\n+We have utilised Crowdin's 'In-Context' localisation feature to allow content\n+translation directly on the website, by switching to a special Translation Mode\n+'pseudo-language'.\n+\n+In-context translation is only enable on the development version of the website,\n+at http://cs-unplugged-dev.appspot.com.\n+\n+For technical details on how in-context localisation works, see Crowdin's\n+documentations: https://support.crowdin.com/in-context-localization/\n+\n+.. note::\n+ The pseudo-language used on Crowdin is ``en-UD`` (English Upside-down)\n+ The ``Translation Mode`` language used in django is ``xx-lr``. A custom\n+ ``language_mapping`` entry in the configuration file is used to achieve this\n+ mapping.\n+\n+ Additionally, a ``Translation Mode (Bi-Directional)`` language (``yy-rl``)\n+ is available on django, to support translation into RTL languages. The directory trees\n+ for this language are always symlinks to ``xx-lr``, but the website is rendered\n+ using a RTL layout. This enables translators to see how their RTL translations\n+ will look when relased. This language is not involved in the process of downloading\n+ translations from crowdin, which only uses ``xx-lr``.\n+\n+Talk about caveats here? About block tags etc?\n+\n+\n+Translation Pipeline\n+==============================================================================\n+\n+.. image:: ../_static/img/translation_pipeline_overview.png\n+\n+Crowdin Bot\n+==============================================================================\n+\n+In order to manage the complex translation pipeline, an autmoation agent (``crowdin-bot``)\n+is used to perform the following tasks.\n+\n+- Updating source .po file with new translatable system strings\n+- Pushing source files to crowdin for translation\n+- Downloading updated metadata for in-context translation mode on dev deployment\n+- Downloading completed translations for release\n+\n+Crowdin bot is implemented as a number of cron jobs running on a Compute Engine VM.\n+Each of the above tasks runs periodically as a cron job, independently from one another.\n+The frequency of each task can be varied by modifying the crontab entry in ``setup-instance.py``\n+Currently each task is run once per day, each staggered by 1 hour starting from midnight NZDT.\n+\n+Updating message files - ``crowdin-bot-update-messages.sh``\n+------------------------------------------------------------------------------\n+\n+Uploading source files to Crowdin - ``crowdin-bot-push-source.sh``\n+------------------------------------------------------------------------------\n+\n+Downloading in-context translation files - ``crowdin-bot-pull-incontext.sh``\n+------------------------------------------------------------------------------\n+\n+Downloading completed translations - ``crowdin-bot-pull-translations.sh``\n+------------------------------------------------------------------------------\n+\n+Python package\n+------------------------------------------------------------------------------\n+\n+Deployment\n+------------------------------------------------------------------------------\n+\n+Monitoring\n+------------------------------------------------------------------------------\n+Logging + future plans for status monitoring\n" } ]
Python
MIT License
uccser/cs-unplugged
WIP - Documentation for translation infrastructure
701,855
01.12.2017 17:50:01
-46,800
80824d024623327909716c75b05eed4fce6b598a
(WIP) Update translation infrastructure docs
[ { "change_type": "MODIFY", "old_path": "docs/source/_static/img/translation_pipeline_overview.png", "new_path": "docs/source/_static/img/translation_pipeline_overview.png", "diff": "Binary files a/docs/source/_static/img/translation_pipeline_overview.png and b/docs/source/_static/img/translation_pipeline_overview.png differ\n" }, { "change_type": "MODIFY", "old_path": "docs/source/developer/index.rst", "new_path": "docs/source/developer/index.rst", "diff": "@@ -17,4 +17,4 @@ The following pages are for those wanting to develop the CS Unplugged system.\ndev\ndeployment\ntest_suite\n- translations\n+ translation_infrastructure\n" }, { "change_type": "ADD", "old_path": null, "new_path": "docs/source/developer/translation_infrastructure.rst", "diff": "+Translation Infrastructure\n+##############################################################################\n+\n+Crowdin\n+==============================================================================\n+We use a localisation management platform called `Crowdin <https://crowdin.com/project/cs-unplugged>`_ for translation of CS Unplugged. The project is public, meaning that anyone can create an account and contribute translations.\n+\n+Currently, the following languages are available for translation:\n+\n+ - Hebrew\n+ - Maori\n+ - Polish\n+\n+These languages serve as a test bed for internationalisation of CS Unplugged.\n+Further languages will be added over time once the developers are satisfied\n+that the translation pipeline is stable.\n+\n+\n+Files Configurations\n+==============================================================================\n+There are 3 types of files that contain translatable content:\n+\n+- Content markdown files\n+- Content yaml files containg translatable model strings\n+- ``django.po`` file containing translatable system strings\n+\n+Translatable source files must always reside under an ``en`` directory tree.\n+Translated files are downloaded into a directory named with the language's\n+locale code, and with the same structure as the source tree.\n+\n+.. note::\n+ The locale code differs from the language code in format - where a language\n+ code is of form ``ab-cd``, the locale code will be ``ab_CD``. Directories must be named\n+ using the locale code recognised by django for that language.\n+\n+ For more information, see\n+\n+ - https://docs.djangoproject.com/en/1.11/topics/i18n/\n+ - https://github.com/django/django/tree/master/django/conf/locale\n+ - https://github.com/django/django/blob/master/django/utils/translation/trans_real.py#L59\n+\n+The configuration specifying which files should be uploaded for translation is\n+stored in the file ``crowdin_content.yaml`` in the repository root. For details\n+about the structure of this file, see the `documentation <https://support.crowdin.com/configuration-file/>`_.\n+\n+.. note::\n+ The crowdin placeholder ``osx_locale`` matches the django locale code\n+ in almost all cases, and should be used for every entry in the config file.\n+ You can view a list of the Crowdin language code values `here <https://api.crowdin.com/api/supported-languages>`_.\n+ In any cases where the osx_locale code does not match the django locale code,\n+ use a custom `language mapping <https://support.crowdin.com/configuration-file/#language-mapping>`_.\n+\n+ Due to the various automated components in the translation pipeline, the\n+ following restrictions are imposed on the config file:\n+\n+ - The ``%osx_locale%`` and ``%original_file_name%`` placeholders must be used.\n+ - No other placeholders may be used.\n+ - If a ``language_mapping`` is provided for ``osx_locale``, it must be the same for\n+ all ``files`` entries.\n+\n+\n+Review Process\n+==============================================================================\n+For a translation of any given string to make it to production release, it must\n+pass the following stages of review:\n+\n+1. (Crowdin) Translation Proofread - Review by a second translator with 'proofreader' status in the target language.\n+2. (Crowdin) Tech Review - Review by a member of the CS Unplugged technical team to catch technical errors (i.e. with Verto tags, links, markdown syntax etc).\n+3. (GitHub) PR Review - Final review of completed translation files being merged into develop. Automated testing on travis will also occur at this stage.\n+\n+The first two review phases are enforced by a `custom workflow <https://support.crowdin.com/advanced-workflows/>`_ on Crowdin.\n+\n+\n+In-Context Translation\n+==============================================================================\n+We utilise Crowdin's `in-context localisation <https://support.crowdin.com/in-context-localization/>`_ feature to allow content\n+translation directly on the website, by switching to a special Translation Mode pseudo-language.\n+In-context translation is only enabled on the `development version <http://cs-unplugged-dev.appspot.com>`_ of CS Unplugged.\n+\n+.. note::\n+ The pseudo-language used on Crowdin is ``en-UD`` (English Upside-down)\n+ The translation mode language used in django is ``xx-lr``. A custom\n+ ``language_mapping`` entry in the configuration file is used to map from one to the other.\n+\n+ Additionally, a bi-directional translation mode is available using the language ``yy-rl``.\n+ The directory trees for this language are always symlinks to ``xx-lr``, but the website is rendered using a RTL layout.\n+ This enables translators to see how their RTL translations will look when released.\n+ This language is not involved in the process of downloading translations from crowdin.\n+\n+.. _inContextVertoCaveat:\n+\n+.. note::\n+\n+ Verto tags are treated like any other string on Crowdin. Because of this, the in-context pseudo-translation files have replaced verto tags with their crowdin identifiers (which then get substituted with the original/translated string on the front end).\n+ This is problematic, because tags need to be present when processed by Verto which occurs before the content gets to the front end.\n+\n+ As a workaround, the following modifications are made to in-context pseudo translations of markdown files:\n+\n+ - An XLIFF file is downloaded containing the source strings together with their identifiers.\n+ - All source strings in XLIFF file are matched against a regex for Verto block tags.\n+ - For every match:\n+\n+ - The identifier in the markdown file is replaced by the source string (the verto tag).\n+ - The identifier is placed immediately above the verto tag, to allow editing of the tag on the front end.\n+\n+ This allows the verto tags to render correctly, while still giving translators the option to modify the tag if required.\n+ This might be necessary in cases where a link to a different video/image/etc is required for a specific language.\n+\n+ Note that if a translator modifys a block tag, this will be present in the final translations, but will never be rendered in the in-context translation mode.\n+ As such, any changes to block tags will need to be checked for correct rendering before merging the completed translation branch into develop.\n+\n+\n+==============================================================================\n+\n+\n+Translation Pipeline\n+==============================================================================\n+\n+The following diagram gives a broad overview of the translation pipeline.\n+The blue arrows indicate the path from a source file change through to the release of the translation for that change.\n+\n+.. image:: ../_static/img/translation_pipeline_overview.png\n+\n+The following sections provide more detail on the path through the translation pipe for\n+\n+- `New/Updated content files`_.\n+- `Deleted content files`_.\n+- `Moved content files`_.\n+- `Added/deleted/updated strings in HTML templates and python code`_.\n+\n+\n+New/Updated content files\n+------------------------------------------------------------------------------\n+\n+1. English content changes on feature branch\n+\n+2. English content changes merged into develop\n+\n+3. Source files on develop uploaded to Crowdin\n+\n+ - Translation can begin on Crowdin\n+\n+4. Metadata for in context translation is downloaded on separate branch\n+\n+5. Metadata for in context translation merged into develop\n+\n+ - In context translation mode now available on dev site\n+\n+6. All strings in file completely translated into a certain language and approved on Crowdin (see review process above)\n+\n+7. Translated content file downloaded on separate branch for that language\n+\n+8. Translated content merged into develop and available in dev deployment\n+\n+9. Translated content merged into master and released\n+\n+\n+Deleted content files\n+------------------------------------------------------------------------------\n+\n+1. English content file deleted on feature branch\n+\n+2. English content file deletion merged into develop\n+\n+3. Source files on develop uploaded to Crowdin\n+\n+ - Note, at this point the file will not be pushed to Crowdin (because it doesn't exist on develop), but it will not be deleted off Crowdin\n+\n+The remaining steps are the same as for `New/Updated content files`_\n+\n+.. note::\n+ The file deletion will propagate through the pipeline even though the file is not deleted from Crowdin.\n+ This is because only files that exist in the English directory tree are downloaded by `Crowdin Bot`_.\n+\n+ The script ``crowdin-bot-list-unused.sh`` can be used to list all files currently present on Crowdin that are no longer used.\n+\n+ As a house-keeping task, this should be manually run every so often to identify deprecated files on crowdin, which can then be deleted through the Crowdin web interface.\n+ This has not been automated as source file deletion is a potentially destructive action, as all translations for that file will be lost.\n+\n+\n+Moved content files\n+------------------------------------------------------------------------------\n+\n+A moved content file are treated as a combination of `deleting an old file <Deleted content files_>`_ and `adding a new file <New/Updated content files_>`_.\n+\n+\n+Added/deleted/updated strings in HTML templates and python code\n+------------------------------------------------------------------------------\n+\n+This refers to all strings marked for translation using\n+\n+- ``ugettext()``/``_()`` in python code.\n+- ``{% trans %}``/``{% blocktrans %}`` tags in HTML templates.\n+\n+In these cases, the translatable strings must be first collected into a message file (``.po``) for translation.\n+This is achieved by running ``./csu dev makemessages`` which will update the file ``csunplugged/locale/en/LC_MESSAGES/django.po``\n+\n+This can be done in two ways:\n+\n+- manually running the command before merging the template/python changes into develop.\n+\n+- automatically by `Crowdin Bot`_, which will periodically update the message file if required.\n+\n+\n+After the updated message file is merged into develop, the pipeline is similar to above for an `updated content file <New/Updated content files_>`_. However, there are a couple of important differences to be aware of:\n+\n+- The translated message file is downloaded even if there are strings that haven't been translated.\n+\n+- translated message files are added to a branch together for merging into develop. This differs from content files, where languages have separate branches.\n+\n+==============================================================================\n+\n+\n+Crowdin Bot\n+==============================================================================\n+\n+In order to manage the complex translation pipeline, an autmoation bot is used to perform the following tasks:\n+\n+- Updating source message files with new translatable system strings.\n+- Pushing source files to crowdin for translation.\n+- Downloading updated metadata for in-context translation mode on dev deployment.\n+- Downloading completed translations for release.\n+\n+Crowdin bot is implemented as a number of cron jobs running on a Compute Engine VM.\n+Each of the above tasks is stateless and runs as a scheduled cron job, independently from one another.\n+The frequency of each task can be varied by modifying the crontab entry in ``setup-instance.py``.\n+Currently each task is run once per day, staggered by 1 hour, starting from midnight NZDT.\n+\n+Scripts\n+------------------------------------------------------------------------------\n+The 4 periodic tasks above are implemented as bash scripts:\n+\n+- **Updating message file** - ``crowdin-bot-update-messages.sh``\n+\n+ - Checkout and pull ``UPDATE_MESSAGES_TARGET_BRANCH``.\n+ - Run command to update message file.\n+ - If changed, create PR back into ``UPDATE_MESSAGES_TARGET_BRANCH``.\n+\n+- **Uploading source files to Crowdin** - ``crowdin-bot-push-source.sh``\n+\n+ - Checkout and pull ``TRANSLATION_SOURCE_BRANCH``.\n+ - Use Crowdin CLI to upload source files to Crowdin.\n+\n+- **Downloading in-context translation files** - ``crowdin-bot-pull-incontext.sh``\n+\n+ - Checkout and pull ``IN_CONTEXT_L10N_TARGET_BRANCH``.\n+ - Download in-context pseudo-translations using Crowdin CLI.\n+ - Download XLIFF files containing source strings and string identifiers.\n+ - Perform `necessary modifications <inContextVertoCaveat_>`_ to markdown files.\n+ - If there are changes, commit and create PR back into ``IN_CONTEXT_L10N_TARGET_BRANCH``.\n+\n+- **Downloading completed translations** - ``crowdin-bot-pull-translations.sh``\n+\n+ - Checkout and pull ``TRANSLATION_TARGET_BRANCH``.\n+ - For each language:\n+\n+ - Download markdown and yaml files for that language.\n+ - For each file:\n+\n+ - Download XLIFF file containing translation status.\n+ - If file is completely translated (all strings translated and approved) and differs from currently committed translation, commit file.\n+\n+ - If there are any changes create PR back into ``TRANSLATION_TARGET_BRANCH``.\n+\n+ - Download message file for all languages.\n+ - If there are non trivial changes (i.e. changes beyond timestamp metadata), commit and create PR back into ``TRANSLATION_TARGET_BRANCH``.\n+\n+Additionally, there is another scripts that is intended to be run manually, and is not scheduled as a cron job.\n+\n+\n+- **Listing unused files on Crowdin** - ``crowdin-bot-list-unused.sh``\n+\n+ - Download list of files currently on Crowdin.\n+ - Create list of translatable files for current state of ``TRANSLATION_SOURCE_BRANCH``. These are files that don't match the current configuration file, or aren't present in the English source tree.\n+ - Print all files that exist in the first list and not the second.\n+\n+\n+Python package\n+------------------------------------------------------------------------------\n+Many of the above scripts utilise Python modules to do the heavy lifting.\n+\n+Python modules are used for:\n+\n+- Interacting with Crowdin through their `API <https://support.crowdin.com/api>`_.\n+- Performing `necessary modifications <inContextVertoCaveat_>`_ to in-context translation markdown files.\n+\n+These python modules are installed as a python package ``crowdin_bot`` during deployment.\n+\n+\n+Environment secrets\n+------------------------------------------------------------------------------\n+The following environment variables must be available when running the above scripts:\n+\n+- ``CROWDIN_API_KEY`` - `API key <https://support.crowdin.com/api/api-integration-setup/>`_ for Crowdin project.\n+- ``GITHUB_TOKEN`` - `Personal access token <https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/>`_ for UCCSER Bot GitHub account.\n+\n+Additionally, SSH pull/push access to the csunplugged repository is required.\n+To achieve this on deployed instances, an encrypted private key linked to the UCCSER Bot\n+account is stored in the repo. This key is retrieved and decrypted in ``setup-instance.sh``.\n+This is not required when running commands on a local machine, provided the user running the\n+script has setup SSH authentication with their github account, and has push/pull access to the CS Unplugged repository\n+\n+To update the keys used by Crowdin Bot, create the following files in the crowdin_bot_secrets directory:\n+\n+- ``crowdin_api_key`` - Generated Crowdin API key.\n+- ``uccser_bot_token`` - Generated Personal access token for UCCSER Bot GitHub account.\n+- ``gce_key`` - Generated SSH private key.\n+\n+ - Generate using ``ssh-keygen -c -t rsa -b 4096 -C \"33709036+uccser-bot@users.noreply.github.com\" -f gce_key``.\n+ - Add public key ``gce_key.pub`` to UCCSER Bot Github account.\n+\n+Encrypt the files using `Google Key Management System (KMS) <https://cloud.google.com/kms/>`_.\n+\n+.. code-block:: bash\n+\n+ $ cd crowdin_bot_secrets\n+ $ ./encrypt-secrets.sh\n+\n+Add encrypted files to repository.\n+\n+.. code-block:: bash\n+\n+ $ git add crowdin_api_key.enc uccser_bot_token.enc gce_key.enc\n+ $ git commit\n+\n+Finally, store the plain-text versions of gce_key and uccser_bot_token in LastPass for later retrieval.\n+\n+\n+Deployment\n+------------------------------------------------------------------------------\n+\n+Ensure you have installed the `Google Cloud SDK <https://cloud.google.com/sdk/docs/>`_.\n+\n+Update ``gcloud`` components:\n+\n+.. code-block:: bash\n+\n+ $ gcloud components update\n+ $ gcloud components install beta\n+\n+Authenticate, using an account with write access to compute engine resources:\n+\n+.. code-block:: bash\n+\n+ $ gcloud auth login\n+\n+Run the deployment script:\n+\n+.. code-block:: bash\n+\n+ $ cd infrastructure/crowdin\n+ $ ./deploy.sh\n+\n+\n+Running commands manually\n+------------------------------------------------------------------------------\n+As well as the scheduled cron jobs, it's also possible to run any of the above scripts manually.\n+\n+SSH into the Compute Engine instance:\n+\n+.. code-block:: bash\n+\n+ $ gcloud compute ssh crowdin-bot\n+\n+Load required environment variables:\n+\n+.. code-block:: bash\n+\n+ $ source crowdin-bot-env-secrets.sh\n+\n+Run required command(s):\n+\n+.. code-block:: bash\n+\n+ $ crowdin-bot-update-messages.sh\n+ $ crowdin-bot-list-unused.sh\n+ $ crowdin-bot-pull-translations.sh\n+ ...\n+\n+Additionally, it is possible to run the scripts on a local machine, provided the correct packages are installed (see ``setup-instance.py``)\n+\n+Monitoring\n+------------------------------------------------------------------------------\n+All cron job scripts write to log files in the home directory of the user that deployed Crowdin Bot. The log file is overwritten every time the script is run.\n+\n+Future improvements in this area could include\n+\n+- Status monitoring of Crowdin Bot, with errors being reported to maintainers.\n+- Log files being collected for each execution.\n+\n+`Google Stackdriver <https://cloud.google.com/stackdriver/>`_ should be investigated for this.\n" }, { "change_type": "DELETE", "old_path": "docs/source/developer/translations.rst", "new_path": null, "diff": "-Translation Infrastructure\n-##############################################################################\n-\n-Crowdin\n-==============================================================================\n-We use a localisation management platform called Crowdin for translation of CS Unplugged.\n-\n-https://crowdin.com/project/cs-unplugged\n-\n-The project is public, so anyone can create an account and contribute translations.\n-\n-Currently, the following languages are available for translation:\n-\n- - Hebrew\n- - Maori\n- - Polish\n-\n-These languages serve as a test bed for internationalisation of CS Unplugged.\n-Further languages will be added over time once the developers are satisfied\n-that the system is robust\n-\n-\n-\n-Translatable Files\n-==============================================================================\n-There are 3 types of files that contain translatable content:\n-\n-- Content markdown files\n-- Content yaml files containg translatable model strings\n-- ``django.po`` file containing translatable system strings\n-\n-Translatable source files must always reside under an ``en`` directory tree.\n-Translated files are downloaded into a directory named with the language's\n-locale code, and with the same structure as the source tree.\n-\n-.. note::\n- The locale code differs from the language code in format - where a language\n- code is of form ``ab-cd``, the locale code will be ``ab_CD``. Directories must be named\n- using the locale code recognised by django for that language.\n-\n- For more information, see\n-\n- - https://docs.djangoproject.com/en/1.11/topics/i18n/\n- - https://github.com/django/django/tree/master/django/conf/locale\n- - https://github.com/django/django/blob/master/django/utils/translation/trans_real.py#L59\n-\n-The configuration specifying which files should be uploaded for translation is\n-stored in the file ``crowdin_content.yaml`` in the repository root. For details\n-about the structure of this file, see https://support.crowdin.com/configuration-file/\n-\n-.. note::\n- The crowdin placeholder ``osx_locale`` matches the django locale code\n- in almost all cases, and should be used for every entry in the config file.\n- In any cases where the osx_locale code does not match the django locale code,\n- use the ``language_mapping`` option.\n-\n- See:\n-\n- - https://api.crowdin.com/api/supported-languages\n- - https://support.crowdin.com/configuration-file/#language-mapping\n-\n- Due to the various automated components in the translation pipeline, the\n- following restrictions are imposed on the config file:\n-\n- - The ``%osx_locale%`` and ``%original_file_name%`` placeholders must be used.\n- - No other placeholders may be used.\n- - If a language_mapping is provided for ``osx_locale``, it must be the same for\n- all ``files`` entries.\n-\n-\n-\n-Review Process\n-==============================================================================\n-For a translation of any given string to make it to production release, it must\n-pass the following stages of review:\n-\n-1. (Crowdin) Translation Proofread - Review by a second translator with 'proofreader' status in the target language.\n-2. (Crowdin) Tech Review - Review by a member of the CS Unplugged technical team to catch technical errors (i.e. with Verto tags, links, markdown syntax etc).\n-3. (GitHub) PR Review - Final review of completed translation files being merged into develop. Automated testing on travis will also occur at this stage.\n-\n-The first two review phases are enforced by a custom workflow on Crowdin.\n-See their documentation at https://support.crowdin.com/advanced-workflows/\n-\n-\n-In-Context Translation\n-==============================================================================\n-We have utilised Crowdin's 'In-Context' localisation feature to allow content\n-translation directly on the website, by switching to a special Translation Mode\n-'pseudo-language'.\n-\n-In-context translation is only enable on the development version of the website,\n-at http://cs-unplugged-dev.appspot.com.\n-\n-For technical details on how in-context localisation works, see Crowdin's\n-documentations: https://support.crowdin.com/in-context-localization/\n-\n-.. note::\n- The pseudo-language used on Crowdin is ``en-UD`` (English Upside-down)\n- The ``Translation Mode`` language used in django is ``xx-lr``. A custom\n- ``language_mapping`` entry in the configuration file is used to achieve this\n- mapping.\n-\n- Additionally, a ``Translation Mode (Bi-Directional)`` language (``yy-rl``)\n- is available on django, to support translation into RTL languages. The directory trees\n- for this language are always symlinks to ``xx-lr``, but the website is rendered\n- using a RTL layout. This enables translators to see how their RTL translations\n- will look when relased. This language is not involved in the process of downloading\n- translations from crowdin, which only uses ``xx-lr``.\n-\n-Talk about caveats here? About block tags etc?\n-\n-\n-Translation Pipeline\n-==============================================================================\n-\n-.. image:: ../_static/img/translation_pipeline_overview.png\n-\n-Crowdin Bot\n-==============================================================================\n-\n-In order to manage the complex translation pipeline, an autmoation agent (``crowdin-bot``)\n-is used to perform the following tasks.\n-\n-- Updating source .po file with new translatable system strings\n-- Pushing source files to crowdin for translation\n-- Downloading updated metadata for in-context translation mode on dev deployment\n-- Downloading completed translations for release\n-\n-Crowdin bot is implemented as a number of cron jobs running on a Compute Engine VM.\n-Each of the above tasks runs periodically as a cron job, independently from one another.\n-The frequency of each task can be varied by modifying the crontab entry in ``setup-instance.py``\n-Currently each task is run once per day, each staggered by 1 hour starting from midnight NZDT.\n-\n-Updating message files - ``crowdin-bot-update-messages.sh``\n-------------------------------------------------------------------------------\n-\n-Uploading source files to Crowdin - ``crowdin-bot-push-source.sh``\n-------------------------------------------------------------------------------\n-\n-Downloading in-context translation files - ``crowdin-bot-pull-incontext.sh``\n-------------------------------------------------------------------------------\n-\n-Downloading completed translations - ``crowdin-bot-pull-translations.sh``\n-------------------------------------------------------------------------------\n-\n-Python package\n-------------------------------------------------------------------------------\n-\n-Deployment\n-------------------------------------------------------------------------------\n-\n-Monitoring\n-------------------------------------------------------------------------------\n-Logging + future plans for status monitoring\n" }, { "change_type": "MODIFY", "old_path": "docs/source/developer/website_design.rst", "new_path": "docs/source/developer/website_design.rst", "diff": "@@ -14,6 +14,7 @@ In summary:\n- We plan to use Bootstrap 4 for the underlying framework for responsive design.\n- We use SCSS for style sheets where possible.\n+- We wrap translatable strings in {% trans %} or {% blocktrans trimmed %} tags.\n- We use the `django-bootstrap-breadcrumbs`_ package for breadcrumbs on the\nwebsite.\n" } ]
Python
MIT License
uccser/cs-unplugged
(WIP) Update translation infrastructure docs
701,855
11.12.2017 17:15:20
-46,800
55c2667d45343f2382755bbffb3bcf1332134aab
Initial attempt at core translation documentation
[ { "change_type": "MODIFY", "old_path": "docs/source/developer/index.rst", "new_path": "docs/source/developer/index.rst", "diff": "@@ -17,4 +17,5 @@ The following pages are for those wanting to develop the CS Unplugged system.\ndev\ndeployment\ntest_suite\n+ translation\ntranslation_infrastructure\n" }, { "change_type": "ADD", "old_path": null, "new_path": "docs/source/developer/translation.rst", "diff": "+Translation\n+##############################################################################\n+\n+\n+Translation Principles\n+=============================================================================\n+\n+The following principles were used to guide the design of a translation system for CS Unplugged\\:.\n+\n+1. Translations should be 'first class citizens' - they should exist as independent entities from the source content, and be coupled as loosely as possible to it.\n+2. Translated content should remain accessible even if the source material changes, and an updated translation is not yet available.\n+3. Users should be able to see all content that exists, even if it is not available in their language.\n+4. Translated content should be presented solely in the users language, without being interspersed with English.\n+\n+\n+Translatable Files\n+=============================================================================\n+Translatable content is stored in two types of files:\n+\n+- Markdown files, for content to be processed by Verto.\n+- YAML files containg field translations for a given model type.\n+\n+Both types of file are stored inside the directory tree for a given language (ie. the directory named using the django locale code).\n+\n+.. note::\n+\n+ YAML translation files must contain translations for only one model type, but may contain translations for multiple instances of that model, and for multiple fields.\n+\n+ They are structured as follows\n+\n+ .. code-block:: yaml\n+\n+ <object-slug-1>:\n+ <field-1>: <translated value for field-1>\n+ <field-2>: <translated value for field-2>\n+ <object-slug-2>\n+\n+ For example, the following snippet is from the yaml translation file for all classroom resources\n+\n+ .. code-block:: yaml\n+\n+ pens:\n+ description: Pens\n+ paper:\n+ description: Paper\n+ number-line-0-20:\n+ description: Number line from 0 to 20\n+\n+ It is important to note that these YAML files are separate from `configuration files <understanding_configuration_files>`_, which are located in the ``structure`` directory.\n+\n+ These files can be parsed and loaded using a `utility function <UtilityFunctions_>`_ on the ``TranslatableModelLoader`` base class.\n+\n+Translatable Model\n+=============================================================================\n+\n+The ``TranslatableModel`` class is a base model class that allows content to be stored using the above principles.\n+It is availabe in the file ``utils/TranslatableModel.py`` and should be subclassed by all models which contain any user facing content.\n+\n+Django Package - ``modeltranslation``\n+******************************************************************************\n+The django modeltranslation package is utilised to stored translated content on a model.\n+The basic idea is that for each translatable field, an extra database column is added for every language defined in the django settings file.\n+When the base field is accessed, ``modeltranslation`` performs some magic to retrieve the translation for the users language\n+\n+\n+To register translation fields for a given TranslatableModel, add a TranslationOptions subclass to the ``translations.py`` file in the relevant application.\n+For more details, see the models already registered, or read the `modeltranslation docs <http://django-modeltranslation.readthedocs.io/en/latest/registration.html>`_.\n+\n+.. note::\n+\n+ The default behaviour for modeltranslation is to fallback to the english value if no translation is present.\n+ In CS Unplugged, this is desirable for fields such as name and title, but is often undesirable for most other fields (see `Translation Principles`_).\n+\n+ To disable fallback for a given field:\n+\n+ - Add ``<field name>: None`` to the ``fallback_undefined`` dictionary in the models ``TranslationOptions`` subclass.\n+ - Add ``default=\"\"`` option to the field in it's ``models.py`` definition.\n+\n+\n+Available Languages\n+******************************************************************************\n+\n+The ``TranslatableModel`` base class includes a mechanism to determine whether a model sufficiently translated and available in a given language.\n+\n+This mechanism consists of\n+\n+- The ``languages`` field, which is an array field storing the django language codes for languages in which the model is available\n+- The ``translation_available`` property, which returns true if the model is available in the current language\n+\n+When creating the ``TranslatableModel`` instance, the list of available languages should be determined.\n+This will likely be decided using a list of required fields, where the presence of translations for all required fields leads to the model being marked as available.\n+The `TranslatableModelLoader <TranslatableModelLoader_>`_ base class includes functions to assist with this task\n+\n+In view and template code, the ``translation_available`` property can be checked to determine the presentation of translated content (or lack thereof) on the front end.\n+\n+\n+.. _TranslatableModelLoader:\n+\n+Translatable Model Loader\n+=============================================================================\n+\n+The ``TranslatabaleModelLoader`` base class should be subclassed by all loaders that deal with translatable models.\n+It provides a number of helper functions for dealing with translated content.\n+It is availabe in the file ``utils/TranslatableModelLoader.py``.\n+\n+.. _UtilityFunctions:\n+\n+Utility Functions\n+******************************************************************************\n+\n+The following utility functions are available:\n+\n+- ``get_yaml_translations`` - Load translations for model fields from a given YAML file\n+- ``get_markdown_translations`` - Load translations for a given markdown file\n+- ``populate_translations`` - Populate translation fields on a model using values in a given dictionary\n+- ``mark_translation_availability`` - Modify ``languages`` field to contain all languages for which all required translation fields are populated\n+\n+Refer to the function docstrings for more detailed documentation.\n+It may also be useful to refer to existing loader implementations to understand how these functions can be used.\n" } ]
Python
MIT License
uccser/cs-unplugged
Initial attempt at core translation documentation
701,855
11.12.2017 17:50:03
-46,800
5bf440a05bf0f3b391c204a6b6db3b054a28fe99
Minor docs tidyups
[ { "change_type": "MODIFY", "old_path": "docs/source/developer/translation.rst", "new_path": "docs/source/developer/translation.rst", "diff": "@@ -35,7 +35,7 @@ Both types of file are stored inside the directory tree for a given language (ie\n<field-2>: <translated value for field-2>\n<object-slug-2>\n- For example, the following snippet is from the yaml translation file for all classroom resources\n+ For example, the following snippet is from the YAML translation file for all classroom resources\n.. code-block:: yaml\n@@ -111,7 +111,7 @@ Utility Functions\nThe following utility functions are available:\n- ``get_yaml_translations`` - Load translations for model fields from a given YAML file\n-- ``get_markdown_translations`` - Load translations for a given markdown file\n+- ``get_markdown_translations`` - Load translations for a given Markdown file\n- ``populate_translations`` - Populate translation fields on a model using values in a given dictionary\n- ``mark_translation_availability`` - Modify ``languages`` field to contain all languages for which all required translation fields are populated\n" } ]
Python
MIT License
uccser/cs-unplugged
Minor docs tidyups
701,860
12.12.2017 11:32:54
-46,800
34395ae0d64300ecbb0627ed8ea3fb06f1d6c4df
Add new image and edit hero slightly
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/red-hero-banner.png", "new_path": "csunplugged/static/img/red-hero-banner.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/red-hero-banner.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -101,10 +101,10 @@ div.plugged-in-language-implementation {\n$rounded-corner-radius: 0.5rem;\n.jumbotron {\n- background: linear-gradient( rgba($red,.7), rgba($red,.7) ), url(\"../img/home-page-banner-photo.jpg\");\n+ background: url(\"../img/red-hero-banner.png\");\nbackground-size: cover;\n- border: $card-border-width solid darken($red, 10%);\n- border-radius: $rounded-corner-radius;\n+ // border: $card-border-width solid darken($red, 10%);\n+ // border-radius: $rounded-corner-radius;\nmargin: 1rem 0;\nwidth: 100%;\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% block body_container %}\n<div class=\"row\">\n- <div class=\"jumbotron jumbotron-fluid py-5 mt-0\">\n+ <div class=\"jumbotron jumbotron-fluid\">\n<div class=\"container\">\n<h1 class=\"display-3 text-center\">\n{% blocktrans trimmed %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Add new image and edit hero slightly
701,860
12.12.2017 12:13:41
-46,800
fd7f00361f65d8b5a8e97751a31a68260256691e
Add paragraph text to jumbotron Change colour of text Elongate jumbotron
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -105,13 +105,19 @@ $rounded-corner-radius: 0.5rem;\nbackground-size: cover;\n// border: $card-border-width solid darken($red, 10%);\n// border-radius: $rounded-corner-radius;\n- margin: 1rem 0;\n+ // margin: 1rem 0;\nwidth: 100%;\n+ padding-bottom: 10vh;\nh1 {\nfont-family: $headings-font-family;\ncolor: $white;\n}\n+\n+ p {\n+ color: $gray-lighter;\n+ font-size: 1rem;\n+ }\n}\n.link-box-container {\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "Computer Science<br>without a computer\n{% endblocktrans %}\n</h1>\n- </div>\n- </div>\n<div class=\"row align-items-center\">\n- <div class=\"col-md-2 d-none d-md-block\">\n- <img class=\"img-fluid\" src=\"{% static \"img/general/computer-searching.png\" %}\">\n+ <div class=\"col-md-1 d-none d-md-block\">\n</div>\n- <div class=\"col-12 col-md-8\">\n+ <div class=\"col-12 col-md-10\">\n<p class=\"lead text-center\">\n{% blocktrans trimmed %}\nCS Unplugged is a collection of free teaching material that teaches Computer Science through engaging games and puzzles that use cards, string, crayons and lots of running around.\n{% endblocktrans %}\n</p>\n</div>\n- <div class=\"col-md-2 d-none d-md-block\">\n- <img class=\"img-fluid\" src=\"{% static \"img/general/detective.png\" %}\">\n+ <div class=\"col-md-1 d-none d-md-block\">\n+ </div>\n</div>\n</div>\n+ </div>\n+\n+\n" } ]
Python
MIT License
uccser/cs-unplugged
Add paragraph text to jumbotron Change colour of text Elongate jumbotron
701,855
12.12.2017 13:25:49
-46,800
63217f66e22a722dc2c69704294a04c05d86c84e
Add initial version of translators guide
[ { "change_type": "MODIFY", "old_path": "docs/source/author/translations.rst", "new_path": "docs/source/author/translations.rst", "diff": "Translations\n##############################################################################\n+.. note::\n+ This guide is a work in progress, as translation support for CS Unplugged is a recent addition.\n+ Many of the finer details of the translation workflow are likely to changes as translators begin to work on the project.\n+ Any roadblocks encountered and lessons learned will be used to refine the translation workflow and improve this guide.\n+\nGetting Started\n==============================================================================\n+It's really easy to start contributing translations using CS Unplugged\n+\n+1. Read this documentation page, especially the `Translation Notes`_ section.\n+2. Create an account on `Crowdin <https://crowdin.com/join>`_.\n+3. Read the Crowdin `documentation <https://support.crowdin.com/crowdin-intro/>`_ for translators.\n+4. Visit the CS Unplugged `development site <http://cs-unplugged-dev.appspot.com/>`_.\n+5. Switch to translation mode using the language drop down.\n+6. Log in with your Crowdin credentials and select a target language.\n+7. Start translating!\n+\n+Crowdin Overview\n+==============================================================================\n+We use a localisation management platform called `Crowdin <https://crowdin.com/project/cs-unplugged>`_ for translation of CS Unplugged.\n+Our project is public, meaning that anyone can create an account and contribute translations.\n+\n+Crowdin has excellent documentation for translators, and all translators should read the following documents:\n+\n+- `Crowdin Introduction <https://support.crowdin.com/crowdin-intro/>`_, which provides an overview of the Crowdin platform\n+- `Online Editor <https://support.crowdin.com/online-editor/>`_, which explains how to use the Crowdin UI to contribute translations.\n+ Note that this page is written about the full online editor on Crowdin.com, but most of the information is also relevant to the `in-context editor <In-Context Localisation_>`_ that we use.\n+\n+\n+Translation Phases\n+==============================================================================\n+There are 3 phases translation phases used to ensure high quality translation of CS Unplugged content:\n+\n+1. Translation\n+2. Proofread\n+3. Technical Review\n+\n+In the inital translation phase, anyone (who has created an account with Crowdin) can contribute translations.\n+These translations are then reviewed by a designated proofreader who will check the translations for accuracy and consistency.\n+To request to become a proofreader, please `contact <https://support.crowdin.com/joining-translation-project/#contacting-a-project-manager>`_ one of the Crowdin project managers.\n+\n+.. note::\n+ While not enforced by Crowdin, proofreaders should not approve their own translations.\n+ Instead, they should be reviewed by a different proofreader.\n+\n+Finally, a technical review will be performed by a member of the CS Unplugged technical team.\n+In this review, technical components such as Verto tags and document structure will be checked.\n+\nIn-Context Localisation\n==============================================================================\n+We utilise Crowdin's in-context localisation feature to allow content translation directly on the development website.\n+This lets translators see their translations appear as it will look on the final website, in real time.\n+\n+.. note::\n+\n+ Verto tags are an exception to this rule.\n+\n+ The verto tag text is rendered as raw text onto the front end, to allow translators to modify the tag if required.\n+ These raw text tags will never be visible in the final release, as they are parsed and removed during verto processing.\n+\n+ For technical reasons, any changes in the translation of a verto tag will not be rendered in-context translation mode, and will only be visible after the translated file is downloaded for release.\n+ See `here <../developer/translation_infrastructure.html#in-context-translation>`_ for more details.\n+\n+To use in-context translation features, simply visit the CS Unplugged `development site <http://cs-unplugged-dev.appspot.com/>`_, and use the language selector to select ``Translation Mode``.\n+\n+.. note::\n+ For bi-directional languages such as Hebrew and Arabic, translators should instead select ``Translation Mode (Bi-Directional)`` using the language selector.\n+\n+\n+In cases where in-context translation mode is not available, it is also possible to use the standard Crowdin UI.\n+To access this, visit the CS Unplugged project page on `Crowdin <https://crowdin.com/project/cs-unplugged>`_.\n+\nTranslation notes\n==============================================================================\n" } ]
Python
MIT License
uccser/cs-unplugged
Add initial version of translators guide
701,860
12.12.2017 14:38:33
-46,800
2ee85088b49a4fea3f62aaae20897a23c9041af4
Tried things.
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% trans \"CS Unplugged\" %}\n{% endblock custom_title %}\n+\n{% block body_container %}\n- <div class=\"row\">\n+<div class=\"container\">\n<div class=\"jumbotron jumbotron-fluid\">\n<div class=\"container\">\n<h1 class=\"display-3 text-center\">\nComputer Science<br>without a computer\n{% endblocktrans %}\n</h1>\n-\n+ <div class=\"container\">\n<div class=\"row align-items-center\">\n<div class=\"col-md-1 d-none d-md-block\">\n</div>\n</div>\n</div>\n</div>\n-\n-\n-\n-\n+ </div>\n+</div>\n+ <div class=\"row\">\n<div class=\"link-box-container justify-content-between\">\n<a class=\"link-box link-box-md-6 link-box-blue\" href=\"{% url 'general:about' %}\">\n" } ]
Python
MIT License
uccser/cs-unplugged
Tried things.
701,860
12.12.2017 15:01:26
-46,800
1e85bbabcc08cbc695b67f189dce0794ddb23285
make jumbotron take full width of screen thx jack
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@import url('https://fonts.googleapis.com/css?family=Sniglet');\n@import url('https://fonts.googleapis.com/css?family=Noto+Sans');\n-$body-space-from-top: 72px;\n+// $body-space-from-top: 72px;\n$ct-abstraction: #E30613;\n$ct-algorithm: #0B983A;\n$ct-decomposition: #DABB00;\n@@ -393,14 +393,18 @@ details {\n}\n}\n+$navbar-height: 50px;\n+$navbar-padding-bottom: 24px;\nbody {\n- padding-top: $body-space-from-top;\n+ padding-top: $navbar-height;\nposition: relative;\nbackground-color: $gray-100;\n}\n-\n+#content-container {\n+ padding-top: $navbar-padding-bottom;\n+}\n#sticky-sidebar {\n- top: $body-space-from-top;\n+ top: $navbar-height + $navbar-padding-bottom;\n}\n.sticky-top {\nz-index: 1020;\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "{% block breadcrumbs %}\n{% endblock breadcrumbs %}\n- <div id=\"content-container\" class=\"container\">\n{% block body_container %}\n+ <div id=\"content-container\" class=\"container\">\n{% render_breadcrumbs \"django_bootstrap_breadcrumbs/bootstrap4.html\" %}\n<div class=\"row\">\n<div class=\"col-12\">\n{% endblock end_content %}\n</div>\n</div>\n- {% endblock body_container %}\n</div>\n+ {% endblock body_container %}\n<div class=\"container white-footer mt-5 py-5\">\n<div class=\"row align-items-center text-center\">\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% block body_container %}\n-<div class=\"container\">\n<div class=\"jumbotron jumbotron-fluid\">\n<div class=\"container\">\n<h1 class=\"display-3 text-center\">\n</div>\n</div>\n</div>\n-</div>\n+\n+ <div class=\"container\">\n<div class=\"row\">\n<div class=\"link-box-container justify-content-between\">\n</a>\n</div>\n</div>\n+ </div>\n{% endblock body_container %}\n" } ]
Python
MIT License
uccser/cs-unplugged
make jumbotron take full width of screen thx jack
701,860
12.12.2017 17:16:26
-46,800
51505b9dfc9cc46b38229a0d208c530e419de032
add text-shadow to text (fixes
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@import url('https://fonts.googleapis.com/css?family=Sniglet');\n@import url('https://fonts.googleapis.com/css?family=Noto+Sans');\n-// $body-space-from-top: 72px;\n$ct-abstraction: #E30613;\n$ct-algorithm: #0B983A;\n$ct-decomposition: #DABB00;\n@@ -103,11 +102,9 @@ $rounded-corner-radius: 0.5rem;\n.jumbotron {\nbackground: url(\"../img/red-hero-banner.png\");\nbackground-size: cover;\n- // border: $card-border-width solid darken($red, 10%);\n- // border-radius: $rounded-corner-radius;\n- // margin: 1rem 0;\nwidth: 100%;\n- padding-bottom: 10vh;\n+ padding-bottom: 15vh;\n+ text-shadow: 0 2px 2px rgba(0,0,0,0.4);\nh1 {\nfont-family: $headings-font-family;\n" } ]
Python
MIT License
uccser/cs-unplugged
add text-shadow to text (fixes #698)
701,855
12.12.2017 18:11:41
-46,800
32ccf4ed9f3dd83124967ef0e6ff5bac0f75f107
PR Documentation Tidy-Ups
[ { "change_type": "MODIFY", "old_path": "docs/source/author/translations.rst", "new_path": "docs/source/author/translations.rst", "diff": "@@ -3,9 +3,10 @@ Translations\n.. note::\nThis guide is a work in progress, as translation support for CS Unplugged is a recent addition.\n- Many of the finer details of the translation workflow are likely to changes as translators begin to work on the project.\n+ Many of the finer details of the translation workflow are likely to change as translators begin to work on the project.\nAny roadblocks encountered and lessons learned will be used to refine the translation workflow and improve this guide.\n+\nGetting Started\n==============================================================================\n@@ -13,11 +14,10 @@ It's really easy to start contributing translations using CS Unplugged\n1. Read this documentation page, especially the `Translation Notes`_ section.\n2. Create an account on `Crowdin <https://crowdin.com/join>`__.\n-3. Read the Crowdin `documentation <https://support.crowdin.com/crowdin-intro/>`_ for translators.\n-4. Visit the CS Unplugged `development site <http://cs-unplugged-dev.appspot.com/>`_.\n-5. Switch to translation mode using the language drop down.\n-6. Log in with your Crowdin credentials and select a target language.\n-7. Start translating!\n+3. Visit the CS Unplugged `development site <http://cs-unplugged-dev.appspot.com/>`_.\n+4. Switch to translation mode using the language drop down.\n+5. Log in with your Crowdin credentials and select a target language.\n+6. Start translating!\nCrowdin Overview\n==============================================================================\n@@ -63,28 +63,26 @@ This lets translators see their translations appear as it will look on the final\nThese raw text tags will never be visible in the final release, as they are parsed and removed during verto processing.\nFor technical reasons, any changes in the translation of a verto tag will not be rendered in-context translation mode, and will only be visible after the translated file is downloaded for release.\n- See `here <../developer/translation_infrastructure.html#in-context-translation>`_ for more details.\n+ See :ref:`inContextTranslations` for more details.\nTo use in-context translation features, simply visit the CS Unplugged `development site <http://cs-unplugged-dev.appspot.com/>`_, and use the language selector to select ``Translation Mode``.\n.. note::\nFor bi-directional languages such as Hebrew and Arabic, translators should instead select ``Translation Mode (Bi-Directional)`` using the language selector.\n-\nIn cases where in-context translation mode is not available, it is also possible to use the standard Crowdin UI.\nTo access this, visit the CS Unplugged project page on `Crowdin <https://crowdin.com/project/cs-unplugged>`_.\n-\nTranslation notes\n==============================================================================\n.. note::\n- On Crowdin, markdown files are translated on a per-sentence basis. There may\n+ On Crowdin, Markdown files are translated on a per-sentence basis. There may\nbe some cases where this is not desirable, and some paragraph level restructuring\nis required to convey a concept in a given language.\n- In these cases, it's possible to work around this with tricks such as\n+ In these cases, it could be possible to work around this with tricks such as\n- translating one sentence into the translation box for another.\n- translating a sentence into a blank string.\n" }, { "change_type": "MODIFY", "old_path": "docs/source/developer/translation.rst", "new_path": "docs/source/developer/translation.rst", "diff": "@@ -5,7 +5,7 @@ Translation\nTranslation Principles\n=============================================================================\n-The following principles were used to guide the design of a translation system for CS Unplugged\\:.\n+The following principles were used to guide the design of a translation system for CS Unplugged:\n1. Translations should be 'first class citizens' - they should exist as independent entities from the source content, and be coupled as loosely as possible to it.\n2. Translated content should remain accessible even if the source material changes, and an updated translation is not yet available.\n@@ -15,12 +15,14 @@ The following principles were used to guide the design of a translation system f\nTranslatable Files\n=============================================================================\n-Translatable content is stored in two types of files:\n+Translatable content is stored in four types of files:\n- Markdown files, for content to be processed by Verto.\n- YAML files containg field translations for a given model type.\n+- HTML templates.\n+- Python code.\n-Both types of file are stored inside the directory tree for a given language (ie. the directory named using the django locale code).\n+The first two types of file are stored inside the directory tree for a given language (ie. the directory named using the Django locale code).\n.. note::\n@@ -50,6 +52,11 @@ Both types of file are stored inside the directory tree for a given language (ie\nThese files can be parsed and loaded using a `utility function <UtilityFunctions_>`_ on the ``TranslatableModelLoader`` base class.\n+For the latter two type of files, Django's built-in `translation support <https://docs.djangoproject.com/en/2.0/topics/i18n/>`_ is utilised to handle translatable strings.\n+In python code, text is wrapped in a ``ugettext`` function call (usually aliased to ``_``).\n+In HTML templates, text is wrapped in ``{% trans %}``/``{% blocktrans trimmed %}`` tags.\n+\n+\nTranslatable Model\n=============================================================================\n@@ -58,8 +65,8 @@ It is availabe in the file ``utils/TranslatableModel.py`` and should be subclass\nDjango Package - ``modeltranslation``\n******************************************************************************\n-The django modeltranslation package is utilised to stored translated content on a model.\n-The basic idea is that for each translatable field, an extra database column is added for every language defined in the django settings file.\n+The Django modeltranslation package is utilised to stored translated content on a model.\n+The basic idea is that for each translatable field, an extra database column is added for every language defined in the Django settings file.\nWhen the base field is accessed, ``modeltranslation`` performs some magic to retrieve the translation for the users language\n@@ -68,8 +75,8 @@ For more details, see the models already registered, or read the `modeltranslati\n.. note::\n- The default behaviour for modeltranslation is to fallback to the english value if no translation is present.\n- In CS Unplugged, this is desirable for fields such as name and title, but is often undesirable for most other fields (see `Translation Principles`_).\n+ The default behaviour for ``modeltranslation`` is to fallback to the English value if no translation is present.\n+ In CS Unplugged, this is desirable for text fields such as name and title, but is often undesirable for most other fields (see `Translation Principles`_).\nTo disable fallback for a given field:\n@@ -84,7 +91,7 @@ The ``TranslatableModel`` base class includes a mechanism to determine whether a\nThis mechanism consists of\n-- The ``languages`` field, which is an array field storing the django language codes for languages in which the model is available\n+- The ``languages`` field, which is an array field storing the Django language codes for languages in which the model is available\n- The ``translation_available`` property, which returns true if the model is available in the current language\nWhen creating the ``TranslatableModel`` instance, the list of available languages should be determined.\n" }, { "change_type": "MODIFY", "old_path": "docs/source/developer/translation_infrastructure.rst", "new_path": "docs/source/developer/translation_infrastructure.rst", "diff": "@@ -70,6 +70,7 @@ pass the following stages of review:\nThe first two review phases are enforced by a `custom workflow <https://support.crowdin.com/advanced-workflows/>`_ on Crowdin.\n+.. _inContextTranslations:\nIn-Context Translation\n==============================================================================\n" } ]
Python
MIT License
uccser/cs-unplugged
PR Documentation Tidy-Ups
701,860
18.12.2017 14:04:20
-46,800
67dcc6f9dd4cc5da7a79fa4cbb0978f8082308b1
replace 'resource' with 'printouts' front-end only.
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/index.html", "new_path": "csunplugged/templates/resources/index.html", "diff": "{% load django_bootstrap_breadcrumbs %}\n{% block title %}\n- {% trans \"Resources\" %}\n+ {% trans \"Printouts\" %}\n{% endblock title %}\n{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Resources\" \"resources:index\" %}\n+ {% breadcrumb \"Printouts\" \"resources:index\" %}\n{% endblock breadcrumbs %}\n{% block page_heading %}\n- <h1>{% trans \"Resources\" %}</h1>\n+ <h1>{% trans \"Printouts\" %}</h1>\n<p>\n{% blocktrans trimmed %}\n- This page diplays a complete list of all available resources.\n- If a lesson uses a resource, the lesson will contain a direct link to the\n- resource with a description on how to use it.\n+ This page diplays a complete list of all available printouts.\n+ If a lesson uses a printout, the lesson will contain a direct link to the\n+ printout with a description on how to use it.\n{% endblocktrans %}\n</p>\n{% endblock page_heading %}\n{% endfor %}\n</div>\n{% else %}\n- <p>{% trans \"No resources are available.\" %}</p>\n+ <p>{% trans \"No printouts are available.\" %}</p>\n{% endif %}\n{% endblock content %}\n" } ]
Python
MIT License
uccser/cs-unplugged
replace 'resource' with 'printouts' front-end only.
701,860
18.12.2017 14:13:23
-46,800
c17ae3dc93aed73b5b461385a396c7d7bdc535ae
Replaces 'resources' with 'printouts' on individual printouts pages front-end only
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/resource.html", "new_path": "csunplugged/templates/resources/resource.html", "diff": "{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Resources\" \"resources:index\" %}\n+ {% breadcrumb \"Printouts\" \"resources:index\" %}\n{% breadcrumb resource.name \"resources:resource\" resource.slug %}\n{% endblock breadcrumbs %}\n{% endblock page_heading %}\n{% block left_column_content %}\n- <h2>Create Resource</h2>\n+ <h2>Create Printout</h2>\n<form action=\"{% url 'resources:generate' resource.slug %}\" method=\"get\"{% if not debug %} target=\"_blank\"{% endif %} id=\"resource-generation-form\">\n{% block generation_form %}\n<hr>\n{% if debug %}\n- <input type=\"submit\" value=\"{% trans \"Generate Resource\" %}\" class=\"btn btn-outline-primary mb-3\" />\n+ <input type=\"submit\" value=\"{% trans \"Generate Printout\" %}\" class=\"btn btn-outline-primary mb-3\" />\n{% else %}\n{% if resource.copies %}\n<div class=\"alert alert-info\" role=\"alert\">\n{% blocktrans trimmed %}\n- The download of this resource includes {{ copies_amount }} unique copies.\n+ The download of this printout includes {{ copies_amount }} unique copies.\n{% endblocktrans %}\n</div>\n{% endif %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Replaces 'resources' with 'printouts' on individual printouts pages front-end only
701,860
08.01.2018 11:40:49
-46,800
4579415b71205ab421a76330d77947afb088a835
Change resources to printouts on Navbar
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n<div class=\"navbar-nav navbar-nav-i18n mr-auto\">\n<a class=\"nav-item nav-link\" href=\"{% url 'topics:index' %}\">{% trans \"Topics\" %}</a>\n- <a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Resources\" %}</a>\n+ <a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Printouts\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'general:about' %}\">{% trans \"About\" %}</a>\n</div>\n{% if LANGUAGES|length > 1 %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Change resources to printouts on Navbar
701,860
15.01.2018 13:17:36
-46,800
15dd817cae779f9d1f6c4209caf0a76cc603da2a
Replace 'CS Unplugged Resources' to 'Printouts' in Lessons
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/topics/lesson.html", "new_path": "csunplugged/templates/topics/lesson.html", "diff": "{% block right_column_content %}\n{% if lesson.translation_available %}\n{% if generated_resources %}\n- <h2>{% trans \"CS Unplugged resources\" %}</h2>\n+ <h2>{% trans \"Printouts\" %}</h2>\n<div class=\"row\">\n{% for generated_resource in generated_resources %}\n<div class=\"col-12 mb-4\">\n" } ]
Python
MIT License
uccser/cs-unplugged
Replace 'CS Unplugged Resources' to 'Printouts' in Lessons
701,860
17.01.2018 12:30:33
-46,800
6f9708c57e601845cd15fbab6da6fe6598ef4f53
Resize/reoptimize second batch of images.
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/binary_cards_equals_three.png", "new_path": "csunplugged/static/img/topics/binary_cards_equals_three.png", "diff": "Binary files a/csunplugged/static/img/topics/binary_cards_equals_three.png and b/csunplugged/static/img/topics/binary_cards_equals_three.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_2cards.png", "new_path": "csunplugged/static/img/topics/col_binary_2cards.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_2cards.png and b/csunplugged/static/img/topics/col_binary_2cards.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_3cards.png", "new_path": "csunplugged/static/img/topics/col_binary_3cards.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_3cards.png and b/csunplugged/static/img/topics/col_binary_3cards.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_5cards.png", "new_path": "csunplugged/static/img/topics/col_binary_5cards.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_5cards.png and b/csunplugged/static/img/topics/col_binary_5cards.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_bite_vs_byte.png", "new_path": "csunplugged/static/img/topics/col_binary_bite_vs_byte.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_bite_vs_byte.png and b/csunplugged/static/img/topics/col_binary_bite_vs_byte.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_counting_pattern.png", "new_path": "csunplugged/static/img/topics/col_binary_counting_pattern.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_counting_pattern.png and b/csunplugged/static/img/topics/col_binary_counting_pattern.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_2.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_2.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_4_bulbs_2.png and b/csunplugged/static/img/topics/lightbulb_series_4_bulbs_2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_3.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_3.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_4_bulbs_3.png and b/csunplugged/static/img/topics/lightbulb_series_4_bulbs_3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_4.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_4_bulbs_4.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_4_bulbs_4.png and b/csunplugged/static/img/topics/lightbulb_series_4_bulbs_4.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Resize/reoptimize second batch of images.
701,860
17.01.2018 12:38:00
-46,800
44d85985f49310ef4c732ecb2d102c13181af5e9
Resize/reoptimize third batch of images The lightbulb series
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_1.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_1.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_1.png and b/csunplugged/static/img/topics/lightbulb_series_1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_2.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_2.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_2.png and b/csunplugged/static/img/topics/lightbulb_series_2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_3.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_3.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_3.png and b/csunplugged/static/img/topics/lightbulb_series_3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/lightbulb_series_4.png", "new_path": "csunplugged/static/img/topics/lightbulb_series_4.png", "diff": "Binary files a/csunplugged/static/img/topics/lightbulb_series_4.png and b/csunplugged/static/img/topics/lightbulb_series_4.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Resize/reoptimize third batch of images The lightbulb series
701,860
17.01.2018 16:07:08
-46,800
28bd0c8d3dbd61964cfc08b560000703b8fca176
replace binary bot and boy converstaion image and right align
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_robot_boy_convo.png", "new_path": "csunplugged/static/img/topics/col_binary_robot_boy_convo.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_robot_boy_convo.png and b/csunplugged/static/img/topics/col_binary_robot_boy_convo.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/lessons/codes-for-letters-using-binary-representation.md", "new_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/lessons/codes-for-letters-using-binary-representation.md", "diff": "@@ -18,6 +18,8 @@ There is also an online interactive version of the binary cards [here](http://ww\n{panel end}\n+{image file-path=\"img/topics/col_binary_robot_boy_convo.png\" alt=\"Cartoon boy talking to robot\" alignment=\"right\"}\n+\nDiscuss how you would communicate a letter of the alphabet to someone if all\nyou could do is say a number between 0 and 26.\n*(Students will usually suggest using a code of 1 or a, 2 for b, and so on)*.\n@@ -25,7 +27,6 @@ you could do is say a number between 0 and 26.\nWork out and write down the binary numbers using 5 bits from 0 to 26 on the\nBinary to Alphabet resource, then add the letters of the alphabet.\n-{image file-path=\"img/topics/col_binary_robot_boy_convo.png\" alt=\"Cartoon boy talking to robot\" alignment=\"right\"}\n{panel type=\"teaching\" title=\"Teaching observations\"}\n" } ]
Python
MIT License
uccser/cs-unplugged
replace binary bot and boy converstaion image and right align
701,860
17.01.2018 17:01:35
-46,800
a5c638928bf9b21d699a17f453f2dea43247522a
Replace/optimize fourth batch of images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_birthdayFinal.png", "new_path": "csunplugged/static/img/topics/col_binary_birthdayFinal.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_birthdayFinal.png and b/csunplugged/static/img/topics/col_binary_birthdayFinal.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_cake.png", "new_path": "csunplugged/static/img/topics/col_binary_cake.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_cake.png and b/csunplugged/static/img/topics/col_binary_cake.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/col_binary_necklace_copy.png", "new_path": "csunplugged/static/img/topics/col_binary_necklace_copy.png", "diff": "Binary files a/csunplugged/static/img/topics/col_binary_necklace_copy.png and b/csunplugged/static/img/topics/col_binary_necklace_copy.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/lessons/codes-for-letters-using-binary-representation.md", "new_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/lessons/codes-for-letters-using-binary-representation.md", "diff": "@@ -18,7 +18,7 @@ There is also an online interactive version of the binary cards [here](http://ww\n{panel end}\n-{image file-path=\"img/topics/col_binary_robot_boy_convo.png\" alt=\"Cartoon boy talking to robot\" alignment=\"right\"}\n+{image file-path=\"img/topics/col_binary_robot_boy_convo.png\" alt=\"Cartoon boy talking to robot\" alignment=\"left\"}\nDiscuss how you would communicate a letter of the alphabet to someone if all\nyou could do is say a number between 0 and 26.\n" } ]
Python
MIT License
uccser/cs-unplugged
Replace/optimize fourth batch of images
701,860
18.01.2018 16:51:58
-46,800
f60139026e7e07bb74bcd3ad581b6d3cc953f920
Replace/optimize sixth batch of images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-2.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-2.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-2.png and b/csunplugged/static/img/topics/barcode-12-step-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-5.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-5.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-5.png and b/csunplugged/static/img/topics/barcode-12-step-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-6.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-6.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-6.png and b/csunplugged/static/img/topics/barcode-12-step-6.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-7.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-7.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-7.png and b/csunplugged/static/img/topics/barcode-12-step-7.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12.jpg", "new_path": "csunplugged/static/img/topics/barcode-12.jpg", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12.jpg and b/csunplugged/static/img/topics/barcode-12.jpg differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-2.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-2.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-2.png and b/csunplugged/static/img/topics/barcode-13-step-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-5.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-5.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-5.png and b/csunplugged/static/img/topics/barcode-13-step-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-6.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-6.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-6.png and b/csunplugged/static/img/topics/barcode-13-step-6.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-7.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-7.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-7.png and b/csunplugged/static/img/topics/barcode-13-step-7.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13.jpg", "new_path": "csunplugged/static/img/topics/barcode-13.jpg", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13.jpg and b/csunplugged/static/img/topics/barcode-13.jpg differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Replace/optimize sixth batch of images
701,860
18.01.2018 17:42:42
-46,800
d160cbf01d1b6b497d2b5f513ef2e1ae95cfab0f
Replaces/resizes images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/careers.png", "new_path": "csunplugged/static/img/topics/careers.png", "diff": "Binary files a/csunplugged/static/img/topics/careers.png and b/csunplugged/static/img/topics/careers.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kids-parity-trick.jpg", "new_path": "csunplugged/static/img/topics/kids-parity-trick.jpg", "diff": "Binary files a/csunplugged/static/img/topics/kids-parity-trick.jpg and b/csunplugged/static/img/topics/kids-parity-trick.jpg differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/program.png", "new_path": "csunplugged/static/img/topics/program.png", "diff": "Binary files a/csunplugged/static/img/topics/program.png and b/csunplugged/static/img/topics/program.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/shannon-juggling.png", "new_path": "csunplugged/static/img/topics/shannon-juggling.png", "diff": "Binary files a/csunplugged/static/img/topics/shannon-juggling.png and b/csunplugged/static/img/topics/shannon-juggling.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/teamwork.png", "new_path": "csunplugged/static/img/topics/teamwork.png", "diff": "Binary files a/csunplugged/static/img/topics/teamwork.png and b/csunplugged/static/img/topics/teamwork.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Replaces/resizes images
701,860
19.01.2018 15:57:17
-46,800
d569e3e647674b06d0e962b2bd9a6bdb7cb305aa
Replace/resize another batch of images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/exercise-2.png", "new_path": "csunplugged/static/img/topics/exercise-2.png", "diff": "Binary files a/csunplugged/static/img/topics/exercise-2.png and b/csunplugged/static/img/topics/exercise-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/exercise.png", "new_path": "csunplugged/static/img/topics/exercise.png", "diff": "Binary files a/csunplugged/static/img/topics/exercise.png and b/csunplugged/static/img/topics/exercise.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-1.png", "new_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-1.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-little-red-riding-hood-1.png and b/csunplugged/static/img/topics/kidbots-little-red-riding-hood-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-barriers.png", "new_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-barriers.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-little-red-riding-hood-barriers.png and b/csunplugged/static/img/topics/kidbots-little-red-riding-hood-barriers.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-2.png", "new_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-2.png", "diff": "Binary files a/csunplugged/static/img/topics/whiteboards-and-hula-hoop-2.png and b/csunplugged/static/img/topics/whiteboards-and-hula-hoop-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-3.png", "new_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-3.png", "diff": "Binary files a/csunplugged/static/img/topics/whiteboards-and-hula-hoop-3.png and b/csunplugged/static/img/topics/whiteboards-and-hula-hoop-3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-4.png", "new_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-4.png", "diff": "Binary files a/csunplugged/static/img/topics/whiteboards-and-hula-hoop-4.png and b/csunplugged/static/img/topics/whiteboards-and-hula-hoop-4.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-5.png", "new_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop-5.png", "diff": "Binary files a/csunplugged/static/img/topics/whiteboards-and-hula-hoop-5.png and b/csunplugged/static/img/topics/whiteboards-and-hula-hoop-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop.png", "new_path": "csunplugged/static/img/topics/whiteboards-and-hula-hoop.png", "diff": "Binary files a/csunplugged/static/img/topics/whiteboards-and-hula-hoop.png and b/csunplugged/static/img/topics/whiteboards-and-hula-hoop.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Replace/resize another batch of images
701,860
19.01.2018 16:30:51
-46,800
2aa3abf7f72f33a5722d53072de02bdc52b1dde6
Replaces/resizes more images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/geo-parrot-square.png", "new_path": "csunplugged/static/img/topics/geo-parrot-square.png", "diff": "Binary files a/csunplugged/static/img/topics/geo-parrot-square.png and b/csunplugged/static/img/topics/geo-parrot-square.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-geometry-plane-1.png", "new_path": "csunplugged/static/img/topics/kidbots-geometry-plane-1.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-geometry-plane-1.png and b/csunplugged/static/img/topics/kidbots-geometry-plane-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-geometry-plane-5.png", "new_path": "csunplugged/static/img/topics/kidbots-geometry-plane-5.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-geometry-plane-5.png and b/csunplugged/static/img/topics/kidbots-geometry-plane-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-alternative-story.png", "new_path": "csunplugged/static/img/topics/kidbots-little-red-riding-hood-alternative-story.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-little-red-riding-hood-alternative-story.png and b/csunplugged/static/img/topics/kidbots-little-red-riding-hood-alternative-story.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-numeracy-plane-1.png", "new_path": "csunplugged/static/img/topics/kidbots-numeracy-plane-1.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-numeracy-plane-1.png and b/csunplugged/static/img/topics/kidbots-numeracy-plane-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-rocket-1.png", "new_path": "csunplugged/static/img/topics/kidbots-rocket-1.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-rocket-1.png and b/csunplugged/static/img/topics/kidbots-rocket-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/kidbots-rocket-barriers.png", "new_path": "csunplugged/static/img/topics/kidbots-rocket-barriers.png", "diff": "Binary files a/csunplugged/static/img/topics/kidbots-rocket-barriers.png and b/csunplugged/static/img/topics/kidbots-rocket-barriers.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/modulo-10-clock.png", "new_path": "csunplugged/static/img/topics/modulo-10-clock.png", "diff": "Binary files a/csunplugged/static/img/topics/modulo-10-clock.png and b/csunplugged/static/img/topics/modulo-10-clock.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/modulo-2-clock.png", "new_path": "csunplugged/static/img/topics/modulo-2-clock.png", "diff": "Binary files a/csunplugged/static/img/topics/modulo-2-clock.png and b/csunplugged/static/img/topics/modulo-2-clock.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/odd-parroty-parity.png", "new_path": "csunplugged/static/img/topics/odd-parroty-parity.png", "diff": "Binary files a/csunplugged/static/img/topics/odd-parroty-parity.png and b/csunplugged/static/img/topics/odd-parroty-parity.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Replaces/resizes more images
701,860
23.01.2018 11:56:44
-46,800
f6a36a92391c7b8ade5616b31ce0ac0209b43b9b
replace searching images with resize/reoptimized images or animations
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/binary_detective.gif", "new_path": "csunplugged/static/img/topics/binary_detective.gif", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/binary_detective.gif differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/computer_searching.png", "new_path": "csunplugged/static/img/topics/computer_searching.png", "diff": "Binary files a/csunplugged/static/img/topics/computer_searching.png and b/csunplugged/static/img/topics/computer_searching.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/different-sized-haystacks.png", "new_path": "csunplugged/static/img/topics/different-sized-haystacks.png", "diff": "Binary files a/csunplugged/static/img/topics/different-sized-haystacks.png and b/csunplugged/static/img/topics/different-sized-haystacks.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sequential_detective.gif", "new_path": "csunplugged/static/img/topics/sequential_detective.gif", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sequential_detective.gif differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sequential_detective3.gif", "new_path": "csunplugged/static/img/topics/sequential_detective3.gif", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sequential_detective3.gif differ\n" } ]
Python
MIT License
uccser/cs-unplugged
replace searching images with resize/reoptimized images or animations
701,860
24.01.2018 15:00:49
-46,800
b7de716257bd59131e8e4b90aa4832bc253899d9
Change Printouts to Printables Change printouts to printables Change Printout to Printable Change printout to printable change remaining Resources to Printables
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<div class=\"collapse navbar-collapse\" id=\"navbarNav\">\n<div class=\"navbar-nav navbar-nav-i18n mr-auto\">\n<a class=\"nav-item nav-link\" href=\"{% url 'topics:index' %}\">{% trans \"Topics\" %}</a>\n- <a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Printouts\" %}</a>\n+ <a class=\"nav-item nav-link\" href=\"{% url 'resources:index' %}\">{% trans \"Printables\" %}</a>\n<a class=\"nav-item nav-link\" href=\"{% url 'general:about' %}\">{% trans \"About\" %}</a>\n</div>\n<form method=\"get\" action=\"{% url 'search:index' %}\">\n</li>\n<li>\n<a href=\"{% url 'resources:index' %}\">\n- {% trans \"Resources\" %}\n+ {% trans \"Printables\" %}\n</a>\n</li>\n</ul>\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "<div class=\"col-12 col-md-6 col-lg-4 mb-4\">\n<a class=\"link-item link-item-top link-item-top-teal no-text-decoration d-block h-100\" href=\"{% url 'resources:index' %}\">\n<h2 class=\"mb-0\">\n- {% trans \"Resources\" %}\n+ {% trans \"Printables\" %}\n</h2>\n</a>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/index.html", "new_path": "csunplugged/templates/resources/index.html", "diff": "{% load django_bootstrap_breadcrumbs %}\n{% block title %}\n- {% trans \"Printouts\" %}\n+ {% trans \"Printables\" %}\n{% endblock title %}\n{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Printouts\" \"resources:index\" %}\n+ {% breadcrumb \"Printables\" \"resources:index\" %}\n{% endblock breadcrumbs %}\n{% block page_heading %}\n- <h1>{% trans \"Printouts\" %}</h1>\n+ <h1>{% trans \"Printables\" %}</h1>\n<p>\n{% blocktrans trimmed %}\n- This page diplays a complete list of all available printouts.\n- If a lesson uses a printout, the lesson will contain a direct link to the\n- printout with a description on how to use it.\n+ This page diplays a complete list of all available Printables.\n+ If a lesson uses a Printable, the lesson will contain a direct link to the\n+ Printable with a description on how to use it.\n{% endblocktrans %}\n</p>\n{% endblock page_heading %}\n{% endfor %}\n</div>\n{% else %}\n- <p>{% trans \"No printouts are available.\" %}</p>\n+ <p>{% trans \"No Printables are available.\" %}</p>\n{% endif %}\n{% endblock content %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/resource.html", "new_path": "csunplugged/templates/resources/resource.html", "diff": "{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Printouts\" \"resources:index\" %}\n+ {% breadcrumb \"Printables\" \"resources:index\" %}\n{% breadcrumb resource.name \"resources:resource\" resource.slug %}\n{% endblock breadcrumbs %}\n{% endblock page_heading %}\n{% block left_column_content %}\n- <h2>Create Printout</h2>\n+ <h2>Create Printable</h2>\n<form action=\"{% url 'resources:generate' resource.slug %}\" method=\"get\"{% if not debug %} target=\"_blank\"{% endif %} id=\"resource-generation-form\">\n{% block generation_form %}\n<hr>\n{% if debug %}\n- <input type=\"submit\" value=\"{% trans \"Generate Printout\" %}\" class=\"btn btn-outline-primary mb-3\" />\n+ <input type=\"submit\" value=\"{% trans \"Generate Printable\" %}\" class=\"btn btn-outline-primary mb-3\" />\n{% else %}\n{% if resource.copies %}\n<div class=\"alert alert-info\" role=\"alert\">\n{% blocktrans trimmed %}\n- The download of this printout includes {{ copies_amount }} unique copies.\n+ The download of this Printable includes {{ copies_amount }} unique copies.\n{% endblocktrans %}\n</div>\n{% endif %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/topics/lesson.html", "new_path": "csunplugged/templates/topics/lesson.html", "diff": "{% block right_column_content %}\n{% if lesson.translation_available %}\n{% if generated_resources %}\n- <h2>{% trans \"Printouts\" %}</h2>\n+ <h2>{% trans \"Printables\" %}</h2>\n<div class=\"row\">\n{% for generated_resource in generated_resources %}\n<div class=\"col-12 mb-4\">\n" } ]
Python
MIT License
uccser/cs-unplugged
Change Printouts to Printables Change printouts to printables Change Printout to Printable Change printout to printable change remaining Resources to Printables
701,860
24.01.2018 15:38:17
-46,800
08d76034332d7b7ce35728f97fb511d6224fb094
Right align images fix sequential search detective gif
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/sequential_detective.gif", "new_path": "csunplugged/static/img/topics/sequential_detective.gif", "diff": "Binary files a/csunplugged/static/img/topics/sequential_detective.gif and b/csunplugged/static/img/topics/sequential_detective.gif differ\n" }, { "change_type": "DELETE", "old_path": "csunplugged/static/img/topics/sequential_detective3.gif", "new_path": "csunplugged/static/img/topics/sequential_detective3.gif", "diff": "Binary files a/csunplugged/static/img/topics/sequential_detective3.gif and /dev/null differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/unit-plan.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/unit-plan.md", "diff": "@@ -32,7 +32,7 @@ dozens of cards has been turned over, using the same kind of method that\ncomputers use to figure out when and where an error has occurred in a piece of\ndata.\n-{image file-path=\"img/topics/mug-with-barcode.png\"}\n+{image file-path=\"img/topics/mug-with-barcode.png\" alignment=\"right\"}\nA related technique is used on the barcodes printed on products to check that\nthey are scanned correctly at a checkout; the last digit in the product code is\n@@ -130,7 +130,7 @@ digit wrong?\nSomeone else might get charged for the item and person who mis-typed the number\nmight be accused of fraud just because of a simple typing mistake.\n-{image file-path=\"img/topics/cd-with-marks.png\"}\n+{image file-path=\"img/topics/cd-with-marks.png\" alignment=\"right\"}\nEverything stored by computers and sent between them is represented as bits\n(binary digits).\n" } ]
Python
MIT License
uccser/cs-unplugged
Right align images fix sequential search detective gif
701,860
24.01.2018 15:50:20
-46,800
78839e29917829229e4237396e04cc20f0e4dc18
fix alignment for error detection lessons
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic.md", "diff": "@@ -224,7 +224,7 @@ You can make a fuss that it might have been a fluke, so repeat the trick again.\n(After you put the card back to how it was originally, look away again and ask\nfor another card to be flipped over.)\n-{image file-path=\"img/topics/parity-wizard.png\" alt=\"A wizard holding a magic one with parity cards on it.\"}\n+{image file-path=\"img/topics/parity-wizard.png\" alt=\"A wizard holding a magic one with parity cards on it.\" alignment=\"right\"}\nSo is it magic? Or is it a trick?\n" } ]
Python
MIT License
uccser/cs-unplugged
fix alignment for error detection lessons
701,860
25.01.2018 11:00:38
-46,800
d3a050cd690a9b5befd6ccdf3ca1aa73a3ba2d8e
Update the current team members Add Past Team Members section
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/people.html", "new_path": "csunplugged/templates/general/people.html", "diff": "<ul>\n<li>Tim Bell - Founder &amp; Content Writer</li>\n- <li>Caitlin Duncan - Content Writer</li>\n<li>Tracy Henderson - Content Writer</li>\n- <li>Behshid Ghorbani - Content Writer</li>\n<li>Sarang Love Leehan - Creative Content Developer &amp; Illustrator</li>\n<li>Jack Morgan - Project Manager &amp; Technical Team</li>\n<li>Hayley van Waas - Technical Team</li>\n+ </ul>\n+\n+ <h3>{% trans \"Past Team Members\" %}</h3>\n+\n+ <ul>\n+ <li>Caitlin Duncan - Content Writer</li>\n+ <li>Behshid Ghorbani - Content Writer</li>\n<li>Hayden Jackson - Technical Team</li>\n<li>Jordan Griffiths - Technical Team</li>\n</ul>\n" } ]
Python
MIT License
uccser/cs-unplugged
Update the current team members Add Past Team Members section
701,860
25.01.2018 11:23:33
-46,800
f3182addabcd698e9c8f42bb3955b1a241c516d8
Place image in correct position (fixes
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/lessons/investigating-variations-using-the-sorting-network.md", "new_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/lessons/investigating-variations-using-the-sorting-network.md", "diff": "@@ -87,12 +87,12 @@ Have the students try the Sorting Network with some of these words (note that yo\nThere is also a number of words that have the letters in reverse alphabetical order, such as SPONGE and ZONKED (these can be sorted using the \"larger to the left\" variation, or can be read from the far side of the Sorting Network).\nSome words with this property have double letters in them, such as BELLOW; these will sort correctly, since the order of the double letters is immaterial.\n-{image file-path=\"img/topics/sorting-network-toffees-cellos-sponge.png\"}\n-\n{panel type=\"general\"}\n# List of words with letters in alphabetical order\n+{image file-path=\"img/topics/sorting-network-toffees-cellos-sponge.png\"}\n+\nHere is a longer list of 6-letter words that can be used for this exercise.\nThey are all from a dictionary, although some are rather obscure!\n" } ]
Python
MIT License
uccser/cs-unplugged
Place image in correct position (fixes #678)
701,860
26.01.2018 15:33:25
-46,800
2016d0c43abcd33b4427d050f1713cff7f8fd1cc
Undo printout back to resource
[ { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/index.html", "new_path": "csunplugged/templates/resources/index.html", "diff": "{% load django_bootstrap_breadcrumbs %}\n{% block title %}\n- {% trans \"Printouts\" %}\n+ {% trans \"Resources\" %}\n{% endblock title %}\n{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Printouts\" \"resources:index\" %}\n+ {% breadcrumb \"Resources\" \"resources:index\" %}\n{% endblock breadcrumbs %}\n{% block page_heading %}\n- <h1>{% trans \"Printouts\" %}</h1>\n+ <h1>{% trans \"Resources\" %}</h1>\n<p>\n{% blocktrans trimmed %}\n- This page diplays a complete list of all available printouts.\n+ This page diplays a complete list of all available resources.\nIf a lesson uses a resource, the lesson will contain a direct link to the\nresource with a description on how to use it.\n{% endblocktrans %}\n{% endfor %}\n</div>\n{% else %}\n- <p>{% trans \"No printouts are available.\" %}</p>\n+ <p>{% trans \"No resources are available.\" %}</p>\n{% endif %}\n{% endblock content %}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/resources/resource.html", "new_path": "csunplugged/templates/resources/resource.html", "diff": "{% block breadcrumbs %}\n{% breadcrumb \"Home\" \"/\" %}\n- {% breadcrumb \"Printouts\" \"resources:index\" %}\n+ {% breadcrumb \"Resources\" \"resources:index\" %}\n{% breadcrumb resource.name \"resources:resource\" resource.slug %}\n{% endblock breadcrumbs %}\n{% endblock page_heading %}\n{% block left_column_content %}\n- <h2>Create Printout</h2>\n+ <h2>Create Resource</h2>\n<form action=\"{% url 'resources:generate' resource.slug %}\" method=\"get\"{% if not debug %} target=\"_blank\"{% endif %} id=\"resource-generation-form\">\n{% block generation_form %}\n<hr>\n{% if debug %}\n- <input type=\"submit\" value=\"{% trans \"Generate Printout\" %}\" class=\"btn btn-outline-primary mb-3\" />\n+ <input type=\"submit\" value=\"{% trans \"Generate Resource\" %}\" class=\"btn btn-outline-primary mb-3\" />\n{% else %}\n{% if resource.copies %}\n<div class=\"alert alert-info\" role=\"alert\">\n{% blocktrans trimmed %}\n- The download of this printout includes {{ copies_amount }} unique copies.\n+ The download of this resource includes {{ copies_amount }} unique copies.\n{% endblocktrans %}\n</div>\n{% endif %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Undo printout back to resource
701,860
26.01.2018 16:19:17
-46,800
86a35e1fb13abfad9787524c8d05ffd443eed7fa
right align col_binary_01 right align binary_torch
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/unit-plan.md", "new_path": "csunplugged/topics/content/en/binary-numbers/unit-plan/unit-plan.md", "diff": "@@ -55,7 +55,7 @@ Humans normally use the decimal number system, which is base 10, so there are te\n## Real World Implications\n-{image file-path=\"img/topics/col_binary_01.png\"}\n+{image file-path=\"img/topics/col_binary_01.png\" alignment=\"right\"}\n- The number of bits used to represent characters in text affects the range of characters available; a short representation is more compact, but can't represent characters from all languages.\n" } ]
Python
MIT License
uccser/cs-unplugged
right align col_binary_01 right align binary_torch
701,860
26.01.2018 16:36:16
-46,800
70c26b42dd5ba8d9b1b1d74b17a15f1d444a22b4
right-align col_binary_cake.png
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/binary-numbers/curriculum-integrations/binary-or-normal-candles.md", "new_path": "csunplugged/topics/content/en/binary-numbers/curriculum-integrations/binary-or-normal-candles.md", "diff": "@@ -5,7 +5,7 @@ On a birthday cake we often use one candle for each year of age.\nBut since each candle can be either lit or not lit, we could use them to show a binary representation of your age.\nFor example, 14 years old is 1110 in binary, so you could represent it with four candles.\n-{image file-path=\"img/topics/col_binary_cake.png\"}\n+{image file-path=\"img/topics/col_binary_cake.png\" alignment=\"right\"}\nPersuade people to start using binary candles on their birthday cake.\n" } ]
Python
MIT License
uccser/cs-unplugged
right-align col_binary_cake.png
701,860
26.01.2018 16:44:08
-46,800
c204e0fc6021bcfe0ba817c0fbb4090c1272e5b6
resize and right-align parity-cards.png
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/parity-cards.png", "new_path": "csunplugged/static/img/topics/parity-cards.png", "diff": "Binary files a/csunplugged/static/img/topics/parity-cards.png and b/csunplugged/static/img/topics/parity-cards.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic-junior.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic-junior.md", "diff": "@@ -14,10 +14,10 @@ A demonstration of lesson one (\"Parity magic\") being taught is available here:\n# Notes on resources\n-{image file-path=\"img/topics/parity-cards.png\" alt=\"A pile of square cards with black on one side and white on the other side.\"}\n-\nYou will require:\n+{image file-path=\"img/topics/parity-cards.png\" alt=\"A pile of square cards with black on one side and white on the other side.\" alignment=\"right\"}\n+\n- A set of 36 \"fridge magnet\" cards, all identical with a different colour on\neach side (e.g. black and white); or non-magnetic cards, in which case the\ndemonstration should be done on a table-top or the floor.\n@@ -28,6 +28,7 @@ You will require:\nmagnetic sheet back to back.\nPaper (non-magnetic) cards can be made by cutting up a sheet of light card\nthat is a different colour on each side.\n+\n- A metal board (ideally a whiteboard) if magnetic cards are being used.\n- Each pair of children will need: a set of 36 (non-magnetic) cards as above.\n" } ]
Python
MIT License
uccser/cs-unplugged
resize and right-align parity-cards.png
701,860
29.01.2018 15:22:11
-46,800
d989c85491fa17819cd2d818ced4f41f878d958a
reoptimize 13 digit barcode images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-1.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-1.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-1.png and b/csunplugged/static/img/topics/barcode-13-step-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-2.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-2.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-2.png and b/csunplugged/static/img/topics/barcode-13-step-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-3.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-3.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-3.png and b/csunplugged/static/img/topics/barcode-13-step-3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-4.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-4.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-4.png and b/csunplugged/static/img/topics/barcode-13-step-4.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-5.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-5.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-5.png and b/csunplugged/static/img/topics/barcode-13-step-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-6.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-6.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-6.png and b/csunplugged/static/img/topics/barcode-13-step-6.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-13-step-7.png", "new_path": "csunplugged/static/img/topics/barcode-13-step-7.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-13-step-7.png and b/csunplugged/static/img/topics/barcode-13-step-7.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/error-correction-paint-tin.png", "new_path": "csunplugged/static/img/topics/error-correction-paint-tin.png", "diff": "Binary files a/csunplugged/static/img/topics/error-correction-paint-tin.png and b/csunplugged/static/img/topics/error-correction-paint-tin.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/product-code-check-digits.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/product-code-check-digits.md", "diff": "@@ -28,7 +28,7 @@ How many people do you know check their dockets at the supermarket or in a shop\n## Lesson starter\n-{image file-path=\"img/topics/error-correction-paint-tin.png\" alt=\"A black paint tin with paint across the name and barcode.\"}\n+{image file-path=\"img/topics/error-correction-paint-tin.png\" alt=\"A black paint tin with paint across the name and barcode.\" alignment=\"right\"}\nExplain to your class that you can calculate what the last digit will be on a\n12 or 13 digit product code (the number on a bar code).\n" } ]
Python
MIT License
uccser/cs-unplugged
reoptimize 13 digit barcode images
701,860
29.01.2018 15:37:30
-46,800
dd00bc1c5ef1d6bb5014a87c41b407efcbc859ff
Reoptimize 12 digit barcode images
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-1.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-1.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-1.png and b/csunplugged/static/img/topics/barcode-12-step-1.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-2.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-2.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-2.png and b/csunplugged/static/img/topics/barcode-12-step-2.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-3.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-3.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-3.png and b/csunplugged/static/img/topics/barcode-12-step-3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-4.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-4.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-4.png and b/csunplugged/static/img/topics/barcode-12-step-4.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-5.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-5.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-5.png and b/csunplugged/static/img/topics/barcode-12-step-5.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-6.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-6.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-6.png and b/csunplugged/static/img/topics/barcode-12-step-6.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/barcode-12-step-7.png", "new_path": "csunplugged/static/img/topics/barcode-12-step-7.png", "diff": "Binary files a/csunplugged/static/img/topics/barcode-12-step-7.png and b/csunplugged/static/img/topics/barcode-12-step-7.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Reoptimize 12 digit barcode images
701,860
29.01.2018 15:44:37
-46,800
e9d9bb3049f1627019f868475a7f1d2ea797dafc
right align claude shannon image
[ { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/curriculum-integrations/biographies-and-error-control-history.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/curriculum-integrations/biographies-and-error-control-history.md", "diff": "@@ -13,7 +13,7 @@ A biography:\n- Write about the significant events that happened in their lives\n- Write about the impact their work has had on other people\n-{image file-path=\"img/topics/shannon-juggling.png\" caption=\"true\" alt=\"person juggling on unicycle\"}\n+{image file-path=\"img/topics/shannon-juggling.png\" caption=\"true\" alt=\"person juggling on unicycle\" alignment=\"right\"}\nClaude Shannon\n" } ]
Python
MIT License
uccser/cs-unplugged
right align claude shannon image
701,860
29.01.2018 17:27:21
-46,800
b82b02915a1559d778bb01cdbbac5fcb69ae7b7c
Reoptimize 6 guesses images right align fitness 2 image and apple comparison image
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/6_guesses.png", "new_path": "csunplugged/static/img/topics/6_guesses.png", "diff": "Binary files a/csunplugged/static/img/topics/6_guesses.png and b/csunplugged/static/img/topics/6_guesses.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/kidbots/unit-plan/lessons/fitness-unplugged.md", "new_path": "csunplugged/topics/content/en/kidbots/unit-plan/lessons/fitness-unplugged.md", "diff": "@@ -22,7 +22,7 @@ Today we are going to write our own unplugged fitness app. Before we start we ne\n1. Brainstorm as a class all the different fitness exercises you could have in your programming language.\n- {image file-path=\"img/topics/exercise-2.png\" alt=\"Cartoon kids exercising\"}\n+ {image file-path=\"img/topics/exercise-2.png\" alt=\"Cartoon kids exercising\" alignment=\"right\"}\nIdeas to get you started include:\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/unit-plan-ct-links.md", "new_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/unit-plan-ct-links.md", "diff": "@@ -43,7 +43,7 @@ this is explained under the generalisation heading.\n# Decomposition\n-{image file-path=\"img/topics/sorting-network-comparing-apples.png\" alt=\"A person compares a large apple and a small apple.\"}\n+{image file-path=\"img/topics/sorting-network-comparing-apples.png\" alt=\"A person compares a large apple and a small apple.\" alignment=\"right\"}\nIn order to create an algorithm that can solve computational problems\neffectively using parallel processors, we must first be able decompose the task\n" } ]
Python
MIT License
uccser/cs-unplugged
Reoptimize 6 guesses images right align fitness 2 image and apple comparison image
701,860
30.01.2018 13:13:13
-46,800
9e8771e5f0363608d76e15193a5fdfebcdc16d47
add new sorting network cards
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-variation-music.png", "new_path": "csunplugged/static/img/topics/sorting-network-variation-music.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-variation-music.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-variation-words-2.png", "new_path": "csunplugged/static/img/topics/sorting-network-variation-words-2.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-variation-words-2.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-variation-words.png", "new_path": "csunplugged/static/img/topics/sorting-network-variation-words.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-variation-words.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
add new sorting network cards
701,860
05.02.2018 11:19:34
-46,800
ac9fac453fe913474cd1d4e5f32e87e587616f34
Illustrate sorting cards exemplars
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-example-cards-1.png", "new_path": "csunplugged/static/img/topics/sorting-network-example-cards-1.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-example-cards-1.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-example-cards-2.png", "new_path": "csunplugged/static/img/topics/sorting-network-example-cards-2.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-example-cards-2.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/sorting-network-example-cards-3.png", "new_path": "csunplugged/static/img/topics/sorting-network-example-cards-3.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/sorting-network-example-cards-3.png differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/lessons/reinforcing-numeracy-through-a-sorting-network.md", "new_path": "csunplugged/topics/content/en/sorting-networks/unit-plan/lessons/reinforcing-numeracy-through-a-sorting-network.md", "diff": "@@ -53,11 +53,11 @@ It's good to start with the single digit numbers to get students used to the\nsystem, and then provide more difficult numbers appropriate to the students'\nability level.\n-{image file-path=\"img/topics/sorting-network-example-cards-1.jpg\" alt=\"Two pieces of paper with single digit numbers printed on them.\"}\n+{image file-path=\"img/topics/sorting-network-example-cards-1.png\" alt=\"Two pieces of paper with single digit numbers printed on them.\"}\n-{image file-path=\"img/topics/sorting-network-example-cards-2.jpg\" alt=\"Two pieces of paper with seven digit numbers printed on them.\"}\n+{image file-path=\"img/topics/sorting-network-example-cards-2.png\" alt=\"Two pieces of paper with seven digit numbers printed on them.\"}\n-{image file-path=\"img/topics/sorting-network-example-cards-3.jpg\" alt=\"Two pieces of paper with fractions printed on them.\"}\n+{image file-path=\"img/topics/sorting-network-example-cards-3.png\" alt=\"Two pieces of paper with fractions printed on them.\"}\n{panel end}\n" } ]
Python
MIT License
uccser/cs-unplugged
Illustrate sorting cards exemplars
701,860
05.02.2018 12:31:25
-46,800
d7cd0721dc594be38f2e4af9724f5e3c0ef28b1d
Add searching cards animation
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/img/topics/cards-0.png", "new_path": "csunplugged/static/img/topics/cards-0.png", "diff": "Binary files a/csunplugged/static/img/topics/cards-0.png and b/csunplugged/static/img/topics/cards-0.png differ\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/searching_cards.gif", "new_path": "csunplugged/static/img/topics/searching_cards.gif", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/searching_cards.gif differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Add searching cards animation
701,860
05.02.2018 12:51:29
-46,800
fce59923a0f0a206526eac194d9102c9046a0970
Add parity cards animation
[ { "change_type": "ADD", "old_path": "csunplugged/static/img/topics/parity-cards.gif", "new_path": "csunplugged/static/img/topics/parity-cards.gif", "diff": "Binary files /dev/null and b/csunplugged/static/img/topics/parity-cards.gif differ\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic-junior.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic-junior.md", "diff": "@@ -98,71 +98,7 @@ Step 1: Example layout of a 5x5 grid set up by the volunteer.\n### Step by step adding a parity bit to each row and column\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-2.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 2: Adding parity bit for the first row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-3.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 3: Adding parity bit for the second row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-4.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 4: Adding parity bit for the third row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-5.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 5: Adding parity bit for the fourth row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-6.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 6: Adding parity bit for the fifth row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-7.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 7: Adding parity bit for the first column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-8.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 8: Adding parity bit for the second column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-9.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 9: Adding parity bit for the third column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-10.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 10: Adding parity bit for the fourth column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-11.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 11: Adding parity bit for the fifth column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-12.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 12: Adding parity bit for the sixth column.\n-\n-{image end}\n+{image file-path=\"img/topics/parity-cards.gif\"}\nThe last parity bit placed is useful because it will always work for both the column and row;\nif it doesn't match for both the row and column then you'll have made a mistake with one of the cards, and should go back and check them (try to not make it obvious that you're doing that).\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic.md", "new_path": "csunplugged/topics/content/en/error-detection-and-correction/unit-plan/lessons/parity-magic.md", "diff": "@@ -112,71 +112,7 @@ Step 1: Example layout of a 5x5 grid set up by the volunteer.\n### Step by step adding a parity bit to each row and column\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-2.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 2: Adding parity bit for the first row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-3.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 3: Adding parity bit for the second row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-4.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 4: Adding parity bit for the third row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-5.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 5: Adding parity bit for the fourth row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-6.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 6: Adding parity bit for the fifth row.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-7.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 7: Adding parity bit for the first column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-8.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 8: Adding parity bit for the second column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-9.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 9: Adding parity bit for the third column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-10.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 10: Adding parity bit for the fourth column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-11.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 11: Adding parity bit for the fifth column.\n-\n-{image end}\n-\n-{image file-path=\"img/topics/parity-cards-6x6-grid-step-12.png\" alt=\"Progress image of adding parity bits.\" caption=\"true\"}\n-\n-Step 12: Adding parity bit for the sixth column.\n-\n-{image end}\n+{image file-path=\"img/topics/parity-cards.gif\"}\nThe last parity bit placed is useful because it will always work for both the\ncolumn and row; if it doesn't match for both the row and column then you'll\n" } ]
Python
MIT License
uccser/cs-unplugged
Add parity cards animation
701,860
08.02.2018 14:48:00
-46,800
d4e7f9d93c3453a9332fafab5e35f9f25ea89750
Update the barcode checksum poster thumbnail (fixes
[ { "change_type": "MODIFY", "old_path": "csunplugged/resources/content/structure/resources.yaml", "new_path": "csunplugged/resources/content/structure/resources.yaml", "diff": "@@ -64,7 +64,7 @@ searching-cards:\ncopies: false\nbarcode-checksum-poster:\ngenerator-module: BarcodeChecksumPosterResourceGenerator\n- thumbnail-static-path: img/resources/barcode-checksum-poster/thumbnail.gif\n+ thumbnail-static-path: img/resources/barcode-checksum-poster/thumbnail.png\ncopies: false\npixel-painter:\ngenerator-module: PixelPainterResourceGenerator\n" }, { "change_type": "ADD", "old_path": "csunplugged/static/img/resources/barcode-checksum-poster/thumbnail.png", "new_path": "csunplugged/static/img/resources/barcode-checksum-poster/thumbnail.png", "diff": "Binary files /dev/null and b/csunplugged/static/img/resources/barcode-checksum-poster/thumbnail.png differ\n" } ]
Python
MIT License
uccser/cs-unplugged
Update the barcode checksum poster thumbnail (fixes #877)
701,860
09.02.2018 13:42:18
-46,800
caee31db3f4d98425bcd3e490ddabc3c47ea9bba
Add more space between logo and 'Topics'
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -132,6 +132,9 @@ $rounded-corner-radius: 0.5rem;\n#navbar-brand-logo {\nheight: 2rem;\n+ @include media-breakpoint-up(md) {\n+ padding-right: .5em;\n+ }\n}\n.navbar-nav .nav-link:hover {\n" } ]
Python
MIT License
uccser/cs-unplugged
Add more space between logo and 'Topics'
701,860
12.02.2018 13:09:40
-46,800
ac655d4279faa7b6c24789e9c8308b714cfd3a04
Resize search bar to be ~20% smaller
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -518,7 +518,8 @@ h1, h2, h3, h4, h5, h6, details {\nclear: both;\n}\n.icon {\n- display: inline-block;\n+ display: block;\n+ margin: auto;\nwidth: 1em;\nheight: 1em;\nstroke-width: 0;\n@@ -634,3 +635,13 @@ button:hover .icon {\nleft: 0;\n}\n}\n+\n+#search-navbar {\n+ input,\n+ button {\n+ line-height: 1.4 !important;\n+ padding-left: 0.4rem !important;\n+ padding-right: 0.4rem !important;\n+ // padding-top: 0.3rem !important;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<a class=\"nav-item nav-link\" href=\"{% url 'general:about' %}\">{% trans \"About\" %}</a>\n</div>\n<form method=\"get\" action=\"{% url 'search:index' %}\">\n- <div class=\"input-group\">\n+ <div class=\"input-group\" id=\"search-navbar\">\n<input type=\"text\" class=\"form-control form-control-sm border-0\" placeholder=\"Search\" aria-label=\"Search\" name=\"q\">\n<div class=\"input-group-append\">\n- <button class=\"btn btn-outline-light btn-sm px-2\" type=\"submit\">\n+ <button class=\"btn btn-outline-light btn-sm\" type=\"submit\">\n<!-- SVG from Icomoon-Free -->\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" class=\"icon icon-search\">\n<title>Search</title>\n" } ]
Python
MIT License
uccser/cs-unplugged
Resize search bar to be ~20% smaller
701,860
13.02.2018 13:25:03
-46,800
f3f00cbe423237df3c68c78cb01eac7e65f637a1
Add responsive transparent navbar on homescreen
[ { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/static/js/homepage.js", "diff": "+$(window).scroll(function() {\n+ if($(this).scrollTop() <= 50) /*height in pixels when the navbar becomes non opaque*/\n+ {\n+ $('.trans-navbar').removeClass('trans');\n+ } else {\n+ $('.trans-navbar').addClass('trans');\n+ }\n+});\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -99,6 +99,7 @@ $rounded-corner-radius: 0.5rem;\nbackground: url(\"../img/red-hero-banner.png\");\nbackground-size: cover;\nwidth: 100%;\n+ padding-top: 80px;\npadding-bottom: 60px;\ntext-shadow: 0 2px 2px rgba(0,0,0,0.4);\n@@ -298,6 +299,7 @@ body {\nposition: relative;\nbackground-color: $gray-100;\n}\n+\n#content-container {\npadding-top: $navbar-padding-bottom;\n}\n@@ -644,3 +646,13 @@ button:hover .icon {\npadding-right: 0.4rem !important;\n}\n}\n+\n+.trans-navbar.trans {\n+ background-color: $red;\n+ transition: background-color .5s ease 0s;\n+}\n+\n+.trans-navbar{\n+ background-color: rgba(0,0,0,0);\n+ transition: background-color .5s ease 0s;\n+}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/base.html", "new_path": "csunplugged/templates/base.html", "diff": "<meta name=\"theme-color\" content=\"#ffffff\">\n</head>\n<body style=\"text-align: {{LANGUAGE_START}};\">\n- <nav class=\"navbar fixed-top navbar-expand-md navbar-dark py-1 d-print-none\">\n+ <nav class=\"navbar fixed-top navbar-expand-md navbar-dark py-1 d-print-none trans-navbar\">\n<div class=\"container px-0\">\n<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarNav\" aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n<span class=\"navbar-toggler-icon\"></span>\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% block body_container %}\n+ <style>body { padding-top: 0px !important; }</style>\n<div class=\"jumbotron jumbotron-fluid\">\n<div class=\"container\">\n<h1 class=\"text-center\">\n</div>\n</div>\n{% endblock body_container %}\n+\n+{% block scripts %}\n+ <script src=\"{% static 'js/homepage.js' %}\"></script>\n+{% endblock scripts %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Add responsive transparent navbar on homescreen
701,860
13.02.2018 14:42:34
-46,800
c9a6c512aa659dac32bb0509742c8e530391c3d4
Remove navbar transparency on other pages
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/js/homepage.js", "new_path": "csunplugged/static/js/homepage.js", "diff": "$(window).scroll(function() {\n- if($(this).scrollTop() <= 50) /*height in pixels when the navbar becomes non opaque*/\n+ if($(this).scrollTop() > 50) /*height in pixels when the navbar becomes transparent*/\n{\n$('.trans-navbar').removeClass('trans');\n} else {\n" }, { "change_type": "ADD", "old_path": null, "new_path": "csunplugged/static/scss/homepage.scss", "diff": "+@import \"bootstrap-overrides\";\n+\n+.trans-navbar {\n+ background-color: $red;\n+ transition: background-color .5s ease 0s;\n+}\n+\n+.trans-navbar.trans {\n+ background-color: rgba(0,0,0,0);\n+ transition: background-color .5s ease 0s;\n+}\n+\n+body {\n+ padding-top: 0px !important;\n+}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -647,12 +647,12 @@ button:hover .icon {\n}\n}\n-.trans-navbar.trans {\n- background-color: $red;\n- transition: background-color .5s ease 0s;\n-}\n-\n-.trans-navbar{\n- background-color: rgba(0,0,0,0);\n- transition: background-color .5s ease 0s;\n-}\n+// .trans-navbar.trans {\n+// background-color: $red;\n+// transition: background-color .5s ease 0s;\n+// }\n+//\n+// .trans-navbar{\n+// background-color: rgba(0,0,0,0);\n+// transition: background-color .5s ease 0s;\n+// }\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% block body_container %}\n- <style>body { padding-top: 0px !important; }</style>\n<div class=\"jumbotron jumbotron-fluid\">\n<div class=\"container\">\n<h1 class=\"text-center\">\n{% endblock body_container %}\n{% block scripts %}\n+ <link rel=\"stylesheet\" href=\"{% static 'css/homepage.css' %}\">\n<script src=\"{% static 'js/homepage.js' %}\"></script>\n{% endblock scripts %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove navbar transparency on other pages
701,860
13.02.2018 17:10:42
-46,800
e3fa420da9157bd27380def7464001c9de0810b9
Make navbar transparent from load.
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/js/homepage.js", "new_path": "csunplugged/static/js/homepage.js", "diff": "$(window).scroll(function() {\nif($(this).scrollTop() > 50) /*height in pixels when the navbar becomes transparent*/\n{\n- $('.trans-navbar').removeClass('trans');\n+ $('.trans-navbar').addClass('opaque');\n} else {\n- $('.trans-navbar').addClass('trans');\n+ $('.trans-navbar').removeClass('opaque');\n}\n});\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/homepage.scss", "new_path": "csunplugged/static/scss/homepage.scss", "diff": "@import \"bootstrap-overrides\";\n-.trans-navbar {\n+.trans-navbar.opaque {\nbackground-color: $red;\ntransition: background-color .5s ease 0s;\n}\n-.trans-navbar.trans {\n+.trans-navbar {\nbackground-color: rgba(0,0,0,0);\ntransition: background-color .5s ease 0s;\n}\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -646,13 +646,3 @@ button:hover .icon {\npadding-right: 0.4rem !important;\n}\n}\n-\n-// .trans-navbar.trans {\n-// background-color: $red;\n-// transition: background-color .5s ease 0s;\n-// }\n-//\n-// .trans-navbar{\n-// background-color: rgba(0,0,0,0);\n-// transition: background-color .5s ease 0s;\n-// }\n" } ]
Python
MIT License
uccser/cs-unplugged
Make navbar transparent from load.
701,860
14.02.2018 11:09:30
-46,800
89ac483eb651da3581a1376ef5f972f1fc4247e4
Remove redundant homepage.scss
[ { "change_type": "DELETE", "old_path": "csunplugged/static/scss/homepage.scss", "new_path": null, "diff": "-@import \"bootstrap-overrides\";\n" }, { "change_type": "MODIFY", "old_path": "csunplugged/templates/general/index.html", "new_path": "csunplugged/templates/general/index.html", "diff": "{% endblock body_container %}\n{% block scripts %}\n- <link rel=\"stylesheet\" href=\"{% static 'css/homepage.css' %}\">\n<script src=\"{% static 'js/homepage.js' %}\"></script>\n{% endblock scripts %}\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove redundant homepage.scss
701,860
14.02.2018 11:36:05
-46,800
a3a2f588ef7b71082f06695c49647b382cde7328
Remove unnescessary comments
[ { "change_type": "MODIFY", "old_path": "csunplugged/general/views.py", "new_path": "csunplugged/general/views.py", "diff": "@@ -15,9 +15,7 @@ class GeneralIndexView(TemplateView):\nReturns:\nDictionary of context data.\n\"\"\"\n- # Call the base implementation first to get a context\ncontext = super(GeneralIndexView, self).get_context_data(**kwargs)\n- # Add in a QuerySet of all the connected unit plans\ncontext[\"homepage\"] = True\nreturn context\n" } ]
Python
MIT License
uccser/cs-unplugged
Remove unnescessary comments
701,860
15.02.2018 13:40:20
-46,800
b46b4818792037fecdfa0a6990fc44847b11d1f6
Add whtie border around menu button on mobile view
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/bootstrap-overrides.scss", "new_path": "csunplugged/static/scss/bootstrap-overrides.scss", "diff": "@@ -76,4 +76,4 @@ $link-hover-decoration: underline;\n$navbar-dark-color: $white;\n$navbar-dark-hover-color: $white;\n$navbar-dark-toggler-icon-bg: str-replace(url(\"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E\"), \"#\", \"%23\");\n-$navbar-dark-toggler-border-color: $red;\n+$navbar-dark-toggler-border-color: $white;\n" } ]
Python
MIT License
uccser/cs-unplugged
Add whtie border around menu button on mobile view
701,860
15.02.2018 13:50:36
-46,800
654386d2df2a1b0ecfd4488c58df38ef1aa683c0
Add dropshadow to navbar
[ { "change_type": "MODIFY", "old_path": "csunplugged/static/scss/website.scss", "new_path": "csunplugged/static/scss/website.scss", "diff": "@@ -129,11 +129,13 @@ $rounded-corner-radius: 0.5rem;\n.trans-navbar {\nbackground-color: rgba(0,0,0,0) !important;\n+ box-shadow: 0px 0px 0px 0px #ffffff00 !important;\n}\n.navbar {\nbackground-color: $red;\ntransition: background-color .5s ease 0s;\n+ box-shadow: 0px 0px 3px 0px #6b0a19;\n#navbar-brand-logo {\nheight: 2rem;\n" } ]
Python
MIT License
uccser/cs-unplugged
Add dropshadow to navbar