@crowdin/app-project-module 0.84.1 → 0.84.2

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.
@@ -178,6 +178,7 @@ function processSyncSettings({ config, integration, period, syncSettings, }) {
178
178
  crowdinId: crowdinCredentials.id,
179
179
  clientId: integrationCredentials.id,
180
180
  };
181
+ const logInfo = (0, logger_1.withContext)(context);
181
182
  try {
182
183
  const preparedCrowdinClient = yield (0, connection_1.prepareCrowdinClient)({
183
184
  config,
@@ -189,6 +190,9 @@ function processSyncSettings({ config, integration, period, syncSettings, }) {
189
190
  crowdinClient = preparedCrowdinClient.client;
190
191
  }
191
192
  catch (e) {
193
+ intConfig.schedule = '0';
194
+ yield (0, storage_1.getStorage)().updateIntegrationConfig(syncSettings.integrationId, JSON.stringify(intConfig));
195
+ logInfo(`Auto-sync has been disabled for organization '${crowdinCredentials.id}'.`);
192
196
  (0, logger_1.logError)(e, context);
193
197
  return;
194
198
  }
@@ -159,8 +159,8 @@ function applyIntegrationModuleDefaults(config, integration) {
159
159
  if (integration.withCronSync || integration.webhooks) {
160
160
  defaultSettings.push({
161
161
  key: 'schedule',
162
- label: 'Auto sync',
163
- helpText: 'Adjust the update frequency for sources and translations. If enabled, make sure Auto Sync is enabled for your selected directories and files in the dual pane view.',
162
+ label: 'Sync schedule',
163
+ helpText: `Defines how often content is synced between ${config.name} and Crowdin. Make sure Auto Sync is enabled for selected directories and files in the dual pane view.`,
164
164
  type: 'select',
165
165
  defaultValue: '0',
166
166
  options: [
@@ -208,16 +208,18 @@ function applyIntegrationModuleDefaults(config, integration) {
208
208
  }
209
209
  if (integration.uploadTranslations) {
210
210
  defaultSettings.push({
211
+ labelHtml: `<b>Translation sync settings (${config.name} → Crowdin)</b>`,
212
+ }, {
211
213
  key: 'importEqSuggestions',
212
- label: 'Allow target translation to match source',
214
+ label: 'Add translations that are the same as the source text',
213
215
  type: 'checkbox',
214
216
  }, {
215
217
  key: 'autoApproveImported',
216
- label: 'Approve added translations',
218
+ label: 'Mark added translations as Approved in Crowdin',
217
219
  type: 'checkbox',
218
220
  }, {
219
221
  key: 'translateHidden',
220
- label: 'Translate hidden strings',
222
+ label: 'Add translations for hidden source strings in Crowdin',
221
223
  type: 'checkbox',
222
224
  });
223
225
  }
@@ -80,9 +80,9 @@
80
80
  integration-logo="logo.png"
81
81
  {{#if uploadTranslations}}
82
82
  {{#if excludedTargetLanguages}}
83
- integration-button-menu-items='[{"label":"Sync translations", "title":"Sync translations to Crowdin", "action":"uploadTranslations"}, {"label":"Select target languages", "title":"Upload file for translation into selected languages", "action":"excludedTargetLanguages"}]'
83
+ integration-button-menu-items='[{"label":"Sync translations", "title":"Sync existing translations from {{name}} to Crowdin. Falls back to heuristics if string keys are not defined. Accuracy may vary.", "action":"uploadTranslations"}, {"label":"Select target languages", "title":"Upload file for translation into selected languages", "action":"excludedTargetLanguages"}]'
84
84
  {{else}}
85
- integration-button-menu-items='[{"label":"Sync translations", "title":"Sync translations to Crowdin", "action":"uploadTranslations"}]'
85
+ integration-button-menu-items='[{"label":"Sync translations", "title":"Sync existing translations from {{name}} to Crowdin. Falls back to heuristics if string keys are not defined. Accuracy may vary.", "action":"uploadTranslations"}]'
86
86
  {{/if}}
87
87
  {{else}}
88
88
  {{#if excludedTargetLanguages}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.84.1",
3
+ "version": "0.84.2",
4
4
  "description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",