Add Traditional Chinese, Hong Kong translation (zh-HK) (#1544)

* Added Chinese Traditional Hong Kong (zh-HK) for Ruby

* Added translations for Ruby.

* Added Chinese Traditional Hong Kong (zh-HK) for JS

* Added translations for javascript code.

* Rearrange language references in mastodon.jsx

* Break `addLocaleData` into multiple lines. Make future commit more readable.
* Roughly re-sort the languages in alphabetical orders
  (only manually put English on top because it is default).

* Sort application.rb locale with alphabetical order

With exception that English (default language) goes first.
Improve code readability.

* Resort language selection box alphabetically

Sort HUMAN_LOCALES in the alphabetical order of display name
(except English, the default language, come first).

Improve usability.
This commit is contained in:
Koala Yeung
2017-04-12 14:50:50 +08:00
committed by wxcafé
parent 3442bc0ea3
commit 24eb45425e
9 changed files with 551 additions and 15 deletions

View File

@ -41,15 +41,17 @@ import Report from '../features/report';
import { IntlProvider, addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';
import de from 'react-intl/locale-data/de';
import es from 'react-intl/locale-data/es';
import fr from 'react-intl/locale-data/fr';
import pt from 'react-intl/locale-data/pt';
import hu from 'react-intl/locale-data/hu';
import uk from 'react-intl/locale-data/uk';
import fi from 'react-intl/locale-data/fi';
import eo from 'react-intl/locale-data/eo';
import ru from 'react-intl/locale-data/ru';
import es from 'react-intl/locale-data/es';
import fi from 'react-intl/locale-data/fi';
import fr from 'react-intl/locale-data/fr';
import hu from 'react-intl/locale-data/hu';
import ja from 'react-intl/locale-data/ja';
import pt from 'react-intl/locale-data/pt';
import ru from 'react-intl/locale-data/ru';
import uk from 'react-intl/locale-data/uk';
import zh from 'react-intl/locale-data/zh';
import { localeData as zh_hk } from '../locales/zh-hk';
import getMessagesForLocale from '../locales';
import { hydrateStore } from '../actions/store';
@ -64,7 +66,21 @@ const browserHistory = useRouterHistory(createBrowserHistory)({
});
addLocaleData([...en, ...de, ...es, ...fr, ...pt, ...hu, ...uk, ...fi, ...eo, ...ru, ...ja]);
addLocaleData([
...en,
...de,
...eo,
...es,
...fi,
...fr,
...hu,
...ja,
...pt,
...ru,
...uk,
...zh,
...zh_hk,
]);
const Mastodon = React.createClass({