@n8n/i18n 1.15.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
3
 
4
4
 
@@ -6,6 +6,7 @@
6
6
  var _chunkMOPMPZJOcjs = require('./chunk-MOPMPZJO.cjs');
7
7
 
8
8
  // src/index.ts
9
+ var _vue = require('vue');
9
10
  var _vuei18n = require('vue-i18n');
10
11
 
11
12
  // src/locales/en.json
@@ -79,12 +80,14 @@ var en_default = {
79
80
  "generic.clickToCopy": "Click to copy",
80
81
  "generic.copiedToClipboard": "Copied to clipboard",
81
82
  "generic.beta": "beta",
83
+ "generic.betaProper": "beta",
82
84
  "generic.yes": "Yes",
83
85
  "generic.no": "No",
84
86
  "generic.rating": "Rating",
85
87
  "generic.refresh": "Refresh",
86
88
  "generic.retry": "Retry",
87
89
  "generic.error": "Something went wrong",
90
+ "generic.error.subworkflowCreationFailed": "Error creating sub-workflow",
88
91
  "generic.settings": "Settings",
89
92
  "generic.service": "the service",
90
93
  "generic.star": "Star",
@@ -122,7 +125,7 @@ var en_default = {
122
125
  "generic.upgradeToEnterprise": "Upgrade to Enterprise",
123
126
  "generic.never": "Never",
124
127
  "generic.list.clearSelection": "Clear selection",
125
- "generic.list.selected": "{count} row selected: | {count} rows selected:",
128
+ "generic.list.selected": "{count} row selected | {count} rows selected",
126
129
  "about.aboutN8n": "About n8n",
127
130
  "about.close": "Close",
128
131
  "about.license": "License",
@@ -210,10 +213,6 @@ var en_default = {
210
213
  "aiAssistant.builder.canvasPrompt.startManually.title": "Start manually",
211
214
  "aiAssistant.builder.canvasPrompt.startManually.subTitle": "Add the first node",
212
215
  "aiAssistant.builder.streamAbortedMessage": "[Task aborted]",
213
- "aiAssistant.builder.plan.intro": "Do you want to proceed with this plan?",
214
- "aiAssistant.builder.plan.approve": "Approve Plan",
215
- "aiAssistant.builder.plan.reject": "Request Changes",
216
- "aiAssistant.builder.plan.whatToChange": "What would you like to change?",
217
216
  "aiAssistant.assistant": "AI Assistant",
218
217
  "aiAssistant.newSessionModal.title.part1": "Start new",
219
218
  "aiAssistant.newSessionModal.title.part2": "session",
@@ -983,17 +982,17 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
983
982
  "folders.actions.moveToFolder": "Move",
984
983
  "folders.add": "Add folder",
985
984
  "folders.add.here.message": "Create a new folder here",
986
- "folders.add.to.parent.message": 'Create folder in "{parent}"',
985
+ "folders.add.to.parent.message": "Create folder in '{parent}'",
987
986
  "folders.add.overview.community.message": "Folders available in your personal space",
988
987
  "folders.add.overview.withProjects.message": "Folders available in projects or your personal space",
989
988
  "folders.add.success.title": "Folder created",
990
- "folders.add.success.message": 'Created new folder "{folderName}"<br><a href="{link}">Open folder</a>',
989
+ "folders.add.success.message": `Created new folder '{folderName}'<br><a href="{link}">Open folder</a>`,
991
990
  "folders.invalidName.empty.message": "Folder name cannot be empty",
992
991
  "folders.invalidName.tooLong.message": "Folder name cannot be longer than {maxLength} characters",
993
992
  "folders.invalidName.invalidCharacters.message": "Folder name cannot contain the following characters: {illegalChars}",
994
993
  "folders.invalidName.starts.with.dot..message": "Folder name cannot start with a dot",
995
994
  "folders.invalidName.only.dots.message": "Folder name cannot contain only dots",
996
- "folders.delete.confirm.title": 'Delete "{folderName}"',
995
+ "folders.delete.confirm.title": "Delete '{folderName}'",
997
996
  "folders.delete.typeToConfirm": "delete {folderName}",
998
997
  "folders.delete.confirm.message": "Are to sure you want to delete this folder?",
999
998
  "folders.delete.success.message": "Folder deleted",
@@ -1003,13 +1002,13 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
1003
1002
  "folder.and.workflow.separator": "and",
1004
1003
  "folders.delete.action": "Archive all workflows and delete subfolders",
1005
1004
  "folders.delete.error.message": "Problem while deleting folder",
1006
- "folders.delete.confirmation.message": 'Type "delete {folderName}" to confirm',
1007
- "folders.transfer.confirm.message": 'Data transferred to "{folderName}"',
1008
- "folders.transfer.action": 'Transfer workflows and subfolders to another folder inside "{projectName}"',
1005
+ "folders.delete.confirmation.message": "Type 'delete {folderName}' to confirm",
1006
+ "folders.transfer.confirm.message": "Data transferred to '{folderName}'",
1007
+ "folders.transfer.action": "Transfer workflows and subfolders to another folder inside '{projectName}'",
1009
1008
  "folders.transfer.action.noProject": "Transfer workflows and subfolders to another folder",
1010
1009
  "folders.transfer.selectFolder": "Folder to transfer to",
1011
1010
  "folders.transfer.select.placeholder": "Select folder",
1012
- "folders.rename.message": 'Rename "{folderName}"',
1011
+ "folders.rename.message": "Rename '{folderName}'",
1013
1012
  "folders.rename.error.title": "Problem renaming folder",
1014
1013
  "folders.rename.success.message": "Folder renamed",
1015
1014
  "folders.rename.placeholder": "Enter new folder name",
@@ -1416,6 +1415,7 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
1416
1415
  "nodeCreator.nodeItem.triggerIconTitle": "Trigger Node",
1417
1416
  "nodeCreator.nodeItem.aiIconTitle": "LangChain AI Node",
1418
1417
  "nodeCreator.nodeItem.deprecated": "Deprecated",
1418
+ "nodeCreator.nodeItem.beta": "Beta",
1419
1419
  "nodeCreator.preBuiltAgents.title": "Pre-built agents",
1420
1420
  "nodeCreator.preBuiltAgents.description": "Get started faster with ready to go agents",
1421
1421
  "nodeCredentials.createNew": "Create new credential",
@@ -1546,6 +1546,8 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
1546
1546
  "nodeView.focusPanel.noExecutionData": "Execute previous node for autocomplete",
1547
1547
  "nodeView.focusPanel.noParameters.title": "Show a node parameter here, to iterate easily",
1548
1548
  "nodeView.focusPanel.noParameters.subtitle": "For example, keep your prompt always visible so you can run the workflow while tweaking it",
1549
+ "nodeView.focusPanel.v2.noParameters.title": "Select a node to edit it here",
1550
+ "nodeView.focusPanel.v2.noParameters.subtitle": "Or show single node parameter you\u2019d like to iterate on by clicking this button next to it:",
1549
1551
  "nodeView.focusPanel.missingParameter": "This parameter is no longer visible on the node. A related parameter was likely changed, removing this one.",
1550
1552
  "nodeView.itLooksLikeYouHaveBeenEditingSomething": "It looks like you made some edits. If you leave before saving, your changes will be lost.",
1551
1553
  "nodeView.loadingTemplate": "Loading template",
@@ -1898,6 +1900,7 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
1898
1900
  "runData.editValue": "Edit Value",
1899
1901
  "runData.executionStatus.success": "Executed successfully",
1900
1902
  "runData.executionStatus.failed": "Execution failed",
1903
+ "runData.executionStatus.canceled": "Execution canceled",
1901
1904
  "runData.downloadBinaryData": "Download",
1902
1905
  "runData.executeNode": "Test Node",
1903
1906
  "runData.executionTime": "Execution Time",
@@ -1931,8 +1934,8 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
1931
1934
  "runData.aiContentBlock.tokens": "{count} Tokens",
1932
1935
  "runData.aiContentBlock.tokens.prompt": "Prompt:",
1933
1936
  "runData.aiContentBlock.tokens.completion": "Completion:",
1934
- "runData.trimmedData.title": "Data not viewable yet",
1935
- "runData.trimmedData.message": "It will be available here once the execution has finished.",
1937
+ "runData.trimmedData.title": "No data yet",
1938
+ "runData.trimmedData.message": "Data will be available here once the execution has finished.",
1936
1939
  "runData.trimmedData.loading": "Loading data",
1937
1940
  "runData.panel.actions.collapse": "Collapse panel",
1938
1941
  "runData.panel.actions.open": "Open panel",
@@ -2725,6 +2728,7 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
2725
2728
  "workflows.empty.preBuiltAgents": "Try a pre-built agent",
2726
2729
  "workflows.empty.shared-with-me": "No {resource} has been shared with you",
2727
2730
  "workflows.empty.shared-with-me.link": '<a href="#">Back to Personal</a>',
2731
+ "workflows.empty.readyToRunV2": "Try an AI workflow",
2728
2732
  "workflows.list.easyAI": "Test the power of AI in n8n with this simple AI Agent Workflow",
2729
2733
  "workflows.list.error.fetching": "Error fetching workflows",
2730
2734
  "workflows.shareModal.title": "Share '{name}'",
@@ -2856,8 +2860,7 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
2856
2860
  "contextual.feature.unavailable.title.cloud": "Available on the Pro Plan",
2857
2861
  "dataStore.dataStores": "Data tables",
2858
2862
  "dataStore.empty.label": "You don't have any data tables yet",
2859
- "dataStore.empty.description": "Once you create data tables for your projects, they will appear here",
2860
- "dataStore.empty.button.label": 'Create Data table in "{projectName}"',
2863
+ "dataStore.empty.description": "Use data tables to persist execution results, share data between workflows, and track metrics for evaluation.",
2861
2864
  "dataStore.card.size": "{size}MB",
2862
2865
  "dataStore.card.column.count": "{count} column | {count} columns",
2863
2866
  "dataStore.card.row.count": "{count} record | {count} records",
@@ -2868,13 +2871,12 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
2868
2871
  "dataStore.search.placeholder": "Search",
2869
2872
  "dataStore.error.fetching": "Error loading data tables",
2870
2873
  "dataStore.add.title": "Create new Data table",
2871
- "dataStore.add.description": "Set up a new data table to organize and manage your data.",
2872
2874
  "dataStore.add.button.label": "Create Data table",
2873
2875
  "dataStore.add.input.name.label": "Data table name",
2874
2876
  "dataStore.add.input.name.placeholder": "Enter data table name",
2875
2877
  "dataStore.add.error": "Error creating data table",
2876
2878
  "dataStore.delete.confirm.title": "Delete Data table",
2877
- "dataStore.delete.confirm.message": 'Are you sure you want to delete the data table "{name}"? This action cannot be undone.',
2879
+ "dataStore.delete.confirm.message": "Are you sure you want to delete the data table '{name}'? This action cannot be undone.",
2878
2880
  "dataStore.delete.error": "Error deleting data table",
2879
2881
  "dataStore.rename.error": "Error renaming data table",
2880
2882
  "dataStore.getDetails.error": "Error fetching data table details",
@@ -2887,10 +2889,12 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
2887
2889
  "dataStore.addColumn.nameInput.placeholder": "Enter column name",
2888
2890
  "dataStore.addColumn.typeInput.label": "@:_reusableBaseText.type",
2889
2891
  "dataStore.addColumn.error": "Error adding column",
2892
+ "dataStore.addColumn.alreadyExistsError": "This column already exists",
2893
+ "dataStore.addColumn.alreadyExistsDescription": "Column name already exisits, choose a different name",
2890
2894
  "dataStore.moveColumn.error": "Error moving column",
2891
2895
  "dataStore.deleteColumn.error": "Error deleting column",
2892
2896
  "dataStore.deleteColumn.confirm.title": "Delete column",
2893
- "dataStore.deleteColumn.confirm.message": 'Are you sure you want to delete the column "{name}"? This action cannot be undone.',
2897
+ "dataStore.deleteColumn.confirm.message": "Are you sure you want to delete the column '{name}'? This action cannot be undone.",
2894
2898
  "dataStore.addColumn.invalidName.error": "Invalid column name",
2895
2899
  "dataStore.addColumn.invalidName.description": "Column names must begin with a letter and can only include letters, numbers, or underscores",
2896
2900
  "dataStore.fetchContent.error": "Error fetching data store content",
@@ -2899,8 +2903,11 @@ Return "Good morning" if time is before 10am, "Good day" it's before 5pm, otherw
2899
2903
  "dataStore.updateRow.error": "Error updating row",
2900
2904
  "dataStore.deleteRows.title": "Delete Rows",
2901
2905
  "dataStore.deleteRows.confirmation": "Are you sure you want to delete {count} row? | Are you sure you want to delete {count} rows?",
2902
- "dataStore.deleteRows.success": "Rows deleted successfully",
2903
2906
  "dataStore.deleteRows.error": "Error deleting rows",
2907
+ "dataStore.banner.storageLimitWarning.message": "{usage} of Data tables storage used. Delete data to avoid errors",
2908
+ "dataStore.banner.storageLimitError.message": "{usage} of Data tables storage used, operations may fail. Delete data to avoid errors",
2909
+ "dataStore.error.tableNotInitialized": "Table not initialized",
2910
+ "dataStore.noRows": "No rows",
2904
2911
  "settings.ldap": "LDAP",
2905
2912
  "settings.ldap.note": "LDAP allows users to authenticate with their centralized account. It's compatible with services that provide an LDAP interface like Active Directory, Okta and Jumpcloud.",
2906
2913
  "settings.ldap.infoTip": "Learn more about <a href='https://docs.n8n.io/user-management/ldap/' target='_blank'>LDAP in the Docs</a>",
@@ -3473,6 +3480,7 @@ var i18nInstance = _vuei18n.createI18n.call(void 0, {
3473
3480
  messages: { en: en_default },
3474
3481
  warnHtmlMessage: false
3475
3482
  });
3483
+ var i18nVersion = _vue.ref.call(void 0, 0);
3476
3484
  var I18nClass = (_class = class {constructor() { _class.prototype.__init.call(this);_class.prototype.__init2.call(this); }
3477
3485
  __init() {this.baseTextCache = /* @__PURE__ */ new Map()}
3478
3486
  get i18n() {
@@ -3497,7 +3505,8 @@ var I18nClass = (_class = class {constructor() { _class.prototype.__init.call(th
3497
3505
  * Render a string of base text, i.e. a string with a fixed path to the localized value. Optionally allows for [interpolation](https://kazupon.github.io/vue-i18n/guide/formatting.html#named-formatting) when the localized value contains a string between curly braces.
3498
3506
  */
3499
3507
  baseText(key, options) {
3500
- const cacheKey = `${key}-${JSON.stringify(options)}`;
3508
+ i18nVersion.value;
3509
+ const cacheKey = `${i18nVersion.value}|${key}-${JSON.stringify(options)}`;
3501
3510
  if (this.baseTextCache.has(cacheKey)) {
3502
3511
  return _nullishCoalesce(this.baseTextCache.get(cacheKey), () => ( key));
3503
3512
  }
@@ -3511,6 +3520,13 @@ var I18nClass = (_class = class {constructor() { _class.prototype.__init.call(th
3511
3520
  this.baseTextCache.set(cacheKey, result);
3512
3521
  return result;
3513
3522
  }
3523
+ /**
3524
+ * Clear cached baseText results. Useful when locale messages are updated at runtime (e.g. HMR) or locale changes.
3525
+ */
3526
+ clearCache() {
3527
+ this.baseTextCache.clear();
3528
+ i18nVersion.value++;
3529
+ }
3514
3530
  /**
3515
3531
  * Render a string of dynamic text, i.e. a string with a constructed path to the localized value.
3516
3532
  */
@@ -3746,26 +3762,24 @@ var I18nClass = (_class = class {constructor() { _class.prototype.__init.call(th
3746
3762
  docLinkLabel: this.baseText("expressionEdit.learnMore")
3747
3763
  }}
3748
3764
  }, _class);
3749
- var loadedLanguages = ["en"];
3750
- async function setLanguage(language) {
3751
- i18nInstance.global.locale.value = language;
3752
- document.querySelector("html").setAttribute("lang", language);
3753
- return language;
3765
+ var loadedLanguages = [];
3766
+ function setLanguage(locale) {
3767
+ i18nInstance.global.locale.value = locale;
3768
+ document.querySelector("html").setAttribute("lang", locale);
3769
+ i18n.clearCache();
3770
+ return locale;
3754
3771
  }
3755
- async function loadLanguage(language) {
3756
- if (i18nInstance.global.locale.value === language) {
3757
- return await setLanguage(language);
3758
- }
3759
- if (loadedLanguages.includes(language)) {
3760
- return await setLanguage(language);
3772
+ function loadLanguage(locale, messages) {
3773
+ if (loadedLanguages.includes(locale)) {
3774
+ return setLanguage(locale);
3761
3775
  }
3762
- const { numberFormats, ...rest } = (await Promise.resolve().then(() => _interopRequireWildcard(require(`@n8n/i18n/locales/${language}.json`)))).default;
3763
- i18nInstance.global.setLocaleMessage(language, rest);
3776
+ const { numberFormats, ...rest } = messages;
3777
+ i18nInstance.global.setLocaleMessage(locale, rest);
3764
3778
  if (numberFormats) {
3765
- i18nInstance.global.setNumberFormat(language, numberFormats);
3779
+ i18nInstance.global.setNumberFormat(locale, numberFormats);
3766
3780
  }
3767
- loadedLanguages.push(language);
3768
- return await setLanguage(language);
3781
+ loadedLanguages.push(locale);
3782
+ return setLanguage(locale);
3769
3783
  }
3770
3784
  function addNodeTranslation(nodeTranslation, language) {
3771
3785
  const newMessages = {
@@ -3775,6 +3789,12 @@ function addNodeTranslation(nodeTranslation, language) {
3775
3789
  };
3776
3790
  i18nInstance.global.mergeLocaleMessage(language, newMessages);
3777
3791
  }
3792
+ function updateLocaleMessages(locale, messages) {
3793
+ const { numberFormats, ...rest } = messages;
3794
+ i18nInstance.global.setLocaleMessage(locale, rest);
3795
+ if (numberFormats) i18nInstance.global.setNumberFormat(locale, numberFormats);
3796
+ i18n.clearCache();
3797
+ }
3778
3798
  function addCredentialTranslation(nodeCredentialTranslation, language) {
3779
3799
  const newMessages = {
3780
3800
  "n8n-nodes-base": {
@@ -3799,5 +3819,8 @@ function useI18n() {
3799
3819
 
3800
3820
 
3801
3821
 
3802
- exports.I18nClass = I18nClass; exports.addCredentialTranslation = addCredentialTranslation; exports.addHeaders = addHeaders; exports.addNodeTranslation = addNodeTranslation; exports.i18n = i18n; exports.i18nInstance = i18nInstance; exports.loadLanguage = loadLanguage; exports.useI18n = useI18n;
3822
+
3823
+
3824
+
3825
+ exports.I18nClass = I18nClass; exports.addCredentialTranslation = addCredentialTranslation; exports.addHeaders = addHeaders; exports.addNodeTranslation = addNodeTranslation; exports.i18n = i18n; exports.i18nInstance = i18nInstance; exports.i18nVersion = i18nVersion; exports.loadLanguage = loadLanguage; exports.setLanguage = setLanguage; exports.updateLocaleMessages = updateLocaleMessages; exports.useI18n = useI18n;
3803
3826
  //# sourceMappingURL=index.cjs.map