TaoTao的网络记事本
In: Uncategorized
14 Jan 2010之前写过一篇免费发送google wave邀请的日志,当时我才刚刚获得发送邀请的资格,名额是16个。写了那篇日志之后陆续有人找我索取google wave邀请,但似乎邀请非但没有越用越少,却是逐渐增多。今天去看了一下,发现已经有22个邀请名额了。当真是“既以为人己愈有 既以与人己愈多”。
In: wordpress
12 Jan 2010woothemes是非常知名的wordpress主题制作公司,制作了大量高质量的主题。虽然大多数是收费主题,但也有一部分免费的,而且在我看来免费中也有精品,比如meta-morphosis。
最近做了一个站用到了meta-morphosis,需要将该主题界面汉化。woothemes出品的主题确实是比较规范的,主题文件夹里带有专门的lang文件夹,应该是具有方便翻译的功能。但是这个lang文件夹里的.mo和.po文件到底应该怎么使用呢,我也不知道。woothemes网站的帮助文档以及讨论区都是只有付费用户才有资格进入的,所以作为未付费用户,即使是对于这个官方免费的模板,我也无法从woothemes官网上获得任何帮助资料。于是只得继续求助google,终于得到了这篇非常有用的文章:
以下是全文,有空我会翻译一下这篇。
simple solution create new .po and .mo file put in your theme folder thats it
WordPress uses a standard localization framework called GNU gettext. This framework provides the programmer the ability to mark text inside code as being suitable for localization. The role of the translator is to take these marked pieces of text and produce a language-specific localization. No code needs to change and you do not need to understand how the program works.
Text is marked by wrapping it with special PHP functions. It is not important to know how these functions work, but it will be helpful to recognize them:
__($text) – Looks for a translated version of $text and returns the result_e($text) – Looks for a translated version of $text and echo the result to the screen (i.e. effectively it is echo __($text))__ngettext($single,$plural,$number) – If $number is 1 then looks for a translated version of $single. If number is more than 1 then looks for a translated version of$plural.(Source: Urban Giraffe)
Translating WooThemes
Putting this into context, it means that all our text in our template files (.php files) have been wrapped in gettext functions. This enables us to create a Portable Object File (or .po file) which contains all the text for the theme. This has already been done by us atWooThemes.
The user (that’s you) then has the ability to use a program (we’ll get back to this later) totranslate this .po file into another language, add it to the theme directory, and have a translated theme!
Before you can start to translate the theme, you need to make sure that the theme has been made ready for translation. All our new themes will support localization and include alanguage file (.po file) which contains all the English texts, and soon all our old themes will be upgraded as well.
If you are not certain if your theme has been made ready for translation/localization, you can simply check if there is a “/lang/themename.po” file in your theme folder. If there isn’t one, you will need to download the latest version of the theme and check if the .po file existst there. If it does include a translation file, you will need to upgrade your theme to be able to translate it.
To translate your theme, you will need to use Poedit to translate the includedPortable Object file (.po file), which will then create a Machine Object file (.mo file) which we will upload to our theme folder for WordPress to read.
Follow these steps to translate your .po file into another language and make a .mo file:
Translating the .po file with Poedit
Setup WordPress
Before we can upload our new .mo file, we need to make sure we named it correctly, as it has to match your desired language locale. See the complete list of language codes and country codes to find your exact locale.
We’ll use Norwegian as the example here, so first we find the language code (nb – Norsk Bokmål) and the country code (NO). We than rename our .mo file to nb_NO.mo and upload to the root of our theme folder e.g.
wp-content/themes/themename/nb_NO.mo
The last step is to make sure your WordPress config file, wp-config.php, is setup with your locale, which in this case is Norwegian. So open wp-config.php and check that what you have in your define() function. For Norwegian it will look like this:
define ('WPLANG', 'nb_NO');
Once you have matched the wp-config.php setting to our .mo filename, you should have successfully translated your WooTheme into another language.
We want to make it easier for users to get the theme in their language, so if you have translated your theme into your language, we hope you can share the .mo file with us, so new users don’t have to translate the theme themselves.
Please send us your translated files (.po and .mo) files to support@woothemes.com and we will put your file up in our repository.
In: Uncategorized
6 Dec 2009现有16个google wave邀请名额,要得请留下gmail地址,我会直接邀请的。先到先得送完为止。
另外,邀请之后似乎google要进行人工审核,比较慢的。我上次被邀请之后等了差不多一周才得以开通google wave。我也不理解为什么会需要等那么久,所以你得有耐心…..
In: Uncategorized
28 Nov 2009差不多一个月前给家里的三台电脑装了win7.其中我的主力电脑x61s)(4G内存)和一台amd芯片的台式机(只有2G内存,最近内存贵舍不得升级啊)装了64位版本;一台sony上网本w117(2g内存)装了32bit版.
如今一个月期限已到,win7开始提示要求激活.于是不得已上网搜索种种激活方法.看到windows之家的这个帖子比较靠谱:
于是下载了该帖所推荐的前两款激活软件,几次试用之下,sony上网本w117最先搞定,随后台式机也成功搞定.x61s稍微麻烦一点,换了两三种方式最后也成功激活。总之用网上提供的激活工具都还挺顺利的。
另外win7本身也挺听话,几台电脑基本上装完win7之后就驱动完整,直接可以工作,不需要再额外安装驱动。整个过程非常愉悦。
In: Uncategorized
30 Oct 2009picasa是我最喜爱的图片管理软件,picasaweb是我最爱的网络相册。
当然flickr社交功能显然更好,但是超慢的速度是致命的。国内的yupoo等也不错,但致命的是他们好死不死非要学picasa,也那么一页一页慢慢翻,尽管服务器在国内,但速度也足以让我放弃。
picasaweb当然在09年夏天就被墙了,没有picasaweb的日子很难过,拍了很多照片却没有顺手的分享平台,导致我基本上都不上网分享照片了。
其实picasaweb的被墙程度是比较轻的,服务器的访问并没有被拦截,只是在DNS解析上做了手脚。要正常使用picasaweb非常简单,也早就存在。今天看到好多人还在说要用什么GAE或者vpn翻墙看picasaweb,于是正好炒炒冷饭将早已有之的不用翻墙浏览picasaweb方法贡献如下:
去 c:windowssystem32driversetc 目录下寻找 hosts 文档,用写字板打开
到文档末尾打个回车,然后贴上如下内容:
203.208.39.104 picasaweb.google.com
203.208.39.104 lh1.ggpht.com
203.208.39.104 lh2.ggpht.com
203.208.39.104 lh3.ggpht.com
203.208.39.104 lh4.ggpht.com
203.208.39.104 lh5.ggpht.com
203.208.39.104 lh6.ggpht.com
然后Ctrl-S保存就可以了。浏览picasaweb.google.com正常无碍
当然网络相册最重要的不是给自己看,而是让别人能方便地看到。我无法让所有的朋友都用以上的方法来看我的相册,所以还是希望GFW把可爱的picasaweb还给我们吧…..
2010年4月更新:以上方法似乎已经失效……草泥马
In: Uncategorized
30 Oct 2009最近把家里几台电脑都升级到了win7的最终发行版。一切都非常顺利,只要二十分钟左右安装,装完之后几乎立即可以开始工作,实在太完美了。
网上很多人担心自己原有的笔记本装win7之后的硬件驱动问题,就我个人的经验我觉得不必太多担心这方面的问题。我的两个本子–一个用了一年半的thinkpad x61s,一个新买的sony的上网本(是的,sony出标准的上网本了,n280的cpu) vaio w117,都非常顺利。
In: Uncategorized
28 Oct 2009虽然搜索肯定是全部用google,但百度知道也是我喜欢的一个产品。平时肯定都是输入zhidao.baidu.com进入百度知道,而这次突然阴差阳错输入了baiduzhidao.com。然后发现看到的是名为“考试blog”的一个wordpress博客站雏形。看来这位做代考的兄弟申请了一个有意思域名。
有图有真相

In: Uncategorized
18 Aug 2009离开中学整整十年了,现在看这些中学里的视频,只能用宛如外星景象来形容了。
你见过整个教室的所有桌椅板凳扔向教室墙角里的一个学生吗?人民公敌? 这唤起了我看《英雄》里“大风大风”的记忆。哦耶

In: Gadget控
8 Aug 2009我的ipod touch 二代 32G买了已经有半年。买后没多久屏幕就开始进灰,而且情况还比较严重。前几天终于看不下去,痛下杀手拆机清理灰尘。
ipod touch这种没有一个螺丝的设计我还真不知道从哪里下手。当然google一下就知道了原来应该从屏幕边缘下手直接把屏幕翻开就行了。于是便按此行事。
实际操作比想象中复杂得多。玻璃的屏幕和金属的边框之间有一圈柔弱的橡胶圈,橡胶圈在我的蹂躏之下很快就四散奔溃,现在感觉到有些暴力的味道了。然后两者的结合比我想象中紧密的多,应该是背后有太多的锁扣了,而且似乎只有靠硬撬。撬起一个角之后我本以此为突破口会使其他三个角更容易解决,而事实却并非如此。
其他三个角怎么都撬不起来,于是我只得对已撬起的玻璃一角施加更大的力量以求突破,这块玻璃看来也比较争气似乎还没有承受不住的迹象。于是再加力,于是玻璃破碎。
ipod touch是电容屏,最上面的玻璃层就是电容触摸屏,也就是被我拆碎的那块。而显示用的LCD和触摸屏是完全分离的,我拆机的时候LCD还平静地躺在下面,未受任何伤害。
把触摸屏拆碎了,心中自然是有些悔,也不知道能不能买到配件,要多少钱才能搞定。于是上taobao搜,一看心中就放心了,只要120。当时已经深夜卖家不在线,不过我直接拍下,加上运费一共140.
配件到的时候我比较忙,拖了几天才有空装。装的过程简单极了,接上排线,然后屏幕按上去,就好了。实在是太简单了,以至于当我意识到应该拍摄一下拆装过程的时候,就已经装好了。装好了再拆我是没这个雅兴了,下次再拍吧哈哈。
因为发现触摸屏比较便宜,我决定从此也不用贴膜了。一方面是屏幕也还算结实,看上去不像容易磨花的样子;另一方面磨花了就换个屏呗,不过是几块贴膜的价钱。

