I doubt that anyone can help me with this (as usual), but I try it anyway, so at least you can see what entertaining problems are brightening my day: I have been trying to set up a Pootle server for a while. Basically, Pootle is a very nice software, allowing very comfortable (though not as stylish as launchpad) software localization. But...
Pootle comes along with its own web server. Although it is written in Python, setting up a Pootle server is not done by copying a few files into a web server's hunting grounds. (though that should be possible somehow) I couldn't get its requirements fulfilled on Ubuntu 7.04, but it was in the repositories in 7.10, so I set up a machine with that. That machine also runs ISPConfig, supposed to ease account management.
There is a bug in pootle's package in Gutsy, and the recommended fix did not work for me, but at least Pootle would run... That machine is running Apache, plus a second Apache on port 81 for ISPConfig. Now Pootle comes with its own server on port 8080, and it wants to be executed by root.
Originally I wanted to "put" pootle into a user account, but the docs are a bit "fuzzy" here: The mentioned scripts and archive files do not exist on Ubuntu, and there is no hint what files I really need and how I could collect all necessary files manually. This is one problem.
Another problem is that I need to redirect port 8080 from that account (if I get it to work one day) to port 80, for which I probably need mod_proxy. The pootle docs seem to suggest a forward proxy (though with a few settings not recommended by the mod_proxy docs), while in my understanding a reverse proxy should be used. But again, no idea how to set that up properly...
So why I am creating myself all that trouble? Short answer: Because I've gone mad. Long answer: I would like to set up a localization site. I would like to use it for localizing Postnuke and some other FOSS. I know that my students will not be interested in this, but rumours claim there are people outside our school... And with localized Chinese versions, a few nice programs may become a bit more popular here in Taiwan...
So, you can't help me either? Never mind, I got used to that, I'll see that I get it done myself...
Rants, Riding, Radio, Recipes, Rock - and the remnants of a G+ presence...
Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts
2008-04-21
2008-03-28
學生車禍地理訊息系統 - Accident GIS
我知道我是口譯,所以我不應該做這種東西,但是有時候我就忍不住... :D 這次為什麼有做出這個呢?
我們學務處雖然會記錄車禍,但是第一,他們知道的車禍只是學生通知教官的,第二,他們只會記錄每月多少次車禍,多少人受傷,然後公告這些數字。不過,他們不會記錄(或至少不會公告)車禍是誰的錯,也不會公告哪裡發生。
我覺得這對學生不太有用,所以考慮做出這個GIS (Geographic Information System)。Google幾年前已經開始提供GMaps,但是近一年多才終於有台灣的地圖資料。GMaps的API好像也還一直在變化中,但是平常的變化是增加,不是減少。如果你自己也想“玩”一下,可以先看官方的blog。
如果你覺得那些都好複雜(就像對一些人開啟一台非Windows電腦一樣“複雜”),不用擔心,我在這裡會告訴你一個很簡單的方法。你知不知道Google Docs?這個服務原來只要讓你在線上建文件或工作表,後來人們發現其實可以把這文件經過分享連結到Gmaps - 或者其它服務。
意思是,我只需要一個HTML檔,放在我的web server,改一些連線的資料,然後永遠只需要在工作表裡面加資料,不用再動HTML檔。有沒有興趣?那我跟你說怎麼做。
我們先需要HTML檔,所以我們最好到我的GIS,在那邊按Ctrl-U(view page as source),然後存檔。之後你當然需要一個適合的地方可以放這個檔案。這可能是一個小小的網頁空間,但是也可能是你自己的伺服器。決定這個位置之後你必須申請自己的Gmaps key。你要在你的網站使用GMaps的地圖,你先需要有連接的key。
下一步:工作表。我們在Google Docs建立新的工作表。請建這些欄位(在第一行每個欄位寫一個名稱): rank, date, long, lat, acc, resp, text,就像這個圖:

