The different Zetkin projects do not use consistent indentation within YAML locale files. Some use 2 spaces, and some use 4. In order to keep the "git diff" as small as possible, we want to be able to configure the indentation used in a project so that when the new YAML files are generated they have the same indentation that was already used in the project.
Create Language objects in the Django Admin for each language in the project.
From here you can create a Project object. Once you make the changes, you should see the field for the indentation spaces used in the form for Project objects.
Validating your work
To check your work is correct, this is what is expected:
Set up a project using the steps above. Set any value of indentation you wish.
Click the checkbox for your project and from the actions dropdown select: "Export locale files"
Open the downloaded files and check the indentation is correct.
Requirements
There should be an integer field on the Project model that representations the number of spaces that are used for indentation.
The default value should be 4.
When locale files are generated, the indentation should be correct for the project.
There should be a small test case that this functionality works as expected.
Description
The different Zetkin projects do not use consistent indentation within YAML locale files. Some use 2 spaces, and some use 4. In order to keep the "git diff" as small as possible, we want to be able to configure the indentation used in a project so that when the new YAML files are generated they have the same indentation that was already used in the project.
Files that you will work with
Set up the environment
localhost:8000/admin
and sign in with the superuserFrom here you can create a Project object. Once you make the changes, you should see the field for the indentation spaces used in the form for Project objects.
Validating your work
To check your work is correct, this is what is expected:
Requirements