Skip to content

Added multiple space rule#7

Merged
lslezak merged 1 commit into
mainfrom
add-multiple-space-rule
Nov 21, 2025
Merged

Added multiple space rule#7
lslezak merged 1 commit into
mainfrom
add-multiple-space-rule

Conversation

@lslezak
Copy link
Copy Markdown
Collaborator

@lslezak lslezak commented Nov 21, 2025

Problem

  • Some translatable texts in Agama contain indentation spaces, like here.

Example:

{
  {
    {
      const message = _("Some very long message \
        which spans across multiple lines.");
    }
  }
}

The problem is that the indentation on the second line is actually included in the message text. The HTML collapses multiple spaces to a single space when rendered in a browser so in the end it is not a visible problem for users.

But it might be confusing for the translators, they will see text "Some very long message        which spans across multiple lines." to translate and they might be wondering if the the extra space characters need to be kept or not. I got this question on the IRC channel.

Let's add a new check to avoid this kind of problems.

@lslezak lslezak merged commit 3dc15d0 into main Nov 21, 2025
5 checks passed
@lslezak lslezak deleted the add-multiple-space-rule branch November 21, 2025 21:28
lslezak added a commit to agama-project/agama that referenced this pull request Dec 2, 2025
## Problem

- Some translatable texts in Agama contain indentation spaces, like
[here](https://github.com/agama-project/agama/blob/87a04f1769e5d83439f7b1298fc486908ef511da/web/src/components/storage/EncryptionSection.tsx#L50-L51).

Example:

```js
{
  {
    {
      const message = _("Some very long message \
        which spans across multiple lines.");
    }
  }
}
```

The problem is that the indentation on the second line is actually
included in the message text. The HTML collapses multiple spaces to a
single space when rendered in a browser so in the end it is not a
visible problem for users. But it still might be confusing for the
translators.

- See related
agama-project/eslint-plugin-agama-i18n#7

## Solution

- Enable eslint check
- Fix the reported problems

## TODO

- [ ] Manually fix the translations in Weblate using `sed` to avoid
invalidating the existing translations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants