mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-28 02:28:43 +00:00
[plugin] Library updates (#10070)
* Expose lingui modules to plugins * Add i18n object to plugin context * Expose form types * Update package.json requirements * Externalize react and mantine when building @inventreedb/ui components * Externalize lingui packages too * Extern <AddItemButton />
This commit is contained in:
1 parent
a301214ac9
commit
0e0abf2d75
55 files changed
+945
-868
No files matched your search
@@ -16,3 +16,14 @@ export function checkPluginVersion(context: InvenTreePluginContext) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to initialize the plugin context.
|
||||
*/
|
||||
export function initPlugin(context: InvenTreePluginContext) {
|
||||
// Check that the plugin version matches the expected version
|
||||
checkPluginVersion(context);
|
||||
|
||||
// Activate the i18n context for the current locale
|
||||
context.i18n?.activate?.(context.locale);
|
||||
}
|
||||
Reference in new issue
Block a user