Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore unknown PO flags #708

Open
fangly opened this issue Jul 16, 2021 · 5 comments
Open

Ignore unknown PO flags #708

fangly opened this issue Jul 16, 2021 · 5 comments

Comments

@fangly
Copy link

fangly commented Jul 16, 2021

I am working with an uncommon programming language, which is not supported by gettext (https://www.gnu.org/software/gettext/manual/html_node/Translators-for-other-Languages.html#Translators-for-other-Languages). My workflow adds the zoe-format flag to PO messages containing a format string. Here is a PO example:

#, zoe-format
msgid "Hello #{name}"
msgstr "Bonjour #{name}"

I can open the message fine in Poedit 3 (6387) and do not expect Poedit to do anything unusual with it since I am using a non-standard flag. However, when I save the PO file, Poedit strips my flag. I would rather Poedit not to remove it.

I realize some gettext utility may be removing this flag, not Poedit directly. I see value in non-standard flags because they can be used in non-standard workflows to support custom features and uncommon programming languages. To support this flexibility, I am arguing here that Poedit / gettext should merely leave all flags that they do not recognize alone.

@vslavik
Copy link
Owner

vslavik commented Jul 16, 2021

I would rather Poedit not to remove it.

I would prefer that too. This is GNU gettext tools doing it — you need to file a bug report (or much better, a patch) there.

@fangly
Copy link
Author

fangly commented Jul 18, 2021

Thanks for the support. I will raise the issue upstream.
Could you clarify, which parts of gettext strip the flags? Is it just one utility or all of them?

@vslavik
Copy link
Owner

vslavik commented Jul 18, 2021

It's pretty much all of them because this handling is present in library code and affects all PO output. msgmerge and msgcat are the tools relevant to Poedit and msgcat is an easy way to reproduce:

msgcat -o- YourPoFileWithNonstandardFlags.po

@fangly
Copy link
Author

fangly commented Jul 20, 2021

I raised the issue upstream: https://savannah.gnu.org/bugs/index.php?60947

@vslavik
Copy link
Owner

vslavik commented Jul 20, 2021

Thanks!

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

No branches or pull requests

2 participants