Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd933092

Browse files
committed
Add more message pluralization
Even though we can't do much about the case with multiple plurals inone sentence, we can fix the other cases.
1 parent8507c2f commitd933092

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

‎src/backend/commands/dbcommands.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,20 +1804,21 @@ check_db_file_conflict(Oid db_id)
18041804
staticint
18051805
errdetail_busy_db(intnotherbackends,intnpreparedxacts)
18061806
{
1807-
/*
1808-
* We don't worry about singular versus plural here, since the English
1809-
* rules for that don't translate very well. But we can at least avoid
1810-
* the case of zero items.
1811-
*/
18121807
if (notherbackends>0&&npreparedxacts>0)
1808+
/* We don't deal with singular versus plural here, since gettext
1809+
* doesn't support multiple plurals in one string. */
18131810
errdetail("There are %d other session(s) and %d prepared transaction(s) using the database.",
18141811
notherbackends,npreparedxacts);
18151812
elseif (notherbackends>0)
1816-
errdetail("There are %d other session(s) using the database.",
1817-
notherbackends);
1813+
errdetail_plural("There is %d other session using the database.",
1814+
"There are %d other sessions using the database.",
1815+
notherbackends,
1816+
notherbackends);
18181817
else
1819-
errdetail("There are %d prepared transaction(s) using the database.",
1820-
npreparedxacts);
1818+
errdetail_plural("There is %d prepared transaction using the database.",
1819+
"There are %d prepared transactions using the database.",
1820+
npreparedxacts,
1821+
npreparedxacts);
18211822
return0;/* just to keep ereport macro happy */
18221823
}
18231824

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp