Skip to content

Commit 5946e9f

Browse files
committed
Add boolean fields to Project
1 parent 357b411 commit 5946e9f

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 5.2.14 on 2026-06-24 09:50
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("base", "0117_userprofile_editor_theme"),
9+
]
10+
11+
operations = [
12+
migrations.AddField(
13+
model_name="project",
14+
name="set_locales_from_repo",
15+
field=models.BooleanField(
16+
default=False,
17+
help_text="\n Control target locales by their directories' presence in the target repository,\n or in the root locales config if `configuration_file` is not None.\n ",
18+
),
19+
),
20+
migrations.AddField(
21+
model_name="project",
22+
name="set_translated_resources_from_repo",
23+
field=models.BooleanField(
24+
default=False,
25+
help_text="\n If `set_locales_from_repo` is True and `configuration_file` is None,\n setting `set_translated_resources_from_repo` to True will\n control the availability of each resource for translation in each locale\n according to the presence of a file (even if empty) at its expected target path.\n\n If `set_locales_from_repo` is False or `configuration_file` is not None,\n this control has no effect.\n ",
26+
),
27+
),
28+
]

pontoon/base/models/project.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,27 @@ class Visibility(models.TextChoices):
237237
""",
238238
)
239239

240+
set_locales_from_repo = models.BooleanField(
241+
default=False,
242+
help_text="""
243+
Control target locales by their directories' presence in the target repository,
244+
or in the root locales config if `configuration_file` is not None.
245+
""",
246+
)
247+
248+
set_translated_resources_from_repo = models.BooleanField(
249+
default=False,
250+
help_text="""
251+
If `set_locales_from_repo` is True and `configuration_file` is None,
252+
setting `set_translated_resources_from_repo` to True will
253+
control the availability of each resource for translation in each locale
254+
according to the presence of a file (even if empty) at its expected target path.
255+
256+
If `set_locales_from_repo` is False or `configuration_file` is not None,
257+
this control has no effect.
258+
""",
259+
)
260+
240261
objects = ProjectQuerySet.as_manager()
241262

242263
project_locale: "ProjectLocaleQuerySet"

0 commit comments

Comments
 (0)