說明:rank是排名位置,每次比行少一個。rank決定在網頁上列的順序。date是日期,當然。你可以用別的寫法,但是這個比較簡單使用,也可以很容易讓電腦以日期排序。acc是學生車禍時的交通工具。我原來想用漢字,但是GMaps在這裡好像還不支援。所以我用簡單的數字:1=走路,2=腳踏車,3=機車,4=汽車。resp要表示車禍責任:1=對方,2=學生。而在text可以寫簡單的車禍說明。
還有兩個:long跟lat。這個是地理位置,我們會用一個工具讓我們知道這些數據:getlonlat。你可以在地圖上找車禍的位置,點那個地方,就可以知道數據。
因為我們網頁要讀工作表的資料,我們必須分享它。(所以,不要記錄太私人的資料!)請點"Publish",然後"More Publishing Options"(更多發佈選項)。我們要把檔案格式改成Atom,然後做出URL。那個URL會有這個格式:http://spreadsheets.google.com/feeds/list/[spreadsheet key]/[worksheet id]/public/values
我們需要的是spreadsheet key跟worksheet id。有這兩個,我們回到原來的HTML檔。請你把var param_wsId =的數據改成自己的worksheet id,然後把var param_ssKey =的數值改成自己的spreadsheet key。
之後只有兩個地方還要修改:一個是地圖下的說明。你可以完全刪掉或修改一下。另一個地方在HTML檔的下面。如果你不想知道有多少人有誤打誤撞到你的系統,你可以把一整段刪掉。如果你想用Google Analytics,你最好建一個帳號,然後把我的code換成自己的。
就這樣,這麼快就可以有一個學生車禍GIS。如果有改善的建議,可以在這裡提出。對了,你可能有發現,雖然我在半年前已經做出來了初期的版本,但是我的GIS裡面卻沒有很多資料。沒錯,這就是我們學校的特色:沒有人對任何事情有興趣。希望你的學生不會這樣。
我們學務處雖然會記錄車禍,但是第一,他們知道的車禍只是學生通知教官的,第二,他們只會記錄每月多少次車禍,多少人受傷,然後公告這些數字。不過,他們不會記錄(或至少不會公告)車禍是誰的錯,也不會公告哪裡發生。
我覺得這對學生不太有用,所以考慮做出這個GIS (Geographic Information System)。Google幾年前已經開始提供GMaps,但是近一年多才終於有台灣的地圖資料。GMaps的API好像也還一直在變化中,但是平常的變化是增加,不是減少。如果你自己也想“玩”一下,可以先看官方的blog。
如果你覺得那些都好複雜(就像對一些人開啟一台非Windows電腦一樣“複雜”),不用擔心,我在這裡會告訴你一個很簡單的方法。你知不知道Google Docs?這個服務原來只要讓你在線上建文件或工作表,後來人們發現其實可以把這文件經過分享連結到Gmaps - 或者其它服務。
意思是,我只需要一個HTML檔,放在我的web server,改一些連線的資料,然後永遠只需要在工作表裡面加資料,不用再動HTML檔。有沒有興趣?那我跟你說怎麼做。
我們先需要HTML檔,所以我們最好到我的GIS,在那邊按Ctrl-U(view page as source),然後存檔。之後你當然需要一個適合的地方可以放這個檔案。這可能是一個小小的網頁空間,但是也可能是你自己的伺服器。決定這個位置之後你必須申請自己的Gmaps key。你要在你的網站使用GMaps的地圖,你先需要有連接的key。
下一步:工作表。我們在Google Docs建立新的工作表。請建這些欄位(在第一行每個欄位寫一個名稱): rank, date, long, lat, acc, resp, text,就像這個圖:

