-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Follow GNU .po files headers formatting #251
Comments
I think there's no way to insert this comment before the headers right now. But it's easy to implement. I imagine something like this: $translations->setDescription(<<<EOT
SOME DESCRIPTIVE TITLE
Copyright (C) YEAR Free Software Foundation, Inc.
This file is distributed under the same license as the PACKAGE package.
FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
EOT); I don't know whether adding flags to the headers makes sense ( |
Sure it could be a great feature 😄
It makes sense because it's used to notice the translators that one or more translations in the file are fuzzy, without having to scroll down all the file. |
Ok, where did you see this example? |
You can see specifications here: https://www.gnu.org/software/trans-coord/manual/gnun/html_node/PO-Header.html For further info: https://www.gnu.org/software/gettext/manual/html_node/index.html Some of these specifications could be adapted or removed to fit better with your scripts. |
New version released including these features: $translations->setDescription($description);
$translations->getFlags()->add('fuzzy'); |
@oscarotero is there a possibility to add the fuzzy flag automatically? I mean when a translation has been changed, it is erased from the PO file. The issue is that sometimes it's just a little difference like a colon or a single word. It would be great not to erase completly the concerning translation but mark it as fuzzy when there are a few changes to the string. |
I don't understand. Do you mean the Translations class handles the flags automatically according to the flags added in each translation? This class should contain the less logic (aka magic) possible, so anyone can edit the content, add or remove flags according to his own standards. |
Yes but it would be an option, maybe a new Merge method. |
Currently, the translations flags are using the same option as the individual translation (https://github.com/php-gettext/Gettext/blob/master/src/Translations.php#L188) |
Is there a way to follow the recommended gnu headers for
.po
files as following? With the copyright header and description.The text was updated successfully, but these errors were encountered: