aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-22 11:05:47 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-22 13:15:31 +0100
commit2256d29650521deac96dad531c5e7384cb0304ff (patch)
tree15d3ce83b6bfa7464f1508b88e2bb024bdf9f029 /lisp
parent348a917b8bafb2b6dafbdfa0a6945c6803b0d806 (diff)
add mastodon-iso.el containing ISO language lists
iso.el typo and provide
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-iso.el246
1 files changed, 246 insertions, 0 deletions
diff --git a/lisp/mastodon-iso.el b/lisp/mastodon-iso.el
new file mode 100644
index 0000000..8baff3c
--- /dev/null
+++ b/lisp/mastodon-iso.el
@@ -0,0 +1,246 @@
+;;; mastodon-iso.el --- ISO language code lists for mastodon.el -*- lexical-binding: t -*-
+
+;; Copyright (C) 2022 Marty Hiatt
+;; Author: Marty Hiatt <martianhiatus@riseup.net>
+;; Version: 1.0.0
+;; Package-Requires: ((emacs "27.1") (request "0.3.0"))
+;; Homepage: https://codeberg.org/martianh/mastodon.el
+
+;; This file is not part of GNU Emacs.
+
+;; This file is part of mastodon.el.
+
+;; mastodon.el is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; mastodon.el is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with mastodon.el. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+;; via
+;; https://github.com/VyrCossont/mastodon/blob/0836f4a656d5486784cadfd7d0cd717bb67ede4c/app/helpers/languages_helper.rb
+;; and
+;; https://github.com/Shinmera/language-codes/blob/master/data/iso-639-3.lisp
+
+(defvar mastodon-iso-639-1
+ '(("ab" "Abkhazian")
+ ("aa" "Afar")
+ ("af" "Afrikaans")
+ ("ak" "Akan")
+ ("sq" "Albanian")
+ ("am" "Amharic")
+ ("ar" "Arabic")
+ ("an" "Aragonese")
+ ("hy" "Armenian")
+ ("as" "Assamese")
+ ("av" "Avaric")
+ ("ae" "Avestan")
+ ("ay" "Aymara")
+ ("az" "Azerbaijani")
+ ("bm" "Bambara")
+ ("ba" "Bashkir")
+ ("eu" "Basque")
+ ("be" "Belarusian")
+ ("bn" "Bengali")
+ ("bh" "Bihari languages")
+ ("bi" "Bislama")
+ ("bs" "Bosnian")
+ ("br" "Breton")
+ ("bg" "Bulgarian")
+ ("my" "Burmese")
+ ("km" "Central Khmer")
+ ("ch" "Chamorro")
+ ("ce" "Chechen")
+ ("zh" "Chinese")
+ ("cv" "Chuvash")
+ ("kw" "Cornish")
+ ("co" "Corsican")
+ ("cr" "Cree")
+ ("hr" "Croatian")
+ ("cs" "Czech")
+ ("da" "Danish")
+ ("dz" "Dzongkha")
+ ("en" "English")
+ ("eo" "Esperanto")
+ ("et" "Estonian")
+ ("ee" "Ewe")
+ ("fo" "Faroese")
+ ("fj" "Fijian")
+ ("fi" "Finnish")
+ ("nl" "Dutch" "Flemish")
+ ("fr" "French")
+ ("ff" "Fulah")
+ ("gl" "Galician")
+ ("lg" "Ganda")
+ ("ka" "Georgian")
+ ("de" "German")
+ ("el" "Greek")
+ ("gn" "Guarani")
+ ("gu" "Gujarati")
+ ("ht" "Haitian" "Haitian Creole")
+ ("ha" "Hausa")
+ ("he" "Hebrew")
+ ("hz" "Herero")
+ ("hi" "Hindi")
+ ("ho" "Hiri Motu")
+ ("hu" "Hungarian")
+ ("is" "Icelandic")
+ ("io" "Ido")
+ ("ig" "Igbo")
+ ("id" "Indonesian")
+ ("ia" "Interlingua" "Interlingua (International Auxiliary Language Association)")
+ ("iu" "Inuktitut")
+ ("ik" "Inupiaq")
+ ("ga" "Irish")
+ ("it" "Italian")
+ ("ja" "Japanese")
+ ("jp" "Japanese")
+ ("jv" "Javanese")
+ ("kl" "Kalaallisut" "Greenlandic")
+ ("kn" "Kannada")
+ ("kr" "Kanuri")
+ ("ks" "Kashmiri")
+ ("kk" "Kazakh")
+ ("ki" "Kikuyu" "Gikuyu")
+ ("rw" "Kinyarwanda")
+ ("kv" "Komi")
+ ("kg" "Kongo")
+ ("ko" "Korean")
+ ("ku" "Kurdish")
+ ("kj" "Kuanyama" "Kwanyama")
+ ("ky" "Kirghiz" "Kyrgyz")
+ ("lo" "Lao")
+ ("la" "Latin")
+ ("lv" "Latvian")
+ ("li" "Limburgan" "Limburger" "Limburgish")
+ ("ln" "Lingala")
+ ("lt" "Lithuanian")
+ ("lu" "Luba-Katanga")
+ ("lb" "Luxembourgish" "Letzeburgesch")
+ ("mk" "Macedonian")
+ ("mg" "Malagasy")
+ ("ms" "Malay")
+ ("ml" "Malayalam")
+ ("dv" "Divehi" "Dhivehi" "Maldivian")
+ ("mt" "Maltese")
+ ("gv" "Manx")
+ ("mi" "Maori")
+ ("mr" "Marathi")
+ ("mh" "Marshallese")
+ ("mn" "Mongolian")
+ ("na" "Nauru")
+ ("nv" "Navajo" "Navaho")
+ ("ng" "Ndonga")
+ ("ne" "Nepali")
+ ("nd" "Ndebele, North" "North Ndebele")
+ ("se" "Northern Sami")
+ ("no" "Norwegian")
+ ("nb" "Bokmål, Norwegian" "Norwegian Bokmål")
+ ("ny" "Chichewa" "Chewa" "Nyanja")
+ ("nn" "Norwegian Nynorsk" "Nynorsk, Norwegian")
+ ("ie" "Interlingue" "Occidental")
+ ("oc" "Occitan")
+ ("oj" "Ojibwa")
+ ("cu" "Church Slavic" "Old Slavonic" "Church Slavonic" "Old Bulgarian" "Old Church Slavonic")
+ ("or" "Oriya")
+ ("om" "Oromo")
+ ("os" "Ossetian" "Ossetic")
+ ("pi" "Pali")
+ ("fa" "Persian")
+ ("pl" "Polish")
+ ("pt" "Portuguese")
+ ("pa" "Panjabi" "Punjabi")
+ ("ps" "Pushto" "Pashto")
+ ("qu" "Quechua")
+ ("ro" "Romanian" "Moldavian" "Moldovan")
+ ("rm" "Romansh")
+ ("rn" "Rundi")
+ ("ru" "Russian")
+ ("sm" "Samoan")
+ ("sg" "Sango")
+ ("sa" "Sanskrit")
+ ("sc" "Sardinian")
+ ("gd" "Gaelic" "Scottish Gaelic")
+ ("sr" "Serbian")
+ ("sn" "Shona")
+ ("ii" "Sichuan Yi" "Nuosu")
+ ("sd" "Sindhi")
+ ("si" "Sinhala" "Sinhalese")
+ ("sk" "Slovak")
+ ("sl" "Slovenian")
+ ("so" "Somali")
+ ("st" "Sotho, Southern")
+ ("nr" "Ndebele, South" "South Ndebele")
+ ("es" "Spanish" "Castilian")
+ ("su" "Sundanese")
+ ("sw" "Swahili")
+ ("ss" "Swati")
+ ("sv" "Swedish")
+ ("tl" "Tagalog")
+ ("ty" "Tahitian")
+ ("tg" "Tajik")
+ ("ta" "Tamil")
+ ("tt" "Tatar")
+ ("te" "Telugu")
+ ("th" "Thai")
+ ("bo" "Tibetan")
+ ("ti" "Tigrinya")
+ ("to" "Tonga (Tonga Islands)")
+ ("ts" "Tsonga")
+ ("tn" "Tswana")
+ ("tr" "Turkish")
+ ("tk" "Turkmen")
+ ("tw" "Twi")
+ ("uk" "Ukrainian")
+ ("ur" "Urdu")
+ ("ug" "Uighur" "Uyghur")
+ ("uz" "Uzbek")
+ ("ca" "Catalan" "Valencian")
+ ("ve" "Venda")
+ ("vi" "Vietnamese")
+ ("vo" "Volapük")
+ ("wa" "Walloon")
+ ("cy" "Welsh")
+ ("fy" "Western Frisian")
+ ("wo" "Wolof")
+ ("xh" "Xhosa")
+ ("yi" "Yiddish")
+ ("yo" "Yoruba")
+ ("za" "Zhuang" "Chuang")
+ ("zu" "Zulu")))
+
+;; web UI doesn't respect these for now
+(defvar mastodon-iso-639-regional
+ '(("es-AR" "Español (Argentina)")
+ ("es-MX" "Español (México)")
+ ("pt-BR" "Português (Brasil)")
+ ("pt-PT" "Português (Portugal)")
+ ("sr-Latn" "Srpski (latinica)")
+ ("zh-CN" "简体中文")
+ ("zh-HK" "繁體中文(香港)")
+ ("zh-TW" "繁體中文(臺灣)")))
+
+(defvar mastodon-iso-639-3
+ '(("ast" "Asturian" "Asturianu")
+ ("ckb" "Sorani (Kurdish)" "سۆرانی")
+ ("jbo" "Lojban" "la .lojban.")
+ ("kab" "Kabyle" "Taqbaylit")
+ ("kmr" "Kurmanji (Kurdish)" "Kurmancî")
+ ("ldn" "Láadan" "Láadan")
+ ("lfn" "Lingua Franca Nova" "lingua franca nova")
+ ("tok" "Toki Pona" "toki pona")
+ ("zba" "Balaibalan" "باليبلن")
+ ("zgh" "Standard Moroccan Tamazight" "ⵜⴰⵎⴰⵣⵉⵖⵜ")))
+
+(provide 'mastodon-iso)
+;;; mastodon-iso.el ends here