diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..5cf262c --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,37 @@ +name: Django CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.12] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + cd core + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run Django Tests + run: | + cd core + python manage.py test + - name: Run PIP Tests + run: | + cd i18nilize + python3 -m tests.test_read_file + python3 -m tests.test_parse_json \ No newline at end of file diff --git a/core/i18nilize/models.py b/core/i18nilize/models.py index c225700..a2d98fa 100644 --- a/core/i18nilize/models.py +++ b/core/i18nilize/models.py @@ -11,7 +11,7 @@ def __str__(self): return str(self.value) class Translation(models.Model): - token = models.foreignKey(Token, on_delete=models.CASCADE) - original_word = models.charField(max_length = 255) - translated_word = models.charField(max_length = 255) - language = models.charField(max_length = 255) \ No newline at end of file + token = models.ForeignKey(Token, on_delete=models.CASCADE) + original_word = models.CharField(max_length = 255) + translated_word = models.CharField(max_length = 255) + language = models.CharField(max_length = 255) \ No newline at end of file diff --git a/i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc b/i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..6350b0b Binary files /dev/null and b/i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc differ diff --git a/i18nilize/src/internationalize/__pycache__/helpers.cpython-312.pyc b/i18nilize/src/internationalize/__pycache__/helpers.cpython-312.pyc new file mode 100644 index 0000000..945a4fe Binary files /dev/null and b/i18nilize/src/internationalize/__pycache__/helpers.cpython-312.pyc differ diff --git a/i18nilize/src/internationalize/__pycache__/localize.cpython-312.pyc b/i18nilize/src/internationalize/__pycache__/localize.cpython-312.pyc new file mode 100644 index 0000000..1f73387 Binary files /dev/null and b/i18nilize/src/internationalize/__pycache__/localize.cpython-312.pyc differ diff --git a/i18nilize/tests/__pycache__/__init__.cpython-312.pyc b/i18nilize/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..92ab834 Binary files /dev/null and b/i18nilize/tests/__pycache__/__init__.cpython-312.pyc differ diff --git a/i18nilize/tests/__pycache__/test_parse_json.cpython-312.pyc b/i18nilize/tests/__pycache__/test_parse_json.cpython-312.pyc new file mode 100644 index 0000000..2ad95fb Binary files /dev/null and b/i18nilize/tests/__pycache__/test_parse_json.cpython-312.pyc differ diff --git a/i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc b/i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc new file mode 100644 index 0000000..6c479b7 Binary files /dev/null and b/i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc differ