mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-20 09:02:00 +02:00
- finally cleaned up localisation (now i18n) - made localisation strings easier to read and understand - removed static selected language in service modules - added support for russian language (привет-привет) - it's now extremely easy to add support for more languages. just copy en folder in i18n and start translating strings. pull requests for adding languages are more than welcome.
11 lines
No EOL
338 B
JavaScript
11 lines
No EOL
338 B
JavaScript
import loc from "./i18n.js";
|
|
|
|
export function internalError(res) {
|
|
res.status(501).json({ status: "error", text: "Internal Server Error" });
|
|
}
|
|
export function errorUnsupported(lang) {
|
|
return loc(lang, 'apiError', 'notSupported');
|
|
}
|
|
export function genericError(lang, host) {
|
|
return loc(lang, 'apiError', 'brokenLink', host);
|
|
} |