frostming / frostming/pofmt

Support for plural translations

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
At the moment the linter errors when using `msgid_plural`

**Describe the solution you'd like**
Support for plural translations as described in A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
Using another linter maybe?

**Additional context**
```
msgid "There is %d unconfirmed user."
msgid_plural "There are %d unconfirmed users."
msgstr[0] "Singular translation!"
msgstr[1] "Plural translation!"
```

error:

```
❌ /data/test.po Parse error: line 0: Missing msgstr

Checked 1 file(s), 1 error file(s) and 0 file(s) changed.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the parse error using the plural entry shown in the issue and `/data/test.po`. Then trace the linter's PO parsing path to see how `msgid_plural`, `msgstr[0]`, and `msgstr[1]` are handled. Done means this example is accepted and plural translations are linted or formatted without the missing-msgstr error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.