diff --git a/.vscode/settings.json b/.vscode/settings.json index b823b0001..858d6ae2c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ "i18n-ally.extract.ignoredByFiles": { "src\\routes\\__layout.svelte": ["Coolify", "coolLabs logo"] }, - "i18n-ally.sourceLanguage": "en" + "i18n-ally.sourceLanguage": "en", + "i18n-ally.enabledFrameworks": ["svelte"], + "i18n-ally.enabledParsers": ["js", "ts", "json"], + "i18n-ally.extract.autoDetect": true } diff --git a/src/lib/locales/en.json b/src/lib/locales/en.json index 3f8da70a8..58e368e6f 100644 --- a/src/lib/locales/en.json +++ b/src/lib/locales/en.json @@ -8,7 +8,8 @@ }, "error": { "you_can_find_your_way_back": "You can find your way back", - "here": "here" + "here": "here", + "you_are_lost": "Ooops you are lost! But don't be afraid!" }, "index": { "dashboard": "Dashboard", @@ -19,7 +20,12 @@ "services": "Services", "teams": "Teams", "not_implemented_yet": "Not implemented yet", - "database": "Database" + "database": "Database", + "settings": "Settings", + "global_settings": "Global Settings", + "secret": "Secret", + "team": "Team", + "logout": "Logout" }, "login": { "already_logged_in": "Already logged in...", @@ -78,7 +84,12 @@ "verify_emails_without_smtp": "Verify emails without SMTP", "extra_config": "Extra Config", "select_a_service": "Select a Service", - "select_a_service_version": "Select a Service version" + "select_a_service_version": "Select a Service version", + "removing": "Removing...", + "remove_domain": "Remove domain", + "public_port_range": "Public Port Range", + "public_port_range_explainer": "Ports used to expose databases/services/internal services.
Add them to your firewall (if applicable).

You can specify a range of ports, eg: 9000-9100", + "no_actions_available": "No actions available" }, "register": { "register": "Register", @@ -237,12 +248,31 @@ "remote_docker": "Remote Docker", "organization_explainer": "Fill it if you would like to use an organization's as your Git Source. Otherwise your user will be used." }, - "eg_https_api_github_com": "eg: https://api.github.com", - "eg_https_github_com": "eg: https://github.com", "source": { "new": { "git_source": "Add New Git Source", "official_providers": "Official providers" + }, + "no_git_sources_found": "No git sources found", + "delete_git_source": "Delete Git Source", + "permission_denied": "You do not have permission to delete a Git Source", + "create_new_app": "Create new {name} App", + "change_app_settings": "Change {name} App Settings", + "install_repositories": "Install Repositories", + "application_id": "Application ID", + "group_name": "Group Name", + "oauth_id": "OAuth ID", + "oauth_id_explainer": "The OAuth ID is the unique identifier of the GitLab application.
You can find it in the URL of your GitLab OAuth Application.", + "register_oauth_gitlab": "Register new OAuth application on GitLab", + "gitlab": { + "self_hosted": "Instance-wide application (self-hosted)", + "user_owned": "User owned application", + "group_owned": "Group owned application", + "gitlab_application_type": "GitLab Application Type", + "already_configured": "GitLab App is already configured." + }, + "github": { + "redirecting": "Redirecting to Github..." } }, "services": { @@ -255,6 +285,36 @@ "start_service": "Start Service", "permission_denied_start_service": "You do not have permission to start the service.", "delete_service": "Delete Service", - "permission_denied_delete_service": "You do not have permission to delete a service." + "permission_denied_delete_service": "You do not have permission to delete a service.", + "no_service": "No services found" + }, + "setting": { + "permission_denied": "You do not have permission to do this. \\nAsk an admin to modify your permissions.", + "domain_removed": "Domain removed", + "ssl_explainer": "If you specify https, Coolify will be accessible only over https. SSL certificate will be generated for you.
If you specify www, Coolify will be redirected (302) from non-www and vice versa.", + "must_remove_domain_before_changing": "Must remove the domain before you can change this setting.", + "registration_allowed": "Registration allowed?", + "registration_allowed_explainer": "Allow further registrations to the application.
It's turned off after the first registration.", + "coolify_proxy_settings": "Coolify Proxy Settings" + }, + "team": { + "pending_invitations": "Pending invitations", + "accept": "Accept", + "delete": "Delete", + "member": "member(s)", + "root": "(root)", + "invited_with_permissions": "Invited to {teamName} with {permission} permission.", + "members": "Members", + "root_team_explainer": "This is the root team. That means members of this group can manage instance wide settings and have all the priviliges in Coolify (imagine like root user on Linux).", + "permission": "Permission", + "you": "(You)", + "promote_to": "Promote to {grade}", + "revoke_invitation": "Revoke invitation", + "pending_invitation": "Pending invitation", + "invite_new_member": "Invite new member", + "send_invitation": "Send invitation", + "invite_only_register_explainer": "You can only invite registered users at the moment - will be extended soon.", + "admin": "Admin", + "read": "Read" } } diff --git a/src/routes/__error.svelte b/src/routes/__error.svelte index edecc0f82..1ac61d6bf 100644 --- a/src/routes/__error.svelte +++ b/src/routes/__error.svelte @@ -20,7 +20,7 @@
{status}
-
Ooops you are lost! But don't be afraid!
+
{$t('error.you_are_lost')}
{$t('error.you_can_find_your_way_back')} {$t('error.here')} diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 7d6946b8d..3594a8c1c 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -159,7 +159,7 @@ class="icons tooltip-right bg-coolgray-200 hover:text-white" class:text-white={$page.url.pathname === '/'} class:bg-coolgray-500={$page.url.pathname === '/'} - data-tooltip="Dashboard" + data-tooltip={$t('index.dashboard')} >
-
Services
+
{$t('index.services')}
{#if !services || services.length === 0}
-
No services found
+
{$t('service.no_service')}
{:else} {#each services as service} @@ -73,7 +74,7 @@
{#if !service.type || !service.fqdn}
- Configuration missing + {$t('application.configuration.configuration_missing')}
{:else}
{service.type}
diff --git a/src/routes/settings/check.json.ts b/src/routes/settings/check.json.ts index d24dcc0e6..bec577001 100644 --- a/src/routes/settings/check.json.ts +++ b/src/routes/settings/check.json.ts @@ -1,6 +1,7 @@ import { asyncExecShell, getEngine, getUserDetails } from '$lib/common'; import * as db from '$lib/database'; import { ErrorHandler } from '$lib/database'; +import { t } from '$lib/translations'; import type { RequestHandler } from '@sveltejs/kit'; export const post: RequestHandler = async (event) => { @@ -16,7 +17,8 @@ export const post: RequestHandler = async (event) => { return { status: found ? 500 : 200, body: { - error: found && `Domain ${fqdn.replace('www.', '')} is already used.` + error: + found && t.get('application.domain_already_in_use', { domain: fqdn.replace('www.', '') }) } }; } catch (error) { diff --git a/src/routes/settings/index.json.ts b/src/routes/settings/index.json.ts index db3dc0710..6f4bd8374 100644 --- a/src/routes/settings/index.json.ts +++ b/src/routes/settings/index.json.ts @@ -1,6 +1,7 @@ import { getUserDetails } from '$lib/common'; import * as db from '$lib/database'; import { listSettings, ErrorHandler } from '$lib/database'; +import { t } from '$lib/translations'; import type { RequestHandler } from '@sveltejs/kit'; import { promises as dns } from 'dns'; @@ -27,7 +28,7 @@ export const del: RequestHandler = async (event) => { return { status: 401, body: { - message: 'You do not have permission to do this. \nAsk an admin to modify your permissions.' + message: t.get('setting.permission_denied') } }; if (status === 401) return { status, body }; @@ -44,7 +45,7 @@ export const del: RequestHandler = async (event) => { return { status: 200, body: { - message: 'Domain removed', + message: t.get('setting.domain_removed'), redirect: ip ? `http://${ip[0]}:3000/settings` : undefined } }; @@ -58,7 +59,7 @@ export const post: RequestHandler = async (event) => { return { status: 401, body: { - message: 'You do not have permission to do this. \nAsk an admin to modify your permissions.' + message: t.get('setting.permission_denied') } }; if (status === 401) return { status, body }; diff --git a/src/routes/settings/index.svelte b/src/routes/settings/index.svelte index d4b561ebf..1b3833803 100644 --- a/src/routes/settings/index.svelte +++ b/src/routes/settings/index.svelte @@ -31,6 +31,7 @@ import { browser } from '$app/env'; import { getDomain } from '$lib/components/common'; import { toast } from '@zerodevx/svelte-toast'; + import { t } from '$lib/translations'; let isRegistrationEnabled = settings.isRegistrationEnabled; let dualCerts = settings.dualCerts; @@ -67,7 +68,7 @@ dualCerts = !dualCerts; } await post(`/settings.json`, { isRegistrationEnabled, dualCerts }); - return toast.push('Settings saved.'); + return toast.push(t.get('application.settings_saved')); } catch ({ error }) { return errorNotification(error); } @@ -94,19 +95,19 @@
-
Settings
+
{$t('index.settings')}
{#if $session.teamId === '0'}
-
Global Settings
+
{$t('index.global_settings')}
{loading.save ? $t('forms.saving') : $t('forms.save')} {#if isFqdnSet} {loading.remove ? $t('forms.removing') : $t('forms.remove_domain')} {/if}
-
Domain (FQDN)
- +
+ {$t('application.domain_fqdn')} +
+
-
Public Port Range
- +
+ {$t('forms.public_port_range')} +
+
!isFqdnSet && changeSettings('dualCerts')} />
changeSettings('isRegistrationEnabled')} />
-
Coolify Proxy Settings
+
{$t('setting.coolify_proxy_settings')}
- +
- + {#if !source.githubAppId} - + {:else if source.githubApp?.installationId}
-
General
+
{$t('general')}
{#if $session.isAdmin} {loading ? $t('forms.saving') : $t('forms.save')} {$t('source.change_app_settings', { name: 'GitHub' })} {/if}
@@ -85,5 +86,5 @@
{:else} - + {/if} diff --git a/src/routes/sources/[id]/_Gitlab.svelte b/src/routes/sources/[id]/_Gitlab.svelte index 3667fc98d..51616f8e9 100644 --- a/src/routes/sources/[id]/_Gitlab.svelte +++ b/src/routes/sources/[id]/_Gitlab.svelte @@ -6,6 +6,7 @@ import { onMount } from 'svelte'; import { post } from '$lib/api'; import { browser } from '$app/env'; + import { t } from '$lib/translations'; const { id } = $page.params; let loading = false; @@ -93,25 +94,25 @@ {#if !source.gitlabApp?.appId}
- +
{#if payload.applicationType === 'group'}
- +
{/if}
{$t('source.register_oauth_gitlab')}
@@ -131,21 +132,19 @@
-
Configuration
+
{$t('forms.configuration')}
{loading ? $t('forms.saving') : $t('forms.save')}
- - + +
{#if payload.applicationType === 'group'}
- +
{/if}
- +
- + {loading ? 'Saving...' : 'Save'}{loading ? $t('forms.saving') : $t('forms.save')} + - {/if}
diff --git a/src/routes/sources/[id]/__layout.svelte b/src/routes/sources/[id]/__layout.svelte index 0f5139558..30df278a5 100644 --- a/src/routes/sources/[id]/__layout.svelte +++ b/src/routes/sources/[id]/__layout.svelte @@ -34,10 +34,11 @@ import { page, session } from '$app/stores'; import { errorNotification } from '$lib/form'; import DeleteIcon from '$lib/components/DeleteIcon.svelte'; + import { t } from '$lib/translations'; const { id } = $page.params; async function deleteSource(name) { - const sure = confirm(`Are you sure you would like to delete '${name}'?`); + const sure = confirm($t('application.confirm_to_delete', { name: name })); if (sure) { const response = await fetch(`/sources/${id}.json`, { method: 'delete' @@ -55,14 +56,14 @@ diff --git a/src/routes/sources/[id]/check.json.ts b/src/routes/sources/[id]/check.json.ts index fe7d8e9c0..89084fdd7 100644 --- a/src/routes/sources/[id]/check.json.ts +++ b/src/routes/sources/[id]/check.json.ts @@ -1,6 +1,7 @@ import { getUserDetails } from '$lib/common'; import * as db from '$lib/database'; import { ErrorHandler } from '$lib/database'; +import { t } from '$lib/translations'; import type { RequestHandler } from '@sveltejs/kit'; export const post: RequestHandler = async (event) => { @@ -11,7 +12,7 @@ export const post: RequestHandler = async (event) => { const found = await db.prisma.gitlabApp.findFirst({ where: { oauthId: Number(oauthId) } }); if (found) { throw { - message: `GitLab App is already configured.` + message: t.get('source.gitlab.already_configured') }; } return { status: 200 }; diff --git a/src/routes/sources/[id]/index.svelte b/src/routes/sources/[id]/index.svelte index 83f171412..32db1d167 100644 --- a/src/routes/sources/[id]/index.svelte +++ b/src/routes/sources/[id]/index.svelte @@ -32,10 +32,11 @@ import type Prisma from '@prisma/client'; import Github from './_Github.svelte'; import Gitlab from './_Gitlab.svelte'; + import { t } from '$lib/translations';
-
Git Source
+
{$t('application.git_source')}
> {source.name}
diff --git a/src/routes/sources/[id]/newGithubApp.svelte b/src/routes/sources/[id]/newGithubApp.svelte index c8cb4f6f3..e3215b380 100644 --- a/src/routes/sources/[id]/newGithubApp.svelte +++ b/src/routes/sources/[id]/newGithubApp.svelte @@ -31,6 +31,7 @@
- Redirecting to Github... + {$t('source.github.redirecting')}
diff --git a/src/routes/sources/index.svelte b/src/routes/sources/index.svelte index bd9039514..220df31c2 100644 --- a/src/routes/sources/index.svelte +++ b/src/routes/sources/index.svelte @@ -22,10 +22,11 @@
-
Git Sources
+
{$t('index.git_sources')}
{#if $session.isAdmin} {#if !sources || sources.length === 0}
-
No git sources found
+
{$t('source.no_git_sources_found')}
{:else}
@@ -62,7 +63,7 @@
{source.name}
{#if (source.type === 'gitlab' && !source.gitlabAppId) || (source.type === 'github' && !source.githubAppId && !source.githubApp?.installationId)}
- Configuration missing + {$t('application.configuration.configuration_missing')}
{:else}
{source.htmlUrl}
diff --git a/src/routes/teams/[id]/index.svelte b/src/routes/teams/[id]/index.svelte index 91d6cf38d..4216a9d77 100644 --- a/src/routes/teams/[id]/index.svelte +++ b/src/routes/teams/[id]/index.svelte @@ -27,6 +27,7 @@ import Explainer from '$lib/components/Explainer.svelte'; import { errorNotification } from '$lib/form'; import { post } from '$lib/api'; + import { t } from '$lib/translations'; const { id } = $page.params; let invitation = { teamName: team.name, @@ -94,25 +95,22 @@
-
Team
+
{$t('index.team')}
> {team.name}
-
Settings
- +
{$t('index.settings')}
+
{#if team.id === '0'} - + {/if}
@@ -121,22 +119,23 @@
-
Members
+
{$t('team.members')}
- - - + + + {#each permissions as permission} @@ -144,17 +143,21 @@ {:else} - + {/if} {/each} @@ -167,11 +170,12 @@ {:else} - + {/if} {/each} @@ -181,18 +185,18 @@
-
Invite new member
- +
{$t('team.invite_new_member')}
+
- +
@@ -202,14 +206,14 @@ class="rounded-none rounded-l border border-dashed border-transparent" type="button" class:border-coolgray-300={invitation.permission !== 'read'} - class:bg-pink-500={invitation.permission === 'read'}>Read{$t('team.read')} {$t('team.admin')}
diff --git a/src/routes/teams/index.svelte b/src/routes/teams/index.svelte index 05c020cdf..1814c1414 100644 --- a/src/routes/teams/index.svelte +++ b/src/routes/teams/index.svelte @@ -23,6 +23,7 @@ import { errorNotification } from '$lib/form'; import { session } from '$app/stores'; import { post } from '$lib/api'; + import { t } from '$lib/translations'; export let teams; export let invitations; @@ -46,7 +47,7 @@
EmailPermissionActions{$t('forms.email')}{$t('team.permission')}{$t('forms.action')}
{permission.user.email} - {permission.user.id === $session.userId ? '(You)' : ''}{permission.user.id === $session.userId ? $t('team.you') : ''} {permission.permission} removeFromTeam(permission.user.id)}>{$t('forms.remove')} {$t('team.promote_to', { + grade: permission.permission === 'admin' ? 'read' : 'admin' + })} No actions available + {$t('forms.no_actions_available')} +
revokeInvitation(invitation.id)} + >{$t('team.revoke_invitation')} Pending invitation{$t('team.pending_invitation')}