Allow displaying the result of an operation only.

This concerns the 'representation' and 'properties' modes.

Set the environment variable 'UTF8UTIL_RESULT_ONLY' to any value to
display the result only.

The goal is to achieve consistent usage in scripts.
This commit is contained in:
Saleem Edah-Tally
2023-11-18 21:46:44 +01:00
parent 6f8da19904
commit 45c5877d22
3 changed files with 243 additions and 31 deletions

View File

@@ -51,6 +51,8 @@ This project links to the [utf8proc](https://github.com/JuliaStrings/utf8proc) l
-h, --help: show this message
The input can be piped in or read from stdin. Pass in a single character for simplicity.
If the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result is printed
on stdout.
---
$ utf8util properties --help
This operational mode displays properties of the first identified codepoint.
@@ -67,10 +69,12 @@ This project links to the [utf8proc](https://github.com/JuliaStrings/utf8proc) l
-h, --help: show this message
The input can be piped in or read from stdin. Pass in a single character for simplicity.
If the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result is printed
on stdout.
---
$ utf8util about
Author: Saleem Edah-Tally [Surgeon, Hobbyist developer]
Version: 1
Version: 2
License: CeCILL
---

View File

@@ -1,21 +1,21 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
# SPDX-FileCopyrightText: 2023 Saleem EDAH-TALLY <set@nmset.info>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Project-Id-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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"POT-Creation-Date: 2023-11-18 21:33+0100\n"
"PO-Revision-Date: 2023-11-18 21:36+0100\n"
"Last-Translator: Saleem EDAH-TALLY <set@nmset.info>\n"
"Language-Team: French <>\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 23.08.3\n"
#: ../../main.cpp:57 ../../main.cpp:58 ../../main.cpp:59 ../../main.cpp:60
msgid "Unhandled base: "
@@ -172,57 +172,70 @@ msgstr ""
"(stdin). Passez un caractère unique par souci de simplicité."
#: ../../main.cpp:258 ../../main.cpp:259 ../../main.cpp:260 ../../main.cpp:261
#: ../../main.cpp:263
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
#: ../../main.cpp:303 ../../main.cpp:454
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
#: ../../main.cpp:330
msgid "Codepoint: "
msgstr "Point de code: "
#: ../../main.cpp:355 ../../main.cpp:356 ../../main.cpp:357 ../../main.cpp:358
#: ../../main.cpp:360
msgid "Binary: "
msgstr "Binaire: "
#: ../../main.cpp:363 ../../main.cpp:364 ../../main.cpp:365 ../../main.cpp:366
#: ../../main.cpp:368
msgid "Octal: "
msgstr "Octal: "
#: ../../main.cpp:371 ../../main.cpp:372 ../../main.cpp:373 ../../main.cpp:374
#: ../../main.cpp:376
msgid "Decimal: "
msgstr "Décimal: "
#: ../../main.cpp:379 ../../main.cpp:380 ../../main.cpp:381 ../../main.cpp:382
#: ../../main.cpp:384
msgid "XML decimal: "
msgstr "XML décimal: "
#: ../../main.cpp:387 ../../main.cpp:388 ../../main.cpp:389 ../../main.cpp:390
#: ../../main.cpp:392
msgid "To lower: "
msgstr "En minuscule: "
#: ../../main.cpp:396 ../../main.cpp:397 ../../main.cpp:398 ../../main.cpp:399
#: ../../main.cpp:401
msgid "To upper: "
msgstr "En majuscule: "
#: ../../main.cpp:405 ../../main.cpp:406 ../../main.cpp:407 ../../main.cpp:408
#: ../../main.cpp:410
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
#: ../../main.cpp:423 ../../main.cpp:518
msgid "Character: "
msgstr "Caractère: "
#: ../../main.cpp:472 ../../main.cpp:473 ../../main.cpp:474 ../../main.cpp:475
#: ../../main.cpp:477
msgid "Is lower: "
msgstr "Est minuscule: "
#: ../../main.cpp:475 ../../main.cpp:476 ../../main.cpp:477 ../../main.cpp:478
#: ../../main.cpp:480
msgid "Is upper: "
msgstr "Est majuscule: "
@@ -231,374 +244,467 @@ msgid "Category: ["
msgstr "Catégorie: ["
#: ../../main.cpp:487 ../../main.cpp:488 ../../main.cpp:489 ../../main.cpp:490
#: ../../main.cpp:492
msgid "Direction: "
msgstr "Direction: "
#: ../../main.cpp:493 ../../main.cpp:494 ../../main.cpp:495 ../../main.cpp:496
#: ../../main.cpp:498
msgid "Decomposition type: "
msgstr "Type de décomposition: "
#: ../../main.cpp:500 ../../main.cpp:501 ../../main.cpp:502 ../../main.cpp:503
#: ../../main.cpp:505
msgid "Bound class: "
msgstr "Classe 'bound': "
#: ../../main.cpp:520 ../../main.cpp:526 ../../main.cpp:527 ../../main.cpp:528
#: ../../main.cpp:530
msgid "Other, not assigned"
msgstr "Autre, non assigné"
#: ../../main.cpp:521 ../../main.cpp:527 ../../main.cpp:528 ../../main.cpp:529
#: ../../main.cpp:531
msgid "Letter, uppercase"
msgstr "Lettre, majuscule"
#: ../../main.cpp:522 ../../main.cpp:528 ../../main.cpp:529 ../../main.cpp:530
#: ../../main.cpp:532
msgid "Letter, lowercase"
msgstr "Lettre, minuscule"
#: ../../main.cpp:523 ../../main.cpp:529 ../../main.cpp:530 ../../main.cpp:531
#: ../../main.cpp:533
msgid "Letter, titlecase"
msgstr "Lettre, titre"
#: ../../main.cpp:524 ../../main.cpp:530 ../../main.cpp:531 ../../main.cpp:532
#: ../../main.cpp:534
msgid "Letter, modifier"
msgstr "Lettre, modificateur"
#: ../../main.cpp:525 ../../main.cpp:531 ../../main.cpp:532 ../../main.cpp:533
#: ../../main.cpp:535
msgid "Letter, other"
msgstr "Lettre, autre"
#: ../../main.cpp:526 ../../main.cpp:532 ../../main.cpp:533 ../../main.cpp:534
#: ../../main.cpp:536
msgid "Mark, nonspacing"
msgstr "Marque, non-espaçant"
#: ../../main.cpp:527 ../../main.cpp:533 ../../main.cpp:534 ../../main.cpp:535
#: ../../main.cpp:537
msgid "Mark, spacing combining"
msgstr "Marque, espaçant et combinant"
#: ../../main.cpp:528 ../../main.cpp:534 ../../main.cpp:535 ../../main.cpp:536
#: ../../main.cpp:538
msgid "Mark, enclosing"
msgstr "Marque, encadrant"
#: ../../main.cpp:529 ../../main.cpp:535 ../../main.cpp:536 ../../main.cpp:537
#: ../../main.cpp:539
msgid "Number, letter"
msgstr "Nombre, lettre"
#: ../../main.cpp:530 ../../main.cpp:536 ../../main.cpp:537 ../../main.cpp:538
#: ../../main.cpp:540
msgid "Number, other"
msgstr "Nombre, autre"
#: ../../main.cpp:531 ../../main.cpp:537 ../../main.cpp:538 ../../main.cpp:539
#: ../../main.cpp:541
msgid "Punctuation, connector"
msgstr "Ponctuation, connecteur"
#: ../../main.cpp:532 ../../main.cpp:538 ../../main.cpp:539 ../../main.cpp:540
#: ../../main.cpp:542
msgid "Punctuation, dash"
msgstr "Ponctuation, tiret"
#: ../../main.cpp:533 ../../main.cpp:539 ../../main.cpp:540 ../../main.cpp:541
#: ../../main.cpp:543
msgid "Punctuation, open"
msgstr "Ponctuation, ouverture"
#: ../../main.cpp:534 ../../main.cpp:540 ../../main.cpp:541 ../../main.cpp:542
#: ../../main.cpp:544
msgid "Punctuation, close"
msgstr "Ponctuation, fermeture"
#: ../../main.cpp:535 ../../main.cpp:541 ../../main.cpp:542 ../../main.cpp:543
#: ../../main.cpp:545
msgid "Punctuation, initial quote"
msgstr "Ponctuation, guillemet initial"
#: ../../main.cpp:536 ../../main.cpp:542 ../../main.cpp:543 ../../main.cpp:544
#: ../../main.cpp:546
msgid "Punctuation, final quote"
msgstr "Ponctuation, guillemet final"
#: ../../main.cpp:537 ../../main.cpp:543 ../../main.cpp:544 ../../main.cpp:545
#: ../../main.cpp:547
msgid "Punctuation, other"
msgstr "Ponctuation, autre"
#: ../../main.cpp:538 ../../main.cpp:544 ../../main.cpp:545 ../../main.cpp:546
#: ../../main.cpp:548
msgid "Symbol, math"
msgstr "Symbole, math"
#: ../../main.cpp:539 ../../main.cpp:545 ../../main.cpp:546 ../../main.cpp:547
#: ../../main.cpp:549
msgid "Symbol, currency"
msgstr "Symbole, monnaie"
#: ../../main.cpp:540 ../../main.cpp:546 ../../main.cpp:547 ../../main.cpp:548
#: ../../main.cpp:550
msgid "Symbol, modifier"
msgstr "Symbole, modificateur"
#: ../../main.cpp:541 ../../main.cpp:547 ../../main.cpp:548 ../../main.cpp:549
#: ../../main.cpp:551
msgid "Symbol, other"
msgstr "Symbole, autre"
#: ../../main.cpp:542 ../../main.cpp:548 ../../main.cpp:549 ../../main.cpp:550
#: ../../main.cpp:552
msgid "Separator, space"
msgstr "Séparateur, espace"
#: ../../main.cpp:543 ../../main.cpp:549 ../../main.cpp:550 ../../main.cpp:551
#: ../../main.cpp:553
msgid "Separator, line"
msgstr "Séparateur, ligne"
#: ../../main.cpp:544 ../../main.cpp:550 ../../main.cpp:551 ../../main.cpp:552
#: ../../main.cpp:554
msgid "Separator, paragraph"
msgstr "Séparateur, paragraphe"
#: ../../main.cpp:545 ../../main.cpp:551 ../../main.cpp:552 ../../main.cpp:553
#: ../../main.cpp:555
msgid "Other, control"
msgstr "Autre, contrôle"
#: ../../main.cpp:546 ../../main.cpp:552 ../../main.cpp:553 ../../main.cpp:554
#: ../../main.cpp:556
msgid "Other, format"
msgstr "Autre, format"
#: ../../main.cpp:547 ../../main.cpp:553 ../../main.cpp:554 ../../main.cpp:555
#: ../../main.cpp:557
msgid "Other, surrogate"
msgstr "Autre, codet"
#: ../../main.cpp:548 ../../main.cpp:554 ../../main.cpp:555 ../../main.cpp:556
#: ../../main.cpp:558
msgid "Other, private use"
msgstr "Autre, usage privé"
#: ../../main.cpp:550 ../../main.cpp:556 ../../main.cpp:557 ../../main.cpp:558
#: ../../main.cpp:560
msgid "Left-to-Right"
msgstr "Gauche-Droit"
#: ../../main.cpp:551 ../../main.cpp:557 ../../main.cpp:558 ../../main.cpp:559
#: ../../main.cpp:561
msgid "Left-to-Right Embedding"
msgstr "Gauche-Droit incorporé"
#: ../../main.cpp:552 ../../main.cpp:558 ../../main.cpp:559 ../../main.cpp:560
#: ../../main.cpp:562
msgid "Left-to-Right Override"
msgstr "Gauche-Droit outrepassé"
#: ../../main.cpp:553 ../../main.cpp:559 ../../main.cpp:560 ../../main.cpp:561
#: ../../main.cpp:563
msgid "Right-to-Left"
msgstr "Droit-Gauche"
#: ../../main.cpp:554 ../../main.cpp:560 ../../main.cpp:561 ../../main.cpp:562
#: ../../main.cpp:564
msgid "Right-to-Left Arabic"
msgstr "Droit-Gauche Arabe"
#: ../../main.cpp:555 ../../main.cpp:561 ../../main.cpp:562 ../../main.cpp:563
#: ../../main.cpp:565
msgid "Right-to-Left Embedding"
msgstr "Droit-Gauche incorporé"
#: ../../main.cpp:556 ../../main.cpp:562 ../../main.cpp:563 ../../main.cpp:564
#: ../../main.cpp:566
msgid "Right-to-Left Override"
msgstr "Droit-Gauche outrepassé"
#: ../../main.cpp:557 ../../main.cpp:563 ../../main.cpp:564 ../../main.cpp:565
#: ../../main.cpp:567
msgid "Pop Directional Format"
msgstr "Pop Directional Format"
#: ../../main.cpp:558 ../../main.cpp:564 ../../main.cpp:565 ../../main.cpp:566
#: ../../main.cpp:568
msgid "European Number"
msgstr "Nombre Européen"
#: ../../main.cpp:559 ../../main.cpp:565 ../../main.cpp:566 ../../main.cpp:567
#: ../../main.cpp:569
msgid "European Separator"
msgstr "Séparateur Européen"
#: ../../main.cpp:560 ../../main.cpp:566 ../../main.cpp:567 ../../main.cpp:568
#: ../../main.cpp:570
msgid "European Number Terminator"
msgstr "Terminaison de Nombre Européen"
#: ../../main.cpp:561 ../../main.cpp:567 ../../main.cpp:568 ../../main.cpp:569
#: ../../main.cpp:571
msgid "Arabic Number"
msgstr "Nombre Arabe"
#: ../../main.cpp:562 ../../main.cpp:568 ../../main.cpp:569 ../../main.cpp:570
#: ../../main.cpp:572
msgid "Common Number Separator"
msgstr "Séparateur de Nombre Commun"
#: ../../main.cpp:563 ../../main.cpp:569 ../../main.cpp:570 ../../main.cpp:571
#: ../../main.cpp:573
msgid "Nonspacing Mark"
msgstr "Marque Non-Espaçant"
#: ../../main.cpp:564 ../../main.cpp:570 ../../main.cpp:571 ../../main.cpp:572
#: ../../main.cpp:574
msgid "Boundary Neutral"
msgstr "Périmètre Neutre"
#: ../../main.cpp:565 ../../main.cpp:571 ../../main.cpp:572 ../../main.cpp:573
#: ../../main.cpp:575
msgid "Paragraph Separator"
msgstr "Séparateur de Paragraphe"
#: ../../main.cpp:566 ../../main.cpp:572 ../../main.cpp:573 ../../main.cpp:574
#: ../../main.cpp:576
msgid "Segment Separator"
msgstr "Séparateur de Segment"
#: ../../main.cpp:567 ../../main.cpp:573 ../../main.cpp:574 ../../main.cpp:575
#: ../../main.cpp:577
msgid "Whitespace"
msgstr "Espace"
#: ../../main.cpp:568 ../../main.cpp:574 ../../main.cpp:575 ../../main.cpp:576
#: ../../main.cpp:578
msgid "Other Neutrals"
msgstr "Neutre : Autres"
#: ../../main.cpp:569 ../../main.cpp:575 ../../main.cpp:576 ../../main.cpp:577
#: ../../main.cpp:579
msgid "Left-to-Right Isolate"
msgstr "Gauche-Droit Isoler"
#: ../../main.cpp:570 ../../main.cpp:576 ../../main.cpp:577 ../../main.cpp:578
#: ../../main.cpp:580
msgid "Right-to-Left Isolate"
msgstr "Droit-Gauche Isoler"
#: ../../main.cpp:571 ../../main.cpp:577 ../../main.cpp:578 ../../main.cpp:579
#: ../../main.cpp:581
msgid "First Strong Isolate"
msgstr "Premier Fortement Isolé"
#: ../../main.cpp:572 ../../main.cpp:578 ../../main.cpp:579 ../../main.cpp:580
#: ../../main.cpp:582
msgid "Pop Directional Isolate"
msgstr "Pop Directional Isolate"
#: ../../main.cpp:575 ../../main.cpp:581 ../../main.cpp:582 ../../main.cpp:583
#: ../../main.cpp:585
msgid "Unknown"
msgstr "Inconnu"
#: ../../main.cpp:576 ../../main.cpp:582 ../../main.cpp:583 ../../main.cpp:584
#: ../../main.cpp:586
msgid "Font"
msgstr "Police"
#: ../../main.cpp:577 ../../main.cpp:583 ../../main.cpp:584 ../../main.cpp:585
#: ../../main.cpp:587
msgid "Nobreak"
msgstr "Non-cassant"
#: ../../main.cpp:578 ../../main.cpp:584 ../../main.cpp:585 ../../main.cpp:586
#: ../../main.cpp:588
msgid "Initial"
msgstr "Initial"
#: ../../main.cpp:579 ../../main.cpp:585 ../../main.cpp:586 ../../main.cpp:587
#: ../../main.cpp:589
msgid "Medial"
msgstr "Médial"
#: ../../main.cpp:580 ../../main.cpp:586 ../../main.cpp:587 ../../main.cpp:588
#: ../../main.cpp:590
msgid "Final"
msgstr "Final"
#: ../../main.cpp:581 ../../main.cpp:587 ../../main.cpp:588 ../../main.cpp:589
#: ../../main.cpp:591
msgid "Isolated"
msgstr "Isolé"
#: ../../main.cpp:582 ../../main.cpp:588 ../../main.cpp:589 ../../main.cpp:590
#: ../../main.cpp:592
msgid "Circle"
msgstr "Cercle"
#: ../../main.cpp:583 ../../main.cpp:589 ../../main.cpp:590 ../../main.cpp:591
#: ../../main.cpp:593
msgid "Super"
msgstr "Super"
#: ../../main.cpp:584 ../../main.cpp:590 ../../main.cpp:591 ../../main.cpp:592
#: ../../main.cpp:594
msgid "Sub"
msgstr "Sub"
#: ../../main.cpp:585 ../../main.cpp:591 ../../main.cpp:592 ../../main.cpp:593
#: ../../main.cpp:595
msgid "Vertical"
msgstr "Vertical"
#: ../../main.cpp:586 ../../main.cpp:592 ../../main.cpp:593 ../../main.cpp:594
#: ../../main.cpp:596
msgid "Wide"
msgstr "Large"
#: ../../main.cpp:587 ../../main.cpp:593 ../../main.cpp:594 ../../main.cpp:595
#: ../../main.cpp:597
msgid "Narrow"
msgstr "Étroit"
#: ../../main.cpp:588 ../../main.cpp:594 ../../main.cpp:595 ../../main.cpp:596
#: ../../main.cpp:598
msgid "Small"
msgstr "Petit"
#: ../../main.cpp:589 ../../main.cpp:595 ../../main.cpp:596 ../../main.cpp:597
#: ../../main.cpp:599
msgid "Square"
msgstr "Carré"
#: ../../main.cpp:590 ../../main.cpp:596 ../../main.cpp:597 ../../main.cpp:598
#: ../../main.cpp:600
msgid "Fraction"
msgstr "Fraction"
#: ../../main.cpp:591 ../../main.cpp:597 ../../main.cpp:598 ../../main.cpp:599
#: ../../main.cpp:601
msgid "Compat"
msgstr "Compat"
#: ../../main.cpp:594 ../../main.cpp:600 ../../main.cpp:601 ../../main.cpp:602
#: ../../main.cpp:604
msgid "Start"
msgstr "Début"
#: ../../main.cpp:595 ../../main.cpp:601 ../../main.cpp:602 ../../main.cpp:603
#: ../../main.cpp:605
msgid "Other"
msgstr "Autre"
#: ../../main.cpp:596 ../../main.cpp:602 ../../main.cpp:603 ../../main.cpp:604
#: ../../main.cpp:606
msgid "Cr"
msgstr "Cr"
#: ../../main.cpp:597 ../../main.cpp:603 ../../main.cpp:604 ../../main.cpp:605
#: ../../main.cpp:607
msgid "Lf"
msgstr "Lf"
#: ../../main.cpp:598 ../../main.cpp:604 ../../main.cpp:605 ../../main.cpp:606
#: ../../main.cpp:608
msgid "Control"
msgstr "Contrôler"
#: ../../main.cpp:599 ../../main.cpp:605 ../../main.cpp:606 ../../main.cpp:607
#: ../../main.cpp:609
msgid "Extend"
msgstr "Étendre"
#: ../../main.cpp:600 ../../main.cpp:606 ../../main.cpp:607 ../../main.cpp:608
#: ../../main.cpp:610
msgid "L"
msgstr "L"
#: ../../main.cpp:601 ../../main.cpp:607 ../../main.cpp:608 ../../main.cpp:609
#: ../../main.cpp:611
msgid "V"
msgstr "V"
#: ../../main.cpp:602 ../../main.cpp:608 ../../main.cpp:609 ../../main.cpp:610
#: ../../main.cpp:612
msgid "T"
msgstr "T"
#: ../../main.cpp:603 ../../main.cpp:609 ../../main.cpp:610 ../../main.cpp:611
#: ../../main.cpp:613
msgid "Lv"
msgstr "Lv"
#: ../../main.cpp:604 ../../main.cpp:610 ../../main.cpp:611 ../../main.cpp:612
#: ../../main.cpp:614
msgid "Lvt"
msgstr "Lvt"
#: ../../main.cpp:605 ../../main.cpp:611 ../../main.cpp:612 ../../main.cpp:613
#: ../../main.cpp:615
msgid "Regional indicator"
msgstr "Indicateur Régional"
#: ../../main.cpp:606 ../../main.cpp:612 ../../main.cpp:613 ../../main.cpp:614
#: ../../main.cpp:616
msgid "Spacingmark"
msgstr "Marque d'espacement"
#: ../../main.cpp:607 ../../main.cpp:613 ../../main.cpp:614 ../../main.cpp:615
#: ../../main.cpp:617
msgid "Prepend"
msgstr "Préfixer"
#: ../../main.cpp:608 ../../main.cpp:614 ../../main.cpp:615 ../../main.cpp:616
#: ../../main.cpp:618
msgid "Zero Width Joiner"
msgstr "Accoler"
#: ../../main.cpp:609 ../../main.cpp:615 ../../main.cpp:616 ../../main.cpp:617
#: ../../main.cpp:619
msgid "Emoji Base"
msgstr "Base Emoji"
#: ../../main.cpp:610 ../../main.cpp:616 ../../main.cpp:617 ../../main.cpp:618
#: ../../main.cpp:620
msgid "Emoji Modifier"
msgstr "Modificateur Emoji"
#: ../../main.cpp:611 ../../main.cpp:617 ../../main.cpp:618 ../../main.cpp:619
#: ../../main.cpp:621
msgid "Glue_After_ZWJ"
msgstr "Glue_After_ZWJ"
#: ../../main.cpp:612 ../../main.cpp:618 ../../main.cpp:619 ../../main.cpp:620
#: ../../main.cpp:622
msgid "E_BASE + GLUE_AFTER_ZJW"
msgstr "E_BASE + GLUE_AFTER_ZJW"
#: ../../main.cpp:613 ../../main.cpp:619 ../../main.cpp:620 ../../main.cpp:621
#: ../../main.cpp:623
msgid "Extended_Pictographic"
msgstr "Extended_Pictographic"
#: ../../main.cpp:614 ../../main.cpp:620 ../../main.cpp:621 ../../main.cpp:622
#: ../../main.cpp:624
msgid "UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ"
msgstr "UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ"
@@ -611,3 +717,102 @@ msgstr ""
"Un mode opératoire est requis: unaccent, normalize, representation, "
"properties, about.\n"
"Utilisez '--help' pour plus d'information à propos de chaque mode."
#: ../../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.\n"
"If the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result "
"is printed on stdout."
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é. "
"Si la variable d'environnement 'UTF8UTIL_RESULT_ONLY' est assignée, seul "
"le résultat de l'opération est affiché."
#: ../../main.cpp:115
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"
" -d, --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"
" -b, --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.\n"
"If the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result "
"is printed on stdout."
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"
" -d, --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"
" -b, --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é. "
"Si la variable d'environnement 'UTF8UTIL_RESULT_ONLY' est assignée, seul "
"le résultat de l'opération est affiché."
#: ../../main.cpp:485
msgid "Category: "
msgstr ""

View File

@@ -19,8 +19,9 @@ 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 _E(STRING) string(getenv("UTF8UTIL_RESULT_ONLY") != NULL ? "" : STRING)
#define _APPNAME_ "utf8util"
#define _APPVERSION_ 1
#define _APPVERSION_ 2
typedef map<int, string> KeyValuePair;
// Described in utf8proc.h.
@@ -103,7 +104,8 @@ void representationShowHelp()
"\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\nThe input can be piped in or read from stdin. Pass in a single character for simplicity.");
"\n\nThe input can be piped in or read from stdin. Pass in a single character for simplicity."
"\nIf the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result is printed on stdout.");
cout << message << endl;
}
@@ -118,7 +120,8 @@ void propertiesShowHelp()
"\n -i, --decompositiontype: determines the decomposition type of a codepoint; see utf8proc.h"
"\n -b, --boundclass: determines the boundclass property of a codepoint; see utf8proc.h"
"\n -h, --help: show this message"
"\n\nThe input can be piped in or read from stdin. Pass in a single character for simplicity.");
"\n\nThe input can be piped in or read from stdin. Pass in a single character for simplicity."
"\nIf the environment variable 'UTF8UTIL_RESULT_ONLY' is set, only the result is printed on stdout.");
cout << message << endl;
}
@@ -324,10 +327,10 @@ int representation(int argc, char ** argv)
switch (opt) {
case 'p':
cout << _("Codepoint: ") << valueRepresentation(codepoint, 'U') << endl;
cout << _E(_("Codepoint: ")) << valueRepresentation(codepoint, 'U') << endl;
break;
case 'e':
cout << "UTF-8: ";
cout << _E("UTF-8: ");
for (uint i = 0; i < nbOfBytesInFirstChar; i++)
{
cout << valueRepresentation(firstCharArray[i], 16) << " ";
@@ -336,7 +339,7 @@ int representation(int argc, char ** argv)
break;
case 's':
// https://en.wikipedia.org/wiki/UTF-16
cout << "UTF-16: ";
cout << _E("UTF-16: ");
if (codepoint < 0xFFFF) // 2 bytes only
{
cout << valueRepresentation(codepoint, 17);
@@ -354,7 +357,7 @@ int representation(int argc, char ** argv)
cout << endl;
break;
case 'b':
cout << _("Binary: ");
cout << _E(_("Binary: "));
for (uint i = 0; i < nbOfBytesInFirstChar; i++)
{
cout << valueRepresentation(firstCharArray[i], 2) << " ";
@@ -362,7 +365,7 @@ int representation(int argc, char ** argv)
cout << endl;
break;
case 'o':
cout << _("Octal: ");
cout << _E(_("Octal: "));
for (uint i = 0; i < nbOfBytesInFirstChar; i++)
{
cout << valueRepresentation(firstCharArray[i], 8) << " ";
@@ -370,7 +373,7 @@ int representation(int argc, char ** argv)
cout << endl;
break;
case 'd':
cout << _("Decimal: ");
cout << _E(_("Decimal: "));
for (uint i = 0; i < nbOfBytesInFirstChar; i++)
{
cout << valueRepresentation(firstCharArray[i], 10) << " ";
@@ -378,7 +381,7 @@ int representation(int argc, char ** argv)
cout << endl;
break;
case 'x':
cout << _("XML decimal: ") << valueRepresentation(codepoint, 'x') << endl;
cout << _E(_("XML decimal: ")) << valueRepresentation(codepoint, 'x') << endl;
break;
case 'L':
{
@@ -386,7 +389,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 << _E(_("To lower: ")) << (const char*) dst << endl;
}
break;
case 'U':
@@ -395,7 +398,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 << _E(_("To upper: ")) << (const char*) dst << endl;
}
break;
case 'T':
@@ -404,7 +407,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 << _E(_("To title: ")) << (const char*) dst << endl;
}
break;
case 'h':
@@ -417,7 +420,7 @@ int representation(int argc, char ** argv)
}
}
// Show the processed character.
cout << _("Character: ") << (const char*) firstCharArray << endl;
cout << _E(_("Character: ")) << (const char*) firstCharArray << endl;
return 0;
}
@@ -471,35 +474,35 @@ int properties(int argc, char ** argv)
switch (opt) {
case 'l':
cout << _("Is lower: ") << utf8proc_islower(codepoint) << endl;
cout << _E(_("Is lower: ")) << utf8proc_islower(codepoint) << endl;
break;
case 'u':
cout << _("Is upper: ") << utf8proc_isupper(codepoint) << endl;
cout << _E(_("Is upper: ")) << utf8proc_isupper(codepoint) << endl;
break;
case 'c':
{
utf8proc_category_t category = utf8proc_category(codepoint);
cout << _("Category: [") << utf8proc_category_string(codepoint) << "] ";
cout << _E(_("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 << _E(_("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 << _E(_("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 << _E(_("Bound class: ")) << boundClass[property->boundclass] << endl;
}
break;
case 'h':
@@ -512,7 +515,7 @@ int properties(int argc, char ** argv)
}
}
// Show the processed character.
cout << _("Character: ") << (const char*) firstCharArray << endl;
cout << _E(_("Character: ")) << (const char*) firstCharArray << endl;
return 0;
}