diff --git a/Resources/Lokalize/0_getstrings.sh b/Resources/Lokalize/0_getstrings.sh new file mode 100755 index 0000000..e530a9b --- /dev/null +++ b/Resources/Lokalize/0_getstrings.sh @@ -0,0 +1,25 @@ +#!/bin/bash +if [ ! -x 0_getstrings.sh ] +then + echo "Wrong working directory. Please cd to the directory containing this script." + exit 0 +fi + +if [ -z $1 ]; +then + echo "\$1: domain; example: fr" + exit 0 +fi + +APPNAME=utf8util +SRC=../../ +DOMAIN="$1" +DEST=$DOMAIN/$APPNAME.po +[ ! -d $DOMAIN ] && mkdir $DOMAIN +[ -f $DEST ] && JOIN="-j" +[ -f $DEST ] && cp $DEST $DEST.bak-$(date +%F-%T) + +xgettext --keyword=_ -d $DOMAIN $JOIN -o $DEST --c++ --from-code=UTF-8 $(find $SRC -maxdepth 1 -type f -name "*.cpp") +#xgettext --keyword=_ -d $DOMAIN -j -o $DEST --c++ --from-code=UTF-8 $(find $SRC -maxdepth 1 -type f -name "*.h") + +exit 0 diff --git a/Resources/Lokalize/2_makemo.sh b/Resources/Lokalize/2_makemo.sh new file mode 100755 index 0000000..6b63005 --- /dev/null +++ b/Resources/Lokalize/2_makemo.sh @@ -0,0 +1,22 @@ +#!/bin/bash +if [ ! -x 2_makemo.sh ] +then + echo "Wrong working directory. Please cd to the directory containing this script." + exit 0 +fi + +if [ -z $1 ]; +then + echo "\$1: domain; example: fr" + exit 0 +fi + +APPNAME=utf8util +DOMAIN="$1" + +msgfmt $DOMAIN/$APPNAME.po -o $DOMAIN/$APPNAME.mo + +# cp $DOMAIN/$APPNAME.mo /usr/local/share/locale/$DOMAIN/LC_MESSAGES/ + +exit 0 + diff --git a/Resources/Lokalize/fr/utf8util.po b/Resources/Lokalize/fr/utf8util.po new file mode 100644 index 0000000..6b22ca5 --- /dev/null +++ b/Resources/Lokalize/fr/utf8util.po @@ -0,0 +1,613 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-02 21:06+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../main.cpp:57 ../../main.cpp:58 ../../main.cpp:59 ../../main.cpp:60 +msgid "Unhandled base: " +msgstr "Base non pris en charge:" + +#: ../../main.cpp:66 ../../main.cpp:67 ../../main.cpp:68 ../../main.cpp:69 +msgid "" +"This operational mode removes character markings, control characters, " +"default ignorable characters and unassigned codepoints from an UTF-8 input." +"The utf8proc library, on which this utility is based, refers to character " +"markings as 'non-spacing, spacing and enclosing (accents)' marks, and to " +"default ignorable characters 'such as SOFT-HYPHEN or ZERO-WIDTH-SPACE'. " +"Control characters are stripped or converted to spaces.\n" +"\n" +"By default, every removable byte is stripped, the output characters are " +"decomposed and Unicode Versioning Stability is enforced.\n" +"\n" +" -i, --ignore: do not strip 'default ignorable characters'\n" +" -c, --control: do not handle 'control characters'\n" +" -m, --mark: do not strip 'character markings'\n" +" -n, --na: do not strip 'unassigned codepoints'\n" +" -r, --recompose: output recomposed characters\n" +" -h, --help: show this message\n" +"\n" +"The input can be piped in or read from stdin. It must be a single NULL " +"terminated line." +msgstr "" +"Ce mode opératoire supprime les marques de caractère, les caractères de " +"contrôle, les caractères pouvant être ignorés et les points de code non-" +"assignés d'une entrée en UTF-8. La bibliothèque utf8proc, à la base de cet " +"utilitaire, décrit les marques de caractères comme 'non-espaçant, espaçant " +"et encadrant (accents) ', et les caractères pouvant être ignorés 'tels que " +"SOFT-HYPHEN ou ZERO-SPACE-WIDTH'. Les caractères de contrôle sont supprimés " +"ou convertis en espaces.\n" +"\n" +"Par défaut, chaque octet pouvant être supprimé est supprimé, les caractères " +"en sortie sont décomposés et la 'Unicode Versioning Stability' est " +"appliquée.\n" +"\n" +" -i, --ignore: ne pas supprimer les 'caractères pouvant être ignorés'\n" +" -c, --control: ignorer les 'caractères de contrôle'\n" +" -m, --mark: ne pas supprimer les 'marques de caractères'\n" +" -n, --na: ne pas supprimer les 'points de code non-assignés'\n" +" -r, --recompose: recomposer les caractères en sortie\n" +" -h, --help: afficher ce message\n" +"\n" +"L'entrée peut être effectué via in tuyau (pipe) ou via l'entrée standard " +"(stdin). Elle doit être une ligne unique, terminée par un caractère NULL." + +#: ../../main.cpp:82 ../../main.cpp:83 ../../main.cpp:84 ../../main.cpp:85 +msgid "" +"This operational mode normalizes the input string according to the specified " +"type, the default being NFC.\n" +"\n" +" -t, --type: one of NFC, NFD, NFKC, NFKD, NFKC_Casefold\n" +" -h, --help: show this message\n" +"\n" +"The input can be piped in or read from stdin. It must be a single NULL " +"terminated line." +msgstr "" +"Ce mode opératoire normalise l'entrée selon le type spécifié, NFC par " +"défaut.\n" +"\n" +" -t, --type: peut être NFC, NFD, NFKC, NFKD, NFKC_Casefold\n" +" -h, --help: afficher ce message\n" +"\n" +"L'entrée peut être effectué via in tuyau (pipe) ou via l'entrée standard " +"(stdin). Elle doit être une ligne unique, terminée par un caractère NULL." + +#: ../../main.cpp:92 ../../main.cpp:93 ../../main.cpp:94 ../../main.cpp:95 +msgid "" +"This operational mode displays representations of the first identified " +"codepoint.\n" +"\n" +" -p, --codepoint: hexadecimal representation of the codepoint\n" +" -e, --utf8: hexadecimal representation of each byte\n" +" -s, --utf16: hexadecimal representation of each surrogate\n" +" -b, --binary: binary representation of each byte\n" +" -o, --octal: octal representation of each byte\n" +" -d, --decimal: decimal representation of each byte\n" +" -x, --xml: XML decimal representation of each byte\n" +" -L, --tolower: displays the codepoint as a lower-case character if " +"existent\n" +" -U, --toupper: displays the codepoint as an upper-case character if " +"existent\n" +" -T, --totitle: displays the codepoint as a title-case character if " +"existent\n" +" -h, --help: show this message\n" +"\n" +"The input can be piped in or read from stdin. Pass in a single character for " +"simplicity." +msgstr "" +"Ce mode opératoire affiche des représentations du premier point de code " +"identifié.\n" +"\n" +" -p, --codepoint: représentation hexadécimale du point de code\n" +" -e, --utf8: représentation hexadécimale de chaque octet\n" +" -s, --utf16: représentation hexadécimale de chaque codet (surrogate)\n" +" -b, --binary: représentation binaire de chaque octet\n" +" -o, --octal: représentation octale de chaque octet\n" +" -d, --decimal: représentation décimale de chaque octet\n" +" -x, --xml: entité décimale XML de chaque octet\n" +" -L, --tolower: affiche le point de code en casse minuscule si le caractère " +"existe\n" +" -U, --toupper: affiche le point de code en casse majuscule si le caractère " +"existe\n" +" -T, --totitle: affiche le point de code en casse de titre si le caractère " +"existe\n" +" -h, --help: afficher ce message\n" +"\n" +"L'entrée peut être effectué via in tuyau (pipe) ou via l'entrée standard " +"(stdin). Passez un caractère unique par souci de simplicité." + +#: ../../main.cpp:112 ../../main.cpp:113 ../../main.cpp:114 +msgid "" +"This operational mode displays properties of the first identified " +"codepoint.\n" +"\n" +" -l, --islower: displays 1 if the codepoint refers to a lower-case " +"character, 0 otherwise\n" +" -u, --isupper: displays 1 if the codepoint refers to an upper-case " +"character, 0 otherwise\n" +" -c, --category: determines the category of a codepoint (Letter, Number, " +"Symbol...)\n" +" -n, --direction: determines the bidirectional class of a codepoint; see " +"utf8proc.h\n" +" -i, --decompositiontype: determines the decomposition type of a codepoint; " +"see utf8proc.h\n" +" -k, --boundclass: determines the boundclass property of a codepoint; see " +"utf8proc.h\n" +" -h, --help: show this message\n" +"\n" +"The input can be piped in or read from stdin. Pass in a single character for " +"simplicity." +msgstr "" +"Ce mode opératoire affiche des propriétés du premier point de code " +"identifié.\n" +"\n" +" -l, --islower: affiche 1 si le point de code se réfère à la casse " +"minuscule d'un caractère, sinon 0\n" +" -u, --isupper: affiche 1 si le point de code se réfère à la casse " +"majuscule d'un caractère, sinon 0\n" +" -c, --category: détermine la catégorie d'un point de code (Lettre, Nombre, " +"Symbole...)\n" +" -n, --direction: détermine la bidirection d'un point de code; voir " +"utf8proc.h\n" +" -i, --decompositiontype: détermine le type de décomposition d'un point de " +"code; voir utf8proc.h\n" +" -k, --boundclass: détermine la propriété 'boundclass' d'un point de code; " +"voir utf8proc.h\n" +" -h, --help: afficher ce message\n" +"\n" +"L'entrée peut être effectué via in tuyau (pipe) ou via l'entrée standard " +"(stdin). Passez un caractère unique par souci de simplicité." + +#: ../../main.cpp:258 ../../main.cpp:259 ../../main.cpp:260 ../../main.cpp:261 +msgid "Unknown type; valid types are NFC, NFD, NFKC, NFKD and NFKC_Casefold." +msgstr "" +"Type inconnu; les types connus sont NFC, NFD, NFKC, NFKD et NFKC_Casefold." + +#: ../../main.cpp:298 ../../main.cpp:449 ../../main.cpp:299 ../../main.cpp:450 +#: ../../main.cpp:300 ../../main.cpp:451 ../../main.cpp:301 ../../main.cpp:452 +msgid "No valid bytes at start of input." +msgstr "Pas d'octet valide au début de l'entrée." + +#: ../../main.cpp:325 ../../main.cpp:326 ../../main.cpp:327 ../../main.cpp:328 +msgid "Codepoint: " +msgstr "Point de code: " + +#: ../../main.cpp:355 ../../main.cpp:356 ../../main.cpp:357 ../../main.cpp:358 +msgid "Binary: " +msgstr "Binaire: " + +#: ../../main.cpp:363 ../../main.cpp:364 ../../main.cpp:365 ../../main.cpp:366 +msgid "Octal: " +msgstr "Octal: " + +#: ../../main.cpp:371 ../../main.cpp:372 ../../main.cpp:373 ../../main.cpp:374 +msgid "Decimal: " +msgstr "Décimal: " + +#: ../../main.cpp:379 ../../main.cpp:380 ../../main.cpp:381 ../../main.cpp:382 +msgid "XML decimal: " +msgstr "XML décimal: " + +#: ../../main.cpp:387 ../../main.cpp:388 ../../main.cpp:389 ../../main.cpp:390 +msgid "To lower: " +msgstr "En minuscule: " + +#: ../../main.cpp:396 ../../main.cpp:397 ../../main.cpp:398 ../../main.cpp:399 +msgid "To upper: " +msgstr "En majuscule: " + +#: ../../main.cpp:405 ../../main.cpp:406 ../../main.cpp:407 ../../main.cpp:408 +msgid "To title: " +msgstr "En titre: " + +#: ../../main.cpp:418 ../../main.cpp:513 ../../main.cpp:419 ../../main.cpp:514 +#: ../../main.cpp:420 ../../main.cpp:515 ../../main.cpp:421 ../../main.cpp:516 +msgid "Character: " +msgstr "Caractère: " + +#: ../../main.cpp:472 ../../main.cpp:473 ../../main.cpp:474 ../../main.cpp:475 +msgid "Is lower: " +msgstr "Est minuscule: " + +#: ../../main.cpp:475 ../../main.cpp:476 ../../main.cpp:477 ../../main.cpp:478 +msgid "Is upper: " +msgstr "Est majuscule: " + +#: ../../main.cpp:480 ../../main.cpp:481 ../../main.cpp:482 ../../main.cpp:483 +msgid "Category: [" +msgstr "Catégorie: [" + +#: ../../main.cpp:487 ../../main.cpp:488 ../../main.cpp:489 ../../main.cpp:490 +msgid "Direction: " +msgstr "Direction: " + +#: ../../main.cpp:493 ../../main.cpp:494 ../../main.cpp:495 ../../main.cpp:496 +msgid "Decomposition type: " +msgstr "Type de décomposition: " + +#: ../../main.cpp:500 ../../main.cpp:501 ../../main.cpp:502 ../../main.cpp:503 +msgid "Bound class: " +msgstr "Classe 'bound': " + +#: ../../main.cpp:520 ../../main.cpp:526 ../../main.cpp:527 ../../main.cpp:528 +msgid "Other, not assigned" +msgstr "Autre, non assigné" + +#: ../../main.cpp:521 ../../main.cpp:527 ../../main.cpp:528 ../../main.cpp:529 +msgid "Letter, uppercase" +msgstr "Lettre, majuscule" + +#: ../../main.cpp:522 ../../main.cpp:528 ../../main.cpp:529 ../../main.cpp:530 +msgid "Letter, lowercase" +msgstr "Lettre, minuscule" + +#: ../../main.cpp:523 ../../main.cpp:529 ../../main.cpp:530 ../../main.cpp:531 +msgid "Letter, titlecase" +msgstr "Lettre, titre" + +#: ../../main.cpp:524 ../../main.cpp:530 ../../main.cpp:531 ../../main.cpp:532 +msgid "Letter, modifier" +msgstr "Lettre, modificateur" + +#: ../../main.cpp:525 ../../main.cpp:531 ../../main.cpp:532 ../../main.cpp:533 +msgid "Letter, other" +msgstr "Lettre, autre" + +#: ../../main.cpp:526 ../../main.cpp:532 ../../main.cpp:533 ../../main.cpp:534 +msgid "Mark, nonspacing" +msgstr "Marque, non-espaçant" + +#: ../../main.cpp:527 ../../main.cpp:533 ../../main.cpp:534 ../../main.cpp:535 +msgid "Mark, spacing combining" +msgstr "Marque, espaçant et combinant" + +#: ../../main.cpp:528 ../../main.cpp:534 ../../main.cpp:535 ../../main.cpp:536 +msgid "Mark, enclosing" +msgstr "Marque, encadrant" + +#: ../../main.cpp:529 ../../main.cpp:535 ../../main.cpp:536 ../../main.cpp:537 +msgid "Number, letter" +msgstr "Nombre, lettre" + +#: ../../main.cpp:530 ../../main.cpp:536 ../../main.cpp:537 ../../main.cpp:538 +msgid "Number, other" +msgstr "Nombre, autre" + +#: ../../main.cpp:531 ../../main.cpp:537 ../../main.cpp:538 ../../main.cpp:539 +msgid "Punctuation, connector" +msgstr "Ponctuation, connecteur" + +#: ../../main.cpp:532 ../../main.cpp:538 ../../main.cpp:539 ../../main.cpp:540 +msgid "Punctuation, dash" +msgstr "Ponctuation, tiret" + +#: ../../main.cpp:533 ../../main.cpp:539 ../../main.cpp:540 ../../main.cpp:541 +msgid "Punctuation, open" +msgstr "Ponctuation, ouverture" + +#: ../../main.cpp:534 ../../main.cpp:540 ../../main.cpp:541 ../../main.cpp:542 +msgid "Punctuation, close" +msgstr "Ponctuation, fermeture" + +#: ../../main.cpp:535 ../../main.cpp:541 ../../main.cpp:542 ../../main.cpp:543 +msgid "Punctuation, initial quote" +msgstr "Ponctuation, guillemet initial" + +#: ../../main.cpp:536 ../../main.cpp:542 ../../main.cpp:543 ../../main.cpp:544 +msgid "Punctuation, final quote" +msgstr "Ponctuation, guillemet final" + +#: ../../main.cpp:537 ../../main.cpp:543 ../../main.cpp:544 ../../main.cpp:545 +msgid "Punctuation, other" +msgstr "Ponctuation, autre" + +#: ../../main.cpp:538 ../../main.cpp:544 ../../main.cpp:545 ../../main.cpp:546 +msgid "Symbol, math" +msgstr "Symbole, math" + +#: ../../main.cpp:539 ../../main.cpp:545 ../../main.cpp:546 ../../main.cpp:547 +msgid "Symbol, currency" +msgstr "Symbole, monnaie" + +#: ../../main.cpp:540 ../../main.cpp:546 ../../main.cpp:547 ../../main.cpp:548 +msgid "Symbol, modifier" +msgstr "Symbole, modificateur" + +#: ../../main.cpp:541 ../../main.cpp:547 ../../main.cpp:548 ../../main.cpp:549 +msgid "Symbol, other" +msgstr "Symbole, autre" + +#: ../../main.cpp:542 ../../main.cpp:548 ../../main.cpp:549 ../../main.cpp:550 +msgid "Separator, space" +msgstr "Séparateur, espace" + +#: ../../main.cpp:543 ../../main.cpp:549 ../../main.cpp:550 ../../main.cpp:551 +msgid "Separator, line" +msgstr "Séparateur, ligne" + +#: ../../main.cpp:544 ../../main.cpp:550 ../../main.cpp:551 ../../main.cpp:552 +msgid "Separator, paragraph" +msgstr "Séparateur, paragraphe" + +#: ../../main.cpp:545 ../../main.cpp:551 ../../main.cpp:552 ../../main.cpp:553 +msgid "Other, control" +msgstr "Autre, contrôle" + +#: ../../main.cpp:546 ../../main.cpp:552 ../../main.cpp:553 ../../main.cpp:554 +msgid "Other, format" +msgstr "Autre, format" + +#: ../../main.cpp:547 ../../main.cpp:553 ../../main.cpp:554 ../../main.cpp:555 +msgid "Other, surrogate" +msgstr "Autre, codet" + +#: ../../main.cpp:548 ../../main.cpp:554 ../../main.cpp:555 ../../main.cpp:556 +msgid "Other, private use" +msgstr "Autre, usage privé" + +#: ../../main.cpp:550 ../../main.cpp:556 ../../main.cpp:557 ../../main.cpp:558 +msgid "Left-to-Right" +msgstr "Gauche-Droit" + +#: ../../main.cpp:551 ../../main.cpp:557 ../../main.cpp:558 ../../main.cpp:559 +msgid "Left-to-Right Embedding" +msgstr "Gauche-Droit incorporé" + +#: ../../main.cpp:552 ../../main.cpp:558 ../../main.cpp:559 ../../main.cpp:560 +msgid "Left-to-Right Override" +msgstr "Gauche-Droit outrepassé" + +#: ../../main.cpp:553 ../../main.cpp:559 ../../main.cpp:560 ../../main.cpp:561 +msgid "Right-to-Left" +msgstr "Droit-Gauche" + +#: ../../main.cpp:554 ../../main.cpp:560 ../../main.cpp:561 ../../main.cpp:562 +msgid "Right-to-Left Arabic" +msgstr "Droit-Gauche Arabe" + +#: ../../main.cpp:555 ../../main.cpp:561 ../../main.cpp:562 ../../main.cpp:563 +msgid "Right-to-Left Embedding" +msgstr "Droit-Gauche incorporé" + +#: ../../main.cpp:556 ../../main.cpp:562 ../../main.cpp:563 ../../main.cpp:564 +msgid "Right-to-Left Override" +msgstr "Droit-Gauche outrepassé" + +#: ../../main.cpp:557 ../../main.cpp:563 ../../main.cpp:564 ../../main.cpp:565 +msgid "Pop Directional Format" +msgstr "Pop Directional Format" + +#: ../../main.cpp:558 ../../main.cpp:564 ../../main.cpp:565 ../../main.cpp:566 +msgid "European Number" +msgstr "Nombre Européen" + +#: ../../main.cpp:559 ../../main.cpp:565 ../../main.cpp:566 ../../main.cpp:567 +msgid "European Separator" +msgstr "Séparateur Européen" + +#: ../../main.cpp:560 ../../main.cpp:566 ../../main.cpp:567 ../../main.cpp:568 +msgid "European Number Terminator" +msgstr "Terminaison de Nombre Européen" + +#: ../../main.cpp:561 ../../main.cpp:567 ../../main.cpp:568 ../../main.cpp:569 +msgid "Arabic Number" +msgstr "Nombre Arabe" + +#: ../../main.cpp:562 ../../main.cpp:568 ../../main.cpp:569 ../../main.cpp:570 +msgid "Common Number Separator" +msgstr "Séparateur de Nombre Commun" + +#: ../../main.cpp:563 ../../main.cpp:569 ../../main.cpp:570 ../../main.cpp:571 +msgid "Nonspacing Mark" +msgstr "Marque Non-Espaçant" + +#: ../../main.cpp:564 ../../main.cpp:570 ../../main.cpp:571 ../../main.cpp:572 +msgid "Boundary Neutral" +msgstr "Périmètre Neutre" + +#: ../../main.cpp:565 ../../main.cpp:571 ../../main.cpp:572 ../../main.cpp:573 +msgid "Paragraph Separator" +msgstr "Séparateur de Paragraphe" + +#: ../../main.cpp:566 ../../main.cpp:572 ../../main.cpp:573 ../../main.cpp:574 +msgid "Segment Separator" +msgstr "Séparateur de Segment" + +#: ../../main.cpp:567 ../../main.cpp:573 ../../main.cpp:574 ../../main.cpp:575 +msgid "Whitespace" +msgstr "Espace" + +#: ../../main.cpp:568 ../../main.cpp:574 ../../main.cpp:575 ../../main.cpp:576 +msgid "Other Neutrals" +msgstr "Neutre : Autres" + +#: ../../main.cpp:569 ../../main.cpp:575 ../../main.cpp:576 ../../main.cpp:577 +msgid "Left-to-Right Isolate" +msgstr "Gauche-Droit Isoler" + +#: ../../main.cpp:570 ../../main.cpp:576 ../../main.cpp:577 ../../main.cpp:578 +msgid "Right-to-Left Isolate" +msgstr "Droit-Gauche Isoler" + +#: ../../main.cpp:571 ../../main.cpp:577 ../../main.cpp:578 ../../main.cpp:579 +msgid "First Strong Isolate" +msgstr "Premier Fortement Isolé" + +#: ../../main.cpp:572 ../../main.cpp:578 ../../main.cpp:579 ../../main.cpp:580 +msgid "Pop Directional Isolate" +msgstr "Pop Directional Isolate" + +#: ../../main.cpp:575 ../../main.cpp:581 ../../main.cpp:582 ../../main.cpp:583 +msgid "Unknown" +msgstr "Inconnu" + +#: ../../main.cpp:576 ../../main.cpp:582 ../../main.cpp:583 ../../main.cpp:584 +msgid "Font" +msgstr "Police" + +#: ../../main.cpp:577 ../../main.cpp:583 ../../main.cpp:584 ../../main.cpp:585 +msgid "Nobreak" +msgstr "Non-cassant" + +#: ../../main.cpp:578 ../../main.cpp:584 ../../main.cpp:585 ../../main.cpp:586 +msgid "Initial" +msgstr "Initial" + +#: ../../main.cpp:579 ../../main.cpp:585 ../../main.cpp:586 ../../main.cpp:587 +msgid "Medial" +msgstr "Médial" + +#: ../../main.cpp:580 ../../main.cpp:586 ../../main.cpp:587 ../../main.cpp:588 +msgid "Final" +msgstr "Final" + +#: ../../main.cpp:581 ../../main.cpp:587 ../../main.cpp:588 ../../main.cpp:589 +msgid "Isolated" +msgstr "Isolé" + +#: ../../main.cpp:582 ../../main.cpp:588 ../../main.cpp:589 ../../main.cpp:590 +msgid "Circle" +msgstr "Cercle" + +#: ../../main.cpp:583 ../../main.cpp:589 ../../main.cpp:590 ../../main.cpp:591 +msgid "Super" +msgstr "Super" + +#: ../../main.cpp:584 ../../main.cpp:590 ../../main.cpp:591 ../../main.cpp:592 +msgid "Sub" +msgstr "Sub" + +#: ../../main.cpp:585 ../../main.cpp:591 ../../main.cpp:592 ../../main.cpp:593 +msgid "Vertical" +msgstr "Vertical" + +#: ../../main.cpp:586 ../../main.cpp:592 ../../main.cpp:593 ../../main.cpp:594 +msgid "Wide" +msgstr "Large" + +#: ../../main.cpp:587 ../../main.cpp:593 ../../main.cpp:594 ../../main.cpp:595 +msgid "Narrow" +msgstr "Étroit" + +#: ../../main.cpp:588 ../../main.cpp:594 ../../main.cpp:595 ../../main.cpp:596 +msgid "Small" +msgstr "Petit" + +#: ../../main.cpp:589 ../../main.cpp:595 ../../main.cpp:596 ../../main.cpp:597 +msgid "Square" +msgstr "Carré" + +#: ../../main.cpp:590 ../../main.cpp:596 ../../main.cpp:597 ../../main.cpp:598 +msgid "Fraction" +msgstr "Fraction" + +#: ../../main.cpp:591 ../../main.cpp:597 ../../main.cpp:598 ../../main.cpp:599 +msgid "Compat" +msgstr "Compat" + +#: ../../main.cpp:594 ../../main.cpp:600 ../../main.cpp:601 ../../main.cpp:602 +msgid "Start" +msgstr "Début" + +#: ../../main.cpp:595 ../../main.cpp:601 ../../main.cpp:602 ../../main.cpp:603 +msgid "Other" +msgstr "Autre" + +#: ../../main.cpp:596 ../../main.cpp:602 ../../main.cpp:603 ../../main.cpp:604 +msgid "Cr" +msgstr "Cr" + +#: ../../main.cpp:597 ../../main.cpp:603 ../../main.cpp:604 ../../main.cpp:605 +msgid "Lf" +msgstr "Lf" + +#: ../../main.cpp:598 ../../main.cpp:604 ../../main.cpp:605 ../../main.cpp:606 +msgid "Control" +msgstr "Contrôler" + +#: ../../main.cpp:599 ../../main.cpp:605 ../../main.cpp:606 ../../main.cpp:607 +msgid "Extend" +msgstr "Étendre" + +#: ../../main.cpp:600 ../../main.cpp:606 ../../main.cpp:607 ../../main.cpp:608 +msgid "L" +msgstr "L" + +#: ../../main.cpp:601 ../../main.cpp:607 ../../main.cpp:608 ../../main.cpp:609 +msgid "V" +msgstr "V" + +#: ../../main.cpp:602 ../../main.cpp:608 ../../main.cpp:609 ../../main.cpp:610 +msgid "T" +msgstr "T" + +#: ../../main.cpp:603 ../../main.cpp:609 ../../main.cpp:610 ../../main.cpp:611 +msgid "Lv" +msgstr "Lv" + +#: ../../main.cpp:604 ../../main.cpp:610 ../../main.cpp:611 ../../main.cpp:612 +msgid "Lvt" +msgstr "Lvt" + +#: ../../main.cpp:605 ../../main.cpp:611 ../../main.cpp:612 ../../main.cpp:613 +msgid "Regional indicator" +msgstr "Indicateur Régional" + +#: ../../main.cpp:606 ../../main.cpp:612 ../../main.cpp:613 ../../main.cpp:614 +msgid "Spacingmark" +msgstr "Marque d'espacement" + +#: ../../main.cpp:607 ../../main.cpp:613 ../../main.cpp:614 ../../main.cpp:615 +msgid "Prepend" +msgstr "Préfixer" + +#: ../../main.cpp:608 ../../main.cpp:614 ../../main.cpp:615 ../../main.cpp:616 +msgid "Zero Width Joiner" +msgstr "Accoler" + +#: ../../main.cpp:609 ../../main.cpp:615 ../../main.cpp:616 ../../main.cpp:617 +msgid "Emoji Base" +msgstr "Base Emoji" + +#: ../../main.cpp:610 ../../main.cpp:616 ../../main.cpp:617 ../../main.cpp:618 +msgid "Emoji Modifier" +msgstr "Modificateur Emoji" + +#: ../../main.cpp:611 ../../main.cpp:617 ../../main.cpp:618 ../../main.cpp:619 +msgid "Glue_After_ZWJ" +msgstr "Glue_After_ZWJ" + +#: ../../main.cpp:612 ../../main.cpp:618 ../../main.cpp:619 ../../main.cpp:620 +msgid "E_BASE + GLUE_AFTER_ZJW" +msgstr "E_BASE + GLUE_AFTER_ZJW" + +#: ../../main.cpp:613 ../../main.cpp:619 ../../main.cpp:620 ../../main.cpp:621 +msgid "Extended_Pictographic" +msgstr "Extended_Pictographic" + +#: ../../main.cpp:614 ../../main.cpp:620 ../../main.cpp:621 ../../main.cpp:622 +msgid "UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ" +msgstr "UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ" + +#: ../../main.cpp:623 +msgid "" +"A mode of operation is required: unaccent, normalize, representation, " +"properties, about.\n" +"Pass '--help' for more information in each mode." +msgstr "" +"Un mode opératoire est requis: unaccent, normalize, representation, " +"properties, about.\n" +"Utilisez '--help' pour plus d'information à propos de chaque mode." diff --git a/main.cpp b/main.cpp index 3da7185..2cc3a29 100644 --- a/main.cpp +++ b/main.cpp @@ -1,7 +1,7 @@ /* * File: main.cpp * Author: Saleem Edah-Tally - nmset@yandex.com - * License: CeCILL-C + * License: CeCILL * Copyright: Saleem Edah-Tally - © 2023 * * Created on 20 september 2023, 18:31 @@ -12,10 +12,15 @@ #include #include #include +#include using namespace std; #define STRIP_OPTIONS_DEFAULT (UTF8PROC_IGNORE | UTF8PROC_STRIPCC | UTF8PROC_STRIPMARK | UTF8PROC_STRIPNA | UTF8PROC_DECOMPOSE | UTF8PROC_STABLE | UTF8PROC_NULLTERM) +//https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html +#define _(STRING) gettext(STRING) +#define _APPNAME_ "utf8util" +#define _APPVERSION_ 1 typedef map KeyValuePair; // Described in utf8proc.h. @@ -51,7 +56,7 @@ string valueRepresentation(long nb, int baseHint) { formatted = std::format("{}{:d}{}","&#", nb, ";"); break; default: - cout << "Unhandled base: " << baseHint << endl; + cout << _("Unhandled base: ") << baseHint << endl; return ""; } @@ -60,7 +65,7 @@ string valueRepresentation(long nb, int baseHint) { void unaccentShowHelp() { - string message("This operational mode removes character markings, control characters, default ignorable characters and unassigned codepoints from an UTF-8 input." + string message = _("This operational mode removes character markings, control characters, default ignorable characters and unassigned codepoints from an UTF-8 input." "The utf8proc library, on which this utility is based, refers to character markings as 'non-spacing, spacing and enclosing (accents)' marks, and to default ignorable characters 'such as SOFT-HYPHEN or ZERO-WIDTH-SPACE'. Control characters are stripped or converted to spaces." "\n\nBy default, every removable byte is stripped, the output characters are decomposed and Unicode Versioning Stability is enforced." "\n\n -i, --ignore: do not strip 'default ignorable characters'" @@ -76,7 +81,7 @@ void unaccentShowHelp() void normalizeShowHelp() { - string message("This operational mode normalizes the input string according to the specified type, the default being NFC." + string message = _("This operational mode normalizes the input string according to the specified type, the default being NFC." "\n\n -t, --type: one of NFC, NFD, NFKC, NFKD, NFKC_Casefold" "\n -h, --help: show this message" "\n\nThe input can be piped in or read from stdin. It must be a single NULL terminated line."); @@ -86,7 +91,7 @@ void normalizeShowHelp() void representationShowHelp() { - string message("This operational mode displays representations of the first identified codepoint." + string message = _("This operational mode displays representations of the first identified codepoint." "\n\n -p, --codepoint: hexadecimal representation of the codepoint" "\n -e, --utf8: hexadecimal representation of each byte" "\n -s, --utf16: hexadecimal representation of each surrogate" @@ -105,7 +110,7 @@ void representationShowHelp() void propertiesShowHelp() { - string message("This operational mode displays properties of the first identified codepoint." + string message = _("This operational mode displays properties of the first identified codepoint." "\n\n -l, --islower: displays 1 if the codepoint refers to a lower-case character, 0 otherwise" "\n -u, --isupper: displays 1 if the codepoint refers to an upper-case character, 0 otherwise" "\n -c, --category: determines the category of a codepoint (Letter, Number, Symbol...)" @@ -252,7 +257,7 @@ int normalize(int argc, char ** argv) } else { - cout << "Unknown type; valid types are NFC, NFD, NFKC, NFKD and NFKC_Casefold." << endl; + cout << _("Unknown type; valid types are NFC, NFD, NFKC, NFKD and NFKC_Casefold.") << endl; return 41; } @@ -292,7 +297,7 @@ int representation(int argc, char ** argv) utf8proc_ssize_t nbOfBytesInFirstChar = utf8proc_encode_char(codepoint, firstCharArray); if (nbOfBytesInFirstChar == 0) { - cout << "No valid bytes at start of input." << endl; + cout << _("No valid bytes at start of input.") << endl; return 51; } firstCharArray[nbOfBytesInFirstChar] = '\0'; @@ -319,7 +324,7 @@ int representation(int argc, char ** argv) switch (opt) { case 'p': - cout << "Codepoint: " << valueRepresentation(codepoint, 'U') << endl; + cout << _("Codepoint: ") << valueRepresentation(codepoint, 'U') << endl; break; case 'e': cout << "UTF-8: "; @@ -349,7 +354,7 @@ int representation(int argc, char ** argv) cout << endl; break; case 'b': - cout << "Binary: "; + cout << _("Binary: "); for (uint i = 0; i < nbOfBytesInFirstChar; i++) { cout << valueRepresentation(firstCharArray[i], 2) << " "; @@ -357,7 +362,7 @@ int representation(int argc, char ** argv) cout << endl; break; case 'o': - cout << "Octal: "; + cout << _("Octal: "); for (uint i = 0; i < nbOfBytesInFirstChar; i++) { cout << valueRepresentation(firstCharArray[i], 8) << " "; @@ -365,7 +370,7 @@ int representation(int argc, char ** argv) cout << endl; break; case 'd': - cout << "Decimal: "; + cout << _("Decimal: "); for (uint i = 0; i < nbOfBytesInFirstChar; i++) { cout << valueRepresentation(firstCharArray[i], 10) << " "; @@ -373,7 +378,7 @@ int representation(int argc, char ** argv) cout << endl; break; case 'x': - cout << "XML decimal: " << valueRepresentation(codepoint, 'x') << endl; + cout << _("XML decimal: ") << valueRepresentation(codepoint, 'x') << endl; break; case 'L': { @@ -381,7 +386,7 @@ int representation(int argc, char ** argv) utf8proc_uint8_t dst[5]; utf8proc_ssize_t bytesWritten = utf8proc_encode_char(lowerCodepoint, &dst[0]); dst[bytesWritten] = '\0'; - cout << "To lower: " << (const char*) dst << endl; + cout << _("To lower: ") << (const char*) dst << endl; } break; case 'U': @@ -390,7 +395,7 @@ int representation(int argc, char ** argv) utf8proc_uint8_t dst[5]; utf8proc_ssize_t bytesWritten = utf8proc_encode_char( upperCodepoint, &dst[0]); dst[bytesWritten] = '\0'; - cout << "To upper: " << (const char*) dst << endl; + cout << _("To upper: ") << (const char*) dst << endl; } break; case 'T': @@ -399,7 +404,7 @@ int representation(int argc, char ** argv) utf8proc_uint8_t dst[5]; utf8proc_ssize_t bytesWritten = utf8proc_encode_char( upperCodepoint, &dst[0]); dst[bytesWritten] = '\0'; - cout << "To title: " << (const char*) dst << endl; + cout << _("To title: ") << (const char*) dst << endl; } break; case 'h': @@ -412,7 +417,7 @@ int representation(int argc, char ** argv) } } // Show the processed character. - cout << "Character: " << (const char*) firstCharArray << endl; + cout << _("Character: ") << (const char*) firstCharArray << endl; return 0; } @@ -443,7 +448,7 @@ int properties(int argc, char ** argv) utf8proc_ssize_t nbOfBytesInFirstChar = utf8proc_encode_char(codepoint, firstCharArray); if (nbOfBytesInFirstChar == 0) { - cout << "No valid bytes at start of input." << endl; + cout << _("No valid bytes at start of input.") << endl; return 51; } firstCharArray[nbOfBytesInFirstChar] = '\0'; @@ -466,35 +471,35 @@ int properties(int argc, char ** argv) switch (opt) { case 'l': - cout << "Is lower: " << utf8proc_islower(codepoint) << endl; + cout << _("Is lower: ") << utf8proc_islower(codepoint) << endl; break; case 'u': - cout << "Is upper: " << utf8proc_isupper(codepoint) << endl; + cout << _("Is upper: ") << utf8proc_isupper(codepoint) << endl; break; case 'c': { utf8proc_category_t category = utf8proc_category(codepoint); - cout << "Category: [" << utf8proc_category_string(codepoint) << "] "; + cout << _("Category: [") << utf8proc_category_string(codepoint) << "] "; cout << categoryDescription[category] << endl; } break; case 'd': { const utf8proc_property_t * property = utf8proc_get_property(codepoint); - cout << "Direction: " << bidirectional[property->bidi_class] << endl; + cout << _("Direction: ") << bidirectional[property->bidi_class] << endl; } break; case 'i': { const utf8proc_property_t * property = utf8proc_get_property(codepoint); - cout << "Decomposition type: " << decompositionType[property->decomp_type] << endl; + cout << _("Decomposition type: ") << decompositionType[property->decomp_type] << endl; } break; case 'b': { // property->boundclass is 1 (other) on all tested characters. const utf8proc_property_t * property = utf8proc_get_property(codepoint); - cout << "Bound class: " << boundClass[property->boundclass] << endl; + cout << _("Bound class: ") << boundClass[property->boundclass] << endl; } break; case 'h': @@ -507,107 +512,113 @@ int properties(int argc, char ** argv) } } // Show the processed character. - cout << "Character: " << (const char*) firstCharArray << endl; + cout << _("Character: ") << (const char*) firstCharArray << endl; return 0; } int main(int argc, char ** argv) { - categoryDescription[UTF8PROC_CATEGORY_CN] = "Other, not assigned"; - categoryDescription[UTF8PROC_CATEGORY_LU] = "Letter, uppercase"; - categoryDescription[UTF8PROC_CATEGORY_LL] = "Letter, lowercase"; - categoryDescription[UTF8PROC_CATEGORY_LT] = "Letter, titlecase"; - categoryDescription[UTF8PROC_CATEGORY_LM] = "Letter, modifier"; - categoryDescription[UTF8PROC_CATEGORY_LO] = "Letter, other"; - categoryDescription[UTF8PROC_CATEGORY_MN] = "Mark, nonspacing"; - categoryDescription[UTF8PROC_CATEGORY_MC] = "Mark, spacing combining"; - categoryDescription[UTF8PROC_CATEGORY_ME] = "Mark, enclosing"; - categoryDescription[UTF8PROC_CATEGORY_NL] = "Number, letter"; - categoryDescription[UTF8PROC_CATEGORY_NO] = "Number, other"; - categoryDescription[UTF8PROC_CATEGORY_PC] = "Punctuation, connector"; - categoryDescription[UTF8PROC_CATEGORY_PD] = "Punctuation, dash"; - categoryDescription[UTF8PROC_CATEGORY_PS] = "Punctuation, open"; - categoryDescription[UTF8PROC_CATEGORY_PE] = "Punctuation, close"; - categoryDescription[UTF8PROC_CATEGORY_PI] = "Punctuation, initial quote"; - categoryDescription[UTF8PROC_CATEGORY_PF] = "Punctuation, final quote"; - categoryDescription[UTF8PROC_CATEGORY_PO] = "Punctuation, other"; - categoryDescription[UTF8PROC_CATEGORY_SM] = "Symbol, math"; - categoryDescription[UTF8PROC_CATEGORY_SC] = "Symbol, currency"; - categoryDescription[UTF8PROC_CATEGORY_SK] = "Symbol, modifier"; - categoryDescription[UTF8PROC_CATEGORY_SO] = "Symbol, other"; - categoryDescription[UTF8PROC_CATEGORY_ZS] = "Separator, space"; - categoryDescription[UTF8PROC_CATEGORY_ZL] = "Separator, line"; - categoryDescription[UTF8PROC_CATEGORY_ZP] = "Separator, paragraph"; - categoryDescription[UTF8PROC_CATEGORY_CC] = "Other, control"; - categoryDescription[UTF8PROC_CATEGORY_CF] = "Other, format"; - categoryDescription[UTF8PROC_CATEGORY_CS] = "Other, surrogate"; - categoryDescription[UTF8PROC_CATEGORY_CO] = "Other, private use"; + setlocale (LC_ALL, ""); + // TODO: Avoid hardcoding the path + bindtextdomain (_APPNAME_, "/usr/local/share/locale"); // containing /LC_MESSAGES/ + textdomain (_APPNAME_); - bidirectional[UTF8PROC_BIDI_CLASS_L] = "Left-to-Right"; - bidirectional[UTF8PROC_BIDI_CLASS_LRE] = "Left-to-Right Embedding"; - bidirectional[UTF8PROC_BIDI_CLASS_LRO] = "Left-to-Right Override"; - bidirectional[UTF8PROC_BIDI_CLASS_R] = "Right-to-Left"; - bidirectional[UTF8PROC_BIDI_CLASS_AL] = "Right-to-Left Arabic"; - bidirectional[UTF8PROC_BIDI_CLASS_RLE] = "Right-to-Left Embedding"; - bidirectional[UTF8PROC_BIDI_CLASS_RLO] = "Right-to-Left Override"; - bidirectional[UTF8PROC_BIDI_CLASS_PDF] = "Pop Directional Format"; - bidirectional[UTF8PROC_BIDI_CLASS_EN] = "European Number"; - bidirectional[UTF8PROC_BIDI_CLASS_ES] = "European Separator"; - bidirectional[UTF8PROC_BIDI_CLASS_ET] = "European Number Terminator"; - bidirectional[UTF8PROC_BIDI_CLASS_AN] = "Arabic Number"; - bidirectional[UTF8PROC_BIDI_CLASS_CS] = "Common Number Separator"; - bidirectional[UTF8PROC_BIDI_CLASS_NSM] = "Nonspacing Mark"; - bidirectional[UTF8PROC_BIDI_CLASS_BN] = "Boundary Neutral"; - bidirectional[UTF8PROC_BIDI_CLASS_B] = "Paragraph Separator"; - bidirectional[UTF8PROC_BIDI_CLASS_S] = "Segment Separator"; - bidirectional[UTF8PROC_BIDI_CLASS_WS] = "Whitespace"; - bidirectional[UTF8PROC_BIDI_CLASS_ON] = "Other Neutrals"; - bidirectional[UTF8PROC_BIDI_CLASS_LRI] = "Left-to-Right Isolate"; - bidirectional[UTF8PROC_BIDI_CLASS_RLI] = "Right-to-Left Isolate"; - bidirectional[UTF8PROC_BIDI_CLASS_FSI] = "First Strong Isolate"; - bidirectional[UTF8PROC_BIDI_CLASS_PDI] = "Pop Directional Isolate"; + // Translatable, but we won't do it on our own. + categoryDescription[UTF8PROC_CATEGORY_CN] = _("Other, not assigned"); + categoryDescription[UTF8PROC_CATEGORY_LU] = _("Letter, uppercase"); + categoryDescription[UTF8PROC_CATEGORY_LL] = _("Letter, lowercase"); + categoryDescription[UTF8PROC_CATEGORY_LT] = _("Letter, titlecase"); + categoryDescription[UTF8PROC_CATEGORY_LM] = _("Letter, modifier"); + categoryDescription[UTF8PROC_CATEGORY_LO] = _("Letter, other"); + categoryDescription[UTF8PROC_CATEGORY_MN] = _("Mark, nonspacing"); + categoryDescription[UTF8PROC_CATEGORY_MC] = _("Mark, spacing combining"); + categoryDescription[UTF8PROC_CATEGORY_ME] = _("Mark, enclosing"); + categoryDescription[UTF8PROC_CATEGORY_NL] = _("Number, letter"); + categoryDescription[UTF8PROC_CATEGORY_NO] = _("Number, other"); + categoryDescription[UTF8PROC_CATEGORY_PC] = _("Punctuation, connector"); + categoryDescription[UTF8PROC_CATEGORY_PD] = _("Punctuation, dash"); + categoryDescription[UTF8PROC_CATEGORY_PS] = _("Punctuation, open"); + categoryDescription[UTF8PROC_CATEGORY_PE] = _("Punctuation, close"); + categoryDescription[UTF8PROC_CATEGORY_PI] = _("Punctuation, initial quote"); + categoryDescription[UTF8PROC_CATEGORY_PF] = _("Punctuation, final quote"); + categoryDescription[UTF8PROC_CATEGORY_PO] = _("Punctuation, other"); + categoryDescription[UTF8PROC_CATEGORY_SM] = _("Symbol, math"); + categoryDescription[UTF8PROC_CATEGORY_SC] = _("Symbol, currency"); + categoryDescription[UTF8PROC_CATEGORY_SK] = _("Symbol, modifier"); + categoryDescription[UTF8PROC_CATEGORY_SO] = _("Symbol, other"); + categoryDescription[UTF8PROC_CATEGORY_ZS] = _("Separator, space"); + categoryDescription[UTF8PROC_CATEGORY_ZL] = _("Separator, line"); + categoryDescription[UTF8PROC_CATEGORY_ZP] = _("Separator, paragraph"); + categoryDescription[UTF8PROC_CATEGORY_CC] = _("Other, control"); + categoryDescription[UTF8PROC_CATEGORY_CF] = _("Other, format"); + categoryDescription[UTF8PROC_CATEGORY_CS] = _("Other, surrogate"); + categoryDescription[UTF8PROC_CATEGORY_CO] = _("Other, private use"); + + bidirectional[UTF8PROC_BIDI_CLASS_L] = _("Left-to-Right"); + bidirectional[UTF8PROC_BIDI_CLASS_LRE] = _("Left-to-Right Embedding"); + bidirectional[UTF8PROC_BIDI_CLASS_LRO] = _("Left-to-Right Override"); + bidirectional[UTF8PROC_BIDI_CLASS_R] = _("Right-to-Left"); + bidirectional[UTF8PROC_BIDI_CLASS_AL] = _("Right-to-Left Arabic"); + bidirectional[UTF8PROC_BIDI_CLASS_RLE] = _("Right-to-Left Embedding"); + bidirectional[UTF8PROC_BIDI_CLASS_RLO] = _("Right-to-Left Override"); + bidirectional[UTF8PROC_BIDI_CLASS_PDF] = _("Pop Directional Format"); + bidirectional[UTF8PROC_BIDI_CLASS_EN] = _("European Number"); + bidirectional[UTF8PROC_BIDI_CLASS_ES] = _("European Separator"); + bidirectional[UTF8PROC_BIDI_CLASS_ET] = _("European Number Terminator"); + bidirectional[UTF8PROC_BIDI_CLASS_AN] = _("Arabic Number"); + bidirectional[UTF8PROC_BIDI_CLASS_CS] = _("Common Number Separator"); + bidirectional[UTF8PROC_BIDI_CLASS_NSM] = _("Nonspacing Mark"); + bidirectional[UTF8PROC_BIDI_CLASS_BN] = _("Boundary Neutral"); + bidirectional[UTF8PROC_BIDI_CLASS_B] = _("Paragraph Separator"); + bidirectional[UTF8PROC_BIDI_CLASS_S] = _("Segment Separator"); + bidirectional[UTF8PROC_BIDI_CLASS_WS] = _("Whitespace"); + bidirectional[UTF8PROC_BIDI_CLASS_ON] = _("Other Neutrals"); + bidirectional[UTF8PROC_BIDI_CLASS_LRI] = _("Left-to-Right Isolate"); + bidirectional[UTF8PROC_BIDI_CLASS_RLI] = _("Right-to-Left Isolate"); + bidirectional[UTF8PROC_BIDI_CLASS_FSI] = _("First Strong Isolate"); + bidirectional[UTF8PROC_BIDI_CLASS_PDI] = _("Pop Directional Isolate"); // Whatever it means! But does it concern decomposed form only? - decompositionType[0] = "Unknown"; // property->decomp_type is 0 on all tested characters, decomposed or not. - decompositionType[UTF8PROC_DECOMP_TYPE_FONT] = "Font"; // Starts at 1. - decompositionType[UTF8PROC_DECOMP_TYPE_NOBREAK] = "Nobreak"; - decompositionType[UTF8PROC_DECOMP_TYPE_INITIAL] = "Initial"; - decompositionType[UTF8PROC_DECOMP_TYPE_MEDIAL] = "Medial"; - decompositionType[UTF8PROC_DECOMP_TYPE_FINAL] = "Final"; - decompositionType[UTF8PROC_DECOMP_TYPE_ISOLATED] = "Isolated"; - decompositionType[UTF8PROC_DECOMP_TYPE_CIRCLE] = "Circle"; - decompositionType[UTF8PROC_DECOMP_TYPE_SUPER] = "Super"; - decompositionType[UTF8PROC_DECOMP_TYPE_SUB] = "Sub"; - decompositionType[UTF8PROC_DECOMP_TYPE_VERTICAL] = "Vertical"; - decompositionType[UTF8PROC_DECOMP_TYPE_WIDE] = "Wide"; - decompositionType[UTF8PROC_DECOMP_TYPE_NARROW] = "Narrow"; - decompositionType[UTF8PROC_DECOMP_TYPE_SMALL] = "Small"; - decompositionType[UTF8PROC_DECOMP_TYPE_SQUARE] = "Square"; - decompositionType[UTF8PROC_DECOMP_TYPE_FRACTION] = "Fraction"; - decompositionType[UTF8PROC_DECOMP_TYPE_COMPAT] = "Compat"; + decompositionType[0] = _("Unknown"); // property->decomp_type is 0 on all tested characters, decomposed or not. + decompositionType[UTF8PROC_DECOMP_TYPE_FONT] = _("Font"); // Starts at 1. + decompositionType[UTF8PROC_DECOMP_TYPE_NOBREAK] = _("Nobreak"); + decompositionType[UTF8PROC_DECOMP_TYPE_INITIAL] = _("Initial"); + decompositionType[UTF8PROC_DECOMP_TYPE_MEDIAL] = _("Medial"); + decompositionType[UTF8PROC_DECOMP_TYPE_FINAL] = _("Final"); + decompositionType[UTF8PROC_DECOMP_TYPE_ISOLATED] = _("Isolated"); + decompositionType[UTF8PROC_DECOMP_TYPE_CIRCLE] = _("Circle"); + decompositionType[UTF8PROC_DECOMP_TYPE_SUPER] = _("Super"); + decompositionType[UTF8PROC_DECOMP_TYPE_SUB] = _("Sub"); + decompositionType[UTF8PROC_DECOMP_TYPE_VERTICAL] = _("Vertical"); + decompositionType[UTF8PROC_DECOMP_TYPE_WIDE] = _("Wide"); + decompositionType[UTF8PROC_DECOMP_TYPE_NARROW] = _("Narrow"); + decompositionType[UTF8PROC_DECOMP_TYPE_SMALL] = _("Small"); + decompositionType[UTF8PROC_DECOMP_TYPE_SQUARE] = _("Square"); + decompositionType[UTF8PROC_DECOMP_TYPE_FRACTION] = _("Fraction"); + decompositionType[UTF8PROC_DECOMP_TYPE_COMPAT] = _("Compat"); // Whatever most values mean! - boundClass[UTF8PROC_BOUNDCLASS_START] = "Start"; - boundClass[UTF8PROC_BOUNDCLASS_OTHER] = "Other"; - boundClass[UTF8PROC_BOUNDCLASS_CR] = "Cr"; - boundClass[UTF8PROC_BOUNDCLASS_LF] = "Lf"; - boundClass[UTF8PROC_BOUNDCLASS_CONTROL] = "Control"; - boundClass[UTF8PROC_BOUNDCLASS_EXTEND] = "Extend"; - boundClass[UTF8PROC_BOUNDCLASS_L] = "L"; - boundClass[UTF8PROC_BOUNDCLASS_V] = "V"; - boundClass[UTF8PROC_BOUNDCLASS_T] = "T"; - boundClass[UTF8PROC_BOUNDCLASS_LV] = "Lv"; - boundClass[UTF8PROC_BOUNDCLASS_LVT] = "Lvt"; - boundClass[UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR] = "Regional indicator"; - boundClass[UTF8PROC_BOUNDCLASS_SPACINGMARK] = "Spacingmark"; - boundClass[UTF8PROC_BOUNDCLASS_PREPEND] = "Prepend"; - boundClass[UTF8PROC_BOUNDCLASS_ZWJ] = "Zero Width Joiner"; - boundClass[UTF8PROC_BOUNDCLASS_E_BASE] = "Emoji Base"; - boundClass[UTF8PROC_BOUNDCLASS_E_MODIFIER] = "Emoji Modifier"; - boundClass[UTF8PROC_BOUNDCLASS_GLUE_AFTER_ZWJ] = "Glue_After_ZWJ"; - boundClass[UTF8PROC_BOUNDCLASS_E_BASE_GAZ] = "E_BASE + GLUE_AFTER_ZJW"; - boundClass[UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC] = "Extended_Pictographic"; - boundClass[UTF8PROC_BOUNDCLASS_E_ZWG] = "UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ"; + boundClass[UTF8PROC_BOUNDCLASS_START] = _("Start"); + boundClass[UTF8PROC_BOUNDCLASS_OTHER] = _("Other"); + boundClass[UTF8PROC_BOUNDCLASS_CR] = _("Cr"); + boundClass[UTF8PROC_BOUNDCLASS_LF] = _("Lf"); + boundClass[UTF8PROC_BOUNDCLASS_CONTROL] = _("Control"); + boundClass[UTF8PROC_BOUNDCLASS_EXTEND] = _("Extend"); + boundClass[UTF8PROC_BOUNDCLASS_L] = _("L"); + boundClass[UTF8PROC_BOUNDCLASS_V] = _("V"); + boundClass[UTF8PROC_BOUNDCLASS_T] = _("T"); + boundClass[UTF8PROC_BOUNDCLASS_LV] = _("Lv"); + boundClass[UTF8PROC_BOUNDCLASS_LVT] = _("Lvt"); + boundClass[UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR] = _("Regional indicator"); + boundClass[UTF8PROC_BOUNDCLASS_SPACINGMARK] = _("Spacingmark"); + boundClass[UTF8PROC_BOUNDCLASS_PREPEND] = _("Prepend"); + boundClass[UTF8PROC_BOUNDCLASS_ZWJ] = _("Zero Width Joiner"); + boundClass[UTF8PROC_BOUNDCLASS_E_BASE] = _("Emoji Base"); + boundClass[UTF8PROC_BOUNDCLASS_E_MODIFIER] = _("Emoji Modifier"); + boundClass[UTF8PROC_BOUNDCLASS_GLUE_AFTER_ZWJ] = _("Glue_After_ZWJ"); + boundClass[UTF8PROC_BOUNDCLASS_E_BASE_GAZ] = _("E_BASE + GLUE_AFTER_ZJW"); + boundClass[UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC] = _("Extended_Pictographic"); + boundClass[UTF8PROC_BOUNDCLASS_E_ZWG] = _("UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ"); const char * modeInfo = "A mode of operation is required: unaccent, normalize, representation, properties." "\nPass '--help' for more information in each mode.";