cms icon indicating copy to clipboard operation
cms copied to clipboard

i18n space problem of consecutive {% trans %} blocks

Open OmeletWithoutEgg opened this issue 5 months ago • 0 comments

In some languages (like zh_TW) we don't put spaces after periods, commas or between sentences. For example, 你好,世界。歡迎! is correct but 你好, 世界。 歡迎! is not.

It seems that some of CMS's i18n glues two sentences with a space, like: https://github.com/cms-dev/cms/blob/821fed553d419ef437bc00c208562a25ae060c1b/cms/server/contest/templates/overview.html#L84-L85

or https://github.com/cms-dev/cms/blob/821fed553d419ef437bc00c208562a25ae060c1b/cms/server/contest/templates/overview.html#L99-L100

And it feels awkward to see those half-width space between two sentences in the translated pages.

Relevant codes: c71b2959025d8bd7581431b25dc43a586fad7bdb https://github.com/cms-dev/cms/blob/821fed553d419ef437bc00c208562a25ae060c1b/cms/server/contest/formatting.py#L83 https://github.com/cms-dev/cms/blob/821fed553d419ef437bc00c208562a25ae060c1b/cms/server/contest/formatting.py#L103

OmeletWithoutEgg avatar Sep 07 '25 10:09 OmeletWithoutEgg