;;; sami.el --- Quail package for inputting Sámi  -*-coding: utf-8;-*-

;; Copyright (C) 2019-2021 Free Software Foundation, Inc.

;; Author: Wojciech S. Gac <wojciech.s.gac@gmail.com>
;; Keywords: i18n, multilingual, input method, Sámi

;; This file is part of GNU Emacs.

;; GNU Emacs 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.

;; GNU Emacs 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 GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; This file implements the following input methods for the Sámi
;; language
;; - norwegian-sami-prefix
;; - bergsland-hasselbrink-sami-prefix
;; - southern-sami-prefix
;; - ume-sami-prefix
;; - northern-sami-prefix
;; - inari-sami-prefix
;; - skolt-sami-prefix
;; - kildin-sami-prefix

;;; Code

(require 'quail)

(quail-define-package
 "norwegian-sami-prefix" "Sámi" "/NSoS" nil
 "Norwegian Southern Sámi input method

Alphabet (parenthesized letters are used in foreign names):
А а	B b	(C c)	D d	E e	F f	G g	H h
I i	(Ï ï)	J j	K k	L l	M m	N n	O o
P p	(Q q)	R r	S s	T t	U u	V v	(W w)
(X x)	Y y	(Z z)	Æ æ	Ø ø	Å å
"
 nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
 ("А" ?А)
 ("а" ?а)
 ("B" ?B)
 ("b" ?b)
 ("C" ?C)
 ("c" ?c)
 ("D" ?D)
 ("d" ?d)
 ("E" ?E)
 ("e" ?e)
 ("F" ?F)
 ("f" ?f)
 ("G" ?G)
 ("g" ?g)
 ("H" ?H)
 ("h" ?h)
 ("I" ?I)
 ("i" ?i)
 (":I" ?Ï)
 (":i" ?ï)
 ("J" ?J)
 ("j" ?j)
 ("K" ?K)
 ("k" ?k)
 ("L" ?L)
 ("l" ?l)
 ("M" ?M)
 ("m" ?m)
 ("N" ?N)
 ("n" ?n)
 ("O" ?O)
 ("o" ?o)
 ("P" ?P)
 ("p" ?p)
 ("Q" ?Q)
 ("q" ?q)
 ("R" ?R)
 ("r" ?r)
 ("S" ?S)
 ("s" ?s)
 ("T" ?T)
 ("t" ?t)
 ("U" ?U)
 ("u" ?u)
 ("V" ?V)
 ("v" ?v)
 ("W" ?W)
 ("w" ?w)
 ("X" ?X)
 ("x" ?x)
 ("Y" ?Y)
 ("y" ?y)
 ("Z" ?Z)
 ("z" ?z)
 ("AE" ?Æ)
 ("ae" ?æ)
 ("/O" ?Ø)
 ("/o" ?ø)
 ("/A" ?Å)
 ("/a" ?å))

(quail-define-package
 "bergsland-hasselbrink-sami-prefix" "Sámi" "/BHS" nil
 "Bergsland-Hasselbrink Southern Sámi input method

Alphabet:
А а	Â â	Á á	B b	C c	Č č	D d	Đ đ
E e	F f	G g	H h	I i	Î î	J j	K k
L l	M m	N n	Ŋ ŋ	O o	P p	R r	S s
Š š	T t	U u	V v	Y y	Z z	Ž ž	Ä ä
Æ æ	Ö ö	Å å	'
"
 nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
 ("А" ?А)
 ("а" ?а)
 ("^A" ?Â)
 ("^a" ?â)
 ("'A" ?Á)
 ("'a" ?á)
 ("B" ?B)
 ("b" ?b)
 ("C" ?C)
 ("c" ?c)
 ("^C" ?Č)
 ("^c" ?č)
 ("D" ?D)
 ("d" ?d)
 ("-D" ?Đ)
 ("-d" ?đ)
 ("E" ?E)
 ("e" ?e)
 ("F" ?F)
 ("f" ?f)
 ("G" ?G)
 ("g" ?g)
 ("H" ?H)
 ("h" ?h)
 ("I" ?I)
 ("i" ?i)
 ("^I" ?Î)
 ("^i" ?î)
 ("J" ?J)
 ("j" ?j)
 ("K" ?K)
 ("k" ?k)
 ("L" ?L)
 ("l" ?l)
 ("M" ?M)
 ("m" ?m)
 ("N" ?N)
 ("n" ?n)
 ("/N" ?Ŋ)
 ("/n" ?ŋ)
 ("O" ?O)
 ("o" ?o)
 ("P" ?P)
 ("p" ?p)
 ("R" ?R)
 ("r" ?r)
 ("S" ?S)
 ("s" ?s)
 ("^S" ?Š)
 ("^s" ?š)
 ("T" ?T)
 ("t" ?t)
 ("U" ?U)
 ("u" ?u)
 ("V" ?V)
 ("v" ?v)
 ("Y" ?Y)
 ("y" ?y)
 ("Z" ?Z)
 ("z" ?z)
 ("^Z" ?Ž)
 ("^z" ?ž)
 (":A" ?Ä)
 (":a" ?ä)
 ("AE" ?Æ)
 ("ae" ?æ)
 (":O" ?Ö)
 (":o" ?ö)
 ("/A" ?Å)
 ("/a" ?å))

(quail-define-package
 "southern-sami-prefix" "Sámi" "/SoS" nil
 "Contemporary Southern Sámi input method

Alphabet (parenthesized letters are used in foreign names):
А а	B b	(C c)	D d	E e	F f	G g	H h
I i	(Ï ï)	J j	K k	L l	M m	N n	O o
P p	(Q q)	R r	S s	T t	U u	V v	(W w)
(X x)	Y y	(Z z)	Ä ä	Ö ö	Å å
"
 nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
 ("А" ?А)
 ("а" ?а)
 ("B" ?B)
 ("b" ?b)
 ("C" ?C)
 ("c" ?c)
 ("D" ?D)
 ("d" ?d)
 ("E" ?E)
 ("e" ?e)
 ("F" ?F)
 ("f" ?f)
 ("G" ?G)
 ("g" ?g)
 ("H" ?H)
 ("h" ?h)
 ("I" ?I)
 ("i" ?i)
 (":I" ?Ï)
 (":i" ?ï)
 ("J" ?J)
 ("j" ?j)
 ("K" ?K)
 ("k" ?k)
 ("L" ?L)
 ("l" ?l)
 ("M" ?M)
 ("m" ?m)
 ("N" ?N)
 ("n" ?n)
 ("O" ?O)
 ("o" ?o)
 ("P" ?P)
 ("p" ?p)
 ("Q" ?Q)
 ("q" ?q)
 ("R" ?R)
 ("r" ?r)
 ("S" ?S)
 ("s" ?s)
 ("T" ?T)
 ("t" ?t)
 ("U" ?U)
 ("u" ?u)
 ("V" ?V)
 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package
 "northern-sami-prefix" "Sámi" "/NoS" nil
 "Northern Sámi input method

Alphabet:
А а	Á á	B b	C c	Č č	D d	Đ đ	E e
F f	G g	H h	I i	J j	K k	L l	M m
N n	Ŋ ŋ	O o	P p	R r	S s	Š š	T t
Ŧ ŧ	U u	V v	Z z	Ž ž
"
 nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
 ("А" ?А)
 ("а" ?а)
 ("'A" ?Á)
 ("'a" ?á)
 ("B" ?B)
 ("b" ?b)
 ("C" ?C)
 ("c" ?c)
 ("^C" ?Č)
 ("^c" ?č)
 ("D" ?D)
 ("d" ?d)
 ("-D" ?Đ)
 ("-d" ?đ)
 ("E" ?E)
 ("e" ?e)
 ("F" ?F)
 ("f" ?f)
 ("G" ?G)
 ("g" ?g)
 ("H" ?H)
 ("h" ?h)
 ("I" ?I)
 ("i" ?i)
 ("J" ?J)
 ("j" ?j)
 ("K" ?K)
 ("k" ?k)
 ("L" ?L)
 ("l" ?l)
 ("M" ?M)
 ("m" ?m)
 ("N" ?N)
 ("n" ?n)
 ("/N" ?Ŋ)
 ("/n" ?ŋ)
 ("O" ?O)
 ("o" ?o)
 ("P" ?P)
 ("p" ?p)
 ("R" ?R)
 ("r" ?r)
 ("S" ?S)
 ("s" ?s)
 ("^S" ?Š)
 ("^s" ?š)
 ("T" ?T)
 ("t" ?t)
 ("-T" ?Ŧ)
 ("-t" ?ŧ)
 ("U" ?U)
 ("u" ?u)
 ("V" ?V)
 ("v" ?v)
 ("Z" ?Z)
 ("z" ?z)
 ("^Z" ?Ž)
 ("^z" ?ž)
 )

(quail-define-package
 "inari-sami-prefix" "Sámi" "/InS" nil
 "Inari Sámi input method

Alphabet (parenthesized letters are used in foreign names only):
А а	Â â	B b	C c	Č č	D d	Đ đ	E e
F f	G g	H h	I i	J j	K k	L l	M m
N n	O o	P p	(Q q)	R r	S s	Š š	T t
U u	V v	(W w)	(X x)	Y y	Z z	Ž ž	Ä ä
Á á	Å å	Ö ö
"
 nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
 ("А" ?А)
 ("а" ?а)
 ("^A" ?Â)
 ("^a" ?â)
 ("B" ?B)
 ("b" ?b)
 ("C" ?C)
 ("c" ?c)
 ("^C" ?Č)
 ("^c" ?č)
 ("D" ?D)
 ("d" ?d)
 ("-D" ?Đ)
 ("-d" ?đ)
 ("E" ?E)
 ("e" ?e)
 ("F" ?F)
 ("f" ?f)
 ("G" ?G)
 ("g" ?g)
 ("H" ?H)
 ("h" ?h)
 ("I" ?I)
 ("i" ?i)
 ("J" ?J)
 ("j" ?j)
 ("K" ?K)
 ("k" ?k)
 ("L" ?L)
 ("l" ?l)
 ("M" ?M)
 ("m" ?m)
 ("N" ?N)
 ("n" ?n)
 ("O" ?O)
 ("o" ?o)
 ("P" ?P)
 ("p" ?p)
 ("Q" ?Q)
 ("q" ?q)
 ("R" ?R)
 ("r" ?r)
 ("S" ?S)
 ("s" ?s)
 ("^S" ?Š)
 ("^s" ?š)
 ("T" ?T)
 ("t" ?t)
 ("U" ?U)
 ("u" ?u)
 ("V" ?V)
 ("v" ?v)
 ("W" ?W)
 ("w" ?w)
 ("X" ?X)
 ("x" ?x)
 ("Y" ?Y)
 ("y" ?y)
 ("Z" ?Z)
 ("z" ?z)
 ("^Z" ?Ž)
 ("^z" ?ž)
 (":A" ?Ä)
 (":a" ?ä)
 ("'A" ?Á)
 ("'a" ?á)
 ("/A" ?Å)
 ("/a" ?å)
 (":O" ?Ö)
 (":o" ?ö))

(quail-define-package
 "skolt-sami-prefix" "Sámi" "/SkS" nil
 "Skolt Sámi input method

Alphabet (parenthesized letters are used in foreign names only):
А а	Â â	B b	C c	Č č	Ʒ ʒ	Ǯ ǯ	D d
Đ đ	E e	F f	G g	Ǧ ǧ	Ǥ ǥ	H h	I i
J j	K k	Ǩ ǩ	L l	M m	N n	Ŋ ŋ	O o
Õ õ	P p	(Q q)	R r	S s	Š š	T t	U u
V v	(W w)	(X x)	(Y y)	Z z	Ž ž	Å å	Ä ä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