diff --git a/.github/scripts/check_source_strings.py b/.github/scripts/check_source_strings.py new file mode 100644 index 0000000000..e95fab3998 --- /dev/null +++ b/.github/scripts/check_source_strings.py @@ -0,0 +1,100 @@ +"""Script to check source strings for translations.""" + +import argparse +import os + +import rapidfuzz + +BACKEND_SOURCE_FILE = [ + '..', + '..', + 'src', + 'backend', + 'InvenTree', + 'locale', + 'en', + 'LC_MESSAGES', + 'django.po', +] + +FRONTEND_SOURCE_FILE = [ + '..', + '..', + 'src', + 'frontend', + 'src', + 'locales', + 'en', + 'messages.po', +] + + +def extract_source_strings(file_path): + """Extract source strings from the provided file.""" + here = os.path.abspath(os.path.dirname(__file__)) + abs_file_path = os.path.abspath(os.path.join(here, *file_path)) + + sources = [] + + with open(abs_file_path, encoding='utf-8') as f: + for line in f: + line = line.strip() + if line.startswith('msgid '): + msgid = line[6:].strip() + + if msgid in sources: + print(f'Duplicate source string: {msgid}') + else: + sources.append(msgid) + + return sources + + +def compare_source_strings(sources, threshold): + """Compare source strings to find duplicates (or close matches).""" + issues = 0 + + for i, source in enumerate(sources): + for other in sources[i + 1 :]: + if other.lower() == source.lower(): + print(f'- Duplicate: {source} ~ {other}') + issues += 1 + continue + + ratio = rapidfuzz.fuzz.ratio(source, other) + if ratio > threshold: + print(f'- Close match: {source} ~ {other} ({ratio:.1f}%)') + issues += 1 + + if issues: + print(f' - Found {issues} issues.') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='Check source strings for translations.' + ) + parser.add_argument( + '--backend', action='store_true', help='Check backend source strings' + ) + parser.add_argument( + '--frontend', action='store_true', help='Check frontend source strings' + ) + parser.add_argument( + '--threshold', + type=int, + help='Set the threshold for string comparison', + default=99, + ) + + args = parser.parse_args() + + if args.backend: + backend_sources = extract_source_strings(BACKEND_SOURCE_FILE) + print('Backend source strings:', len(backend_sources)) + compare_source_strings(backend_sources, args.threshold) + + if args.frontend: + frontend_sources = extract_source_strings(FRONTEND_SOURCE_FILE) + print('Frontend source strings:', len(frontend_sources)) + compare_source_strings(frontend_sources, args.threshold) diff --git a/.github/workflows/check_translations.yaml b/.github/workflows/check_translations.yaml index 51183e4c89..5d1b03366a 100644 --- a/.github/workflows/check_translations.yaml +++ b/.github/workflows/check_translations.yaml @@ -38,5 +38,8 @@ jobs: apt-dependency: gettext - name: Test Translations run: invoke dev.translate + - name: Check for Duplicates + run: | + python ./.github/scripts/check_source_strings.py --frontend --backend - name: Check Migration Files run: python3 .github/scripts/check_migration_files.py diff --git a/src/backend/InvenTree/InvenTree/conversion.py b/src/backend/InvenTree/InvenTree/conversion.py index 2e6c3fe866..0701bc3eb2 100644 --- a/src/backend/InvenTree/InvenTree/conversion.py +++ b/src/backend/InvenTree/InvenTree/conversion.py @@ -204,7 +204,7 @@ def convert_physical_value(value: str, unit: Optional[str] = None, strip_units=T if unit: raise ValidationError(_(f'Could not convert {original} to {unit}')) else: - raise ValidationError(_('Invalid quantity supplied')) + raise ValidationError(_('Invalid quantity provided')) # Calculate the "magnitude" of the value, as a float # If the value is specified strangely (e.g. as a fraction or a dozen), this can cause issues @@ -218,7 +218,7 @@ def convert_physical_value(value: str, unit: Optional[str] = None, strip_units=T magnitude = float(ureg.Quantity(magnitude).to_base_units().magnitude) except Exception as exc: - raise ValidationError(_(f'Invalid quantity supplied ({exc})')) + raise ValidationError(_('Invalid quantity provided') + f': ({exc})') if strip_units: return magnitude diff --git a/src/backend/InvenTree/InvenTree/helpers.py b/src/backend/InvenTree/InvenTree/helpers.py index b5a20d9679..d7a031c7af 100644 --- a/src/backend/InvenTree/InvenTree/helpers.py +++ b/src/backend/InvenTree/InvenTree/helpers.py @@ -551,7 +551,7 @@ def extract_serial_numbers(input_string, expected_quantity: int, starting_value= if a == b: # Invalid group - add_error(_(f'Invalid group range: {group}')) + add_error(_(f'Invalid group: {group}')) continue group_items = [] @@ -594,7 +594,7 @@ def extract_serial_numbers(input_string, expected_quantity: int, starting_value= for item in group_items: add_serial(item) else: - add_error(_(f'Invalid group range: {group}')) + add_error(_(f'Invalid group: {group}')) else: # In the case of a different number of hyphens, simply add the entire group @@ -612,14 +612,14 @@ def extract_serial_numbers(input_string, expected_quantity: int, starting_value= sequence_count = max(0, expected_quantity - len(serials)) if len(items) > 2 or len(items) == 0: - add_error(_(f'Invalid group sequence: {group}')) + add_error(_(f'Invalid group: {group}')) continue elif len(items) == 2: try: if items[1]: sequence_count = int(items[1]) + 1 except ValueError: - add_error(_(f'Invalid group sequence: {group}')) + add_error(_(f'Invalid group: {group}')) continue value = items[0] @@ -638,7 +638,7 @@ def extract_serial_numbers(input_string, expected_quantity: int, starting_value= for item in sequence_items: add_serial(item) else: - add_error(_(f'Invalid group sequence: {group}')) + add_error(_(f'Invalid group: {group}')) else: # At this point, we assume that the 'group' is just a single serial value diff --git a/src/backend/InvenTree/InvenTree/magic_login.py b/src/backend/InvenTree/InvenTree/magic_login.py index 996e0b35d1..bc4e7c6ece 100644 --- a/src/backend/InvenTree/InvenTree/magic_login.py +++ b/src/backend/InvenTree/InvenTree/magic_login.py @@ -25,7 +25,7 @@ def send_simple_login_email(user, link): ) send_mail( - _(f'[{site_name}] Log in to the app'), + f'[{site_name}] ' + _('Log in to the app'), email_plaintext_message, settings.DEFAULT_FROM_EMAIL, [user.email], diff --git a/src/backend/InvenTree/InvenTree/serializers.py b/src/backend/InvenTree/InvenTree/serializers.py index 98532ec8fe..30599b8d0a 100644 --- a/src/backend/InvenTree/InvenTree/serializers.py +++ b/src/backend/InvenTree/InvenTree/serializers.py @@ -624,7 +624,7 @@ class DataFileUploadSerializer(serializers.Serializer): accepted_file_types = ['xls', 'xlsx', 'csv', 'tsv', 'xml'] if ext not in accepted_file_types: - raise serializers.ValidationError(_('Unsupported file type')) + raise serializers.ValidationError(_('Unsupported file format')) # Impose a 50MB limit on uploaded BOM files max_upload_file_size = 50 * 1024 * 1024 diff --git a/src/backend/InvenTree/common/files.py b/src/backend/InvenTree/common/files.py index 37d85f46aa..2e1d8872ce 100644 --- a/src/backend/InvenTree/common/files.py +++ b/src/backend/InvenTree/common/files.py @@ -60,7 +60,7 @@ class FileManager: file.seek(0) else: fmt = ext.upper() - raise ValidationError(_(f'Unsupported file format: {fmt}')) + raise ValidationError(_('Unsupported file format') + f': {fmt}') except UnicodeEncodeError: raise ValidationError(_('Error reading file (invalid encoding)')) diff --git a/src/backend/InvenTree/common/forms.py b/src/backend/InvenTree/common/forms.py index 85fd2f0732..113b471acc 100644 --- a/src/backend/InvenTree/common/forms.py +++ b/src/backend/InvenTree/common/forms.py @@ -22,8 +22,8 @@ class UploadFileForm(forms.Form): if name: # Update label and help_text with file name - self.fields['file'].label = _(f'{name.title()} File') - self.fields['file'].help_text = _(f'Select {name} file to upload') + self.fields['file'].label = name.title() + ' ' + _('File') + self.fields['file'].help_text = _('Select file to upload') def clean_file(self): """Run tabular file validation. diff --git a/src/backend/InvenTree/common/migrations/0005_auto_20190915_1256.py b/src/backend/InvenTree/common/migrations/0005_auto_20190915_1256.py index 5b3205128d..2822fd82c3 100644 --- a/src/backend/InvenTree/common/migrations/0005_auto_20190915_1256.py +++ b/src/backend/InvenTree/common/migrations/0005_auto_20190915_1256.py @@ -18,6 +18,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='inventreesetting', name='key', - field=models.CharField(help_text='Settings key (must be unique - case insensitive', max_length=50, unique=True), + field=models.CharField(help_text='Settings key', max_length=50, unique=True), ), ] diff --git a/src/backend/InvenTree/common/migrations/0011_auto_20210722_2114.py b/src/backend/InvenTree/common/migrations/0011_auto_20210722_2114.py index 388117f261..2d7d28343f 100644 --- a/src/backend/InvenTree/common/migrations/0011_auto_20210722_2114.py +++ b/src/backend/InvenTree/common/migrations/0011_auto_20210722_2114.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('value', models.CharField(blank=True, help_text='Settings value', max_length=200)), - ('key', models.CharField(help_text='Settings key (must be unique - case insensitive', max_length=50)), + ('key', models.CharField(help_text='Settings key', max_length=50)), ('user', models.ForeignKey(blank=True, help_text='User', null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')), ], options={ diff --git a/src/backend/InvenTree/common/models.py b/src/backend/InvenTree/common/models.py index ac76343f39..6bd224aa25 100644 --- a/src/backend/InvenTree/common/models.py +++ b/src/backend/InvenTree/common/models.py @@ -780,10 +780,7 @@ class BaseInvenTreeSetting(models.Model): ) key = models.CharField( - max_length=50, - blank=False, - unique=False, - help_text=_('Settings key (must be unique - case insensitive)'), + max_length=50, blank=False, unique=False, help_text=_('Settings key') ) value = models.CharField( @@ -2179,10 +2176,7 @@ class InvenTreeSetting(BaseInvenTreeSetting): typ = 'inventree' key = models.CharField( - max_length=50, - blank=False, - unique=True, - help_text=_('Settings key (must be unique - case insensitive'), + max_length=50, blank=False, unique=True, help_text=_('Settings key') ) def to_native_value(self): @@ -2559,10 +2553,7 @@ class InvenTreeUserSetting(BaseInvenTreeSetting): extra_unique_fields = ['user'] key = models.CharField( - max_length=50, - blank=False, - unique=False, - help_text=_('Settings key (must be unique - case insensitive'), + max_length=50, blank=False, unique=False, help_text=_('Settings key') ) user = models.ForeignKey( diff --git a/src/backend/InvenTree/locale/he/LC_MESSAGES/django.po b/src/backend/InvenTree/locale/he/LC_MESSAGES/django.po index 7730798698..505be20cd0 100644 --- a/src/backend/InvenTree/locale/he/LC_MESSAGES/django.po +++ b/src/backend/InvenTree/locale/he/LC_MESSAGES/django.po @@ -40,7 +40,7 @@ msgstr "למשתמש אין הרשאה לצפות במוזל הזה" #: InvenTree/conversion.py:161 #, python-brace-format msgid "Invalid unit provided ({unit})" -msgstr "סופקה יחידה שלא קיימת" +msgstr "סופקה יחידה שלא קיימת ({unit})" #: InvenTree/conversion.py:178 msgid "No value provided" @@ -49,7 +49,7 @@ msgstr "לא צוין ערך" #: InvenTree/conversion.py:205 #, python-brace-format msgid "Could not convert {original} to {unit}" -msgstr "לא ניתן להמיר מקור ליחידה" +msgstr "" #: InvenTree/conversion.py:207 msgid "Invalid quantity supplied" diff --git a/src/backend/InvenTree/machine/migrations/0001_initial.py b/src/backend/InvenTree/machine/migrations/0001_initial.py index cebcd8365d..74cf0c9a38 100644 --- a/src/backend/InvenTree/machine/migrations/0001_initial.py +++ b/src/backend/InvenTree/machine/migrations/0001_initial.py @@ -27,7 +27,7 @@ class Migration(migrations.Migration): name='MachineSetting', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('key', models.CharField(help_text='Settings key (must be unique - case insensitive)', max_length=50)), + ('key', models.CharField(help_text='Settings key', max_length=50)), ('value', models.CharField(blank=True, help_text='Settings value', max_length=2000)), ('config_type', models.CharField(choices=[('M', 'Machine'), ('D', 'Driver')], max_length=1, verbose_name='Config type')), ('machine_config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='settings', to='machine.machineconfig', verbose_name='Machine Config')), diff --git a/src/backend/InvenTree/order/templates/order/order_base.html b/src/backend/InvenTree/order/templates/order/order_base.html index 77e044120b..e8b9ce4110 100644 --- a/src/backend/InvenTree/order/templates/order/order_base.html +++ b/src/backend/InvenTree/order/templates/order/order_base.html @@ -143,7 +143,7 @@ src="{% static 'img/blank_image.png' %}" {% if order.supplier %} {{ order.supplier.name }}{% include "clip.html" %} {% else %} - {% trans "No suppplier information available" %} + {% trans "No supplier information available" %} {% endif %} diff --git a/src/backend/InvenTree/part/test_bom_import.py b/src/backend/InvenTree/part/test_bom_import.py index ec317198ff..5b214aa81c 100644 --- a/src/backend/InvenTree/part/test_bom_import.py +++ b/src/backend/InvenTree/part/test_bom_import.py @@ -82,7 +82,7 @@ class BomUploadTest(InvenTreeAPITestCase): """POST with an unsupported file type.""" response = self.post_bom('sample.txt', b'hello world', expected_code=400) - self.assertIn('Unsupported file type', str(response.data['data_file'])) + self.assertIn('Unsupported file format', str(response.data['data_file'])) def test_broken_file(self): """Test upload with broken (corrupted) files.""" diff --git a/src/backend/InvenTree/plugin/migrations/0003_pluginsetting.py b/src/backend/InvenTree/plugin/migrations/0003_pluginsetting.py index 83e744fa6b..f2066ef068 100644 --- a/src/backend/InvenTree/plugin/migrations/0003_pluginsetting.py +++ b/src/backend/InvenTree/plugin/migrations/0003_pluginsetting.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): name='PluginSetting', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('key', models.CharField(help_text='Settings key (must be unique - case insensitive', max_length=50)), + ('key', models.CharField(help_text='Settings key', max_length=50)), ('value', models.CharField(blank=True, help_text='Settings value', max_length=200)), ('plugin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='settings', to='plugin.pluginconfig', verbose_name='Plugin')), ], diff --git a/src/backend/InvenTree/plugin/migrations/0004_alter_pluginsetting_key.py b/src/backend/InvenTree/plugin/migrations/0004_alter_pluginsetting_key.py index 193da8c340..930b8515d8 100644 --- a/src/backend/InvenTree/plugin/migrations/0004_alter_pluginsetting_key.py +++ b/src/backend/InvenTree/plugin/migrations/0004_alter_pluginsetting_key.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='pluginsetting', name='key', - field=models.CharField(help_text='Settings key (must be unique - case insensitive)', max_length=50), + field=models.CharField(help_text='Settings key', max_length=50), ), ] diff --git a/src/backend/InvenTree/plugin/migrations/0005_notificationusersetting.py b/src/backend/InvenTree/plugin/migrations/0005_notificationusersetting.py index 4ea1959f90..d2ef14b6e9 100644 --- a/src/backend/InvenTree/plugin/migrations/0005_notificationusersetting.py +++ b/src/backend/InvenTree/plugin/migrations/0005_notificationusersetting.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): name='NotificationUserSetting', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('key', models.CharField(help_text='Settings key (must be unique - case insensitive)', max_length=50)), + ('key', models.CharField(help_text='Settings key', max_length=50)), ('value', models.CharField(blank=True, help_text='Settings value', max_length=200)), ('method', models.CharField(max_length=255, verbose_name='Method')), ('user', models.ForeignKey(blank=True, help_text='User', null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')), diff --git a/src/backend/InvenTree/templates/js/translated/sales_order.js b/src/backend/InvenTree/templates/js/translated/sales_order.js index 65891a67b2..7999946360 100644 --- a/src/backend/InvenTree/templates/js/translated/sales_order.js +++ b/src/backend/InvenTree/templates/js/translated/sales_order.js @@ -2046,7 +2046,7 @@ function loadSalesOrderLineItemTable(table, options={}) { if (options.allow_edit && (row.shipped < row.quantity)) { if (part.trackable) { - buttons += makeIconButton('fa-hashtag icon-green', 'button-add-by-sn', pk, '{% trans "Allocate serial numbers" %}'); + buttons += makeIconButton('fa-hashtag icon-green', 'button-add-by-sn', pk, '{% trans "Allocate Serial Numbers" %}'); } buttons += makeIconButton('fa-sign-in-alt icon-green', 'button-add', pk, '{% trans "Allocate stock" %}'); if (part.purchaseable) { diff --git a/src/backend/InvenTree/templates/js/translated/stock.js b/src/backend/InvenTree/templates/js/translated/stock.js index 6c21536343..8347a69e18 100644 --- a/src/backend/InvenTree/templates/js/translated/stock.js +++ b/src/backend/InvenTree/templates/js/translated/stock.js @@ -617,7 +617,7 @@ function findStockItemBySerialNumber(part_id) { handleFormErrors( { 'serial': [ - '{% trans "Enter a serial number" %}', + '{% trans "Enter serial number" %}', ] }, fields, opts ); @@ -1445,14 +1445,14 @@ function removeStockRow(e) { function passFailBadge(result) { if (result) { - return `{% trans "PASS" %}`; + return `{% trans "Pass" %}`; } else { - return `{% trans "FAIL" %}`; + return `{% trans "Fail" %}`; } } function noResultBadge() { - return `{% trans "NO RESULT" %}`; + return `{% trans "No result" %}`; } function formatDate(row, date, options={}) { diff --git a/src/backend/InvenTree/templates/socialaccount/authentication_error.html b/src/backend/InvenTree/templates/socialaccount/authentication_error.html index 9cc638f1d4..abf5b03cd1 100644 --- a/src/backend/InvenTree/templates/socialaccount/authentication_error.html +++ b/src/backend/InvenTree/templates/socialaccount/authentication_error.html @@ -10,7 +10,7 @@

{% trans "An error occurred while attempting to login via your social network account." %}
- {% trans "Contact your system administrator for further information." %} + {% trans "Contact your system administrator for further information" %}


diff --git a/src/frontend/src/components/importer/ImporterImportProgress.tsx b/src/frontend/src/components/importer/ImporterImportProgress.tsx index 01820ec675..c4d9400162 100644 --- a/src/frontend/src/components/importer/ImporterImportProgress.tsx +++ b/src/frontend/src/components/importer/ImporterImportProgress.tsx @@ -36,7 +36,7 @@ export default function ImporterImportProgress({ {t`Importing Records`} - {t`Imported rows`}: {session.sessionData.row_count} + {t`Imported Rows`}: {session.sessionData.row_count} diff --git a/src/frontend/src/components/items/GettingStartedCarousel.tsx b/src/frontend/src/components/items/GettingStartedCarousel.tsx index 1d98fcb25a..16288081d2 100644 --- a/src/frontend/src/components/items/GettingStartedCarousel.tsx +++ b/src/frontend/src/components/items/GettingStartedCarousel.tsx @@ -24,7 +24,7 @@ function StartedCard({ diff --git a/src/frontend/src/components/nav/MainMenu.tsx b/src/frontend/src/components/nav/MainMenu.tsx index 102a70a91b..6ca50d08bf 100644 --- a/src/frontend/src/components/nav/MainMenu.tsx +++ b/src/frontend/src/components/nav/MainMenu.tsx @@ -56,7 +56,7 @@ export function MainMenu() { component={Link} to="/settings/user" > - Account settings + Account Settings {user?.is_staff && ( } > No results available for search query diff --git a/src/frontend/src/components/widgets/GetStartedWidget.tsx b/src/frontend/src/components/widgets/GetStartedWidget.tsx index cd36190046..125d5540d1 100644 --- a/src/frontend/src/components/widgets/GetStartedWidget.tsx +++ b/src/frontend/src/components/widgets/GetStartedWidget.tsx @@ -8,7 +8,7 @@ export default function GetStartedWidget() { return ( - <Trans>Getting started</Trans> + <Trans>Getting Started</Trans> diff --git a/src/frontend/src/defaults/menuItems.tsx b/src/frontend/src/defaults/menuItems.tsx index e713553217..a20659a80d 100644 --- a/src/frontend/src/defaults/menuItems.tsx +++ b/src/frontend/src/defaults/menuItems.tsx @@ -12,7 +12,7 @@ export const menuItems: menuItemsCollection = { }, profile: { id: 'profile', - text: Account settings, + text: Account Settings, link: '/settings/user', doctext: User attributes and design settings. }, diff --git a/src/frontend/src/functions/notifications.tsx b/src/frontend/src/functions/notifications.tsx index 2ed72f34d5..c0f4c47e9a 100644 --- a/src/frontend/src/functions/notifications.tsx +++ b/src/frontend/src/functions/notifications.tsx @@ -21,7 +21,7 @@ export function notYetImplemented() { */ export function permissionDenied() { notifications.show({ - title: t`Permission denied`, + title: t`Permission Denied`, message: t`You do not have permission to perform this action`, color: 'red' }); diff --git a/src/frontend/src/pages/Auth/Reset.tsx b/src/frontend/src/pages/Auth/Reset.tsx index d0395688a4..4a32758b55 100644 --- a/src/frontend/src/pages/Auth/Reset.tsx +++ b/src/frontend/src/pages/Auth/Reset.tsx @@ -38,7 +38,7 @@ export default function Reset() { type="submit" onClick={() => handleReset(navigate, simpleForm.values)} > - Send mail + Send Email diff --git a/src/frontend/src/pages/Auth/Set-Password.tsx b/src/frontend/src/pages/Auth/Set-Password.tsx index 921c58b946..1fcc4bf93e 100644 --- a/src/frontend/src/pages/Auth/Set-Password.tsx +++ b/src/frontend/src/pages/Auth/Set-Password.tsx @@ -45,12 +45,7 @@ export default function Set_Password() { useEffect(() => { // make sure we have a token if (!token || !uid) { - notifications.show({ - title: t`No token provided`, - message: t`You need to provide a token to set a new password. Check your inbox for a reset link.`, - color: 'red' - }); - navigate('/login'); + invalidToken(); } }, [token]); @@ -109,7 +104,7 @@ export default function Set_Password() { /> diff --git a/src/frontend/src/pages/Index/Settings/AdminCenter/TaskManagementPanel.tsx b/src/frontend/src/pages/Index/Settings/AdminCenter/TaskManagementPanel.tsx index 47fb448b1d..32d11cdb7f 100644 --- a/src/frontend/src/pages/Index/Settings/AdminCenter/TaskManagementPanel.tsx +++ b/src/frontend/src/pages/Index/Settings/AdminCenter/TaskManagementPanel.tsx @@ -32,7 +32,7 @@ export default function TaskManagementPanel() { return ( <> {taskInfo?.is_running == false && ( - + {t`The background task manager service is not running. Contact your system administrator.`} )} diff --git a/src/frontend/src/pages/Index/Settings/AdminCenter/UserManagementPanel.tsx b/src/frontend/src/pages/Index/Settings/AdminCenter/UserManagementPanel.tsx index 3597425f40..1a59ffc603 100644 --- a/src/frontend/src/pages/Index/Settings/AdminCenter/UserManagementPanel.tsx +++ b/src/frontend/src/pages/Index/Settings/AdminCenter/UserManagementPanel.tsx @@ -34,7 +34,7 @@ export default function UserManagementPanel() { - System settings + System Settings diff --git a/src/frontend/src/pages/part/pricing/SaleHistoryPanel.tsx b/src/frontend/src/pages/part/pricing/SaleHistoryPanel.tsx index 2512d716a1..10de2eb17f 100644 --- a/src/frontend/src/pages/part/pricing/SaleHistoryPanel.tsx +++ b/src/frontend/src/pages/part/pricing/SaleHistoryPanel.tsx @@ -21,7 +21,7 @@ export default function SaleHistoryPanel({ return [ { accessor: 'order', - title: t`Sale Order`, + title: t`Sales Order`, render: (record: any) => record?.order_detail?.reference, sortable: true, switchable: false diff --git a/src/frontend/src/pages/sales/ReturnOrderDetail.tsx b/src/frontend/src/pages/sales/ReturnOrderDetail.tsx index bee9b47b04..314baad962 100644 --- a/src/frontend/src/pages/sales/ReturnOrderDetail.tsx +++ b/src/frontend/src/pages/sales/ReturnOrderDetail.tsx @@ -346,7 +346,7 @@ export default function ReturnOrderDetail() { title: t`Cancel Return Order`, onFormSuccess: refreshInstance, preFormWarning: t`Cancel this order`, - successMessage: t`Order canceled` + successMessage: t`Order cancelled` }); const holdOrder = useCreateApiFormModal({ diff --git a/src/frontend/src/pages/stock/StockDetail.tsx b/src/frontend/src/pages/stock/StockDetail.tsx index ba07fbe587..46558a6f6d 100644 --- a/src/frontend/src/pages/stock/StockDetail.tsx +++ b/src/frontend/src/pages/stock/StockDetail.tsx @@ -668,7 +668,7 @@ export default function StockDetail() { }, { name: t`Add`, - tooltip: t`Add stock`, + tooltip: t`Add Stock`, hidden: serialized, icon: , onClick: () => { @@ -677,7 +677,7 @@ export default function StockDetail() { }, { name: t`Remove`, - tooltip: t`Remove stock`, + tooltip: t`Remove Stock`, hidden: serialized, icon: , onClick: () => { @@ -695,7 +695,7 @@ export default function StockDetail() { }, { name: t`Transfer`, - tooltip: t`Transfer stock`, + tooltip: t`Transfer Stock`, icon: ( ), diff --git a/src/frontend/src/tables/ColumnRenderers.tsx b/src/frontend/src/tables/ColumnRenderers.tsx index 32681aecd4..a02a3d6fe8 100644 --- a/src/frontend/src/tables/ColumnRenderers.tsx +++ b/src/frontend/src/tables/ColumnRenderers.tsx @@ -38,7 +38,7 @@ export function PartColumn({ )} {part?.locked && ( - + )} diff --git a/src/frontend/src/tables/InvenTreeTable.tsx b/src/frontend/src/tables/InvenTreeTable.tsx index 40169e46f7..4ba9fb718c 100644 --- a/src/frontend/src/tables/InvenTreeTable.tsx +++ b/src/frontend/src/tables/InvenTreeTable.tsx @@ -549,7 +549,7 @@ export function InvenTreeTable>({ color="red" title={t`Are you sure you want to delete the selected items?`} > - {t`This action cannot be undone!`} + {t`This action cannot be undone`} ), initialData: { @@ -652,8 +652,8 @@ export function InvenTreeTable>({ } - label={t`Barcode actions`} - tooltip={t`Barcode actions`} + label={t`Barcode Actions`} + tooltip={t`Barcode Actions`} actions={tableProps.barcodeActions ?? []} /> )} @@ -709,7 +709,7 @@ export function InvenTreeTable>({ variant="transparent" aria-label="table-select-filters" > - + setFiltersVisible(!filtersVisible)} /> diff --git a/src/frontend/src/tables/build/BuildLineTable.tsx b/src/frontend/src/tables/build/BuildLineTable.tsx index b9b385482e..41e4e5955f 100644 --- a/src/frontend/src/tables/build/BuildLineTable.tsx +++ b/src/frontend/src/tables/build/BuildLineTable.tsx @@ -56,7 +56,7 @@ export default function BuildLineTable({ { name: 'available', label: t`Available`, - description: t`Show lines with available stock` + description: t`Show items with available stock` }, { name: 'consumable', diff --git a/src/frontend/src/tables/build/BuildOutputTable.tsx b/src/frontend/src/tables/build/BuildOutputTable.tsx index 2b0a489816..af2a36b4eb 100644 --- a/src/frontend/src/tables/build/BuildOutputTable.tsx +++ b/src/frontend/src/tables/build/BuildOutputTable.tsx @@ -301,7 +301,7 @@ export default function BuildOutputTable({ } }, RowEditAction({ - tooltip: t`Edit build output`, + tooltip: t`Edit Build Output`, onClick: () => { setSelectedOutputs([record]); editBuildOutput.open(); diff --git a/src/frontend/src/tables/part/PartParameterTemplateTable.tsx b/src/frontend/src/tables/part/PartParameterTemplateTable.tsx index f19c14dcc1..7fec837127 100644 --- a/src/frontend/src/tables/part/PartParameterTemplateTable.tsx +++ b/src/frontend/src/tables/part/PartParameterTemplateTable.tsx @@ -138,7 +138,7 @@ export default function PartParameterTemplateTable() { const tableActions = useMemo(() => { return [ newTemplate.open()} hidden={!user.hasAddRole(UserRoles.part)} /> diff --git a/src/frontend/src/tables/part/RelatedPartTable.tsx b/src/frontend/src/tables/part/RelatedPartTable.tsx index f1c5a7ee5e..243b23eb3f 100644 --- a/src/frontend/src/tables/part/RelatedPartTable.tsx +++ b/src/frontend/src/tables/part/RelatedPartTable.tsx @@ -106,7 +106,7 @@ export function RelatedPartTable({ return [