[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66427] msgmerge: Feature Request: Keep user defined tags/flags
From: |
Christian Buhtz |
Subject: |
[bug #66427] msgmerge: Feature Request: Keep user defined tags/flags |
Date: |
Fri, 8 Nov 2024 04:08:31 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?66427>
Summary: msgmerge: Feature Request: Keep user defined
tags/flags
Group: GNU gettext
Submitter: buhtz
Submitted: Fri 08 Nov 2024 10:08:28 AM CET
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 08 Nov 2024 10:08:28 AM CET By: Christian Buhtz <buhtz>
Hello,
I first submitted this bug via email but "Bruno" asked me to open the ticket.
Please allow me to suggest an improvement for gettext which would make my life
easier.
I do have a po file like this
#, python-brace-format, my-foobar-tag
msgid "my id"
msgstr "meine ID"
My problem is that msgmerge --update create this out of it and remove the
"my-foobar-tag" because it doesn't know it.
#, python-brace-format
msgid "my id"
msgstr "meine ID"
The same behavior goes for flags/tags using the "." like this.
#. my-foobar-tag
They are removed.
But I need to keep tags, even if msgmerge doesn't know them. There are good
reason in my workflow to keep them.
For example I do run additional (semantic) tests on my po files. To influence
the behavior of that tests, e.g. formulate exceptional cases, I use this
tags.
So Bruno added some question to my email.
> In order to understand the requirement better,
> I would also need to know more about the workflow:
> - Which processing step sets this tag, and who sets it?
> - Which processing step uses this tag (for testing)?
I do add this text manually in the language specific po file via my text
editor (emacs).
The tag is used by my helper script to decide which additional tests/checks to
run or not to run on a specific entry.
For this specific text I do count and compare the appearance of "{" and "}"
between the msgid and msgstr. The curly brackets are used in Python strings as
placeholders.
My translators do use Weblate for translations to allow non-technical persons
contributing translations. Some of them do not know about the concept of
placeholders in strings. And IMHO they don't need to know. As a maintainer I
try to keep the obstacle as low as possible for them to keep them working and
attract new translators. So I have to deal with some mistakes they can make.
Some do erase that placeholders.
But for some specific strings there are also good reasons for translators to
remove that placeholder and put the real word into it. For this strings I do
use the user defined flag/tag to skip that kind of test.
If you are interested in more details see the helper script and don't hesitate
to ask.
<https://github.com/bit-team/backintime/blob/dev/update_language_files.py>
My current solution is to use just a comment, instead of a flag.
"# my-tag"
Thanks in advance,
Christian Buhtz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66427>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #66427] msgmerge: Feature Request: Keep user defined tags/flags,
Christian Buhtz <=