mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
## Description Refactor the current date formatting system to utilize Lingui. ## Changes Made - Remove redundant `LocaleData` component with Lingui dates ## Important notes For the internal pages for certificates, default to en-US to format any dates. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced internationalization support across various components by utilizing the `i18n` object for date formatting. - Streamlined locale management by removing cookie-based language handling and adopting a more centralized approach. - **Bug Fixes** - Improved date formatting consistency by replacing the `LocaleDate` component with direct calls to `i18n.date()` in multiple components. - **Documentation** - Updated localization strings in the `web.po` files to reflect recent changes in the source code structure. - **Chores** - Minor formatting adjustments and code organization improvements across various files to enhance readability and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions <github-actions@documenso.com>
22 lines
1.1 KiB
TypeScript
22 lines
1.1 KiB
TypeScript
import { env } from 'next-runtime-env';
|
|
|
|
export const APP_DOCUMENT_UPLOAD_SIZE_LIMIT =
|
|
Number(process.env.NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT) || 50;
|
|
|
|
export const NEXT_PUBLIC_WEBAPP_URL = () => env('NEXT_PUBLIC_WEBAPP_URL');
|
|
export const NEXT_PUBLIC_MARKETING_URL = () => env('NEXT_PUBLIC_MARKETING_URL');
|
|
export const NEXT_PRIVATE_INTERNAL_WEBAPP_URL = process.env.NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? NEXT_PUBLIC_WEBAPP_URL();
|
|
|
|
export const IS_APP_MARKETING = process.env.NEXT_PUBLIC_PROJECT === 'marketing';
|
|
export const IS_APP_WEB = process.env.NEXT_PUBLIC_PROJECT === 'web';
|
|
export const IS_BILLING_ENABLED = () => env('NEXT_PUBLIC_FEATURE_BILLING_ENABLED') === 'true';
|
|
export const IS_APP_WEB_I18N_ENABLED = false;
|
|
|
|
export const APP_FOLDER = () => (IS_APP_MARKETING ? 'marketing' : 'web');
|
|
|
|
export const APP_BASE_URL = () =>
|
|
IS_APP_WEB ? NEXT_PUBLIC_WEBAPP_URL() : NEXT_PUBLIC_MARKETING_URL();
|
|
|
|
export const WEBAPP_BASE_URL = NEXT_PUBLIC_WEBAPP_URL() ?? 'http://localhost:3000';
|
|
export const MARKETING_BASE_URL = NEXT_PUBLIC_MARKETING_URL() ?? 'http://localhost:3001';
|