liqd / adhocracy

Adhocracy is a policy drafting and decision making software for distributed groups and open institutions.
GNU Affero General Public License v3.0
150 stars 37 forks source link

translation: traditional chinese (taiwan) #918

Closed xi closed 10 years ago

xi commented 10 years ago

This adds a chinese translation to adhocracy. Big thanks to the translator Charles Chuang!

Before adding a new language for moment.js I took the time to update it to 2.7.0.

While transifex and moment.js use the locale code zh_TW, babel claims that zh_TW is not a real locale and zh_Hant_TW should be used instead (search for "zh_TW" on http://babel.pocoo.org/docs/api/core/). This is where all the soft links are coming from.

While testing I realized that we forgot to mark up numbers for translation. I created #917 for that.

xi commented 10 years ago

A quick note on what I did to actually see the characters on debian:

  1. I enabled some chinese locales via dpkg-reconfigure locales
  2. installed some chinese fonts: apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gbsn00lp
xi commented 10 years ago

We were not sure how chinese characters would interact with some custom font-family and font-face rules. So I did a bit of reading.

I found a helpful article about CSS fonts and simplified chinese that gave a good overview.

The important bit is that fonts are chose for each character individually which means that for chinese characters, the default fallback (sans-serif in most cases) takes precedence.

nidico commented 10 years ago

Very cool!

One small thing: The translations for plural form strings are missing.

xi commented 10 years ago

The translations for plural form strings are missing.

This was a complex issue. The translations are not really missing. But the pluralization-information got lost when compiling to .mo. I created a pull request and switched to my fixed version (16b21b0) of c2c.recipe.msgfmt to fix this.

nidico commented 10 years ago

Very good, thanks for the fix! Works fine, merging now.