Skip to content

Add support for multiple plurals to search results for Cyrillic languages#198

Merged
OrsellGit merged 1 commit into
mainfrom
feat/multiple-plurals
May 30, 2026
Merged

Add support for multiple plurals to search results for Cyrillic languages#198
OrsellGit merged 1 commit into
mainfrom
feat/multiple-plurals

Conversation

@pivotman319-owo
Copy link
Copy Markdown
Member

Requested by @Laveig.

This basically does what it says on the tin. Russian has two definitions of the word "plural", and the current version of search in P2:CE doesn't actually account for this:

btw @pivotman319 there are two plurals in russian language, one for less than 5 objects and one for 5 and more objects so I need an additional plural token for Settings_General_Search_VeryFull for the text to be correct. example: 1 match - 1 совпадение; 2 matches - 2 совпадения; 6 matches - 6 совпадений.

This PR addresses that by adding a second loc string - one is for exactly two matches (#Settings_General_Search_VeryFull_Plural), another is for more than two matches (#Settings_General_Search_VeryFull_Plural2) - the latter "duplicate" string exists and is used in place. This shouldn't be visible to the end-user on languages that don't have multiple plural terms.

One match Two matches Three matches (placeholder suffix for demo purposes, not in actual PR)

@pivotman319-owo pivotman319-owo requested a review from a team as a code owner May 30, 2026 20:33
Copy link
Copy Markdown
Contributor

@OrsellGit OrsellGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OrsellGit OrsellGit merged commit 8a7b320 into main May 30, 2026
1 check failed
@OrsellGit OrsellGit deleted the feat/multiple-plurals branch May 30, 2026 20:37
OrsellGit pushed a commit that referenced this pull request May 30, 2026
@iamsirenstorm
Copy link
Copy Markdown
Member

Just a reminder, please do not forget to run Prettier and check the results of the check test on GH before merging.

While it's a fairly minor thing, a new PR / commit has to be made to account for this which isn't great for history.

@iamsirenstorm
Copy link
Copy Markdown
Member

Actually the warning on here seems to be from a past file from a change a while back. Even more reason to do it... Don't even let me get stuffed merged if it doesn't pass :P

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.

3 participants