Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add or improve verbose text

Marcin Gębalac77547e9dcd4
diff --git a/saleor/product/migrations/0001_initial.py b/saleor/product/migrations/0001_initial.py
index 83360fcc03..378e487180 100644
--- a/saleor/product/migrations/0001_initial.py
+++ b/saleor/product/migrations/0001_initial.py
@@ -21,9 +21,9 @@ class Migration(migrations.Migration):
name='AttributeChoiceValue',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('display', models.CharField(max_length=100)),
- ('color', models.CharField(blank=True, max_length=7, validators=[django.core.validators.RegexValidator('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$')])),
- ('image', versatileimagefield.fields.VersatileImageField(null=True, upload_to='attributes', blank=True)),
+ ('display', models.CharField(max_length=100, verbose_name='display name')),
+ ('color', models.CharField(blank=True, max_length=7, verbose_name='color', validators=[django.core.validators.RegexValidator('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$')])),
+ ('image', versatileimagefield.fields.VersatileImageField(upload_to='attributes', null=True, verbose_name='image', blank=True)),
],
),
migrations.CreateModel(
@@ -68,8 +68,8 @@ class Migration(migrations.Migration):
name='ProductAttribute',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
- ('name', models.SlugField(unique=True, verbose_name='name')),
- ('display', models.CharField(max_length=100, verbose_name='display')),
+ ('name', models.SlugField(unique=True, verbose_name='internal name')),
+ ('display', models.CharField(max_length=100, verbose_name='display name')),
],
options={
'ordering': ['name'],
diff --git a/saleor/product/models/base.py b/saleor/product/models/base.py
index 641d4cdf3c..b9f640f8ae 100644
--- a/saleor/product/models/base.py
+++ b/saleor/product/models/base.py
@@ -246,10 +246,10 @@ class Stock(models.Model):
@python_2_unicode_compatible
class ProductAttribute(models.Model):
name = models.SlugField(
- pgettext_lazy('Product attribute field', 'name'),
+ pgettext_lazy('Product attribute field', 'internal name'),
max_length=50, unique=True)
display = models.CharField(
- pgettext_lazy('Product attribute field', 'display'),
+ pgettext_lazy('Product attribute field', 'display name'),
max_length=100)
class Meta:
@@ -267,12 +267,17 @@ class ProductAttribute(models.Model):
@python_2_unicode_compatible
class AttributeChoiceValue(models.Model):
- display = models.CharField(max_length=100)
+ display = models.CharField(
+ pgettext_lazy('Attribute choice value field', 'display name'),
+ max_length=100)
color = models.CharField(
+ pgettext_lazy('Attribute choice value field', 'color'),
max_length=7,
validators=[RegexValidator('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$')],
blank=True)
- image = VersatileImageField(upload_to='attributes', blank=True, null=True)
+ image = VersatileImageField(
+ pgettext_lazy('Attribute choice value field', 'image'),
+ upload_to='attributes', blank=True, null=True)
attribute = models.ForeignKey(ProductAttribute, related_name='values')
def __str__(self):