diff --git a/backend/src/routes/campaign.js b/backend/src/routes/campaign.js index 99f1e07..b435eb7 100644 --- a/backend/src/routes/campaign.js +++ b/backend/src/routes/campaign.js @@ -16,6 +16,7 @@ router.post('/create', async (req, res) => { await newCampaign.save(); res.json({ status: "ok", campaign: newCampaign }); } catch (err) { + console.error(err); res.json({ status: "error", msg: "errors.internal" }); } }); diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index 25b5821..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Nuxt Minimal Starter - -Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. - -## Setup - -Make sure to install dependencies: - -```bash -# npm -npm install - -# pnpm -pnpm install - -# yarn -yarn install - -# bun -bun install -``` - -## Development Server - -Start the development server on `http://localhost:3000`: - -```bash -# npm -npm run dev - -# pnpm -pnpm dev - -# yarn -yarn dev - -# bun -bun run dev -``` - -## Production - -Build the application for production: - -```bash -# npm -npm run build - -# pnpm -pnpm build - -# yarn -yarn build - -# bun -bun run build -``` - -Locally preview production build: - -```bash -# npm -npm run preview - -# pnpm -pnpm preview - -# yarn -yarn preview - -# bun -bun run preview -``` - -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/frontend/app/assets/css/colors.scss b/frontend/app/assets/css/colors.scss index a645109..4a09265 100644 --- a/frontend/app/assets/css/colors.scss +++ b/frontend/app/assets/css/colors.scss @@ -6,6 +6,7 @@ $themes: ( background-light: #202020, background-line: #202324, background-fore: #10141f, + background-soft: #20202077, window-handle-background: #191919, window-background: #141414, diff --git a/frontend/app/components/layouts/Dropdown.vue b/frontend/app/components/layouts/Dropdown.vue index df2ea29..6eaf74d 100644 --- a/frontend/app/components/layouts/Dropdown.vue +++ b/frontend/app/components/layouts/Dropdown.vue @@ -4,17 +4,16 @@ import { AddContextMenu, HideContextMenu } from '@/services/ContextMenu'; const props = defineProps(['options', 'onselect', 'selected', 'keyFunc']); const options = props.options; const selectCallback = props.onselect; + const initialSelect = props.selected; const dropdown = ref(null); - -const selected = ref(initialSelect); +const selected = ref(null); onMounted(() => { if(props.keyFunc == undefined) props.keyFunc = (option) => option; - else selected.value = props.keyFunc(initialSelect); - + selected.value = props.keyFunc(initialSelect); + let context = []; - if(props.selected == undefined) selected.value = "undefined"; watch(() => props.selected, () => { selected.value = props.keyFunc(props.selected); }); diff --git a/frontend/app/components/partials/CampaignEntry.vue b/frontend/app/components/partials/CampaignEntry.vue index 9dea9f7..70fb701 100644 --- a/frontend/app/components/partials/CampaignEntry.vue +++ b/frontend/app/components/partials/CampaignEntry.vue @@ -8,14 +8,15 @@ const props = defineProps(['data']); const data = props.data; const title = ref(""); -const last_session = ref(""); const container = ref(null); onMounted(() => { title.value = data.name; - last_session.value = new Date(data.last_opened).toISOString().slice(0, 10); - + if (data.color && container.value) { + container.value.style.background = `linear-gradient(90deg, ${data.color}, ${data.color}44)`; + } + AddSound(container.value) }); @@ -31,11 +32,11 @@ function ViewCampaign(){
- {{ title }}
Last session: {{ last_session }} + {{ title }}
- +
diff --git a/frontend/app/components/partials/ColorPicker.vue b/frontend/app/components/partials/ColorPicker.vue index 477f8f2..b738c23 100644 --- a/frontend/app/components/partials/ColorPicker.vue +++ b/frontend/app/components/partials/ColorPicker.vue @@ -21,7 +21,7 @@ onMounted(() => { }); }); -let GetColor = () => color; +let GetColor = () => color.value; defineExpose({ GetColor }); diff --git a/frontend/app/components/partials/EditUserPartial.vue b/frontend/app/components/partials/EditUserPartial.vue index c86c36d..6739b46 100644 --- a/frontend/app/components/partials/EditUserPartial.vue +++ b/frontend/app/components/partials/EditUserPartial.vue @@ -48,12 +48,6 @@ function LogOut(){ CreateWindow('login'); } -function EditProfile(){ - CreateChildWindow(GetFirstWindowId('main_menu'), 'edit_profile', { - user: GetUser() - }); -} - function EditSettings(){ CreateChildWindow(GetFirstWindowId('main_menu'), 'settings', { user: GetUser() @@ -102,7 +96,6 @@ onMounted(() => {
-
diff --git a/frontend/app/components/windows/CreateCampaignWindow.vue b/frontend/app/components/windows/CreateCampaignWindow.vue index 28c1b88..d5abbfd 100644 --- a/frontend/app/components/windows/CreateCampaignWindow.vue +++ b/frontend/app/components/windows/CreateCampaignWindow.vue @@ -27,6 +27,8 @@ const campaignDescription = ref(""); const colorPicker = ref(null); function NewCampaign(){ + const color = colorPicker.value.GetColor(); + console.log(color); Server().post('/campaign/create', { name: campaignName.value, description: campaignDescription.value, diff --git a/frontend/app/components/windows/EditProfileWindow.vue b/frontend/app/components/windows/EditProfileWindow.vue deleted file mode 100644 index 1cc3ab7..0000000 --- a/frontend/app/components/windows/EditProfileWindow.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - diff --git a/frontend/app/components/windows/MainMenuWindow.vue b/frontend/app/components/windows/MainMenuWindow.vue index 802f094..c338de0 100644 --- a/frontend/app/components/windows/MainMenuWindow.vue +++ b/frontend/app/components/windows/MainMenuWindow.vue @@ -24,9 +24,9 @@ function CreateCampaignWindow(){ function RefreshCampaigns(){ Server().get('/campaign/list').then((response) => { - console.log(response.data); - response.data.forEach((camp) => { - campaings.value.push(camp.campaign); + if(response.data.status !== "ok") return; + response.data.campaigns.forEach((camp) => { + campaings.value.push(camp); }); }); } @@ -34,7 +34,7 @@ function RefreshCampaigns(){ onMounted(() => { Top(wrapper); SetupHandle(id, handle); - SetSize(id, {width: 580, height: 760}); + SetSize(id, {width: 880, height: 760}); ResetPosition(id, "center"); RefreshCampaigns(); @@ -46,21 +46,38 @@ onMounted(() => {
- - -
-
-

{{ $t("main-menu.main-menu")}}

- - -
- +
+
+
+ Dragonroll logo
+
+

Welcome to dragonroll!

+

Version 0.1

+

This is totally under construction. This is a review of how the patch notes will be displayed.

+

There is also a lot of heavy development here.

+
+
- -
-
- + +
+ + +
+
+

{{ $t("main-menu.main-menu")}}

+ + +
+ +
+
+ +
+
+ +
+
@@ -72,6 +89,29 @@ onMounted(() => { h1 { margin-top: 20px; font-family: MrEavesRemake; + text-align: center; +} + +h2, h3 { + font-family: MrEavesRemake; +} + +.patch-notes-container { + margin: 10px; + padding: 10px; + border-radius: 5px; + flex-grow: 1; +} + +.two-column { + display: flex; + flex-direction: row; + width: 100%; + height: 100%; +} + +.secondary { + background-color: var(--color-background-soft); } .expand { @@ -89,7 +129,8 @@ h1 { display: flex; flex-direction: column; justify-content: space-between; - height: 100%; + flex-grow: 1; + width: 100%; } @@ -99,8 +140,7 @@ h1 { .button-container { display: flex; - width: 100%; - padding: 20px; + margin: 20px; flex-direction: column; } diff --git a/frontend/app/components/windows/SettingsWindow.vue b/frontend/app/components/windows/SettingsWindow.vue index 69a4d73..08ed765 100644 --- a/frontend/app/components/windows/SettingsWindow.vue +++ b/frontend/app/components/windows/SettingsWindow.vue @@ -6,6 +6,7 @@ import Tabs from '../layouts/Tabs.vue'; import Dropdown from '../layouts/Dropdown.vue'; import { GetUser, GetUserSetting, SetUserSetting } from '@/services/User'; import { SetupHandle, SetSize, ResetPosition, Top, ClearWindow, CreateWindow, SetMinSize, SetResizable } from '@/services/Windows'; +import { locales } from '~~/i18n/locales'; const handle = ref(null); const wrapper = ref(null); @@ -13,11 +14,12 @@ const wrapper = ref(null); const props = defineProps(['data']); const data = props.data; -const { locales, setLocale, locale } = useI18n(); +const { locale } = useI18n(); + const changeLocale = (lang) => { console.log(lang); - setLocale(lang.code); + locale.value = lang.code; SetUserSetting('lang', lang.code); } @@ -28,12 +30,18 @@ const rows = ref([{id: "account-settings", value: "settings.tabs.account-setting /* TODO const languageOptions = ref(["English", "Spanish", "Catalan"]) const langSelector = ref(null); -const currentLanguage = ref(""); */ +function getLocaleFromCode(code){ + for(let i = 0; i < locales.length; i++){ + if(locales[i].code == code) return locales[i]; + } +} + +const selectedLocale = ref(""); onBeforeMount(() => { GetUserSetting('lang').then(value => { - currentLanguage.value = codes[value ?? 'en'] - console.log(currentLanguage.value) + locale.value = value; + selectedLocale.value = getLocaleFromCode(value); // Set selected in dropdown }); if(GetUser().admin) rows.value.push({ id: "site-administration", @@ -44,11 +52,11 @@ onBeforeMount(() => { onMounted(() => { Top(wrapper); SetupHandle(id, handle); - SetSize(id, {width: 400, height: 480}); + SetSize(id, {width: 600, height: 480}); ResetPosition(id, "center"); SetResizable(id, true); - SetMinSize(id, {width: 350, height: 280}); + SetMinSize(id, {width: 450, height: 280}); }); function OpenManageAccounts(){ @@ -86,7 +94,7 @@ const getLocaleName = (locale) => {
- +
diff --git a/frontend/app/components/windows/partials/WindowHandle.vue b/frontend/app/components/windows/partials/WindowHandle.vue index 9320023..fffdb65 100644 --- a/frontend/app/components/windows/partials/WindowHandle.vue +++ b/frontend/app/components/windows/partials/WindowHandle.vue @@ -126,6 +126,11 @@ defineExpose({ justify-content: right; } + .center { + display: flex; + align-items: center; + } + span { font-family: MrEavesRemake; } diff --git a/frontend/app/plugins/i18n.ts b/frontend/app/plugins/i18n.ts new file mode 100644 index 0000000..b3f36aa --- /dev/null +++ b/frontend/app/plugins/i18n.ts @@ -0,0 +1,33 @@ +import { createI18n } from 'vue-i18n' + +function loadLocaleMessages() { + const locales = import.meta.glob('../../i18n/locales/**/*.json', { eager: true }) + const messages: Record = {} + + for (const path in locales) { + console.log(path); + const matched = path.match(/i18n\/locales\/(\w+)\/(.*)\.json$/) + if (!matched) continue + + const [, locale, file] = matched + + if (!messages[locale]) { + messages[locale] = {} + } + + messages[locale][file] = (locales[path] as any).default + } + + console.log(messages); + return messages +} + +export default defineNuxtPlugin((nuxtApp) => { + const i18n = createI18n({ + legacy: false, + locale: 'en', + messages: loadLocaleMessages() + }) + + nuxtApp.vueApp.use(i18n) +}) \ No newline at end of file diff --git a/frontend/app/services/WindowDefinitions.js b/frontend/app/services/WindowDefinitions.js index 98b544f..88a474b 100644 --- a/frontend/app/services/WindowDefinitions.js +++ b/frontend/app/services/WindowDefinitions.js @@ -23,12 +23,6 @@ const defWindows = { component: () => import('~/components/windows/MainMenuWindow.vue'), movable: true }, - edit_profile: { - title: "windows.edit-profile", - component: () => import('~/components/windows/EditProfileWindow.vue'), - close: () => ClearWindow({type: 'edit_profile'}), - movable: true - }, settings: { title: "windows.settings", component: () => import('~/components/windows/SettingsWindow.vue'), diff --git a/frontend/app/services/Windows.js b/frontend/app/services/Windows.js index fb1826e..a3eddb7 100644 --- a/frontend/app/services/Windows.js +++ b/frontend/app/services/Windows.js @@ -224,7 +224,6 @@ function CreateChildWindow(parentId, type, data = {}) { if (parent.children) parent.children.push(newId); // We will create the child window right now else parent.children = [newId]; CreateWindow(type, data); - console.log(windows.value); } function GetFirstWindowId(type) { diff --git a/frontend/i18n/locales.ts b/frontend/i18n/locales.ts new file mode 100644 index 0000000..d6b1dfb --- /dev/null +++ b/frontend/i18n/locales.ts @@ -0,0 +1,17 @@ +export const locales = [ + { + code: 'en', + name: 'English', + flag: '🇬🇧' + }, + { + code: 'es', + name: 'Español', + flag: '🇪🇸' + }, + { + code: 'ca', + name: 'Català', + flag: '�🇸' + } +] \ No newline at end of file diff --git a/frontend/i18n/locales/ca.json b/frontend/i18n/locales/ca.json index 94b884c..9e26dfe 100644 --- a/frontend/i18n/locales/ca.json +++ b/frontend/i18n/locales/ca.json @@ -1,75 +1 @@ -{ - "windows": { - "login": "Inicia sessió", - "register": "Registra't", - "main-menu": "Dragonroll", - "example": "Finestra d'exemple", - "edit-profile": "Editar perfil", - "settings": "Configuració", - "create-campaign": "Crear campanya" - }, - "login": { - "username": "Usuari o correu electrònic", - "username-placeholder": "Introdueix el teu usuari o correu electrònic...", - "password": "Contrasenya", - "password-placeholder": "Introdueix la teva contrasenya...", - "log-in": "Inicia sessió", - "no-account": "No tens un compte?", - "register": "Registra't", - "errors": { - "invalid-credentials": "Usuari/correu o contrasenya incorrectes.", - "params": "Si us plau, introdueix usuari/correu i contrasenya." - }, - "success": "Inici de sessió correcte!" - }, - "register": { - "name": "Nom", - "name-placeholder": "Introdueix el teu nom...", - "email": "Correu electrònic", - "email-placeholder": "Introdueix el teu correu electrònic...", - "username": "Usuari", - "username-placeholder": "Introdueix el teu nom d'usuari...", - "password": "Contrasenya", - "password-placeholder": "Introdueix la teva contrasenya...", - "confirm-password": "Confirma la contrasenya", - "confirm-password-placeholder": "Torna a introduir la contrasenya...", - "register": "Registra't", - "have-account": "Ja tens un compte?", - "login": "Inicia sessió", - "password-confirm-placeholder": "Confirma la teva contrasenya...", - "welcome": "Benvingut a DragonRoll!", - "message": "Si us plau, introdueix el nom d'usuari i la contrasenya que desitges per crear un compte.", - "first-register-message": "Estàs a punt de crear el primer compte en aquesta instància de DragonRoll. Aquest compte tindrà privilegis d'administrador.", - "errors": { - "name-empty": "Si us plau, introdueix el teu nom.", - "email-empty": "Si us plau, introdueix un correu electrònic vàlid.", - "username-empty": "Si us plau, introdueix un nom d'usuari.", - "passwords-no-match": "Les contrasenyes no coincideixen.", - "email-username-exists": "Ja existeix un compte amb aquest correu electrònic o nom d'usuari." - }, - "success": "Registre correcte! Ara pots iniciar sessió." - }, - "errors": { - "internal": "S'ha produït un error intern." - }, - "main-menu": { - "main-menu": "Menú principal", - "edit-profile": "Editar perfil", - "create-campaign": "Crear campanya", - "log-out": "Tanca la sessió", - "settings": "Configuració" - }, - "settings": { - "tabs": { - "account-settings": "Configuració del compte", - "site-administration": "Administració del lloc" - }, - "account-settings": { - "appearance": "Aparença", - "language": "Idioma" - }, - "site-administration": { - "manage-accounts": "Gestiona els comptes" - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/general.json b/frontend/i18n/locales/ca/general.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/frontend/i18n/locales/ca/general.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/login.json b/frontend/i18n/locales/ca/login.json new file mode 100644 index 0000000..d4b1777 --- /dev/null +++ b/frontend/i18n/locales/ca/login.json @@ -0,0 +1,14 @@ +{ + "username": "Usuari o correu electrònic", + "username-placeholder": "Introdueix el teu usuari o correu electrònic...", + "password": "Contrasenya", + "password-placeholder": "Introdueix la teva contrasenya...", + "log-in": "Inicia sessió", + "no-account": "No tens un compte?", + "register": "Registra't", + "errors": { + "invalid-credentials": "Usuari/correu o contrasenya incorrectes.", + "params": "Si us plau, introdueix usuari/correu i contrasenya." + }, + "success": "Inici de sessió correcte!" +} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/main-menu.json b/frontend/i18n/locales/ca/main-menu.json new file mode 100644 index 0000000..a8a5b5d --- /dev/null +++ b/frontend/i18n/locales/ca/main-menu.json @@ -0,0 +1,7 @@ +{ + "main-menu": "Menú principal", + "edit-profile": "Editar perfil", + "create-campaign": "Crear campanya", + "log-out": "Tanca la sessió", + "settings": "Configuració" +} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/register.json b/frontend/i18n/locales/ca/register.json new file mode 100644 index 0000000..f628cfa --- /dev/null +++ b/frontend/i18n/locales/ca/register.json @@ -0,0 +1,27 @@ +{ + "name": "Nom", + "name-placeholder": "Introdueix el teu nom...", + "email": "Correu electrònic", + "email-placeholder": "Introdueix el teu correu electrònic...", + "username": "Usuari", + "username-placeholder": "Introdueix el teu nom d'usuari...", + "password": "Contrasenya", + "password-placeholder": "Introdueix la teva contrasenya...", + "confirm-password": "Confirma la contrasenya", + "confirm-password-placeholder": "Torna a introduir la contrasenya...", + "register": "Registra't", + "have-account": "Ja tens un compte?", + "login": "Inicia sessió", + "password-confirm-placeholder": "Confirma la teva contrasenya...", + "welcome": "Benvingut a DragonRoll!", + "message": "Si us plau, introdueix el nom d'usuari i la contrasenya que desitges per crear un compte.", + "first-register-message": "Estàs a punt de crear el primer compte en aquesta instància de DragonRoll. Aquest compte tindrà privilegis d'administrador.", + "errors": { + "name-empty": "Si us plau, introdueix el teu nom.", + "email-empty": "Si us plau, introdueix un correu electrònic vàlid.", + "username-empty": "Si us plau, introdueix un nom d'usuari.", + "passwords-no-match": "Les contrasenyes no coincideixen.", + "email-username-exists": "Ja existeix un compte amb aquest correu electrònic o nom d'usuari." + }, + "success": "Registre correcte! Ara pots iniciar sessió." +} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/settings.json b/frontend/i18n/locales/ca/settings.json new file mode 100644 index 0000000..715a1f6 --- /dev/null +++ b/frontend/i18n/locales/ca/settings.json @@ -0,0 +1,13 @@ +{ + "tabs": { + "account-settings": "Configuració del compte", + "site-administration": "Administració del lloc" + }, + "account-settings": { + "appearance": "Aparença", + "language": "Idioma" + }, + "site-administration": { + "manage-accounts": "Gestiona els comptes" + } +} \ No newline at end of file diff --git a/frontend/i18n/locales/ca/windows.json b/frontend/i18n/locales/ca/windows.json new file mode 100644 index 0000000..3419e62 --- /dev/null +++ b/frontend/i18n/locales/ca/windows.json @@ -0,0 +1,9 @@ +{ + "login": "Inicia sessió", + "register": "Registra't", + "main-menu": "Dragonroll", + "example": "Finestra d'exemple", + "edit-profile": "Editar perfil", + "settings": "Configuració", + "create-campaign": "Crear campanya" +} \ No newline at end of file diff --git a/frontend/i18n/locales/en.json b/frontend/i18n/locales/en.json index eaa964e..9e26dfe 100644 --- a/frontend/i18n/locales/en.json +++ b/frontend/i18n/locales/en.json @@ -1,91 +1 @@ -{ - "windows": { - "login": "Login", - "register": "Register", - "main-menu": "Dragonroll", - "example": "Example Window", - "edit-profile": "Edit Profile", - "settings": "Settings", - "create-campaign": "Create Campaign" - }, - "general": { - "create": "Create", - "save": "Save", - "cancel": "Cancel", - "delete": "Delete" - }, - "campaigns": { - "create": { - "name": "Name", - "description": "Description", - "description-placeholder": "Enter a brief description for your campaign...", - "enter": "Enter campaign name here...", - "color": "Accent color", - "success": "Campaign created successfully!" - } - }, - "login": { - "username": "Username or email", - "username-placeholder": "Enter your username or email here...", - "password": "Password", - "password-placeholder": "Enter your password...", - "log-in": "Log in", - "no-account": "You don't have an account?", - "register": "Register", - "errors": { - "invalid-credentials": "Invalid username/email or password.", - "params": "Please enter both username/email and password." - }, - "success": "Login successful!" - }, - "register": { - "name": "Name", - "name-placeholder": "Enter your name here...", - "email": "Email", - "email-placeholder": "Enter your email here...", - "username": "Username", - "username-placeholder": "Enter your username here...", - "password": "Password", - "password-placeholder": "Enter your password...", - "confirm-password": "Confirm Password", - "confirm-password-placeholder": "Re-enter your password...", - "register": "Register", - "have-account": "Already have an account?", - "login": "Login", - "password-confirm-placeholder": "Confirm your password...", - "welcome": "Welcome to DragonRoll!", - "message": "Please enter your desired username and password to create an account.", - "first-register-message": "You are about to create the first account on this DragonRoll instance. This account will be granted administrator privileges.", - "errors": { - "name-empty": "Please enter your name.", - "email-empty": "Please enter a valid email address.", - "username-empty": "Please enter a username.", - "passwords-no-match": "The passwords you entered do not match.", - "email-username-exists": "An account with this email or username already exists." - }, - "success": "Registration successful! You can now log in." - }, - "errors": { - "internal": "An internal error occurred." - }, - "main-menu": { - "main-menu": "Main menu", - "edit-profile": "Edit profile", - "create-campaign": "Create Campaign", - "log-out": "Log out", - "settings": "Settings" - }, - "settings": { - "tabs": { - "account-settings": "Account settings", - "site-administration": "Site administration" - }, - "account-settings": { - "appearance": "Appearance", - "language": "Language" - }, - "site-administration": { - "manage-accounts": "Manage accounts" - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/i18n/locales/en/campaigns.json b/frontend/i18n/locales/en/campaigns.json new file mode 100644 index 0000000..ee2b943 --- /dev/null +++ b/frontend/i18n/locales/en/campaigns.json @@ -0,0 +1,10 @@ +{ + "create": { + "name": "Name", + "description": "Description", + "description-placeholder": "Enter a brief description for your campaign...", + "enter": "Enter campaign name here...", + "color": "Accent color", + "success": "Campaign created successfully!" + } +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/general.json b/frontend/i18n/locales/en/general.json new file mode 100644 index 0000000..13bcdec --- /dev/null +++ b/frontend/i18n/locales/en/general.json @@ -0,0 +1,10 @@ +{ + "errors": { + "internal": "An internal error occurred." + }, + "create": "Create", + "save": "Save", + "cancel": "Cancel", + "delete": "Delete", + "open": "Open" +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/login.json b/frontend/i18n/locales/en/login.json new file mode 100644 index 0000000..35115dd --- /dev/null +++ b/frontend/i18n/locales/en/login.json @@ -0,0 +1,15 @@ + +{ + "username": "Username or email", + "username-placeholder": "Enter your username or email here...", + "password": "Password", + "password-placeholder": "Enter your password...", + "log-in": "Log in", + "no-account": "You don't have an account?", + "register": "Register", + "errors": { + "invalid-credentials": "Invalid username/email or password.", + "params": "Please enter both username/email and password." + }, + "success": "Login successful!" +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/main-menu.json b/frontend/i18n/locales/en/main-menu.json new file mode 100644 index 0000000..6ea584a --- /dev/null +++ b/frontend/i18n/locales/en/main-menu.json @@ -0,0 +1,7 @@ +{ + "main-menu": "Main menu", + "edit-profile": "Edit profile", + "create-campaign": "Create Campaign", + "log-out": "Log out", + "settings": "Settings" +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/register.json b/frontend/i18n/locales/en/register.json new file mode 100644 index 0000000..5398b1f --- /dev/null +++ b/frontend/i18n/locales/en/register.json @@ -0,0 +1,27 @@ +{ + "name": "Name", + "name-placeholder": "Enter your name here...", + "email": "Email", + "email-placeholder": "Enter your email here...", + "username": "Username", + "username-placeholder": "Enter your username here...", + "password": "Password", + "password-placeholder": "Enter your password...", + "confirm-password": "Confirm Password", + "confirm-password-placeholder": "Re-enter your password...", + "register": "Register", + "have-account": "Already have an account?", + "login": "Login", + "password-confirm-placeholder": "Confirm your password...", + "welcome": "Welcome to DragonRoll!", + "message": "Please enter your desired username and password to create an account.", + "first-register-message": "You are about to create the first account on this DragonRoll instance. This account will be granted administrator privileges.", + "errors": { + "name-empty": "Please enter your name.", + "email-empty": "Please enter a valid email address.", + "username-empty": "Please enter a username.", + "passwords-no-match": "The passwords you entered do not match.", + "email-username-exists": "An account with this email or username already exists." + }, + "success": "Registration successful! You can now log in." +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/settings.json b/frontend/i18n/locales/en/settings.json new file mode 100644 index 0000000..8be6159 --- /dev/null +++ b/frontend/i18n/locales/en/settings.json @@ -0,0 +1,13 @@ +{ + "tabs": { + "account-settings": "Account settings", + "site-administration": "Site administration" + }, + "account-settings": { + "appearance": "Appearance", + "language": "Language" + }, + "site-administration": { + "manage-accounts": "Manage accounts" + } +} \ No newline at end of file diff --git a/frontend/i18n/locales/en/windows.json b/frontend/i18n/locales/en/windows.json new file mode 100644 index 0000000..b147443 --- /dev/null +++ b/frontend/i18n/locales/en/windows.json @@ -0,0 +1,9 @@ +{ + "login": "Login", + "register": "Register", + "main-menu": "Dragonroll", + "example": "Example Window", + "edit-profile": "Edit Profile", + "settings": "Settings", + "create-campaign": "Create Campaign" +} \ No newline at end of file diff --git a/frontend/i18n/locales/es.json b/frontend/i18n/locales/es.json index 41fdc2a..9e26dfe 100644 --- a/frontend/i18n/locales/es.json +++ b/frontend/i18n/locales/es.json @@ -1,75 +1 @@ -{ - "windows": { - "login": "Iniciar sesión", - "register": "Registrarse", - "main-menu": "Dragonroll", - "example": "Ventana de ejemplo", - "edit-profile": "Editar perfil", - "settings": "Configuración", - "create-campaign": "Crear campanya" - }, - "login": { - "username": "Usuario o correo electrónico", - "username-placeholder": "Introduce tu usuario o correo electrónico...", - "password": "Contraseña", - "password-placeholder": "Introduce tu contraseña...", - "log-in": "Iniciar sesión", - "no-account": "¿No tienes una cuenta?", - "register": "Registrarse", - "errors": { - "invalid-credentials": "Usuario/correo o contraseña incorrectos.", - "params": "Por favor, introduce usuario/correo y contraseña." - }, - "success": "¡Inicio de sesión exitoso!" - }, - "register": { - "name": "Nombre", - "name-placeholder": "Introduce tu nombre...", - "email": "Correo electrónico", - "email-placeholder": "Introduce tu correo electrónico...", - "username": "Usuario", - "username-placeholder": "Introduce tu nombre de usuario...", - "password": "Contraseña", - "password-placeholder": "Introduce tu contraseña...", - "confirm-password": "Confirmar contraseña", - "confirm-password-placeholder": "Vuelve a introducir tu contraseña...", - "register": "Registrarse", - "have-account": "¿Ya tienes una cuenta?", - "login": "Iniciar sesión", - "password-confirm-placeholder": "Confirma tu contraseña...", - "welcome": "¡Bienvenido a DragonRoll!", - "message": "Por favor, introduce el usuario y la contraseña que deseas para crear una cuenta.", - "first-register-message": "Estás a punto de crear la primera cuenta en esta instancia de DragonRoll. Esta cuenta tendrá privilegios de administrador.", - "errors": { - "name-empty": "Por favor, introduce tu nombre.", - "email-empty": "Por favor, introduce un correo electrónico válido.", - "username-empty": "Por favor, introduce un nombre de usuario.", - "passwords-no-match": "Las contraseñas no coinciden.", - "email-username-exists": "Ya existe una cuenta con este correo electrónico o nombre de usuario." - }, - "success": "¡Registro exitoso! Ahora puedes iniciar sesión." - }, - "errors": { - "internal": "Ha ocurrido un error interno." - }, - "main-menu": { - "main-menu": "Menú principal", - "edit-profile": "Editar perfil", - "create-campaign": "Crear campanya", - "log-out": "Cerrar sesión", - "settings": "Configuración" - }, - "settings": { - "tabs": { - "account-settings": "Configuración de la cuenta", - "site-administration": "Administración del sitio" - }, - "account-settings": { - "appearance": "Apariencia", - "language": "Idioma" - }, - "site-administration": { - "manage-accounts": "Gestionar cuentas" - } - } -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/i18n/locales/es/general.json b/frontend/i18n/locales/es/general.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/frontend/i18n/locales/es/general.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/frontend/i18n/locales/es/login.json b/frontend/i18n/locales/es/login.json new file mode 100644 index 0000000..20198b4 --- /dev/null +++ b/frontend/i18n/locales/es/login.json @@ -0,0 +1,14 @@ +{ + "username": "Usuario o correo electrónico", + "username-placeholder": "Introduce tu usuario o correo electrónico...", + "password": "Contraseña", + "password-placeholder": "Introduce tu contraseña...", + "log-in": "Iniciar sesión", + "no-account": "¿No tienes una cuenta?", + "register": "Registrarse", + "errors": { + "invalid-credentials": "Usuario/correo o contraseña incorrectos.", + "params": "Por favor, introduce usuario/correo y contraseña." + }, + "success": "¡Inicio de sesión exitoso!" +} \ No newline at end of file diff --git a/frontend/i18n/locales/es/main-menu.json b/frontend/i18n/locales/es/main-menu.json new file mode 100644 index 0000000..eeb958c --- /dev/null +++ b/frontend/i18n/locales/es/main-menu.json @@ -0,0 +1,7 @@ +{ + "main-menu": "Menú principal", + "edit-profile": "Editar perfil", + "create-campaign": "Crear campanya", + "log-out": "Cerrar sesión", + "settings": "Configuración" +} \ No newline at end of file diff --git a/frontend/i18n/locales/es/register.json b/frontend/i18n/locales/es/register.json new file mode 100644 index 0000000..d36b7d7 --- /dev/null +++ b/frontend/i18n/locales/es/register.json @@ -0,0 +1,27 @@ +{ + "name": "Nombre", + "name-placeholder": "Introduce tu nombre...", + "email": "Correo electrónico", + "email-placeholder": "Introduce tu correo electrónico...", + "username": "Usuario", + "username-placeholder": "Introduce tu nombre de usuario...", + "password": "Contraseña", + "password-placeholder": "Introduce tu contraseña...", + "confirm-password": "Confirmar contraseña", + "confirm-password-placeholder": "Vuelve a introducir tu contraseña...", + "register": "Registrarse", + "have-account": "¿Ya tienes una cuenta?", + "login": "Iniciar sesión", + "password-confirm-placeholder": "Confirma tu contraseña...", + "welcome": "¡Bienvenido a DragonRoll!", + "message": "Por favor, introduce el usuario y la contraseña que deseas para crear una cuenta.", + "first-register-message": "Estás a punto de crear la primera cuenta en esta instancia de DragonRoll. Esta cuenta tendrá privilegios de administrador.", + "errors": { + "name-empty": "Por favor, introduce tu nombre.", + "email-empty": "Por favor, introduce un correo electrónico válido.", + "username-empty": "Por favor, introduce un nombre de usuario.", + "passwords-no-match": "Las contraseñas no coinciden.", + "email-username-exists": "Ya existe una cuenta con este correo electrónico o nombre de usuario." + }, + "success": "¡Registro exitoso! Ahora puedes iniciar sesión." +} \ No newline at end of file diff --git a/frontend/i18n/locales/es/settings.json b/frontend/i18n/locales/es/settings.json new file mode 100644 index 0000000..d292a08 --- /dev/null +++ b/frontend/i18n/locales/es/settings.json @@ -0,0 +1,13 @@ +{ + "tabs": { + "account-settings": "Configuración de la cuenta", + "site-administration": "Administración del sitio" + }, + "account-settings": { + "appearance": "Apariencia", + "language": "Idioma" + }, + "site-administration": { + "manage-accounts": "Gestionar cuentas" + } +} \ No newline at end of file diff --git a/frontend/i18n/locales/es/windows.json b/frontend/i18n/locales/es/windows.json new file mode 100644 index 0000000..f6050f8 --- /dev/null +++ b/frontend/i18n/locales/es/windows.json @@ -0,0 +1,9 @@ +{ + "login": "Iniciar sesión", + "register": "Registrarse", + "main-menu": "Dragonroll", + "example": "Ventana de ejemplo", + "edit-profile": "Editar perfil", + "settings": "Configuración", + "create-campaign": "Crear campanya" +} \ No newline at end of file