In: Gadget控
8 Aug 2009以前用nokia的都知道用nokia pc suite作为电脑和手机同步的工具。后来nokia推出了ovi suite,据说用途和pc suite颇为相似,于是觉得很莫名其妙,何必搞出两个桌面端同步工具来,让人无所适从。(我觉得比微软放着好端端的wmp不用去搞zune desktop专门给zune同步更无厘头一些。)所以我也一直对ovi没有多少好感。
最近又去ovi.com逛了逛,又看到nokia说ovi suite是作为pc suite替代者的,于是决心装ovi suite试一下。结果一装而不可收拾,彻底放弃了原来的pc suite。
最重要的原因是ovi suite整合了绝大多数功能。
比如说,原来用pc suite的时候,想要下载地图给nokia maps离线使用?你需要装map loader
想要检查手机软件版本更新?你需要装nokia software update
需要同步音乐?这也是选装软件啊兄弟!
于是你发现电脑里有了一堆nokia软件。
ovi suite把这些都整合了,而且都在同一个界面下,是一个整体,不再是一个个独立的小零碎。
同步而不仅仅是备份。离开手机之后照样可以在ovi suite里浏览通讯录啊短信啊。
短信同步到ovi suite之后可以对话方式显示。
甚至连nokia maps loader都集成了。用来向手机内存卡里load地图,以便离线使用nokia maps。反正我现在只用google maps和nokia maps,其实绝大多数时间都是用google maps搞定,确实非常好用。nokia maps基本上只是在gprs信号不好在线地图加载非常慢的情况下使用。route66和garmin我没有尝试,我怕麻烦,而且我想对于我这种不开车的人应该没有必要了吧。
其他优点以后想到再说
