Skip to content
Snippets Groups Projects
Commit 74c34bd5 authored by Jan Prachař's avatar Jan Prachař
Browse files

non-breakable space between a number and an unit

parent 6a7da281
Branches
No related tags found
No related merge requests found
......@@ -12,11 +12,11 @@ months = ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'červenc
def inflect_number(n: int, w1: str, w234: str, wother: str, unitprefix: str = '') -> str:
if n == 1:
return f'{n} {unitprefix}{w1}'
return f'{n} {unitprefix}{w1}'
elif 2 <= n <= 4:
return f'{n} {unitprefix}{w234}'
return f'{n} {unitprefix}{w234}'
else:
return f'{n} {unitprefix}{wother}'
return f'{n} {unitprefix}{wother}'
def inflect_by_number(n: int, w1: str, w234: str, wother: str, unitprefix: str = '') -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment