Commit Graph

22 Commits

Author SHA1 Message Date
David Nguyen
75c8772a02 feat: web i18n (#1286) 2024-08-27 20:34:39 +09:00
Roni Äikäs
71a8a3eaa6 chore: rename "none" document access to "no restrictions" (#1138)
## Description

Renames the "None" document access option to "No restrictions".
2024-07-29 12:40:36 +10:00
David Nguyen
1028184cf2 feat: initial i18n marketing implementation (#1223)
## Description

This PR introduces an initial i18n implementation using
[Lingui](https://lingui.dev).

We plan to combine it with Crowdin which will provide AI translations
when PRs are merged into main.

We plan to rollout i18n to only marketing for now, and will review how
everything goes before continuing to introduce it into the main
application.

## Reasoning

Why not use i18n-next or other alternatives?

To hopefully provide the best DX we chose Lingui because it allows us to
simply wrap text that we want to translate in tags, instead of forcing
users to do things such as:

- Update the text to `t('some-text')`
- Extract it to the file
- The text becomes a bit unreadable unless done correctly

Yes, plugins such as i18n-ally and Sherlock exist to simplify these
chores, but these require the user to be correctly setup in vscode, and
it also does not seem to provide the required configurations for our
multi app and multi UI package setup.

## Super simple demo

```html
// Before
<p>Text to update</p>

// After
<p>
  <Trans>Text to update</Trans>
</p>
```

## Related Issue

Relates to #885 but is only for marketing for now.

Another branch is slowly being prepared for the changes required for the
web application while we wait to see how this goes for marketing.

## Changes Made

Our configuration does not follow the general standard since we have
translations that cross:
- Web app
- Marketing app
- Constants package
- UI package

This means we want to separate translations into:
1. Marketing - Only translations extracted from `apps/marketing`
2. Web - Only translations extracted from `apps/web`
3. Common - Translations from `packages/constants` and `packages/ui`

Then we bundle, compile and minify the translations for production as
follows:
1. Marketing = Marketing + Common
2. Web = Web + Common

This allows us to only load the required translations when running each
application.

Overall general changes: 
- Add i18n to marketing
- Add core i18n setup to web
- Add pre-commit hook and GH action to extract any new <Trans> tags into
the translation files

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Added Romanian localization for marketing messages to improve
accessibility for Romanian-speaking users.
- Introduced German and English translation modules and PO files to
enhance the application's internationalization capabilities.
- Integrated internationalization support in the RootLayout component
for dynamic language settings based on server-side configurations.
- Enhanced the Enterprise component with translation support to adapt to
user language preferences.
- Added a `<meta>` tag to prevent Google from translating the page
content, supporting internationalization efforts.

- **Bug Fixes**
- Resolved minor issues related to the structure and accessibility of
translation files.

- **Chores**
- Updated project dependencies to support the new localization features
and ensure stability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@documenso.com>
2024-07-26 14:56:42 +10:00
David Nguyen
2f86bb523b feat: add template enhancements (#1154)
## Description

General enhancements for templates.

## Changes Made

Added the following changes to the template flow:
- Allow adding document meta settings
- Allow adding email settings
- Allow adding document access & action authentication
- Allow adding recipient action authentication
- Save the state between template steps similar to how it works for
documents

Other changes:
- Extract common fields between document and template flows
- Remove the title field from "Use template" since we now have it as
part of the template flow
- Add new API endpoint for generating templates

## Testing Performed

Added E2E tests for templates and creating documents from templates
2024-05-10 19:45:19 +07:00
David Nguyen
a54eb54ef7 feat: add document auth (#1029) 2024-03-28 13:13:29 +08:00
Mythie
08f82b23dc fix: update env entries to evaluate at runtime 2024-01-31 22:32:42 +11:00
Catalin Pit
d451a7acce feat: add next-runtime-env 2024-01-25 10:48:20 +02:00
Mythie
4909eee401 feat: add viewing on completed page for pending documents 2024-01-22 21:36:46 +11:00
Ephraim Atta-Duncan
6a26ab4b2b fix: toast import errors 2024-01-02 04:52:15 +00:00
Ephraim Atta-Duncan
b76d2cea3b fix: changes from code review 2024-01-02 04:38:35 +00:00
Ephraim Atta-Duncan
38ad3a1922 refactor: download function to be reusable 2023-12-07 14:52:12 +00:00
Mythie
1a34f9fa7a fix: import updates and api route body sizes 2023-12-07 15:08:00 +11:00
Ephraim Atta-Duncan
06714a2aeb chore: append _signed to files when downloading (#656) 2023-11-17 12:02:22 +11:00
Timur Ercan
e838a07bf9 chore: remove share button from top level, texts (#653) 2023-11-16 16:43:50 +11:00
Mythie
4af3d05a24 fix: updates from error logs 2023-11-06 13:02:21 +11:00
Anupam
746c97b64f fix: added the share btn in the UI and prewarm fetch (#615) 2023-11-06 13:02:20 +11:00
18feb06
d177dd7c56 fix: page-not-found at share page for document signed in single-player-mode #605 (#606) 2023-11-06 13:02:20 +11:00
Mythie
687ce66e41 fix: update singleplayer add signature to card 2023-11-06 13:02:20 +11:00
Mythie
284a2870c2 fix: move getFile to client side 2023-11-06 13:02:20 +11:00
David Nguyen
1d291e8e03 feat: add safari clipboard copy support (#486) 2023-11-06 13:02:19 +11:00
David Nguyen
38960c459b feat: add document share button to marketing (#422) 2023-11-06 13:02:19 +11:00
David Nguyen
34232c79e5 feat: add single player mode 2023-11-06 13:01:43 +11:00