mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Translation fixes (#8263)
* Translation fixes - Simplifies translations strings - Removes some similar duplicate strings - Reduces passing of tokens into translation * Adds script for detecting close matches in translation source strings * Updates for custom script * Detect duplicate strings (ignoring case) * Fix some duplicate backend strings * Fix duplicate strings in frontend * Fix more duplicate strings * Run check_source_strings in CI * Fixes for unit tests * Fix another broken string * Revert some changes * Fix f-string * Fix old migration files * Reduce front-end duplication * Further updates * Revert change * Updates
This commit is contained in:
		| @@ -36,7 +36,7 @@ export default function ImporterImportProgress({ | ||||
|           <StylishText size="lg">{t`Importing Records`}</StylishText> | ||||
|           <Loader /> | ||||
|           <Text size="lg"> | ||||
|             {t`Imported rows`}: {session.sessionData.row_count} | ||||
|             {t`Imported Rows`}: {session.sessionData.row_count} | ||||
|           </Text> | ||||
|         </Stack> | ||||
|       </Container> | ||||
|   | ||||
| @@ -24,7 +24,7 @@ function StartedCard({ | ||||
|       </div> | ||||
|       <Anchor href={link} target="_blank"> | ||||
|         <Button> | ||||
|           <Trans>Read more</Trans> | ||||
|           <Trans>Read More</Trans> | ||||
|         </Button> | ||||
|       </Anchor> | ||||
|     </Paper> | ||||
|   | ||||
| @@ -56,7 +56,7 @@ export function MainMenu() { | ||||
|           component={Link} | ||||
|           to="/settings/user" | ||||
|         > | ||||
|           <Trans>Account settings</Trans> | ||||
|           <Trans>Account Settings</Trans> | ||||
|         </Menu.Item> | ||||
|         {user?.is_staff && ( | ||||
|           <Menu.Item | ||||
|   | ||||
| @@ -459,7 +459,7 @@ export function SearchDrawer({ | ||||
|               color="blue" | ||||
|               radius="sm" | ||||
|               variant="light" | ||||
|               title={t`No results`} | ||||
|               title={t`No Results`} | ||||
|               icon={<IconSearch size="1rem" />} | ||||
|             > | ||||
|               <Trans>No results available for search query</Trans> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ export default function GetStartedWidget() { | ||||
|   return ( | ||||
|     <span> | ||||
|       <Title order={5}> | ||||
|         <Trans>Getting started</Trans> | ||||
|         <Trans>Getting Started</Trans> | ||||
|       </Title> | ||||
|       <GettingStartedCarousel items={navDocLinks} /> | ||||
|     </span> | ||||
|   | ||||
| @@ -12,7 +12,7 @@ export const menuItems: menuItemsCollection = { | ||||
|   }, | ||||
|   profile: { | ||||
|     id: 'profile', | ||||
|     text: <Trans>Account settings</Trans>, | ||||
|     text: <Trans>Account Settings</Trans>, | ||||
|     link: '/settings/user', | ||||
|     doctext: <Trans>User attributes and design settings.</Trans> | ||||
|   }, | ||||
|   | ||||
| @@ -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' | ||||
|   }); | ||||
|   | ||||
| @@ -38,7 +38,7 @@ export default function Reset() { | ||||
|               type="submit" | ||||
|               onClick={() => handleReset(navigate, simpleForm.values)} | ||||
|             > | ||||
|               <Trans>Send mail</Trans> | ||||
|               <Trans>Send Email</Trans> | ||||
|             </Button> | ||||
|           </Stack> | ||||
|         </Container> | ||||
|   | ||||
| @@ -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() { | ||||
|               /> | ||||
|             </Stack> | ||||
|             <Button type="submit" onClick={handleSet}> | ||||
|               <Trans>Send mail</Trans> | ||||
|               <Trans>Send Email</Trans> | ||||
|             </Button> | ||||
|           </Stack> | ||||
|         </Container> | ||||
|   | ||||
| @@ -32,7 +32,7 @@ export default function TaskManagementPanel() { | ||||
|   return ( | ||||
|     <> | ||||
|       {taskInfo?.is_running == false && ( | ||||
|         <Alert title={t`Background Worker Not Running`} color="red"> | ||||
|         <Alert title={t`Background worker not running`} color="red"> | ||||
|           <Text>{t`The background task manager service is not running. Contact your system administrator.`}</Text> | ||||
|         </Alert> | ||||
|       )} | ||||
|   | ||||
| @@ -34,7 +34,7 @@ export default function UserManagementPanel() { | ||||
|             </Trans> | ||||
|           </Text> | ||||
|           <Anchor component={Link} to={'/settings/system'}> | ||||
|             <Trans>System settings</Trans> | ||||
|             <Trans>System Settings</Trans> | ||||
|           </Anchor> | ||||
|         </Group> | ||||
|       </Stack> | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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({ | ||||
|   | ||||
| @@ -668,7 +668,7 @@ export default function StockDetail() { | ||||
|           }, | ||||
|           { | ||||
|             name: t`Add`, | ||||
|             tooltip: t`Add stock`, | ||||
|             tooltip: t`Add Stock`, | ||||
|             hidden: serialized, | ||||
|             icon: <InvenTreeIcon icon="add" iconProps={{ color: 'green' }} />, | ||||
|             onClick: () => { | ||||
| @@ -677,7 +677,7 @@ export default function StockDetail() { | ||||
|           }, | ||||
|           { | ||||
|             name: t`Remove`, | ||||
|             tooltip: t`Remove stock`, | ||||
|             tooltip: t`Remove Stock`, | ||||
|             hidden: serialized, | ||||
|             icon: <InvenTreeIcon icon="remove" iconProps={{ color: 'red' }} />, | ||||
|             onClick: () => { | ||||
| @@ -695,7 +695,7 @@ export default function StockDetail() { | ||||
|           }, | ||||
|           { | ||||
|             name: t`Transfer`, | ||||
|             tooltip: t`Transfer stock`, | ||||
|             tooltip: t`Transfer Stock`, | ||||
|             icon: ( | ||||
|               <InvenTreeIcon icon="transfer" iconProps={{ color: 'blue' }} /> | ||||
|             ), | ||||
|   | ||||
| @@ -38,7 +38,7 @@ export function PartColumn({ | ||||
|           </Tooltip> | ||||
|         )} | ||||
|         {part?.locked && ( | ||||
|           <Tooltip label={t`Part is locked`}> | ||||
|           <Tooltip label={t`Part is Locked`}> | ||||
|             <IconLock size={16} /> | ||||
|           </Tooltip> | ||||
|         )} | ||||
|   | ||||
| @@ -549,7 +549,7 @@ export function InvenTreeTable<T extends Record<string, any>>({ | ||||
|         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`} | ||||
|       </Alert> | ||||
|     ), | ||||
|     initialData: { | ||||
| @@ -652,8 +652,8 @@ export function InvenTreeTable<T extends Record<string, any>>({ | ||||
|                 <ButtonMenu | ||||
|                   key="barcode-actions" | ||||
|                   icon={<IconBarcode />} | ||||
|                   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<T extends Record<string, any>>({ | ||||
|                     variant="transparent" | ||||
|                     aria-label="table-select-filters" | ||||
|                   > | ||||
|                     <Tooltip label={t`Table filters`}> | ||||
|                     <Tooltip label={t`Table Filters`}> | ||||
|                       <IconFilter | ||||
|                         onClick={() => setFiltersVisible(!filtersVisible)} | ||||
|                       /> | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
| @@ -301,7 +301,7 @@ export default function BuildOutputTable({ | ||||
|           } | ||||
|         }, | ||||
|         RowEditAction({ | ||||
|           tooltip: t`Edit build output`, | ||||
|           tooltip: t`Edit Build Output`, | ||||
|           onClick: () => { | ||||
|             setSelectedOutputs([record]); | ||||
|             editBuildOutput.open(); | ||||
|   | ||||
| @@ -138,7 +138,7 @@ export default function PartParameterTemplateTable() { | ||||
|   const tableActions = useMemo(() => { | ||||
|     return [ | ||||
|       <AddItemButton | ||||
|         tooltip={t`Add parameter template`} | ||||
|         tooltip={t`Add Parameter Template`} | ||||
|         onClick={() => newTemplate.open()} | ||||
|         hidden={!user.hasAddRole(UserRoles.part)} | ||||
|       /> | ||||
|   | ||||
| @@ -106,7 +106,7 @@ export function RelatedPartTable({ | ||||
|     return [ | ||||
|       <AddItemButton | ||||
|         key="add-related-part" | ||||
|         tooltip={t`Add related part`} | ||||
|         tooltip={t`Add Related Part`} | ||||
|         hidden={!user.hasAddRole(UserRoles.part)} | ||||
|         onClick={() => newRelatedPart.open()} | ||||
|       /> | ||||
|   | ||||
| @@ -305,7 +305,7 @@ export default function PluginListTable() { | ||||
|       > | ||||
|         <Stack gap="xs"> | ||||
|           <Text>{t`The selected plugin will be uninstalled.`}</Text> | ||||
|           <Text>{t`This action cannot be undone.`}</Text> | ||||
|           <Text>{t`This action cannot be undone`}</Text> | ||||
|         </Stack> | ||||
|       </Alert> | ||||
|     ), | ||||
|   | ||||
| @@ -342,7 +342,7 @@ export function PurchaseOrderLineItemTable({ | ||||
|       />, | ||||
|       <AddItemButton | ||||
|         key="add-line-item" | ||||
|         tooltip={t`Add line item`} | ||||
|         tooltip={t`Add Line Item`} | ||||
|         onClick={() => { | ||||
|           setInitialData({ | ||||
|             order: orderId | ||||
|   | ||||
| @@ -165,7 +165,7 @@ export default function ReturnOrderLineItemTable({ | ||||
|     return [ | ||||
|       <AddItemButton | ||||
|         key="add-line-item" | ||||
|         tooltip={t`Add line item`} | ||||
|         tooltip={t`Add Line Item`} | ||||
|         hidden={!user.hasAddRole(UserRoles.return_order)} | ||||
|         onClick={() => { | ||||
|           newLine.open(); | ||||
|   | ||||
| @@ -255,7 +255,7 @@ export default function SalesOrderLineItemTable({ | ||||
|     return [ | ||||
|       <AddItemButton | ||||
|         key="add-line-item" | ||||
|         tooltip={t`Add line item`} | ||||
|         tooltip={t`Add Line Item`} | ||||
|         onClick={() => { | ||||
|           setInitialData({ | ||||
|             order: orderId | ||||
| @@ -277,7 +277,7 @@ export default function SalesOrderLineItemTable({ | ||||
|             allocated || | ||||
|             !editable || | ||||
|             !user.hasChangeRole(UserRoles.sales_order), | ||||
|           title: t`Allocate stock`, | ||||
|           title: t`Allocate Stock`, | ||||
|           icon: <IconSquareArrowRight />, | ||||
|           color: 'green', | ||||
|           onClick: notYetImplemented | ||||
|   | ||||
| @@ -112,7 +112,7 @@ export default function CustomStateTable() { | ||||
|     return [ | ||||
|       <AddItemButton | ||||
|         onClick={() => newCustomState.open()} | ||||
|         tooltip={t`Add state`} | ||||
|         tooltip={t`Add State`} | ||||
|       /> | ||||
|     ]; | ||||
|   }, []); | ||||
|   | ||||
| @@ -449,7 +449,7 @@ export function StockItemTable({ | ||||
|         disabled={table.selectedRecords.length === 0} | ||||
|         actions={[ | ||||
|           { | ||||
|             name: t`Add stock`, | ||||
|             name: t`Add Stock`, | ||||
|             icon: <InvenTreeIcon icon="add" iconProps={{ color: 'green' }} />, | ||||
|             tooltip: t`Add a new stock item`, | ||||
|             disabled: !can_add_stock, | ||||
| @@ -458,7 +458,7 @@ export function StockItemTable({ | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             name: t`Remove stock`, | ||||
|             name: t`Remove Stock`, | ||||
|             icon: <InvenTreeIcon icon="remove" iconProps={{ color: 'red' }} />, | ||||
|             tooltip: t`Remove some quantity from a stock item`, | ||||
|             disabled: !can_add_stock, | ||||
| @@ -478,7 +478,7 @@ export function StockItemTable({ | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             name: t`Transfer stock`, | ||||
|             name: t`Transfer Stock`, | ||||
|             icon: ( | ||||
|               <InvenTreeIcon icon="transfer" iconProps={{ color: 'blue' }} /> | ||||
|             ), | ||||
| @@ -525,7 +525,7 @@ export function StockItemTable({ | ||||
|           { | ||||
|             name: t`Delete stock`, | ||||
|             icon: <InvenTreeIcon icon="delete" iconProps={{ color: 'red' }} />, | ||||
|             tooltip: t`Delete stock items`, | ||||
|             tooltip: t`Delete Stock Items`, | ||||
|             disabled: !can_delete_stock, | ||||
|             onClick: () => { | ||||
|               deleteStock.open(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user