y12studio / y12wordpress

Wordpress Demo Sites
http://y12.tw
Apache License 2.0
0 stars 0 forks source link

shortcode hello plugin base on template #4

Closed y12studio closed 10 years ago

y12studio commented 10 years ago

ref

y12studio commented 10 years ago

create hello shortcode plugin from tempalte

hlashbrooke/WordPress-Plugin-Template

$ mkdir /tmp/plugins
$ git clone https://github.com/hlashbrooke/wordpress-plugin-template && cd wordpress-plugin-template
$ /bin/bash build-plugin.sh
Plugin name: Y12 Shortcode Hello
Destination folder: /tmp/plugins
Initialise new git repo (y/n): n
$ cd /home/git/y12wordpress/ &&  git pull
$ mv /tmp/plugins/y12-shortcode-hello/ projects/
// modify php code
// add lang/xxx-zh_TW.po
$ npm install
$ grunt
$ ls build
y12-shortcode-hello-v0.0.1.zip
$ unzip build/y12-shortcode-hello-v0.0.1.zip -d /tmp

po fatal error issue.(bug from template?)

*.mo with no content · Issue #4 · MicheleBertoli/grunt-po2mo

$ msgfmt lang/y12-shortcode-hello-zh_TW.mo lang/y12-shortcode-hello-zh_TW.po
lang/y12-shortcode-hello-zh_TW.po:406: duplicate message definition...
lang/y12-shortcode-hello-zh_TW.po:399: ...this is the location of the first definition
msgfmt: found 1 fatal error
y12studio commented 10 years ago

Grunt and Wordpress Plugin dev

Create a new project from fooplugins/grunt-wp-boilerplate

ref