fix(strings): use Constant Format String

Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
This commit is contained in:
Dorra Jaouad 2025-04-01 09:13:38 +02:00
parent d68abc9846
commit 5583d17ffa
5 changed files with 8 additions and 8 deletions

View file

@ -308,7 +308,7 @@ function extractFeatureVersion(feature) {
}
}
console.error('Failed to get feature version for ' + feature, talkFeatures)
console.error('Failed to get feature version for %s', feature, talkFeatures)
throw new Error()
}

View file

@ -356,7 +356,7 @@ const actions = {
knownPaths[promptPath] = suffix
context.commit('markFileAsPendingUpload', { uploadId, index, sharePath: uniquePath })
} catch (exception) {
console.error(`Error while uploading file "${fileName}":` + exception.message, fileName)
console.error('Error while uploading file "%s": %s', fileName, exception.message)
if (exception.response) {
const message = await parseUploadError(exception)
if (message) {
@ -408,7 +408,7 @@ const actions = {
} catch (exception) {
let reason = 'failed-upload'
if (exception.response) {
console.error(`Error while uploading file "${fileName}":` + exception, fileName, exception.response.status)
console.error('Error while uploading file "%s": %s', fileName, exception.message)
if (exception.response.status === 507) {
reason = 'quota'
showError(t('spreed', 'Not enough free space to upload file "{fileName}"', { fileName }))
@ -416,7 +416,7 @@ const actions = {
showError(t('spreed', 'Error while uploading file "{fileName}"', { fileName }))
}
} else {
console.error(`Error while uploading file "${fileName}":` + exception.message, fileName)
console.error('Error while uploading file "%s": %s', fileName, exception.message)
showError(t('spreed', 'Error while uploading file "{fileName}"', { fileName }))
}

View file

@ -1294,7 +1294,7 @@ const actions = {
context.commit('setCancelPostNewMessage', { messageId: temporaryMessage.id, cancelFunction: null })
let statusCode = null
console.error(`error while submitting message ${error}`, error)
console.error('error while submitting message %s', error)
if (error.isAxiosError) {
statusCode = error?.response?.status
}

View file

@ -1065,7 +1065,7 @@ Signaling.Standalone.prototype.helloResponseReceived = function(data) {
// TODO(fancycode): How should this be handled better?
const url = this._getBackendUrl()
console.error('Could not connect to server using backend url ' + url, data)
console.error('Could not connect to server using backend url %s %o', url, data)
this.reconnect()
return
}

View file

@ -99,9 +99,9 @@ VideoConstrainer.prototype = {
this._knownValidConstraintsForQuality[quality] = constraints
console.debug('Changed quality to ' + quality)
console.debug('Changed quality to %d', quality)
} catch (error) {
console.warn('Failed to set quality ' + quality, error)
console.warn('Failed to set quality %d', quality, error)
const resolutionConstraints = {
width: constraints.width,