Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
declare var OC: Nextcloud.v16.OC | Nextcloud.v17.OC | Nextcloud.v18.OC | Nextcloud.v19.OC | Nextcloud.v20.OC;
declare var window: Nextcloud.v16.WindowWithGlobals | Nextcloud.v17.WindowWithGlobals | Nextcloud.v18.WindowWithGlobals | Nextcloud.v19.WindowWithGlobals;

import { decode as decodeHtml } from 'html-entities'

/**
* Returns the user's locale
*/
Expand Down Expand Up @@ -51,7 +53,7 @@ export function translate(app: string, text: string, vars?: object, count?: numb
return text
}

return OC.L10N.translate(app, text, vars, count, options)
return decodeHtml(OC.L10N.translate(app, text, vars, count, options))
}

/**
Expand All @@ -72,7 +74,7 @@ export function translatePlural(app: string, textSingular: string, textPlural: s
return textSingular
}

return OC.L10N.translatePlural(app, textSingular, textPlural, count, vars, options)
return decodeHtml(OC.L10N.translatePlural(app, textSingular, textPlural, count, vars, options))
}

/**
Expand Down
Loading