-
Notifications
You must be signed in to change notification settings - Fork 25
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
Good way to eliminate duplicates in pot file #73
Comments
Hi @ngocphamm, duplicate strings should already be removed from the generated POT file if your'e using this module. Let me know if you're seeing duplicates after running it, though. |
Thanks for super fast response @bradyvercher! So for now I have this in
Then the generated pot file has these 2 duplicated entries
because of this piece of code, I suppose.
Should there not be duplicates in this case? |
Hmm, I'm not sure about that one. That first entry is the name of the plugin from the header in your main plugin file. The second entry comes from that Deduplication in this module relies on the gettext-parser module, so it may consider something about those strings to be unique. Maybe the presence of a comment for the plugin header entry? The delimiter is different ( I haven't looked into this before, so that's all I have for now without digging in deeper. |
I think you are right, as the 2 lines for Page title and Menu title don't get duplicates. But there's probably nothing to do for now. Do you have an idea of how to run the |
If the header is being disambiguated with context, then even For example, you can try adding a call to
If you really want to remove the plugin header, this example should help. |
I ran Thanks for the example! I will look around for some more info. I really appreciate your help! |
Thanks for letting me know about |
So now I have a separate task, which will be executed after
|
As the title says, I'm trying to find a way to eliminate duplicates in pot file.
The job can be achieved by using
msguniq
command and I can run it manually in Terminal but I'm wondering if I can do that from within this plugin. I know there is theprocessPot
callback function to play with the resulted pot file, but I'm not quite familiar with how it should work.Does anyone have experience with this? If yes can you let me know how it should be done?
Thank you all!
The text was updated successfully, but these errors were encountered: