[GH-ISSUE #1953] Mark specific strings with additional context for translation #560

Closed
opened 2026-02-26 18:47:35 +03:00 by kerem · 1 comment
Owner

Originally created by @mKoonrad on GitHub (Aug 8, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/1953

Issue Description

I want to report issue that prevents Documenso from being translated correctly into different languages. As you probably know, the same string can be translated with different translations depending on context.

For example, translation of save (button to save) vs save (20% on sale) is different in many languages.

Lingui/cli merges the same source strings from different .ts files.
I found some strings (like recipient role, signatute types) which are incorrectly linked with wrong translation.

The only way to fix it is to add special context to some strings. On Crowdin (service where I can translate Documenso) I can't fix it.

Example fix:
Change from
<Trans>View</Trans>
to
<Trans context="special context">View</Trans>

or from
actionVerb: msg'Sign',
to

actionVerb: msg({
      message: 'Sign',
      context: 'special context',
}),

I will create pull request. Without this, I can't translate Documeno into Polish.

Steps to Reproduce

No response

Expected Behavior

en.po file

....
#: file1.ts
msgctxt "special context"
msgid "Type"
msgstr "Type"

#: file2.ts
msgid "Type"
msgstr "Type"
...

Current Behavior

en.po file

....
#: file1.ts
#: file2.ts
msgid "Type"
msgstr "Type"
...

Or similar issues

Image Image

Screenshots (optional)

No response

Operating System [e.g., Windows 10]

any

Browser [e.g., Chrome, Firefox]

any

Version [e.g., 2.0.1]

any

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @mKoonrad on GitHub (Aug 8, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/1953 ### Issue Description I want to report issue that prevents Documenso from being translated correctly into different languages. As you probably know, the same string can be translated with different translations depending on context. For example, translation of save (button to save) vs save (20% on sale) is different in many languages. Lingui/cli merges the same source strings from different .ts files. I found some strings (like recipient role, signatute types) which are incorrectly linked with wrong translation. The only way to fix it is to add special context to some strings. On Crowdin (service where I can translate Documenso) I can't fix it. Example fix: Change from `<Trans>View</Trans>` to `<Trans context="special context">View</Trans>` or from `actionVerb: msg'Sign',` to ``` actionVerb: msg({ message: 'Sign', context: 'special context', }), ``` I will create pull request. Without this, I can't translate Documeno into Polish. ### Steps to Reproduce _No response_ ### Expected Behavior en.po file ``` .... #: file1.ts msgctxt "special context" msgid "Type" msgstr "Type" #: file2.ts msgid "Type" msgstr "Type" ... ``` ### Current Behavior en.po file ``` .... #: file1.ts #: file2.ts msgid "Type" msgstr "Type" ... ``` Or similar issues <img width="375" height="222" alt="Image" src="https://github.com/user-attachments/assets/45f28cf7-a487-4e67-8293-98f1de97e045" /> <img width="302" height="181" alt="Image" src="https://github.com/user-attachments/assets/5904106c-a84d-476a-990c-141664ce5fdd" /> ### Screenshots (optional) _No response_ ### Operating System [e.g., Windows 10] any ### Browser [e.g., Chrome, Firefox] any ### Version [e.g., 2.0.1] any ### Please check the boxes that apply to this issue report. - [x] I have searched the existing issues to make sure this is not a duplicate. - [x] I have provided steps to reproduce the issue. - [x] I have included relevant environment information. - [x] I have included any relevant screenshots. - [x] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [x] I want to work on creating a PR for this issue if approved
kerem 2026-02-26 18:47:35 +03:00
Author
Owner

@mKoonrad commented on GitHub (Aug 12, 2025):

Closed #1954

<!-- gh-comment-id:3178719999 --> @mKoonrad commented on GitHub (Aug 12, 2025): Closed #1954
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#560
No description provided.