common_error_commonFailure method

String common_error_commonFailure(
  1. Object type
)

{type, select, common_error_serverError{Something went wrong while we were talking with our server. Please try again and if the problem persists, reach out to us for support.} common_error_insufficientPermission{You have insufficient permission to access this document. Please check you with your admin for adding permissions.} common_error_emulatorError{Emulator Error.} common_error_noWeatherData{There is no weather data for your apiaries location. Please check that the location is valid and if the problem persists, please contact us for support.} common_error_location{There was a problem when retreiving the location. Please check the location is valid and if the problem persists, please contact us for support.} common_error_missingLocationPermission{You have not given permission to use the device's location. In order to use this feature, please update your permissions in your settings.} common_error_missingCameraPermission{You have not given permission to use the device's camera. In order to use this feature, please update your permissions in your settings.} common_error_missingGalleryPermission{You have not given permission to use the device's pictures. In order to use this feature, please update your permissions in your settings.} hive_error_invalidDocument{The document is invalid or corrupt. Please note the ID in the top right and contact us for support.} common_error_missingTasks{You don’t have any tasks currently on this apiary. You can add a new task by clicking the button below. If you think there is an error then try refresh the page from the menu in top right.} other{Unknown}}

Implementation

String common_error_commonFailure(Object type) {
  return Intl.select(
    type,
    {
      'common_error_serverError':
          'Something went wrong while we were talking with our server. Please try again and if the problem persists, reach out to us for support.',
      'common_error_insufficientPermission':
          'You have insufficient permission to access this document. Please check you with your admin for adding permissions.',
      'common_error_emulatorError': 'Emulator Error.',
      'common_error_noWeatherData':
          'There is no weather data for your apiaries location.  Please check that the location is valid and if the problem persists, please contact us for support.',
      'common_error_location':
          'There was a problem when retreiving the location.  Please check the location is valid and if the problem persists, please contact us for support.',
      'common_error_missingLocationPermission':
          'You have not given permission to use the device\'s location.  In order to use this feature, please update your permissions in your settings.',
      'common_error_missingCameraPermission':
          'You have not given permission to use the device\'s camera. In order to use this feature, please update your permissions in your settings.',
      'common_error_missingGalleryPermission':
          'You have not given permission to use the device\'s pictures. In order to use this feature, please update your permissions in your settings.',
      'hive_error_invalidDocument':
          'The document is invalid or corrupt.  Please note the ID in the top right and contact us for support.',
      'common_error_missingTasks':
          'You don’t have any tasks currently on this apiary. You can add a new task by clicking the button below. If you think there is an error then try refresh the page from the menu in top right.',
      'other': 'Unknown',
    },
    name: 'common_error_commonFailure',
    desc: '',
    args: [type],
  );
}