Skip to content

v1.1.0

Compare
Choose a tag to compare
@ttsukagoshi ttsukagoshi released this 11 Feb 15:20
· 6 commits to main since this release

What's Changed

SheetsL will now be using the POST method together with the payload property for calling the DeepL API for translation via Google Apps Script's built-in UrlFetchApp.fetch() method. This will significantly increase the number of cells and text length that the add-on can translate in a single execution of the translation.

  • Switch to using payload on the POST method on calling the DeepL API for translation at the /v2/translate endpoint by @ttsukagoshi in #152

Details

The previous versions of SheetsL have used the traditional DeepL API translation method of calling the request via URL parameters, where the source text(s) and the language settings were embedded directly in the URL for calling the API. Together with Google Apps Script's limitation that URL length must be within 2KB/call, this had imposed a rather limited experience for SheetsL users, especially when they wanted to bulk translate a large number of cells.

Now that the add-on uses the payload property when calling the API, it can translate chunks of cells at the same time.

As of the time of this release, the official DeepL API documentation states that the total request body size should not exceed 128 KiB, i.e., 128 * 1024 bytes, for a single translation request. Also, a single call can contain up to 50 texts, which in SheetsL will mean 50 Google Sheets cells. Users of SheetsL, however, do not have to care about these limitations. SheetsL will automatically split the translation request when necessary and concatenate the results, so the user should not notice any difference. Select as many cells that you want to translate and let SheetsL do the job.
The only time that a user will be given a heads-up error notification is when a cell in Google Sheets selected by the user for translation contains text long enough to exceed the 128 KiB limit just by itself. Since SheetsL cannot split the translation request for a single cell, an error message will be shown to the user to prompt them to adjust the contents of the cell in question.

Full Changelog: v1.0.4...v1.1.0