On 5/14/26 17:21, Neil Roberts wrote:
Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> 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: l10n+unsubscribe@global.libreoffice.org
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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.