From fb85f9238230a85421571e22ea431fd98d80bcd6 Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Tue, 1 Oct 2024 14:39:06 +0000 Subject: [PATCH 1/7] Translated using Weblate (Basque) Currently translated at 96.4% (1410 of 1462 strings) Translation: Grist/client Translate-URL: https://hosted.weblate.org/projects/grist/client/eu/ --- static/locales/eu.client.json | 54 +++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/static/locales/eu.client.json b/static/locales/eu.client.json index d332690b..beca96ef 100644 --- a/static/locales/eu.client.json +++ b/static/locales/eu.client.json @@ -192,7 +192,12 @@ "No {{columnType}} columns in table.": "Ez dago {{columnType}} zutaberik taulan.", " (optional)": " (aukerakoa)", "{{wrongTypeCount}} non-{{columnType}} columns are not shown_other": "{{wrongTypeCount}} ez dira {{columnType}} zutabeak erakusten", - "Full document access": "Sarbide osoa dokumentura" + "Full document access": "Sarbide osoa dokumentura", + "Accept": "Onartu", + "Developer:": "Garatzailea:", + "Last updated:": "Azkenekoz eguneratua:", + "Missing description and author information.": "Ez dago deskribapen ezta egilearen informaziorik ere.", + "Reject": "Baztertu" }, "DataTables": { "Click to copy": "Egin klik kopiatzeko", @@ -257,7 +262,8 @@ "Workspace not found": "Ez da lan-eremua aurkitu", "You are on the {{siteName}} site. You also have access to the following sites:": "{{siteName}} gunean zaude. Honako gune hauetara ere sar zaitezke:", "You are on your personal site. You also have access to the following sites:": "Zure leku pertsonalean zaude. Honako gune hauetara ere sar zaitezke:", - "You may delete a workspace forever once it has no documents in it.": "Lan-eremu bat betiko ezabatzeko ezin du barruan dokumenturik izan." + "You may delete a workspace forever once it has no documents in it.": "Lan-eremu bat betiko ezabatzeko ezin du barruan dokumenturik izan.", + "Create my first document": "Sortu nire lehen dokumentua" }, "DocPageModel": { "Add Empty Table": "Gehitu taula hutsa", @@ -493,7 +499,8 @@ "Get started by exploring templates, or creating your first Grist document.": "Has zaitez txantiloiak arakatuz edo zure lehen Grist dokumentua sortuz.", "Get started by inviting your team and creating your first Grist document.": "Has zaitez zure taldea gonbidatuz eta zure lehen Grist dokumentua sortuz.", "Interested in using Grist outside of your team? Visit your free ": "Grist zure taldetik kanpo erabili nahi duzu? Bisitatu zure doako ", - "Sprouts Program": "Kimuen programa" + "Sprouts Program": "Kimuen programa", + "Only show documents": "Erakutsi dokumentuak bakarrik" }, "HomeLeftPane": { "All Documents": "Dokumentu guztiak", @@ -720,7 +727,8 @@ "API Console": "API kontsola" }, "TopBar": { - "Manage Team": "Kudeatu taldea" + "Manage Team": "Kudeatu taldea", + "Manage team": "Kudeatu taldea" }, "TriggerFormulas": { "Cancel": "Utzi", @@ -1537,7 +1545,8 @@ "Grist allows for very powerful formulas, using Python. We recommend setting the environment variable GRIST_SANDBOX_FLAVOR to gvisor if your hardware supports it (most will), to run formulas in each document within a sandbox isolated from other documents and isolated from the network.": "Gristek formula oso boteretsuak onartzen ditu, Python erabiliz. Dokumentu bakoitzean beste dokumentu batzuetatik eta saretik isolatutako sandbox baten barruan formulak exekutatzeko, GRIST_SANDBOX_FLAVOR aldagaia gvisor-era aldatzea gomendatzen dugu, zure hardwarea bateragarria bada (gehienak badira).", "Session Secret": "Saioaren gakoa", "Enable Grist Enterprise": "Gaitu Grist Enterprise", - "Enterprise": "Enterprise" + "Enterprise": "Enterprise", + "checking": "egiaztatzen" }, "Columns": { "Remove Column": "Kendu zutabea" @@ -1680,5 +1689,40 @@ "Table {{tableName}} will no longer be visible": "{{tableName}} taula ez da ikusgai egongo aurrerantzean", "raw data page": "datu gordinen orria", "Delete": "Ezabatu" + }, + "CustomWidgetGallery": { + "Add Your Own Widget": "Gehitu zure widgeta", + "Cancel": "Utzi", + "Change Widget": "Aldatu widgeta", + "Developer:": "Garatzailea:", + "Last updated:": "Azkenekoz eguneratua:", + "Search": "Bilatu", + "Widget URL": "Widgetaren URLa", + "Add Widget": "Gehitu widgeta", + "(Missing info)": "(Informaziorik gabe)", + "Grist Widget": "Grist widgeta", + "No matching widgets": "Ez dago bat datorren widgetik" + }, + "HomeIntroCards": { + "Help center": "Laguntza gunea", + "Learn more {{webinarsLinks}}": "Ikasi gehiago {{webinarsLinks}}", + "Start a new document": "Hasi dokuemntu berria", + "Templates": "Txantiloiak", + "Blank document": "Dokumentu zuria", + "Import file": "Inportatu fitxategia" + }, + "ReverseReferenceConfig": { + "Delete": "Ezabatu", + "Table": "Taula", + "Target table": "Helmugako taula", + "Delete column {{column}} in table {{table}}?": "{{table}} taulako {{column}} zutabea ezabatu nahi duzu?", + "Column": "Zutabea" + }, + "SupportGristButton": { + "Close": "Itxi", + "Help Center": "Laguntza gunea" + }, + "buildReassignModal": { + "Cancel": "Utzi" } } From 35a429d99e44bbf6b0c7f0f3edb2a4a13dc9dfb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Guti=C3=A9rrez=20Hermoso?= Date: Wed, 2 Oct 2024 07:56:13 -0400 Subject: [PATCH 2/7] Assistant: ensure that ASSISTANT_API_KEY is a real synonym for OPEN_AI_KEY This was flagged as inconsistent in a community post. https://community.getgrist.com/t/does-the-ai-formula-assist-also-works-with-the-desktop-mac-app/5677/6 --- app/server/lib/Assistance.ts | 11 ++++++----- app/server/lib/sendAppPage.ts | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/server/lib/Assistance.ts b/app/server/lib/Assistance.ts index 40ed3579..24d73203 100644 --- a/app/server/lib/Assistance.ts +++ b/app/server/lib/Assistance.ts @@ -158,8 +158,7 @@ export class OpenAIAssistant implements Assistant { private _maxTokens = process.env.ASSISTANT_MAX_TOKENS ? parseInt(process.env.ASSISTANT_MAX_TOKENS, 10) : undefined; - public constructor() { - const apiKey = process.env.ASSISTANT_API_KEY || process.env.OPENAI_API_KEY; + public constructor(apiKey: string | undefined) { const endpoint = process.env.ASSISTANT_CHAT_COMPLETION_ENDPOINT; if (!apiKey && !endpoint) { throw new Error('Please set either OPENAI_API_KEY or ASSISTANT_CHAT_COMPLETION_ENDPOINT'); @@ -485,11 +484,13 @@ class EchoAssistant implements Assistant { * Instantiate an assistant, based on environment variables. */ export function getAssistant() { - if (process.env.OPENAI_API_KEY === 'test') { + const apiKey = process.env.ASSISTANT_API_KEY || process.env.OPENAI_API_KEY; + + if (apiKey === 'test') { return new EchoAssistant(); } - if (process.env.OPENAI_API_KEY || process.env.ASSISTANT_CHAT_COMPLETION_ENDPOINT) { - return new OpenAIAssistant(); + if (apiKey || process.env.ASSISTANT_CHAT_COMPLETION_ENDPOINT) { + return new OpenAIAssistant(apiKey); } throw new Error('Please set OPENAI_API_KEY or ASSISTANT_CHAT_COMPLETION_ENDPOINT'); } diff --git a/app/server/lib/sendAppPage.ts b/app/server/lib/sendAppPage.ts index 38f3dcb5..2aba9d31 100644 --- a/app/server/lib/sendAppPage.ts +++ b/app/server/lib/sendAppPage.ts @@ -89,7 +89,9 @@ export function makeGristConfig(options: MakeGristConfigOptions): GristLoadConfi supportedLngs: readLoadedLngs(req?.i18n), namespaces: readLoadedNamespaces(req?.i18n), featureComments: isAffirmative(process.env.COMMENTS), - featureFormulaAssistant: Boolean(process.env.OPENAI_API_KEY || process.env.ASSISTANT_CHAT_COMPLETION_ENDPOINT), + featureFormulaAssistant: Boolean(process.env.OPENAI_API_KEY || + process.env.ASSISTANT_API_KEY || + process.env.ASSISTANT_CHAT_COMPLETION_ENDPOINT), assistantService: process.env.OPENAI_API_KEY ? 'OpenAI' : undefined, permittedCustomWidgets: getPermittedCustomWidgets(server), supportEmail: SUPPORT_EMAIL, From 1cf52e1b0a71acff6547aedf2082d9a1dde75773 Mon Sep 17 00:00:00 2001 From: Tristan Robert Date: Fri, 4 Oct 2024 01:15:20 +0200 Subject: [PATCH 3/7] Fetch Url Widget Repository behind corporate proxy (#1238) (#1239) --- README.md | 2 +- app/server/lib/WidgetRepository.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95fb1803..a1b97910 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,7 @@ Grist can be configured in many ways. Here are the main environment variables it | GRIST_ENABLE_REQUEST_FUNCTION | enables the REQUEST function. This function performs HTTP requests in a similar way to `requests.request`. This function presents a significant security risk, since it can let users call internal endpoints when Grist is available publicly. This function can also cause performance issues. Unset by default. | | GRIST_HIDE_UI_ELEMENTS | comma-separated list of UI features to disable. Allowed names of parts: `helpCenter,billing,templates,createSite,multiSite,multiAccounts,sendToDrive,tutorials,supportGrist`. If a part also exists in GRIST_UI_FEATURES, it will still be disabled. | | GRIST_HOST | hostname to use when listening on a port. | -| GRIST_HTTPS_PROXY | if set, use this proxy for webhook payload delivery. | +| GRIST_HTTPS_PROXY | if set, use this proxy for webhook payload delivery or fetching custom widgets repository from url. | | GRIST_ID_PREFIX | for subdomains of form o-*, expect or produce o-${GRIST_ID_PREFIX}*. | | GRIST_IGNORE_SESSION | if set, Grist will not use a session for authentication. | | GRIST_INCLUDE_CUSTOM_SCRIPT_URL | if set, will load the referenced URL in a `