aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-15 23:06:26 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-15 23:06:26 +0200
commit58f7d52150456713d3132408668a92d0f6f3d084 (patch)
tree4b346042a684e416e53c4f4ac779060b832ad227 /src/config
parent63c3da2af27fcfb1a9893ade03543e3a30949c8d (diff)
Port to sveltekit
Diffstat (limited to 'src/config')
-rw-r--r--src/config/apollo.js7
-rw-r--r--src/config/config.js6
-rw-r--r--src/config/translations/en.json218
-rw-r--r--src/config/translations/es.json218
4 files changed, 229 insertions, 220 deletions
diff --git a/src/config/apollo.js b/src/config/apollo.js
index 4cfca79..a3820ed 100644
--- a/src/config/apollo.js
+++ b/src/config/apollo.js
@@ -1,9 +1,14 @@
-import { ApolloClient, InMemoryCache } from '@apollo/client/core';
+import fetch from 'cross-fetch';
+import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core';
import { apollo as apolloConfig } from './config';
const cache = new InMemoryCache();
export const client = new ApolloClient({
cache,
+ link: new HttpLink({
+ uri: apolloConfig.uri,
+ fetch
+ }),
...apolloConfig
});
diff --git a/src/config/config.js b/src/config/config.js
index 0570e1c..9d6d40e 100644
--- a/src/config/config.js
+++ b/src/config/config.js
@@ -7,9 +7,9 @@ import { name, version as packageVersion } from '../../package.json';
*/
export const apollo = {
- uri: import.meta.env.VITE_APOLLO_SERVER,
- name,
- version: packageVersion
+ uri: import.meta.env.VITE_APOLLO_SERVER,
+ name,
+ version: packageVersion
};
export const socketServer = import.meta.env.FORUM_SOCKET_SERVER;
diff --git a/src/config/translations/en.json b/src/config/translations/en.json
index cf66bf2..14e89e4 100644
--- a/src/config/translations/en.json
+++ b/src/config/translations/en.json
@@ -1,110 +1,112 @@
{
- "error": {
- "generic": {
- "title": "Error!",
- "message": "Unknown error has occurred. Panic!"
- },
- "invalid_url": {
- "title": "This is not right.",
- "message": "This URL is not valid. Try another one maybe?"
- }
- },
- "footer": {
- "choose_language": "Choose your language",
- "license": "Forum is <a href=\"{licenseUrl}\">open source.</a>",
- "title": "Footer"
- },
- "forum": {
- "name": {
- "everything": "Everything",
- "us": "Us",
- "words": "Words",
- "sound": "Sounds",
- "structure": "Structure",
- "interaction": "Interaction",
- "emotion": "Emotion",
- "movement": "Movement",
- "belief": "Belief",
- "experience": "Experience",
- "online": "Online",
- "the_world": "The World",
- "life": "Life"
- },
- "error": {
- "unavailable": "Forum topics unavailable."
- }
- },
- "forum_list": {
- "title": "List of forums",
- "error": {
- "unavailable": "Forum list unavailable."
- }
- },
- "glyph": {
- "title": "User avatar"
- },
- "header": {
- "action": {
- "new": {
- "title": "New",
- "display": "<u>N</u>ew"
- },
- "reply": {
- "title": "Reply",
- "display": "<u>R</u>eply"
- },
- "search": {
- "title": "Search",
- "display": "<u>S</u>earch"
- },
- "log_out": {
- "title": "Log Out",
- "display": "Log <u>O</u>ut"
- }
- },
- "long_version": "Forum version {version}",
- "title": "Toolbar",
- "short_version": "Forum v{version}"
- },
- "home": {
- "title": "Hello.",
- "content": "You are now in a forum. Select a category from the left or input a valid URL."
- },
- "loader": {
- "message": "Loading."
- },
- "post": {
- "author_credit": "By:",
- "metadata_title": "Post {count} of {total} metadata",
- "permalink_title": "Permalink to post",
- "title": "Post {count} of {total} by {author}",
- "topic_location": "In",
- "error": {
- "unavailable": "Post unavailable."
- }
- },
- "tag": {
- "title": "Tag:",
- "error": {
- "unavailable": "Tag topics unavailable."
- }
- },
- "topic": {
- "category_location": "Posted on",
- "metadata_title": "Topic metadata",
- "permalink_title": "Permalink to topic",
- "remaining_time": "{remaining} remaining",
- "tags_location": "Tags:",
- "tags_title": "Topic tags",
- "title": "Topic",
- "error": {
- "unavailable": "Topic unavailable."
- }
- },
- "time": {
- "days": "{count, plural, =1 {# day} other {# days}}",
- "hours": "{count, plural, =1 {# hour} other {# hours}}",
- "minutes": "{count, plural, =1 {# minute} other {# minutes}}",
- "seconds": "{count, plural, =1 {# second} other {# seconds}}"
- }
+ "error": {
+ "generic": {
+ "title": "Error!",
+ "message": "Unknown error has occurred. Panic!"
+ },
+ "invalid_url": {
+ "title": "This is not right.",
+ "message": "This URL is not valid. Try another one maybe?"
+ }
+ },
+ "footer": {
+ "choose_language": "Choose your language",
+ "license": "Forum is <a href=\"{licenseUrl}\">open source.</a>",
+ "title": "Footer"
+ },
+ "forum": {
+ "forum": "forum",
+ "name": {
+ "everything": "Everything",
+ "us": "Us",
+ "words": "Words",
+ "sound": "Sounds",
+ "structure": "Structure",
+ "interaction": "Interaction",
+ "emotion": "Emotion",
+ "movement": "Movement",
+ "belief": "Belief",
+ "experience": "Experience",
+ "online": "Online",
+ "the_world": "The World",
+ "life": "Life"
+ },
+ "error": {
+ "unavailable": "Forum topics unavailable."
+ }
+ },
+ "forum_list": {
+ "title": "List of forums",
+ "error": {
+ "unavailable": "Forum list unavailable."
+ }
+ },
+ "glyph": {
+ "title": "User avatar"
+ },
+ "header": {
+ "action": {
+ "new": {
+ "title": "New",
+ "display": "<u>N</u>ew"
+ },
+ "reply": {
+ "title": "Reply",
+ "display": "<u>R</u>eply"
+ },
+ "search": {
+ "title": "Search",
+ "display": "<u>S</u>earch"
+ },
+ "log_out": {
+ "title": "Log Out",
+ "display": "Log <u>O</u>ut"
+ }
+ },
+ "long_version": "Forum version {version}",
+ "title": "Toolbar",
+ "short_version": "Forum v{version}"
+ },
+ "home": {
+ "title": "Hello.",
+ "content": "You are now in a forum. Select a category from the left or input a valid URL."
+ },
+ "loader": {
+ "message": "Loading."
+ },
+ "post": {
+ "author_credit": "By:",
+ "metadata_title": "Post {count} of {total} metadata",
+ "permalink_title": "Permalink to post",
+ "post": "Post",
+ "title": "Post {count} of {total} by {author}",
+ "topic_location": "In",
+ "error": {
+ "unavailable": "Post unavailable."
+ }
+ },
+ "tag": {
+ "title": "Tag",
+ "error": {
+ "unavailable": "Tag topics unavailable."
+ }
+ },
+ "topic": {
+ "category_location": "Posted on",
+ "metadata_title": "Topic metadata",
+ "permalink_title": "Permalink to topic",
+ "remaining_time": "{remaining} remaining",
+ "tags_location": "Tags:",
+ "tags_title": "Topic tags",
+ "title": "Topic",
+ "error": {
+ "unavailable": "Topic unavailable."
+ }
+ },
+ "time": {
+ "days": "{count, plural, =1 {# day} other {# days}}",
+ "hours": "{count, plural, =1 {# hour} other {# hours}}",
+ "minutes": "{count, plural, =1 {# minute} other {# minutes}}",
+ "seconds": "{count, plural, =1 {# second} other {# seconds}}"
+ }
}
diff --git a/src/config/translations/es.json b/src/config/translations/es.json
index 6b6880f..4f6b0c1 100644
--- a/src/config/translations/es.json
+++ b/src/config/translations/es.json
@@ -1,110 +1,112 @@
{
- "error": {
- "generic": {
- "title": "Error!",
- "message": "Hubo un error desconocido. ¡Entra en pánico!"
- },
- "invalid_url": {
- "title": "Esto no está bien.",
- "message": "Este URL no es válido. Intenta otro, ¿Tal vez?"
- }
- },
- "footer": {
- "choose_language": "Escoge un lenguaje",
- "license": "Forum es <a href=\"{licenseUrl}\">software libre.</a>",
- "title": "Pie de página"
- },
- "forum": {
- "name": {
- "everything": "Todo",
- "us": "Nosotros",
- "words": "Palabras",
- "sound": "Sonidos",
- "structure": "Estructura",
- "interaction": "Interacción",
- "emotion": "Emoción",
- "movement": "Movimiento",
- "belief": "Creencia",
- "experience": "Experiencia",
- "online": "En Línea",
- "the_world": "El Mundo",
- "life": "Vida"
- },
- "error": {
- "unavailable": "Temas del foro no disponibles."
- }
- },
- "forum_list": {
- "title": "Lista de foros",
- "error": {
- "unavailable": "Lista de foros no disponible."
- }
- },
- "glyph": {
- "title": "Avatar del usuario"
- },
- "header": {
- "action": {
- "new": {
- "title": "Nuevo",
- "display": "<u>N</u>uevo"
- },
- "reply": {
- "title": "Responder",
- "display": "<u>R</u>esponder"
- },
- "search": {
- "title": "Buscar",
- "display": "Bu<u>s</u>car"
- },
- "log_out": {
- "title": "Cerrar Sesión",
- "display": "Cerrar Sesi<u>ó</u>n"
- }
- },
- "long_version": "Forum versión {version}",
- "title": "Barra de herramientas",
- "short_version": "Forum v{version}"
- },
- "home": {
- "title": "Hola.",
- "content": "Ahora estás en un foro. Elige una categoría de la izquierda o escribe un URL válido."
- },
- "loader": {
- "message": "Cargando."
- },
- "post": {
- "author_credit": "Por:",
- "metadata_title": "Metadatos de entrada {count} de {total}",
- "permalink_title": "Permalink a entrada",
- "title": "Entrada {count} de {total}, por {author}",
- "topic_location": "En",
- "error": {
- "unavailable": "Entrada no disponible."
- }
- },
- "tag": {
- "title": "Etiqueta:",
- "error": {
- "unavailable": "Temas de la etiqueta no disponibles."
- }
- },
- "topic": {
- "category_location": "Agregado a",
- "metadata_title": "Metadatos del tema",
- "permalink_title": "Permalink al tema",
- "remaining_time": "Quedan {remaining}",
- "tags_location": "Etiquetas:",
- "tags_title": "Etiquetas del tema",
- "title": "Tema",
- "error": {
- "unavailable": "Tema no disponible."
- }
- },
- "time": {
- "days": "{count, plural, =1 {# día} other {# días}}",
- "hours": "{count, plural, =1 {# hora} other {# horas}}",
- "minutes": "{count, plural, =1 {# minuto} other {# minutos}}",
- "seconds": "{count, plural, =1 {# segundo} other {# segundos}}"
- }
+ "error": {
+ "generic": {
+ "title": "Error!",
+ "message": "Hubo un error desconocido. ¡Entra en pánico!"
+ },
+ "invalid_url": {
+ "title": "Esto no está bien.",
+ "message": "Este URL no es válido. Intenta otro, ¿Tal vez?"
+ }
+ },
+ "footer": {
+ "choose_language": "Escoge un lenguaje",
+ "license": "Forum es <a href=\"{licenseUrl}\">software libre.</a>",
+ "title": "Pie de página"
+ },
+ "forum": {
+ "forum": "foro",
+ "name": {
+ "everything": "Todo",
+ "us": "Nosotros",
+ "words": "Palabras",
+ "sound": "Sonidos",
+ "structure": "Estructura",
+ "interaction": "Interacción",
+ "emotion": "Emoción",
+ "movement": "Movimiento",
+ "belief": "Creencia",
+ "experience": "Experiencia",
+ "online": "En Línea",
+ "the_world": "El Mundo",
+ "life": "Vida"
+ },
+ "error": {
+ "unavailable": "Temas del foro no disponibles."
+ }
+ },
+ "forum_list": {
+ "title": "Lista de foros",
+ "error": {
+ "unavailable": "Lista de foros no disponible."
+ }
+ },
+ "glyph": {
+ "title": "Avatar del usuario"
+ },
+ "header": {
+ "action": {
+ "new": {
+ "title": "Nuevo",
+ "display": "<u>N</u>uevo"
+ },
+ "reply": {
+ "title": "Responder",
+ "display": "<u>R</u>esponder"
+ },
+ "search": {
+ "title": "Buscar",
+ "display": "Bu<u>s</u>car"
+ },
+ "log_out": {
+ "title": "Cerrar Sesión",
+ "display": "Cerrar Sesi<u>ó</u>n"
+ }
+ },
+ "long_version": "Forum versión {version}",
+ "title": "Barra de herramientas",
+ "short_version": "Forum v{version}"
+ },
+ "home": {
+ "title": "Hola.",
+ "content": "Ahora estás en un foro. Elige una categoría de la izquierda o escribe un URL válido."
+ },
+ "loader": {
+ "message": "Cargando."
+ },
+ "post": {
+ "author_credit": "Por:",
+ "metadata_title": "Metadatos de entrada {count} de {total}",
+ "permalink_title": "Permalink a entrada",
+ "post": "Entrada",
+ "title": "Entrada {count} de {total}, por {author}",
+ "topic_location": "En",
+ "error": {
+ "unavailable": "Entrada no disponible."
+ }
+ },
+ "tag": {
+ "title": "Etiqueta",
+ "error": {
+ "unavailable": "Temas de la etiqueta no disponibles."
+ }
+ },
+ "topic": {
+ "category_location": "Agregado a",
+ "metadata_title": "Metadatos del tema",
+ "permalink_title": "Permalink al tema",
+ "remaining_time": "Quedan {remaining}",
+ "tags_location": "Etiquetas:",
+ "tags_title": "Etiquetas del tema",
+ "title": "Tema",
+ "error": {
+ "unavailable": "Tema no disponible."
+ }
+ },
+ "time": {
+ "days": "{count, plural, =1 {# día} other {# días}}",
+ "hours": "{count, plural, =1 {# hora} other {# horas}}",
+ "minutes": "{count, plural, =1 {# minuto} other {# minutos}}",
+ "seconds": "{count, plural, =1 {# segundo} other {# segundos}}"
+ }
}