On 5/14/26 17:21, Neil Roberts wrote:
Ilmari Lauhakangas <[email protected]> writes:
In the LibreOffice site .pot file we have currently:
#: data/footer.toml:0 i18n/en-us.toml:0
msgid "Blog"
msgstr ""
I would like to split it, so translators can completely control what is
in the header (maybe they want to link somewhere else than some blog):
#: i18n/en-us.toml:0
msgid "Blog"
msgstr ""
#: data/footer.toml:0
msgid "Blog"
msgstr ""
But if I do this, `hugo gettext-extract pot` will always put it back
together again. It didn't help that I added a description to the source.
Is there a way to solve this?
This is a bit hacky, but maybe if you can’t find a better solution then
one way to make it work could be to add a prefix to one of the strings
like this:
[headerfooter-blog]
other = 'headerfooter@Blog'
and then remove it when the string is used like this:
{{ i18n "headerfooter-blog" | replaceRE `^[^@]*@` "" }}
The downside is that the prefix will appear in Weblate and confuse
translators. If they remove it then it will still work, or if they
translate it and don’t remove the @ then it will work as well.
Thanks to you and Martin, I solved it by adding a trailing space:
https://git.libreoffice.org/infra/libreofficeorg/+/860734616a849591011f59af181883222dccf7b0%5E%21
Ilmari
--
To unsubscribe e-mail to: [email protected]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/l10n/
Privacy Policy: https://www.documentfoundation.org/privacy