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

Exclude page templates #67

Open
grappler opened this issue Mar 7, 2016 · 3 comments
Open

Exclude page templates #67

grappler opened this issue Mar 7, 2016 · 3 comments

Comments

@grappler
Copy link

grappler commented Mar 7, 2016

I was trying to exclude a page template from the makepot. After looking at the code I realized it is not possible.

It would be nice if the code would first check if the file excluded before running
$potextmeta->append( $dir . '/' . $file, $output, array( 'Template Name' ) )

@bradyvercher
Copy link
Member

The PHP code really is a bit of a mess and it would probably require a decent bit of duplication/refactoring to make that work. Could you use the processPot callback to remove that string?

@grappler
Copy link
Author

grappler commented Mar 9, 2016

I just needed to generate the pot file once so I just deleted the page template temporarily. I reported the issue so that the next person might find out earlier of the issue.

I would be interested to know how you would remove a string. I saw the code in remove-package-metadata.md but it was a bit complex for me to understand staight away. Is the pot variable documented somewhere.

@bradyvercher
Copy link
Member

Yeah, that example is a little complex without being familiar with the code, but that variable is an object representation of the POT file created by the gettext-parser module. The structure is documented here.

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