Add translation strings for part models

This commit is contained in:
Oliver Walters 2019-11-19 08:42:10 +11:00
parent 39f9aa6141
commit 5ffbfe8eb8
4 changed files with 483 additions and 51 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-16 09:28+0000\n"
"POT-Creation-Date: 2019-11-18 21:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -324,6 +324,14 @@ msgstr ""
msgid "Select currency for price calculation"
msgstr ""
#: part/models.py:56
msgid "Default location for parts in this category"
msgstr ""
#: part/models.py:59
msgid "Default keywords for parts in this category"
msgstr ""
#: part/models.py:308
msgid "Part must be unique for name, IPN and revision"
msgstr ""
@ -336,10 +344,150 @@ msgstr ""
msgid "Part cannot be a variant of another part if it is already a template"
msgstr ""
#: part/models.py:327 part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/models.py:331
msgid "Is this part a template part?"
msgstr ""
#: part/models.py:340
msgid "Is this part a variant of another part?"
msgstr ""
#: part/models.py:342
msgid "Part description"
msgstr ""
#: part/models.py:344
msgid "Part keywords to improve visibility in search results"
msgstr ""
#: part/models.py:349
msgid "Part category"
msgstr ""
#: part/models.py:351
msgid "Internal Part Number"
msgstr ""
#: part/models.py:353
msgid "Part revision or version number"
msgstr ""
#: part/models.py:355
msgid "Link to extenal URL"
msgstr ""
#: part/models.py:361
msgid "Where is this item normally stored?"
msgstr ""
#: part/models.py:405
msgid "Default supplier part"
msgstr ""
#: part/models.py:408
msgid "Minimum allowed stock level"
msgstr ""
#: part/models.py:410
msgid "Stock keeping units for this part"
msgstr ""
#: part/models.py:412
msgid "Can this part be built from other parts?"
msgstr ""
#: part/models.py:414
msgid "Can this part be used to build other parts?"
msgstr ""
#: part/models.py:416
msgid "Does this part have tracking for unique items?"
msgstr ""
#: part/models.py:418
msgid "Can this part be purchased from external suppliers?"
msgstr ""
#: part/models.py:420
msgid "Can this part be sold to customers?"
msgstr ""
#: part/models.py:422
msgid "Is this part active?"
msgstr ""
#: part/models.py:424
msgid "Is this a virtual part, such as a software product or license?"
msgstr ""
#: part/models.py:428
msgid "Stored BOM checksum"
msgstr ""
#: part/models.py:935
msgid "Select file to attach"
msgstr ""
#: part/models.py:937
msgid "File comment"
msgstr ""
#: part/models.py:992
msgid "Parameter template name must be unique"
msgstr ""
#: part/models.py:997
msgid "Parameter Name"
msgstr ""
#: part/models.py:999
msgid "Parameter Units"
msgstr ""
#: part/models.py:1025
msgid "Parent Part"
msgstr ""
#: part/models.py:1027
msgid "Parameter Template"
msgstr ""
#: part/models.py:1029
msgid "Parameter Value"
msgstr ""
#: part/models.py:1053
msgid "Select parent part"
msgstr ""
#: part/models.py:1061
msgid "Select part to be used in BOM"
msgstr ""
#: part/models.py:1067
msgid "BOM quantity for this BOM item"
msgstr ""
#: part/models.py:1070
msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr ""
#: part/models.py:1073
msgid "BOM item reference"
msgstr ""
#: part/models.py:1076
msgid "BOM item notes"
msgstr ""
#: part/models.py:1078
msgid "BOM line checksum"
msgstr ""
#: part/models.py:1141
msgid "Part cannot be added to its own Bill of Materials"
msgstr ""
@ -393,10 +541,6 @@ msgstr ""
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-16 09:28+0000\n"
"POT-Creation-Date: 2019-11-18 21:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -324,6 +324,14 @@ msgstr ""
msgid "Select currency for price calculation"
msgstr ""
#: part/models.py:56
msgid "Default location for parts in this category"
msgstr ""
#: part/models.py:59
msgid "Default keywords for parts in this category"
msgstr ""
#: part/models.py:308
msgid "Part must be unique for name, IPN and revision"
msgstr ""
@ -336,10 +344,150 @@ msgstr ""
msgid "Part cannot be a variant of another part if it is already a template"
msgstr ""
#: part/models.py:327 part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/models.py:331
msgid "Is this part a template part?"
msgstr ""
#: part/models.py:340
msgid "Is this part a variant of another part?"
msgstr ""
#: part/models.py:342
msgid "Part description"
msgstr ""
#: part/models.py:344
msgid "Part keywords to improve visibility in search results"
msgstr ""
#: part/models.py:349
msgid "Part category"
msgstr ""
#: part/models.py:351
msgid "Internal Part Number"
msgstr ""
#: part/models.py:353
msgid "Part revision or version number"
msgstr ""
#: part/models.py:355
msgid "Link to extenal URL"
msgstr ""
#: part/models.py:361
msgid "Where is this item normally stored?"
msgstr ""
#: part/models.py:405
msgid "Default supplier part"
msgstr ""
#: part/models.py:408
msgid "Minimum allowed stock level"
msgstr ""
#: part/models.py:410
msgid "Stock keeping units for this part"
msgstr ""
#: part/models.py:412
msgid "Can this part be built from other parts?"
msgstr ""
#: part/models.py:414
msgid "Can this part be used to build other parts?"
msgstr ""
#: part/models.py:416
msgid "Does this part have tracking for unique items?"
msgstr ""
#: part/models.py:418
msgid "Can this part be purchased from external suppliers?"
msgstr ""
#: part/models.py:420
msgid "Can this part be sold to customers?"
msgstr ""
#: part/models.py:422
msgid "Is this part active?"
msgstr ""
#: part/models.py:424
msgid "Is this a virtual part, such as a software product or license?"
msgstr ""
#: part/models.py:428
msgid "Stored BOM checksum"
msgstr ""
#: part/models.py:935
msgid "Select file to attach"
msgstr ""
#: part/models.py:937
msgid "File comment"
msgstr ""
#: part/models.py:992
msgid "Parameter template name must be unique"
msgstr ""
#: part/models.py:997
msgid "Parameter Name"
msgstr ""
#: part/models.py:999
msgid "Parameter Units"
msgstr ""
#: part/models.py:1025
msgid "Parent Part"
msgstr ""
#: part/models.py:1027
msgid "Parameter Template"
msgstr ""
#: part/models.py:1029
msgid "Parameter Value"
msgstr ""
#: part/models.py:1053
msgid "Select parent part"
msgstr ""
#: part/models.py:1061
msgid "Select part to be used in BOM"
msgstr ""
#: part/models.py:1067
msgid "BOM quantity for this BOM item"
msgstr ""
#: part/models.py:1070
msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr ""
#: part/models.py:1073
msgid "BOM item reference"
msgstr ""
#: part/models.py:1076
msgid "BOM item notes"
msgstr ""
#: part/models.py:1078
msgid "BOM line checksum"
msgstr ""
#: part/models.py:1141
msgid "Part cannot be added to its own Bill of Materials"
msgstr ""
@ -393,10 +541,6 @@ msgstr ""
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-16 09:28+0000\n"
"POT-Creation-Date: 2019-11-18 21:41+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -324,6 +324,14 @@ msgstr ""
msgid "Select currency for price calculation"
msgstr ""
#: part/models.py:56
msgid "Default location for parts in this category"
msgstr ""
#: part/models.py:59
msgid "Default keywords for parts in this category"
msgstr ""
#: part/models.py:308
msgid "Part must be unique for name, IPN and revision"
msgstr ""
@ -336,10 +344,150 @@ msgstr ""
msgid "Part cannot be a variant of another part if it is already a template"
msgstr ""
#: part/models.py:327 part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/models.py:331
msgid "Is this part a template part?"
msgstr ""
#: part/models.py:340
msgid "Is this part a variant of another part?"
msgstr ""
#: part/models.py:342
msgid "Part description"
msgstr ""
#: part/models.py:344
msgid "Part keywords to improve visibility in search results"
msgstr ""
#: part/models.py:349
msgid "Part category"
msgstr ""
#: part/models.py:351
msgid "Internal Part Number"
msgstr ""
#: part/models.py:353
msgid "Part revision or version number"
msgstr ""
#: part/models.py:355
msgid "Link to extenal URL"
msgstr ""
#: part/models.py:361
msgid "Where is this item normally stored?"
msgstr ""
#: part/models.py:405
msgid "Default supplier part"
msgstr ""
#: part/models.py:408
msgid "Minimum allowed stock level"
msgstr ""
#: part/models.py:410
msgid "Stock keeping units for this part"
msgstr ""
#: part/models.py:412
msgid "Can this part be built from other parts?"
msgstr ""
#: part/models.py:414
msgid "Can this part be used to build other parts?"
msgstr ""
#: part/models.py:416
msgid "Does this part have tracking for unique items?"
msgstr ""
#: part/models.py:418
msgid "Can this part be purchased from external suppliers?"
msgstr ""
#: part/models.py:420
msgid "Can this part be sold to customers?"
msgstr ""
#: part/models.py:422
msgid "Is this part active?"
msgstr ""
#: part/models.py:424
msgid "Is this a virtual part, such as a software product or license?"
msgstr ""
#: part/models.py:428
msgid "Stored BOM checksum"
msgstr ""
#: part/models.py:935
msgid "Select file to attach"
msgstr ""
#: part/models.py:937
msgid "File comment"
msgstr ""
#: part/models.py:992
msgid "Parameter template name must be unique"
msgstr ""
#: part/models.py:997
msgid "Parameter Name"
msgstr ""
#: part/models.py:999
msgid "Parameter Units"
msgstr ""
#: part/models.py:1025
msgid "Parent Part"
msgstr ""
#: part/models.py:1027
msgid "Parameter Template"
msgstr ""
#: part/models.py:1029
msgid "Parameter Value"
msgstr ""
#: part/models.py:1053
msgid "Select parent part"
msgstr ""
#: part/models.py:1061
msgid "Select part to be used in BOM"
msgstr ""
#: part/models.py:1067
msgid "BOM quantity for this BOM item"
msgstr ""
#: part/models.py:1070
msgid "Estimated build wastage quantity (absolute or percentage)"
msgstr ""
#: part/models.py:1073
msgid "BOM item reference"
msgstr ""
#: part/models.py:1076
msgid "BOM item notes"
msgstr ""
#: part/models.py:1078
msgid "BOM line checksum"
msgstr ""
#: part/models.py:1141
msgid "Part cannot be added to its own Bill of Materials"
msgstr ""
@ -393,10 +541,6 @@ msgstr ""
msgid "Parts"
msgstr ""
#: part/templates/part/detail.html:16
msgid "Part name"
msgstr ""
#: part/templates/part/detail.html:21
msgid "IPN"
msgstr ""

View File

@ -53,10 +53,10 @@ class PartCategory(InvenTreeTree):
'stock.StockLocation', related_name="default_categories",
null=True, blank=True,
on_delete=models.SET_NULL,
help_text='Default location for parts in this category'
help_text=_('Default location for parts in this category')
)
default_keywords = models.CharField(blank=True, max_length=250, help_text='Default keywords for parts in this category')
default_keywords = models.CharField(blank=True, max_length=250, help_text=_('Default keywords for parts in this category'))
def get_absolute_url(self):
return reverse('category-detail', kwargs={'pk': self.id})
@ -324,11 +324,11 @@ class Part(models.Model):
})
name = models.CharField(max_length=100, blank=False,
help_text='Part name',
help_text=_('Part name'),
validators=[validators.validate_part_name]
)
is_template = models.BooleanField(default=False, help_text='Is this part a template part?')
is_template = models.BooleanField(default=False, help_text=_('Is this part a template part?'))
variant_of = models.ForeignKey('part.Part', related_name='variants',
null=True, blank=True,
@ -337,28 +337,28 @@ class Part(models.Model):
'active': True,
},
on_delete=models.SET_NULL,
help_text='Is this part a variant of another part?')
help_text=_('Is this part a variant of another part?'))
description = models.CharField(max_length=250, blank=False, help_text='Part description')
description = models.CharField(max_length=250, blank=False, help_text=_('Part description'))
keywords = models.CharField(max_length=250, blank=True, help_text='Part keywords to improve visibility in search results')
keywords = models.CharField(max_length=250, blank=True, help_text=_('Part keywords to improve visibility in search results'))
category = TreeForeignKey(PartCategory, related_name='parts',
null=True, blank=True,
on_delete=models.DO_NOTHING,
help_text='Part category')
help_text=_('Part category'))
IPN = models.CharField(max_length=100, blank=True, help_text='Internal Part Number')
IPN = models.CharField(max_length=100, blank=True, help_text=_('Internal Part Number'))
revision = models.CharField(max_length=100, blank=True, help_text='Part revision or version number')
revision = models.CharField(max_length=100, blank=True, help_text=_('Part revision or version number'))
URL = InvenTreeURLField(blank=True, help_text='Link to extenal URL')
URL = InvenTreeURLField(blank=True, help_text=_('Link to extenal URL'))
image = models.ImageField(upload_to=rename_part_image, max_length=255, null=True, blank=True)
default_location = TreeForeignKey('stock.StockLocation', on_delete=models.SET_NULL,
blank=True, null=True,
help_text='Where is this item normally stored?',
help_text=_('Where is this item normally stored?'),
related_name='default_parts')
def get_default_location(self):
@ -402,30 +402,30 @@ class Part(models.Model):
default_supplier = models.ForeignKey(SupplierPart,
on_delete=models.SET_NULL,
blank=True, null=True,
help_text='Default supplier part',
help_text=_('Default supplier part'),
related_name='default_parts')
minimum_stock = models.PositiveIntegerField(default=0, validators=[MinValueValidator(0)], help_text='Minimum allowed stock level')
minimum_stock = models.PositiveIntegerField(default=0, validators=[MinValueValidator(0)], help_text=_('Minimum allowed stock level'))
units = models.CharField(max_length=20, default="pcs", blank=True, help_text='Stock keeping units for this part')
units = models.CharField(max_length=20, default="pcs", blank=True, help_text=_('Stock keeping units for this part'))
assembly = models.BooleanField(default=False, verbose_name='Assembly', help_text='Can this part be built from other parts?')
assembly = models.BooleanField(default=False, verbose_name='Assembly', help_text=_('Can this part be built from other parts?'))
component = models.BooleanField(default=True, verbose_name='Component', help_text='Can this part be used to build other parts?')
component = models.BooleanField(default=True, verbose_name='Component', help_text=_('Can this part be used to build other parts?'))
trackable = models.BooleanField(default=False, help_text='Does this part have tracking for unique items?')
trackable = models.BooleanField(default=False, help_text=_('Does this part have tracking for unique items?'))
purchaseable = models.BooleanField(default=True, help_text='Can this part be purchased from external suppliers?')
purchaseable = models.BooleanField(default=True, help_text=_('Can this part be purchased from external suppliers?'))
salable = models.BooleanField(default=False, help_text="Can this part be sold to customers?")
salable = models.BooleanField(default=False, help_text=_("Can this part be sold to customers?"))
active = models.BooleanField(default=True, help_text='Is this part active?')
active = models.BooleanField(default=True, help_text=_('Is this part active?'))
virtual = models.BooleanField(default=False, help_text='Is this a virtual part, such as a software product or license?')
virtual = models.BooleanField(default=False, help_text=_('Is this a virtual part, such as a software product or license?'))
notes = models.TextField(blank=True)
bom_checksum = models.CharField(max_length=128, blank=True, help_text='Stored BOM checksum')
bom_checksum = models.CharField(max_length=128, blank=True, help_text=_('Stored BOM checksum'))
bom_checked_by = models.ForeignKey(User, on_delete=models.SET_NULL, blank=True, null=True,
related_name='boms_checked')
@ -932,9 +932,9 @@ class PartAttachment(models.Model):
related_name='attachments')
attachment = models.FileField(upload_to=attach_file,
help_text='Select file to attach')
help_text=_('Select file to attach'))
comment = models.CharField(max_length=100, help_text='File comment')
comment = models.CharField(max_length=100, help_text=_('File comment'))
@property
def basename(self):
@ -994,9 +994,9 @@ class PartParameterTemplate(models.Model):
except PartParameterTemplate.DoesNotExist:
pass
name = models.CharField(max_length=100, help_text='Parameter Name', unique=True)
name = models.CharField(max_length=100, help_text=_('Parameter Name'), unique=True)
units = models.CharField(max_length=25, help_text='Parameter Units', blank=True)
units = models.CharField(max_length=25, help_text=_('Parameter Units'), blank=True)
class PartParameter(models.Model):
@ -1022,11 +1022,11 @@ class PartParameter(models.Model):
# Prevent multiple instances of a parameter for a single part
unique_together = ('part', 'template')
part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='parameters', help_text='Parent Part')
part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='parameters', help_text=_('Parent Part'))
template = models.ForeignKey(PartParameterTemplate, on_delete=models.CASCADE, related_name='instances', help_text='Parameter Template')
template = models.ForeignKey(PartParameterTemplate, on_delete=models.CASCADE, related_name='instances', help_text=_('Parameter Template'))
data = models.CharField(max_length=500, help_text='Parameter Value')
data = models.CharField(max_length=500, help_text=_('Parameter Value'))
class BomItem(models.Model):
@ -1050,7 +1050,7 @@ class BomItem(models.Model):
# A link to the parent part
# Each part will get a reverse lookup field 'bom_items'
part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='bom_items',
help_text='Select parent part',
help_text=_('Select parent part'),
limit_choices_to={
'assembly': True,
})
@ -1058,7 +1058,7 @@ class BomItem(models.Model):
# A link to the child item (sub-part)
# Each part will get a reverse lookup field 'used_in'
sub_part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='used_in',
help_text='Select part to be used in BOM',
help_text=_('Select part to be used in BOM'),
limit_choices_to={
'component': True,
})
@ -1067,15 +1067,15 @@ class BomItem(models.Model):
quantity = models.PositiveIntegerField(default=1, validators=[MinValueValidator(0)], help_text='BOM quantity for this BOM item')
overage = models.CharField(max_length=24, blank=True, validators=[validators.validate_overage],
help_text='Estimated build wastage quantity (absolute or percentage)'
help_text=_('Estimated build wastage quantity (absolute or percentage)')
)
reference = models.CharField(max_length=500, blank=True, help_text='BOM item reference')
reference = models.CharField(max_length=500, blank=True, help_text=_('BOM item reference'))
# Note attached to this BOM line item
note = models.CharField(max_length=500, blank=True, help_text='BOM item notes')
note = models.CharField(max_length=500, blank=True, help_text=_('BOM item notes'))
checksum = models.CharField(max_length=128, blank=True, help_text='BOM line checksum')
checksum = models.CharField(max_length=128, blank=True, help_text=_('BOM line checksum'))
def get_item_hash(self):
""" Calculate the checksum hash of this BOM line item: