How to generate *.pot file from static HTML file - internationalization

Is there an easy and straight forward method to generate *.pot file from a static HTML page?

You could try html2po with the --pot flag.

Related

Prevent asciidoc from converting a file path into a link

I'm manually converting a MS Word document to asciidoc format.
By doing so I ran into an issue that I can't work around yet.
There is an example where I want to show the reader of how the syntax of a file link should look like.
So I used this as an example:
file:///<Path>/<to>/<Keytab>
Asciidoc now renders this pseudo link into an actual link and warns me about this while converting my asciidoc document into HTML and PDF.
Usually, I would simply use the [source] element to prevent the link rendering. But the file link is part of a table.
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |file:///<Path>/<to>/<Keytab>
|=======================
Is there a way to prevent the rendering/convertion of the file link?
Okay, I found the solution. I had to escape the whole macro using a \ at the beginning.
So this did the trick:
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |\file:///<Path>/<to>/<Keytab>
|=======================

How to insert custom html into Joomla header

I am using file_get_contents to acquire html. From the html page I extract the css, and js. Right now I am using a very expensive function.
$css_elements = $doc->getElementsByTagName('link');
foreach ($css_elements as $css_element) {
$Jdocument->addStyleSheet($css_element->getAttribute('href'));
}
I would like to save the csss links to a file, and then read the file and add the links as a whole to the head tag of the HTML page.
I was wondering is Joomla has an in build function that allows for one to add unwrapped text to the head tag.
Thanx everyone!
I recommend using the Flexi Custom Code module to do this in Joomla:
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules/15251
This module allows us to insert any code like php, javascript PHP, CSS and html at site modules positions. For example, It's can be used for simple code, simple function, embed code, adsense code, affiliation code and others copy and paste codes for Joomla site.
Main Features:
1. Available for PHP, HTML, JAVASCRIPT and CSS codes
2. Available to set the target of this module
3. Easy and flexible

Magento - How to call a phtml template file from the URL

The question pretty much says it all. I have a store locator application. Which dynamically produces a URL like:
http://www.XXXX.com/storelocator/index/viewstore/id/XXX
And I have also the template file in right directory:
package/template/storelocator/view_store.phtml
Also the block in:
app/code/local/COMPANY/Storelocator
When I click on the ID that is generated by the Javascript, it returns a 404 error. So obviously the template file is not loading. But I am not sure what is causing the issue. Can someone give me some idea.
have you assign your template file in layout file if not try to assign your block in layout file.
<storelocator_index_viewstore>
<block type="Storelocator/Storelocator" template="storelocator/view_store.phtml"></block>
</storelocator_index_viewstore>
This way when your action is call magento render this block and call your phtml file

Is it possible to load an html file in site_prism?

I would need to load an html as a SitePrism Object. Is this possible? From what I see in the documentation, you can only navigate using certain url's. Would I need to store the html in a relative path in my app and then load that url with site_prism? Or do you guys see other, cleaner way to do this?
Thanks!
Rodrigo J. Martin
If you mean passing in a string that contains HTML for a page, no you can't. If you mean accessing a local file containing html, yes you can, as follows:
class Home < SitePrism::Page
set_url "file:///Users/bob/Desktop/html/home.htm"
end

Loading an ImageIcon from a source

i am making a game and i put some images on my ide/images folder but program gives null pointer exception error.my code for loading imageicon is like this
ImageIcon ac=new ImageIcon(getClass().getResource("images/actor.jpg"));
ImageIcon ac1=new ImageIcon(getClass().getResource("images/actor_shoot.jpg"));
//some codes
Image n=ac.getImage();
//some codes
i tried but couldn't find,whats your suggestions?thanks.
Try with an absolute path ? ("/images/actor.jpg") ?
Is your folder /images resides in same diretory in which your class is?
i.e., is your class is also in /ide folder?
Check the path. Are the files really in the images folder?
Are they called what you say there are called?
Are they the right case, if you're on a case-sensitive file system (in other words that actor.jpg and ACTOR.JPG are two different files)?
Are the images a resource? (Also look here.)
Try doing step-by-step what is described here (NetBeans documentation).

Resources