aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 00:56:06 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 00:56:06 +0200
commita7cf03c192470cbab13edeb1aec99e0c66dede10 (patch)
tree581b4430d1de958dcb666bae80a7678332134602 /src/config
parent010f307346e525ac2e4239a0549d2c1a4d6d102b (diff)
Update / use typescript
Diffstat (limited to 'src/config')
-rw-r--r--src/config/.apollo.js.icloudbin0 -> 157 bytes
-rw-r--r--src/config/.config.js.icloudbin0 -> 157 bytes
-rw-r--r--src/config/.i18n.js.icloudbin0 -> 155 bytes
-rw-r--r--src/config/__mocks__/.config.js.icloudbin0 -> 157 bytes
-rw-r--r--src/config/__mocks__/config.js15
-rw-r--r--src/config/apollo.js14
-rw-r--r--src/config/config.js15
-rw-r--r--src/config/env.dist1
-rw-r--r--src/config/i18n.js12
-rw-r--r--src/config/translations/.en.json.icloudbin0 -> 155 bytes
-rw-r--r--src/config/translations/.es.json.icloudbin0 -> 155 bytes
-rw-r--r--src/config/translations/en.json112
-rw-r--r--src/config/translations/es.json112
13 files changed, 0 insertions, 281 deletions
diff --git a/src/config/.apollo.js.icloud b/src/config/.apollo.js.icloud
new file mode 100644
index 0000000..450d231
--- /dev/null
+++ b/src/config/.apollo.js.icloud
Binary files differ
diff --git a/src/config/.config.js.icloud b/src/config/.config.js.icloud
new file mode 100644
index 0000000..905a424
--- /dev/null
+++ b/src/config/.config.js.icloud
Binary files differ
diff --git a/src/config/.i18n.js.icloud b/src/config/.i18n.js.icloud
new file mode 100644
index 0000000..37580b6
--- /dev/null
+++ b/src/config/.i18n.js.icloud
Binary files differ
diff --git a/src/config/__mocks__/.config.js.icloud b/src/config/__mocks__/.config.js.icloud
new file mode 100644
index 0000000..e3fa27b
--- /dev/null
+++ b/src/config/__mocks__/.config.js.icloud
Binary files differ
diff --git a/src/config/__mocks__/config.js b/src/config/__mocks__/config.js
deleted file mode 100644
index b70ee31..0000000
--- a/src/config/__mocks__/config.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export const apollo = {
- uri: 'http://localhost:1234/graphql',
- name: 'COOL_APP',
- version: '9.9.9',
- defaultOptions: {
- watchQuery: {
- fetchPolicy: 'no-cache'
- },
- query: {
- fetchPolicy: 'no-cache'
- }
- }
-};
-
-export const version = '9.9.9';
diff --git a/src/config/apollo.js b/src/config/apollo.js
deleted file mode 100644
index a3820ed..0000000
--- a/src/config/apollo.js
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644
index 3637670..0000000
--- a/src/config/config.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { name, version as packageVersion } from '../../package.json';
-
-/*
- * The main configuration object for the Forum frontend. These values
- * are calculated during compile time and need to be set in a .env
- * file, otherwise it won't work.
- */
-
-export const apollo = {
- uri: import.meta.env.VITE_APOLLO_SERVER,
- name,
- version: packageVersion
-};
-
-export const version = packageVersion;
diff --git a/src/config/env.dist b/src/config/env.dist
deleted file mode 100644
index 1f3ff0c..0000000
--- a/src/config/env.dist
+++ /dev/null
@@ -1 +0,0 @@
-VITE_APOLLO_SERVER=http://location_of_apollo_server
diff --git a/src/config/i18n.js b/src/config/i18n.js
deleted file mode 100644
index 25ffc45..0000000
--- a/src/config/i18n.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { addMessages, getLocaleFromNavigator, init } from 'svelte-i18n';
-
-import en from './translations/en.json';
-import es from './translations/es.json';
-
-addMessages('en', en);
-addMessages('es', es);
-
-init({
- fallbackLocale: 'en',
- initialLocale: getLocaleFromNavigator()
-});
diff --git a/src/config/translations/.en.json.icloud b/src/config/translations/.en.json.icloud
new file mode 100644
index 0000000..1603891
--- /dev/null
+++ b/src/config/translations/.en.json.icloud
Binary files differ
diff --git a/src/config/translations/.es.json.icloud b/src/config/translations/.es.json.icloud
new file mode 100644
index 0000000..fe4cf36
--- /dev/null
+++ b/src/config/translations/.es.json.icloud
Binary files differ
diff --git a/src/config/translations/en.json b/src/config/translations/en.json
deleted file mode 100644
index 14e89e4..0000000
--- a/src/config/translations/en.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "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
deleted file mode 100644
index 4f6b0c1..0000000
--- a/src/config/translations/es.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "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}}"
- }
-}