說明:rank是排名位置,每次比行少一個。rank決定在網頁上列的順序。date是日期,當然。你可以用別的寫法,但是這個比較簡單使用,也可以很容易讓電腦以日期排序。acc是學生車禍時的交通工具。我原來想用漢字,但是GMaps在這裡好像還不支援。所以我用簡單的數字:1=走路,2=腳踏車,3=機車,4=汽車。resp要表示車禍責任:1=對方,2=學生。而在text可以寫簡單的車禍說明。
還有兩個:long跟lat。這個是地理位置,我們會用一個工具讓我們知道這些數據:getlonlat。你可以在地圖上找車禍的位置,點那個地方,就可以知道數據。
因為我們網頁要讀工作表的資料,我們必須分享它。(所以,不要記錄太私人的資料!)請點"Publish",然後"More Publishing Options"(更多發佈選項)。我們要把檔案格式改成Atom,然後做出URL。那個URL會有這個格式:http://spreadsheets.google.com/feeds/list/[spreadsheet key]/[worksheet id]/public/values
我們需要的是spreadsheet key跟worksheet id。有這兩個,我們回到原來的HTML檔。請你把var param_wsId =的數據改成自己的worksheet id,然後把var param_ssKey =的數值改成自己的spreadsheet key。
之後只有兩個地方還要修改:一個是地圖下的說明。你可以完全刪掉或修改一下。另一個地方在HTML檔的下面。如果你不想知道有多少人有誤打誤撞到你的系統,你可以把一整段刪掉。如果你想用Google Analytics,你最好建一個帳號,然後把我的code換成自己的。
就這樣,這麼快就可以有一個學生車禍GIS。如果有改善的建議,可以在這裡提出。對了,你可能有發現,雖然我在半年前已經做出來了初期的版本,但是我的GIS裡面卻沒有很多資料。沒錯,這就是我們學校的特色:沒有人對任何事情有興趣。希望你的學生不會這樣。
2007-11-19
Zhuyin or Hanyu Pinyin IME?
"This is Taiwan, we use Zhuyin input. So you should learn it too." This is something I have heard numerous times, but so far it was not very convincing. Why?
Well, first of all, the "we use Zhuyin" part is not quite correct. In the years I had been working at our school's computer centre I saw plenty of requests to get this or that IME installed, because "I can only use this one." If Taiwanese may be "picky", why not me?
Another reason against Zhuyin and for Hanyu Pinyin is of course the fact that I can get along with Latin script very well. My native language is using it, and also many others I encountered. So, for Hanyu Pinyin, one only needs to learn which letters are assigned to which sounds.
For Zhuyin, I would also need to learn the characters themselves. For a Taiwanese, Zhuyin makes sense because the characters are much simpler than most Hanzi. But for someone used to alphabets in Roman letters, this is an entirely new set to learn.
But when it comes to computer input methods, there are more important arguments. Zhuyin consists of 37 characters. When this script was created in 1913, people could hardly imagine computers. And when computers were created, people did not think of Zhuyin when they designed the first keyboard layouts.
The result? Zhuyin occupies not just 37 keys, there are four more for tone marks, so altogether 41 keys. The keyboard layout common in Taiwan is based on the standard English US layout. English operates with just 26 letters. That means, some more, usually differently assigned keys will be needed to input Zhuyin.
Did you ever notice that most Taiwanese will switch to the number keypad on the right when they have to key in numbers? There are numbers in the top row of the main key block, but... Those numbers are also used for Zhuyin characters. You want to key in Zhuyin? No numbers from there...
This is still a somehow acceptable workaround. Strange, but understandable. Much "funnier" are sentence marks. Just look at the layout: You need a period, a comma, a semicolon? Forget it! Did you ever notice how people write texts with Zhuyin? They write on the keyboard, sending the right hand to the keypad from time to time, and when they need a sentence mark, they will grab the mouse and click on a toolbar.
Without that special toolbar, the only other way available seems to be to call up a program displaying a character map, and to click on the sentence mark in question on that map. Microsoft has added such a toolbar to their office products, and the lack of such toolbar was an important reason why people in Taiwan did not want to use OpenOffice in the beginning. (problem solved some time ago)
Imagine this: You need a special toolbar, assigned to a certain application, to be able to finish a sentence with a period. That also means, you can not write correct Chinese sentences in a mail (at least not without trouble) if the mail program does not sport a sentence mark toolbar!
All these problems are hard to understand for someone used to Hanyu Pinyin input. Hanyu Pinyin is based on regular Latin script. It uses just one letter for a sound that is not in use in the English language: ü. This one has been replaced by "v" on English keyboard layouts.
But I really only need the letter keys to input language. The number keys are still giving me numbers when I press them, and the same original functionality applies to sentence marks. I can input ,。、 right from the keyboard, as long as I use the Hanyu Pinyin IME.
All these are pretty good arguments in favour of Hanyu Pinyin. And there is one more: You can use it basically everywhere on this planet, with almost any keyboard layout. Did you notice that quite a few Taiwanese living abroad bring a keyboard from Taiwan, so they can look up the keys they need for Zhuyin?
So, you want me to learn Zhuyin so I can use that IME? No... The Hanyu Pinyin IME may not always be easily set up on Windows, but it is very easy to use on Linux thanks to scim and Smart Pinyin, and it is very convenient on OS X now thanks to Fun Input Toy. If you ever wanted to know how an IME should behave, try FIT and enjoy...
Well, first of all, the "we use Zhuyin" part is not quite correct. In the years I had been working at our school's computer centre I saw plenty of requests to get this or that IME installed, because "I can only use this one." If Taiwanese may be "picky", why not me?
Another reason against Zhuyin and for Hanyu Pinyin is of course the fact that I can get along with Latin script very well. My native language is using it, and also many others I encountered. So, for Hanyu Pinyin, one only needs to learn which letters are assigned to which sounds.
For Zhuyin, I would also need to learn the characters themselves. For a Taiwanese, Zhuyin makes sense because the characters are much simpler than most Hanzi. But for someone used to alphabets in Roman letters, this is an entirely new set to learn.
But when it comes to computer input methods, there are more important arguments. Zhuyin consists of 37 characters. When this script was created in 1913, people could hardly imagine computers. And when computers were created, people did not think of Zhuyin when they designed the first keyboard layouts.
The result? Zhuyin occupies not just 37 keys, there are four more for tone marks, so altogether 41 keys. The keyboard layout common in Taiwan is based on the standard English US layout. English operates with just 26 letters. That means, some more, usually differently assigned keys will be needed to input Zhuyin.
Did you ever notice that most Taiwanese will switch to the number keypad on the right when they have to key in numbers? There are numbers in the top row of the main key block, but... Those numbers are also used for Zhuyin characters. You want to key in Zhuyin? No numbers from there...
This is still a somehow acceptable workaround. Strange, but understandable. Much "funnier" are sentence marks. Just look at the layout: You need a period, a comma, a semicolon? Forget it! Did you ever notice how people write texts with Zhuyin? They write on the keyboard, sending the right hand to the keypad from time to time, and when they need a sentence mark, they will grab the mouse and click on a toolbar.
Without that special toolbar, the only other way available seems to be to call up a program displaying a character map, and to click on the sentence mark in question on that map. Microsoft has added such a toolbar to their office products, and the lack of such toolbar was an important reason why people in Taiwan did not want to use OpenOffice in the beginning. (problem solved some time ago)
Imagine this: You need a special toolbar, assigned to a certain application, to be able to finish a sentence with a period. That also means, you can not write correct Chinese sentences in a mail (at least not without trouble) if the mail program does not sport a sentence mark toolbar!
All these problems are hard to understand for someone used to Hanyu Pinyin input. Hanyu Pinyin is based on regular Latin script. It uses just one letter for a sound that is not in use in the English language: ü. This one has been replaced by "v" on English keyboard layouts.
But I really only need the letter keys to input language. The number keys are still giving me numbers when I press them, and the same original functionality applies to sentence marks. I can input ,。、 right from the keyboard, as long as I use the Hanyu Pinyin IME.
All these are pretty good arguments in favour of Hanyu Pinyin. And there is one more: You can use it basically everywhere on this planet, with almost any keyboard layout. Did you notice that quite a few Taiwanese living abroad bring a keyboard from Taiwan, so they can look up the keys they need for Zhuyin?
So, you want me to learn Zhuyin so I can use that IME? No... The Hanyu Pinyin IME may not always be easily set up on Windows, but it is very easy to use on Linux thanks to scim and Smart Pinyin, and it is very convenient on OS X now thanks to Fun Input Toy. If you ever wanted to know how an IME should behave, try FIT and enjoy...
Subscribe to:
Posts (Atom)