package gettext
Internationalization library (i18n)
Install
Dune Dependency
Authors
Maintainers
Sources
gettext-v0.4.2.tbz
sha256=8b672c7c521b8ac753c6a90925243cdd367dd5202e7c1e5d1a2507b11ad5d6a7
sha512=72bad53ce15ccc5113e4cfdc76b56c633926bb3702623964e006a99d21a758e7d47f0b9b67bebffe8b9a0c5f4d018cb7d4ae665568dfab52070ed355d5f9d31b
doc/src/gettext.base/gettextCategory.ml.html
Source file gettextCategory.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
(**************************************************************************) (* ocaml-gettext: a library to translate messages *) (* *) (* Copyright (C) 2003-2008 Sylvain Le Gall <sylvain@le-gall.net> *) (* *) (* This library is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public *) (* License as published by the Free Software Foundation; either *) (* version 2.1 of the License, or (at your option) any later version; *) (* with the OCaml static compilation exception. *) (* *) (* This library 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 *) (* Lesser General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this library; if not, write to the Free Software *) (* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *) (* USA *) (**************************************************************************) (** Functions to manipulate category. @author Sylvain Le Gall *) type category = | LC_CTYPE | LC_NUMERIC | LC_TIME | LC_COLLATE | LC_MONETARY | LC_MESSAGES | LC_ALL let string_of_category cat = match cat with | LC_CTYPE -> "LC_CTYPE" | LC_NUMERIC -> "LC_NUMERIC" | LC_TIME -> "LC_TIME" | LC_COLLATE -> "LC_COLLATE" | LC_MONETARY -> "LC_MONETARY" | LC_MESSAGES -> "LC_MESSAGES" | LC_ALL -> "LC_ALL" let category_of_string str = match str with | "LC_CTYPE" -> LC_CTYPE | "LC_NUMERIC" -> LC_NUMERIC | "LC_TIME" -> LC_TIME | "LC_COLLATE" -> LC_COLLATE | "LC_MONETARY" -> LC_MONETARY | "LC_MESSAGES" -> LC_MESSAGES | "LC_ALL" -> LC_ALL | _ -> raise (Invalid_argument "category_of_string") let categories = [ LC_CTYPE; LC_NUMERIC; LC_TIME; LC_COLLATE; LC_MONETARY; LC_MESSAGES; LC_ALL; ] let compare c1 c2 = let val_category x = match x with | LC_CTYPE -> 0 | LC_NUMERIC -> 1 | LC_TIME -> 2 | LC_COLLATE -> 3 | LC_MONETARY -> 4 | LC_MESSAGES -> 5 | LC_ALL -> 6 in compare (val_category c1) (val_category c2) module MapCategory = Map.Make (struct type t = category let compare = compare end)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>