File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1804,20 +1804,21 @@ check_db_file_conflict(Oid db_id)
1804
1804
static int
1805
1805
errdetail_busy_db (int notherbackends , int npreparedxacts )
1806
1806
{
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
- */
1812
1807
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. */
1813
1810
errdetail ("There are %d other session(s) and %d prepared transaction(s) using the database." ,
1814
1811
notherbackends , npreparedxacts );
1815
1812
else if (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 );
1818
1817
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 );
1821
1822
return 0 ; /* just to keep ereport macro happy */
1822
1823
}
1823
1824
You can’t perform that action at this time.
0 commit comments