Skip to content

Fix missing trailing space in "Publish in " translations across multiple locales#899

Open
Ronak-vegad wants to merge 2 commits into
wagtail:mainfrom
Ronak-vegad:main
Open

Fix missing trailing space in "Publish in " translations across multiple locales#899
Ronak-vegad wants to merge 2 commits into
wagtail:mainfrom
Ronak-vegad:main

Conversation

@Ronak-vegad

Copy link
Copy Markdown

#issue : 898

This PR fixes by adding the missing trailing space in msgstr for the string msgid "Publish in " in affected locale files.
without the space, the UI showed text like publish inspanish instead of publish in spanish.

@zerolab

zerolab commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Ronak-vegad
We feed strings and pull translations from https://explore.transifex.com/torchbox/wagtail/ so while this PR would fix the immediate issue, it will break again in a future release. I would suggest updating them in Transifex too

@Ronak-vegad

Copy link
Copy Markdown
Author

@zerolab Thanks for the review and for pointing this out. I understand that the fix also needs to be updated in Transifex to avoid it breaking in future releases. I’ll work on updating the translations there as well.

@gr8jam

gr8jam commented Feb 9, 2026

Copy link
Copy Markdown

Hey @Ronak-vegad , thanks for taking this on. Much appreciated! 🙌

I had a quick look at the PR and I wonder if it would be better to instead of ensuring the trailing space is added in .po files, to actually remove the trailing space from "Publish in " and add space as part of string construction (in the footer.tsx:113). Basically from:

    {gettext('Publish in ') + locale.displayName}

to

    {gettext('Publish in') + ' ' + locale.displayName}

I am not wagtail expert, so maybe my suggestion is stupid. 🤷 But this seems to me less error prone. The extra space at the ned of the string is not natural and the translators might remove them again in the future by mistake.

@Ronak-vegad

Copy link
Copy Markdown
Author

Thank you so much for reviewing the PR, @gr8jam. I understand your suggestion — instead of manually adding spaces in the .po files, we can use Django’s placeholder-based translation, which is a cleaner approach. I’ll try implementing it first and then update the changes on Transifex.

@@ -0,0 +1,613 @@
# Generated by Django 5.2.11 on 2026-02-07 22:19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ronak-vegad , I am having hard time understanding why this migration file has been added in this MR. Can share some light on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants