gt-sanity 2.0.16 → 2.0.17

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
@@ -1365,7 +1365,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1365
1365
  setDocuments(dedupeDocumentsPreferDraft(docs));
1366
1366
  } catch {
1367
1367
  toast.push({
1368
- title: "Error fetching documents",
1368
+ title: "Documents could not be loaded. Check your Sanity connection and try refreshing.",
1369
1369
  status: "error",
1370
1370
  closable: !0
1371
1371
  });
@@ -1379,7 +1379,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1379
1379
  setLocales(availableLocales);
1380
1380
  } catch {
1381
1381
  toast.push({
1382
- title: "Error fetching locales",
1382
+ title: "Locales could not be loaded. Check your General Translation credentials and try again.",
1383
1383
  status: "error",
1384
1384
  closable: !0
1385
1385
  });
@@ -1411,7 +1411,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1411
1411
  }), setExistingTranslations(existing);
1412
1412
  } catch (error) {
1413
1413
  console.error("Error fetching existing translations:", error), toast.push({
1414
- title: "Error fetching existing translations",
1414
+ title: "Existing translations could not be loaded. Try refreshing before importing.",
1415
1415
  status: "error",
1416
1416
  closable: !0
1417
1417
  });
@@ -1447,7 +1447,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1447
1447
  });
1448
1448
  } catch {
1449
1449
  toast.push({
1450
- title: "Error creating translation tasks",
1450
+ title: "Translation tasks could not be created. No documents were changed. Try again or check the console for details.",
1451
1451
  status: "error",
1452
1452
  closable: !0
1453
1453
  });
@@ -1503,7 +1503,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1503
1503
  });
1504
1504
  } catch (error) {
1505
1505
  console.error("Error importing translations:", error), toast.push({
1506
- title: "Error importing translations",
1506
+ title: "Translations could not be imported. No documents were changed. Try again or check the console for details.",
1507
1507
  status: "error",
1508
1508
  closable: !0
1509
1509
  });
@@ -1605,7 +1605,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1605
1605
  });
1606
1606
  } catch (error) {
1607
1607
  console.error("Error importing missing translations:", error), toast.push({
1608
- title: "Error importing missing translations",
1608
+ title: "Missing translations could not be imported. No documents were changed. Try again or check the console for details.",
1609
1609
  status: "error",
1610
1610
  closable: !0
1611
1611
  });
@@ -1691,7 +1691,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1691
1691
  });
1692
1692
  } catch (error) {
1693
1693
  console.error("Error refreshing translation status:", error), toast.push({
1694
- title: "Error refreshing translation status",
1694
+ title: "Translation status could not be refreshed. Try again before importing.",
1695
1695
  status: "error",
1696
1696
  closable: !0
1697
1697
  });
@@ -1766,7 +1766,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1766
1766
  });
1767
1767
  } catch (importError) {
1768
1768
  console.error("Failed to import translation:", importError), toast.push({
1769
- title: `Failed to import translation for ${documentId} (${localeId})`,
1769
+ title: `Translation for ${documentId} (${localeId}) could not be imported. This document was not changed.`,
1770
1770
  status: "error",
1771
1771
  closable: !0
1772
1772
  });
@@ -1779,7 +1779,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1779
1779
  });
1780
1780
  } catch (error) {
1781
1781
  console.error("Error importing translation:", error), toast.push({
1782
- title: `Error importing translation for ${documentId}`,
1782
+ title: `Translation for ${documentId} could not be imported. This document was not changed.`,
1783
1783
  status: "error",
1784
1784
  closable: !0
1785
1785
  });
@@ -1853,7 +1853,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1853
1853
  }), patchedCount;
1854
1854
  } catch (error) {
1855
1855
  return console.error("Error patching document references:", error), toast.push({
1856
- title: "Error patching document references",
1856
+ title: "Document references could not be updated. Imported translations may need to be linked manually.",
1857
1857
  status: "error",
1858
1858
  closable: !0
1859
1859
  }), 0;
@@ -1908,7 +1908,7 @@ const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) =>
1908
1908
  }), translatedDocumentIds.length;
1909
1909
  } catch (error) {
1910
1910
  return console.error("Error publishing translations:", error), toast.push({
1911
- title: "Error publishing translations",
1911
+ title: "Translations could not be published. No unpublished source documents were changed.",
1912
1912
  status: "error",
1913
1913
  closable: !0
1914
1914
  }), 0;