Skip to content

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

Improve label contextes

akjanik60c6ea7f7cb2
diff --git a/saleor/dashboard/category/forms.py b/saleor/dashboard/category/forms.py
index 916f951fcf..a594aeea61 100644
--- a/saleor/dashboard/category/forms.py
+++ b/saleor/dashboard/category/forms.py
@@ -25,17 +25,14 @@ class CategoryForm(forms.ModelForm):
exclude = ['slug']
labels = {
'name': pgettext_lazy(
- 'Category name',
+ 'Item name',
'Name'),
'description': pgettext_lazy(
- 'Category description',
+ 'Item description',
'Description'),
'is_hidden': pgettext_lazy(
- 'Hide in site navigation',
- 'Hide in site navigation'),
- 'parent': pgettext_lazy(
- 'Category parent',
- 'Category parent')}
+ 'Hide in site navigation toggle',
+ 'Hide in site navigation')}
def save(self, commit=True):
self.instance.slug = slugify(unidecode(self.instance.name))
diff --git a/saleor/dashboard/discount/forms.py b/saleor/dashboard/discount/forms.py
index 59e86bc3d6..89348b900f 100644
--- a/saleor/dashboard/discount/forms.py
+++ b/saleor/dashboard/discount/forms.py
@@ -26,17 +26,17 @@ class SaleForm(forms.ModelForm):
'Sale name',
'Name'),
'type': pgettext_lazy(
- 'Fixed or percentage',
+ 'Discount type',
'Fixed or percentage'),
'value': pgettext_lazy(
- 'Sale value',
+ 'Percentage or fixed amount value',
'Value'),
'products': pgettext_lazy(
- 'Products in sale',
- 'Products in sale'),
+ 'Discounted products',
+ 'Discounted products'),
'categories': pgettext_lazy(
- 'Categories',
- 'Categories')}
+ 'Discounted categories',
+ 'Discounted categories')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -58,29 +58,26 @@ class VoucherForm(forms.ModelForm):
class Meta:
model = Voucher
- exclude = ['limit', 'apply_to', 'product', 'category']
+ exclude = ['limit', 'apply_to', 'product', 'category', 'used']
labels = {
'type': pgettext_lazy(
'Discount type',
'Discount type'),
'name': pgettext_lazy(
- 'Voucher name',
+ 'Item name',
'Name'),
'code': pgettext_lazy(
- 'Voucher code',
+ 'Coupon code',
'Code'),
'usage_limit': pgettext_lazy(
'Usage limit',
'Usage limit'),
- 'used': pgettext_lazy(
- 'Number of used vouchers',
- 'Number of used vouchers'),
'start_date': pgettext_lazy(
- 'Discount start date',
- 'Discount start date'),
+ 'Voucher date restrictions',
+ 'Start date'),
'end_date': pgettext_lazy(
- 'Discount end date',
- 'Discount end date')}
+ 'Voucher date restrictions',
+ 'End date')}
def __init__(self, *args, **kwargs):
initial = kwargs.get('initial', {})
diff --git a/saleor/dashboard/group/forms.py b/saleor/dashboard/group/forms.py
index 138503c5d3..fa82e0bda4 100644
--- a/saleor/dashboard/group/forms.py
+++ b/saleor/dashboard/group/forms.py
@@ -10,8 +10,8 @@ class GroupPermissionsForm(forms.ModelForm):
model = Group
fields = ['name', 'permissions']
labels = {
- 'name': pgettext_lazy('Group name', 'Name'),
- 'permissions': pgettext_lazy('Group permission', 'Permission')}
+ 'name': pgettext_lazy('Item name', 'Name'),
+ 'permissions': pgettext_lazy('Permissions', 'Permissions')}
permissions = forms.ModelMultipleChoiceField(
queryset=get_permissions(),
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.py
index 4e5315c7f9..ece6b87122 100644
--- a/saleor/dashboard/order/forms.py
+++ b/saleor/dashboard/order/forms.py
@@ -156,7 +156,7 @@ class ChangeQuantityForm(forms.ModelForm):
fields = ['quantity']
labels = {
'quantity': pgettext_lazy(
- 'Quantity', 'Quantity')}
+ 'Integer number', 'Quantity')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -195,7 +195,7 @@ class ShipGroupForm(forms.ModelForm):
fields = ['tracking_number']
labels = {
'tracking_number': pgettext_lazy(
- 'Shipment tracking number', 'Tracking number')}
+ 'Integer number', 'Tracking number')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -294,7 +294,7 @@ class ChangeStockForm(forms.ModelForm):
fields = ['stock']
labels = {
'stock': pgettext_lazy(
- 'Stock amount', 'Stock amount')}
+ 'Stock record', 'Stock')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py
index db477c647b..ae5a683f05 100644
--- a/saleor/dashboard/product/forms.py
+++ b/saleor/dashboard/product/forms.py
@@ -31,9 +31,9 @@ class StockForm(forms.ModelForm):
'location': pgettext_lazy(
'Stock location', 'Location'),
'quantity': pgettext_lazy(
- 'Stock quantity', 'Quantity'),
+ 'Integer number', 'Quantity'),
'cost_price': pgettext_lazy(
- 'Stock price', 'Cost price')}
+ 'Currency amount', 'Cost price')}
def __init__(self, *args, **kwargs):
self.variant = kwargs.pop('variant')
@@ -62,19 +62,19 @@ class ProductClassForm(forms.ModelForm):
exclude = []
labels = {
'name': pgettext_lazy(
- 'Product name',
+ 'Item name',
'Name'),
'has_variants': pgettext_lazy(
'Enable variants',
'Enable variants'),
'variant_attributes': pgettext_lazy(
- 'Attributes specific to each variant',
+ 'Product type attributes',
'Attributes specific to each variant'),
'product_attributes': pgettext_lazy(
- 'Attributes common to all variants',
+ 'Product type attributes',
'Attributes common to all variants'),
'is_shipping_required': pgettext_lazy(
- 'Require shipping',
+ 'Shipping toggle',
'Require shipping')}
def clean(self):
@@ -114,16 +114,16 @@ class ProductForm(forms.ModelForm):
class Meta:
model = Product
- exclude = ['attributes', 'product_class']
+ exclude = ['attributes', 'product_class', 'updated_at']
labels = {
- 'name': pgettext_lazy('Product name', 'Name'),
- 'description': pgettext_lazy('Product description', 'Description'),
+ 'name': pgettext_lazy('Item name', 'Name'),
+ 'description': pgettext_lazy('Item description', 'Description'),
'categories': pgettext_lazy('Categories', 'Categories'),
- 'price': pgettext_lazy('Product price', 'Price'),
+ 'price': pgettext_lazy('Price', 'Price'),
'available_on': pgettext_lazy(
- 'Availability', 'Availability'),
- 'updated_at': pgettext_lazy('Last updated', 'Last updated'),
- 'is_published': pgettext_lazy('Published', 'Published'),
+ 'Availability date', 'Availability date'),
+ 'is_published': pgettext_lazy(
+ 'Product published toggle', 'Published'),
'is_featured': pgettext_lazy(
'Featured product toggle', 'Feature this product on homepage')}
@@ -176,7 +176,7 @@ class ProductVariantForm(forms.ModelForm):
'sku': pgettext_lazy('SKU', 'SKU'),
'price_override': pgettext_lazy(
'Override price', 'Override price'),
- 'name': pgettext_lazy('Product name', 'Name')}
+ 'name': pgettext_lazy('Product variant name', 'Name')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -263,7 +263,7 @@ class ProductImageForm(forms.ModelForm):
labels = {
'image': pgettext_lazy('Product image', 'Image'),
'alt': pgettext_lazy(
- 'Short description', 'Short description')}
+ 'Product image description', 'Short description')}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -297,9 +297,9 @@ class ProductAttributeForm(forms.ModelForm):
exclude = []
labels = {
'name': pgettext_lazy(
- 'Display name', 'Display name'),
+ 'Product display name', 'Display name'),
'slug': pgettext_lazy(
- 'Internal name', 'Internal name')}
+ 'Product internal name', 'Internal name')}
class StockLocationForm(forms.ModelForm):
diff --git a/saleor/dashboard/shipping/forms.py b/saleor/dashboard/shipping/forms.py
index 1148bb6f82..28ad25b7a9 100644
--- a/saleor/dashboard/shipping/forms.py
+++ b/saleor/dashboard/shipping/forms.py
@@ -11,7 +11,7 @@ class ShippingMethodForm(forms.ModelForm):
exclude = []
labels = {
'name': pgettext_lazy(
- 'Shipping method name', 'Name'),
+ 'Item name', 'Name'),
'description': pgettext_lazy(
'Description', 'Description')}
@@ -24,8 +24,6 @@ class ShippingMethodCountryForm(forms.ModelForm):
widgets = {'shipping_method': forms.widgets.HiddenInput()}
labels = {
'country_code': pgettext_lazy(
- 'Country code', 'Country code'),
- 'shipping_method': pgettext_lazy(
- 'Shipping method', 'Shipping method'),
+ 'List of countries', 'Country'),
'price': pgettext_lazy(
- 'Price', 'Price')}
+ 'Decimal number (currency field)', 'Price')}
diff --git a/saleor/dashboard/sites/forms.py b/saleor/dashboard/sites/forms.py
index beb5ce6596..da15ca9b71 100644
--- a/saleor/dashboard/sites/forms.py
+++ b/saleor/dashboard/sites/forms.py
@@ -11,7 +11,7 @@ class SiteForm(forms.ModelForm):
exclude = []
labels = {
'domain': pgettext_lazy(
- 'Domain name', 'Domain name'),
+ 'Domain name (FQDN)', 'Domain name'),
'name': pgettext_lazy(
'Display name', 'Display name')}
@@ -24,7 +24,7 @@ class SiteSettingsForm(forms.ModelForm):
'header_text': pgettext_lazy(
'Header text', 'Header text'),
'description': pgettext_lazy(
- 'Site description', 'Description')}
+ 'Description', 'Description')}
class AuthorizationKeyForm(forms.ModelForm):
@@ -35,11 +35,11 @@ class AuthorizationKeyForm(forms.ModelForm):
'site_settings': pgettext_lazy(
'Site settings', 'Settings'),
'key': pgettext_lazy(
- 'Key', 'Key'),
+ 'Key for chosen authorization method', 'Key'),
'password': pgettext_lazy(
'Password', 'Password'),
'name': pgettext_lazy(
- 'Authorization key name', 'Name')}
+ 'Item name', 'Name')}
widgets = {'password': forms.PasswordInput(render_value=True),
'key': forms.TextInput(),
'site_settings': forms.widgets.HiddenInput()}
diff --git a/saleor/dashboard/staff/forms.py b/saleor/dashboard/staff/forms.py
index 9108129e05..a5a5f90eff 100644
--- a/saleor/dashboard/staff/forms.py
+++ b/saleor/dashboard/staff/forms.py
@@ -22,6 +22,6 @@ class StaffForm(forms.ModelForm):
'groups': pgettext_lazy(
'Groups', 'Groups'),
'is_active': pgettext_lazy(
- 'User is active', 'User is active'),
+ 'User active toggle', 'User is active'),
'is_staff': pgettext_lazy(
- 'User has access to dashboard', 'Has access to dashboard')}
+ 'User dashboard access toggle', 'Has access to dashboard')}
diff --git a/saleor/userprofile/i18n.py b/saleor/userprofile/i18n.py
index 85b988f36e..04bff66023 100644
--- a/saleor/userprofile/i18n.py
+++ b/saleor/userprofile/i18n.py
@@ -61,9 +61,7 @@ class AddressMetaForm(forms.ModelForm):
fields = ['country', 'preview']
labels = {
'country': pgettext_lazy(
- 'Country', 'Country'),
- 'preview': pgettext_lazy(
- 'Address preview', 'Preview')}
+ 'Country', 'Country')}
def clean(self):
data = super().clean()
@@ -95,15 +93,15 @@ class AddressForm(forms.ModelForm):
exclude = []
labels = {
'first_name': pgettext_lazy(
- 'First name', 'Given name'),
+ 'Person\'s name', 'Given name'),
'last_name': pgettext_lazy(
- 'Last name', 'Family name'),
+ 'Person\'s surname', 'Family name'),
'company_name': pgettext_lazy(
'Company or organization', 'Company or organization'),
'street_address_1': pgettext_lazy(
- 'First address', 'Address'),
+ 'Address', 'Address'),
'street_address_2': pgettext_lazy(
- 'Second address', 'Address'),
+ 'Address', 'Address'),
'city': pgettext_lazy(
'City', 'City'),
'city_area': pgettext_lazy(