Skip to content

πŸ“ˆ Open source, privacy-first web analytics β€” a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

move text to en.json

Blue Mouse3b02bb13a081
diff --git a/web/app/components/SelfhostedApiUrlBanner.tsx b/web/app/components/SelfhostedApiUrlBanner.tsx
index 37560fe3c..c74ad18a2 100644
--- a/web/app/components/SelfhostedApiUrlBanner.tsx
+++ b/web/app/components/SelfhostedApiUrlBanner.tsx
@@ -22,7 +22,7 @@ const SelfhostedApiUrlBanner = () => {
<span className='flex rounded-lg bg-yellow-600 p-2'>
<ExclamationTriangleIcon className='h-6 w-6 text-white' aria-hidden='true' />
</span>
- <p className='ml-3 truncate font-medium text-black'>Can't reach backend β€” check API_URL configuration</p>
+ <p className='ml-3 truncate font-medium text-black'>{t('ce.noApiUrl.banner')}</p>
</div>
<div className='order-3 mt-2 w-full shrink-0 sm:order-2 sm:mt-0 sm:w-auto'>
<span
@@ -39,29 +39,25 @@ const SelfhostedApiUrlBanner = () => {
onClose={() => setShowMoreInfoModal(false)}
onSubmit={() => setShowMoreInfoModal(false)}
submitText={t('common.gotIt')}
- title='API_URL is not configured'
+ title={t('ce.noApiUrl.title')}
message={
<div className='text-left'>
- <p className='mb-3'>
- You are running Swetrix Community Edition without API_URL set. The frontend cannot reach the API.
- </p>
- <p className='mb-3'>
- Set the API_URL environment variable to your API instance URL. In self-hosting there are two containers:
- </p>
+ <p className='mb-3'>{t('ce.noApiUrl.intro1')}</p>
+ <p className='mb-3'>{t('ce.noApiUrl.intro2')}</p>
<ul className='mb-3 list-disc pl-6'>
- <li>swetrix/swetrix-fe β€” the frontend UI</li>
- <li>swetrix/swetrix-api β€” the API (auth, data ingest)</li>
+ <li>{t('ce.noApiUrl.listFe')}</li>
+ <li>{t('ce.noApiUrl.listApi')}</li>
</ul>
- <p className='mb-2 font-medium'>Examples</p>
+ <p className='mb-2 font-medium'>{t('ce.noApiUrl.examplesTitle')}</p>
<ul className='mb-3 list-disc pl-6'>
<li>
- Local default: <code>API_URL=http://localhost:8080</code>
+ {t('ce.noApiUrl.exampleLocal.label')} <code>{t('ce.noApiUrl.exampleLocal.value')}</code>
</li>
<li>
- With subdomains: <code>API_URL=https://swetrix-api.mydomain.com</code>
+ {t('ce.noApiUrl.exampleSubdomain.label')} <code>{t('ce.noApiUrl.exampleSubdomain.value')}</code>
</li>
</ul>
- <p>Please configure it and restart the containers.</p>
+ <p>{t('ce.noApiUrl.finalNote')}</p>
</div>
}
type='warning'
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index b7673c2b7..f5a7faae2 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -64,6 +64,26 @@
"projectAssignError": "Failed to assign the project to the organisation",
"failedToLoadUsageInfo": "Failed to load usage info"
},
+ "ce": {
+ "noApiUrl": {
+ "banner": "Can't reach backend β€” check API_URL configuration",
+ "title": "API_URL is not configured",
+ "intro1": "You are running Swetrix Community Edition without API_URL set. The frontend cannot reach the API.",
+ "intro2": "Set the API_URL environment variable to your API instance URL. In self-hosting there are two containers:",
+ "listFe": "swetrix/swetrix-fe β€” the frontend UI",
+ "listApi": "swetrix/swetrix-api β€” the API (auth, data ingest)",
+ "examplesTitle": "Examples",
+ "exampleLocal": {
+ "label": "Local default:",
+ "value": "API_URL=http://localhost:8080"
+ },
+ "exampleSubdomain": {
+ "label": "With subdomains:",
+ "value": "API_URL=https://swetrix-api.mydomain.com"
+ },
+ "finalNote": "Please configure it and restart the containers."
+ }
+ },
"common": {
"features": "Features",
"docs": "Docs",