Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
tejaswarathe committed Dec 21, 2024
1 parent de526f1 commit ccd556d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/i18n/scripts/translations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ const replacePlaceholders = (json, locale, deprecatedKeys, invalidKeys) => {
* translations are replaced with camelCased keys the app expects.
*/
function replacer(_, match) {
const targetWords = {"openverse": "Openverse"}
const targetWords = { openverse: "Openverse" }

if (match.includes("-")) {
recordProblems(match, deprecatedKeys)
}

// Check if the match is one of the target words
if (match in targetWords) {
return `{'${targetWords[match]}'}` // Add single quotes
return `{'${targetWords[match]}'}`
}

return `{${kebabToCamel(match)}}`
Expand Down

0 comments on commit ccd556d

Please sign in to comment.