MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / pluralize

Function pluralize

tools/release_converter.py:136–142  ·  view source on GitHub ↗

Adds 's' for pluralization if count is not 1.

(count, singular, plural=None)

Source from the content-addressed store, hash-verified

134
135
136def pluralize(count, singular, plural=None):
137 """Adds 's' for pluralization if count is not 1."""
138 if count == 1:
139 return f"{count} {singular}"
140 else:
141 plural_form = plural if plural else singular + 's'
142 return f"{count} {plural_form}"
143
144
145# --- Formatting Functions ---

Callers 3

format_email_htmlFunction · 0.85
format_markdownFunction · 0.85
format_htmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected