Просмотр исходного кода

style: fix wordings and spellings

mizozobu 3 лет назад
Родитель
Сommit
1efd07cd1d

+ 1 - 1
packages/app/public/static/locales/en_US/admin.json

@@ -1033,7 +1033,7 @@
   "g2g": {
     "transfer_success": "Completed GROWI to GROWI transfer successfully",
     "error_generate_growi_archive": "Failed to generate GROWI archive file",
-    "error_send_growi_archive": "Failed to send GROWI archive file to dest GROWI"
+    "error_send_growi_archive": "Failed to send GROWI archive file to the destination GROWI"
   },
   "toaster": {
     "give_user_admin": "Succeeded to give {{username}} admin",

+ 2 - 2
packages/app/public/static/locales/zh_CN/admin.json

@@ -534,7 +534,7 @@
       "upload": "Upload",
       "discard": "Discard uploaded data",
       "errors": {
-        "versions_not_met": "This GROWI and the uploaded data versions are not met",
+        "different_versions": "The version of this GROWI and the uploaded data are not the same",
         "at_least_one": "Select one or more collections.",
         "page_and_revision": "'Pages' and 'Revisions' must be imported both.",
         "depends": "'{{target}}' must be selected when '{{condition}}' is selected."
@@ -1041,7 +1041,7 @@
   "g2g": {
     "transfer_success": "Completed GROWI to GROWI transfer successfully",
     "error_generate_growi_archive": "Failed to generate GROWI archive file",
-    "error_send_growi_archive": "Failed to send GROWI archive file to dest GROWI"
+    "error_send_growi_archive": "Failed to send GROWI archive file to the destination GROWI"
   },
   "toaster": {
     "give_user_admin": "Succeeded to give {{username}} admin",

+ 2 - 2
packages/app/src/server/routes/apiv3/g2g-transfer.ts

@@ -184,7 +184,7 @@ module.exports = (crowi: Crowi): Router => {
       logger.error(err);
       return res.apiv3Err(
         new ErrorV3(
-          'the version of this GROWI and the GROWI that exported the data are not met',
+          'The version of this GROWI and the uploaded GROWI data are not the same',
           'version_incompatible',
         ),
         500,
@@ -200,7 +200,7 @@ module.exports = (crowi: Crowi): Router => {
     }
     catch (err) {
       logger.error(err);
-      return res.apiv3Err(new ErrorV3('Import settings invalid. See GROWI docs about details.', 'import_settings_invalid'));
+      return res.apiv3Err(new ErrorV3('Import settings are invalid. See GROWI docs about details.', 'import_settings_invalid'));
     }
 
     try {

+ 3 - 3
packages/app/src/server/routes/apiv3/import.js

@@ -355,9 +355,9 @@ export default function route(crowi) {
       return res.apiv3(data);
     }
     catch {
-      const msg = 'the version of this GROWI and the GROWI that exported the data are not met';
-      const varidationErr = 'versions-are-not-met';
-      return res.apiv3Err(new ErrorV3(msg, varidationErr), 500);
+      const msg = 'The version of this GROWI and the uploaded GROWI data are not the same';
+      const validationErr = 'versions-are-not-met';
+      return res.apiv3Err(new ErrorV3(msg, validationErr), 500);
     }
   });
 

+ 6 - 5
packages/app/src/server/service/g2g-transfer.ts

@@ -253,7 +253,8 @@ export class G2GTransferPusherService implements Pusher {
       return {
         canTransfer: false,
         // TODO: i18n for reason
-        reason: `The number of active users (${activeUserCount} users) exceeds the limit of dest GROWI (to up ${destGROWIInfo.userUpperLimit} users).`,
+        // eslint-disable-next-line max-len
+        reason: `The number of active users (${activeUserCount} users) exceeds the limit of the destination GROWI (up to ${destGROWIInfo.userUpperLimit} users).`,
       };
     }
 
@@ -261,7 +262,7 @@ export class G2GTransferPusherService implements Pusher {
       return {
         canTransfer: false,
         // TODO: i18n for reason
-        reason: 'File upload is disabled in dest GROWI.',
+        reason: 'The file upload setting is disabled in the destination GROWI.',
       };
     }
 
@@ -278,7 +279,7 @@ export class G2GTransferPusherService implements Pusher {
       return {
         canTransfer: false,
         // TODO: i18n for reason
-        reason: 'The storage of dest GROWI is not writable.',
+        reason: 'The storage of the destination GROWI is not writable.',
       };
     }
 
@@ -288,7 +289,7 @@ export class G2GTransferPusherService implements Pusher {
         canTransfer: false,
         // TODO: i18n for reason
         // eslint-disable-next-line max-len
-        reason: `Total file size exceeds file upload limit of dest GROWI. Requires ${totalFileSize.toLocaleString()} bytes, but got ${(destGROWIInfo.fileUploadTotalLimit ?? Infinity).toLocaleString()} bytes.`,
+        reason: `The total file size of attachments exceeds the file upload limit of the destination GROWI. Requires ${totalFileSize.toLocaleString()} bytes, but got ${(destGROWIInfo.fileUploadTotalLimit ?? Infinity).toLocaleString()} bytes.`,
       };
     }
 
@@ -451,7 +452,7 @@ export class G2GTransferPusherService implements Pusher {
         mongo: G2G_PROGRESS_STATUS.ERROR,
         attachments: G2G_PROGRESS_STATUS.PENDING,
       });
-      socket.emit('admin:g2gError', { message: 'Failed to send GROWI archive file to dest GROWI', key: 'admin:g2g:error_send_growi_archive' });
+      socket.emit('admin:g2gError', { message: 'Failed to send GROWI archive file to the destination GROWI', key: 'admin:g2g:error_send_growi_archive' });
       throw err;
     }
 

+ 1 - 1
packages/app/src/server/service/import.js

@@ -518,7 +518,7 @@ class ImportService {
    */
   validate(meta) {
     if (meta.version !== this.crowi.version) {
-      throw new Error('the version of this GROWI and the GROWI that exported the data are not met');
+      throw new Error('The version of this GROWI and the uploaded GROWI data are not the same');
     }
 
     // TODO: check if all migrations are completed