407 lines
10 KiB
TypeScript

export function getLanguage(lang:string): any {
if (lang === "de")
return de;
return en;
}
export const en = {
upload: "Upload",
cancel: "Cancel",
close: "Close",
uploading: "Uploading...",
uploaded: "Uploaded",
fetching: "Getting your image from $1$...",
poweredBy: "Powered by $1$",
needHelp: "Need help?",
units: {
px: "px",
"%": "%",
deg: "°",
},
errors: {
response_not_ok: "We got an error fetching this file",
unable_to_search: "We got an error searching",
invalid_service_url: "This is not $A$ $1$ URL",
invalid_url: "This URL seems to be invalid",
upload_aborted: "Your upload was cancelled",
upload_error: "We got an error uploading this file",
file_type_not_allowed: "This file type is not allowed",
file_too_large: "Your file should be smaller than $1$",
},
help: {
loading: "Loading help...",
close: "Close help",
},
services: {
default: {
heading: "Select an image",
},
local: {
title: "Choose file",
button: "Select a file",
or: "or",
drop: "Drop files here",
},
camera: {
title: "Camera",
button: "Click photo",
switch: "Switch camera",
waiting: "Waiting for permission...",
unableToRead:
"We're not able to read your camera's video. This may be because you didn't grant the required permission, or because your device doesn't support camera access.",
},
microlink: {
button: "Import from $1$",
label: "$1$ $2$ URL",
placeholder: "Enter $A$ $1$ $2$ URL",
type: "post",
},
url: {
title: "Direct URL",
label: "Image URL",
placeholder: "Enter an image URL",
},
instagram: {
title: "Instagram",
},
facebook: {
title: "Facebook",
},
flickr: {
title: "Flickr",
type: "photo",
},
ninegag: {
title: "9GAG",
type: "photo",
},
deviantart: {
title: "DeviantArt",
},
artstation: {
title: "ArtStation",
},
twitter: {
title: "Twitter",
type: "image tweet",
},
pinterest: {
title: "Pinterest",
type: "pin",
},
flipboard: {
title: "Flipboard",
type: "article",
},
fotki: {
title: "Fotki",
type: "photo",
},
linkedin: {
title: "LinkedIn",
},
reddit: {
title: "Reddit",
},
tumblr: {
title: "Tumblr",
},
weheartit: {
title: "We Heart It",
},
screenshot: {
title: "Screenshot",
button: "Take screenshot",
label: "Webpage URL",
placeholder: "Enter a webpage URL",
loading: "Taking a screenshot...",
},
search: {
button: "Search on $1$",
label: "Find an image",
placeholder: "Search for something",
imagesPoweredBy: "Images powered by $1$",
},
giphy: {
title: "GIPHY",
},
unsplash: {
title: "Unsplash",
},
pixabay: {
title: "Pixabay",
},
pexels: {
title: "Pexels",
},
},
effects: {
preview: {
title: "Preview",
},
filters: {
title: "Filters",
},
crop: {
title: "Crop",
aspectRatios: {
free: "Free",
square: "Square",
},
},
rotate: {
title: "Rotate",
},
flip: {
title: "Flip",
buttons: {
horizontal: "Horizontal",
vertical: "Vertical",
},
},
sharpen: {
title: "Sharpen",
},
blur: {
title: "Blur",
},
brightness: {
title: "Brightness",
},
contrast: {
title: "Contrast",
},
grayscale: {
title: "Grayscale",
},
"hue-rotate": {
title: "Hue rotate",
},
invert: {
title: "Invert",
},
saturate: {
title: "Saturate",
},
sepia: {
title: "Sepia",
},
},
/**
* Helpers can transform a string before returning it
* You can define a language-specific helper here
*/
helper: (text: string) => {
// Replace all instances of $A$ with "a" or "an"
const AAN = "$A$";
while (text.indexOf(AAN) !== -1) {
const index = text.indexOf(AAN);
if (text.length > index + 3) {
if (
["a", "e", "i", "o", "u"].indexOf(text[index + 4].toLowerCase()) !==
-1
) {
text = text.replace(AAN, "an");
} else {
text = text.replace(AAN, "a");
}
}
}
return text;
},
};
export const de = {
upload: "Hochladen",
cancel: "Abbrechen",
close: "Schließen",
uploading: "Hochladen ...",
uploaded: "Hochgeladen",
fetching: "Bild abrufen von $1$ ...",
poweredBy: "Powered by $1$",
needHelp: "Benötigen Sie Hilfe?",
units: {
px: "px",
"%": "%",
deg: "°",
},
errors: {
response_not_ok: "Beim Abrufen dieser Datei ist ein Fehler aufgetreten",
unable_to_search: "Bei der Suche ist ein Fehler aufgetreten",
invalid_service_url: "Dies ist keine $1$ -URL",
invalid_url: "Diese URL ist ungültig",
upload_aborted: "Der Upload wurde abgebrochen",
upload_error: "Beim Hochladen dieser Datei ist ein Fehler aufgetreten",
file_type_not_allowed: "Dieser Dateityp wird nicht unterstützt",
file_too_large: "Die Datei muss kleiner als $1$ sein",
},
help: {
loading: "Lade Hilfe...",
close: "Hilfe schließen",
},
services: {
default: {
heading: "Wählen Sie ein Bild aus",
},
local: {
title: "Wählen Sie eine Datei",
button: "Wählen Sie eine Datei aus",
or: "oder",
drop: "Ziehen Sie eine Datei hier her, um sie hochzuladen",
},
camera: {
title: "Kamera",
button: "Webcam Foto",
switch: "Kamera wechseln",
waiting: "Warten auf Kamera-Erlaubnis ...",
unableToRead:
"Wir können das Video nicht von Ihrer Kamera lesen. Dies kann daran liegen, dass Sie nicht die erforderliche Berechtigung erteilt haben oder dass Ihr Gerät den Kamerazugriff nicht unterstützt.",
},
microlink: {
button: "Import von $1$",
label: "$1$ $2$ URL",
placeholder: "Geben Sie eine URL von 1 bis 2 US-Dollar ein",
type: "Post",
},
url: {
title: "Direkte URL",
label: "Bild-URL",
placeholder: "Geben Sie eine Bild-URL ein",
},
instagram: {
title: "Instagram",
},
facebook: {
title: "Facebook",
},
flickr: {
title: "Flickr",
type: "ein foto",
},
ninegag: {
title: "9GAG",
type: "ein foto",
},
deviantart: {
title: "DeviantArt",
},
artstation: {
title: "ArtStation",
},
twitter: {
title: "Twitter",
type: "Foto-Tweet",
},
pinterest: {
title: "Pinterest",
type: "Stift",
},
flipboard: {
title: "Flipboard",
type: "artikel",
},
fotki: {
title: "Fotos",
type: "ein foto",
},
linkedin: {
title: "LinkedIn",
},
reddit: {
title: "Reddit",
},
tumblr: {
title: "Tumblr",
},
weheartit: {
title: "Wir lieben es",
},
screenshot: {
title: "Bildschirmfoto",
button: "Screenshot machen",
label: "URL der Webseite",
placeholder: "Geben Sie eine URL ein",
loading: "Machen Sie einen Screenshot ...",
},
search: {
button: "Suchen Sie nach $1$",
label: "Suchen Sie nach einem Bild",
placeholder: "Suche nach etwas",
imagesPoweredBy: "Bilder möglich gemacht von $1$",
},
giphy: {
title: "GIPHY",
},
unsplash: {
title: "Aufspritzen",
},
pixabay: {
title: "Pixabay",
},
pexels: {
title: "Pexels",
},
},
effects: {
preview: {
title: "Vorschau",
},
filters: {
title: "Filter",
},
crop: {
title: "Zuschneiden",
aspectRatios: {
free: "Frei",
square: "Rechteckig",
},
},
rotate: {
title: "Drehen",
},
flip: {
title: "Flip",
buttons: {
horizontal: "Horizontal",
vertical: "Vertikal",
},
},
sharpen: {
title: "Schärfe",
},
blur: {
title: "Weichzeichnen",
},
brightness: {
title: "Helligkeit",
},
contrast: {
title: "Kontrast",
},
grayscale: {
title: "Graustufen",
},
"hue-rotate": {
title: "Farbton",
},
invert: {
title: "Invertieren",
},
saturate: {
title: "Sättigung",
},
sepia: {
title: "Sepia",
},
},
};