• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Tools

Theme Localization

June 5, 2013 by Webhead

Wodpress theme localization seemed like an easy task.  And while all the info was there, I ran into several hiccups.

PoEdit

This piece of open source software seems like a great tool for localization until it doesn’t work.  For me, it didn’t read the source files correctly.  If the _ or _e functions were not at the start of a line it did not pick it up.  So my results were always empty until I moved one of the functions to the start of the line.

PoEdit doesn’t allow  you to edit.  Normally this is fine, but not good if the source files aren’t read correctly.

 

iCanLocalize PHP Text Scanner

This tool saved the day for me, but not without problems of it’s own.  The scanner apparently looks for the closing PHP tag “?>”.  In one of my files I had no closing tag so it didn’t work for me.  In another file I had it did have the closing tag, but it wasn’t at the end of the file so not all translations were picked up.

In the end I just edited my PHP file to not have the closing PHP tags or if there were a lot, I just edited the po file manually.  After having that set I opened up PoEdit and created the .mo binary.  What a pain.

 

WordPress documentation

The docs say to use languageCode_CountryCode.mo.  This is not true.  In your theme, just use languageCode.mo.

 

qTranslate

On the up side, after doing a ton of searching for my problems I found out about qTranslate.  It is a great WordPress plugin to make translating your website very easy.  It has a textbox/editor for each language when you are editing your post so you can easily understand what’s going on.  It also provides some decent API to use in your themes.

UPDATE:  qTranslate doesn’t really work “out-of-the-box” when using with WooCommerce.  so instead I used WPML.

WPML

WPML is a bit different from qTranslate.  Instead of translating your content inside each post, you translate it all on one page.   It’s pretty good in that  you can retrieve strings from plugins and themes and add localizations right inside of WordPress.  No need to handle .po files and go through the troubles i did.   WPML lets you translate the attributes of products and all strings throughout the checkout (and everything else).

 

Filed Under: Tools Tagged With: localization, wordpress

Firebug in Safari

November 13, 2012 by Webhead

Since Safari 3.x, you can now have a firebug-like tool in Safari.  Either open terminal and copy-paste the line below or edit the plist file here ~/Library/Preferences/com.apple.Safai.plist.

defaults write com.apple.Safari WebKitDeveloperExtras -bool true

Most websites stop there saying “you should now be able to right click and see the ‘Inspect Element’ in any contextual menu”.  Well, I didn’t.  I had to show the developer menu.  Here’s how to show the developer menu straight from Safari help:

open Safari preferences, click Advanced, and select “Show Develop menu in menu bar.”

Once you do that you should be able to see “Inspect Element” in the right click menu.

source: http://macdevelopertips.com/defaults/firebug-like-tools-in-safari.html
keywords:firebug safari

Filed Under: Tools Tagged With: css, firebug

Loading Graphic

October 30, 2012 by Webhead

Not a graphic designer, but you need an animated graphic to show something is loading?  Preloaders.net is a free online tool that lets you create your very own loading graphic.

 

http://preloaders.net/

Filed Under: Tools

Favicon png or ico?

October 18, 2012 by Webhead

I found some great info, where I always do, on stackoverflow.  Basically it all modern browsers request a ico file so its best to have it in case you don’t have a <link> tag.  The best thing was the ico generator url on Dynamic Drive which does transparency.  Just great stuff.  Scroll down to the answer with the most votes, not the accepted one.

http://tools.dynamicdrive.com/favicon/

source: http://stackoverflow.com/questions/1344122/favicon-png-vs-favicon-ico-why-should-i-use-pngs-instead-of-icos
keywords: favicon png

Filed Under: Tools Tagged With: html

git move files

May 11, 2012 by Webhead

Problem

I added and pushed a bunch of files into my repository, but now I need to put it into a subfolder.

 

Solution

Git is smart and will find the files you moved.  Do the following:

$ mkdir newFolder
$ mv oldFolder newFolder
$ git rm -r oldFolder
$ git add newFolder

source:  http://stackoverflow.com/questions/3900805/git-command-to-move-a-folder-inside-another
keywords: git move files to another folder

Filed Under: Tools Tagged With: git

git couldn’t resolve proxy null

April 13, 2012 by Webhead

Problem:

I keep getting this error:

“Couldn’t resolve proxy ‘(null) …”.

I googled so hard!

 

Solution:

Thank you to someone who just plainly answers my question.  You just have to unset http.proxy and possibly https.proxy!

git config –global –unset http.proxy

searched: proxy connect aborted while accessing git
Thanks to: http://stackoverflow.com/questions/5102361/pull-command-error-failed-connect-to-github-com8080

Filed Under: Tools Tagged With: git

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Go to Next Page »

Primary Sidebar

Topics

apache apple chrome cms css debug eCommerce embed filters firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization macOS mac os x markdown ms sql mysql open source optimize php seo svg tinymce vs code woocommerce wordpress wpengine xss yii youtube

Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized