From 1fdc498f79b083fcf73263d80394638450db1239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Wed, 1 Sep 2021 18:27:27 +0200 Subject: [PATCH] Add Galician and Euskera locales along with 2 license unicode symbols --- NOTES.md | 12 ++++++++++++ README.md | 12 ++++-------- text_braille_l18n.inx | 4 +++- text_braille_l18n.py | 6 ++++-- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/NOTES.md b/NOTES.md index 36a9e79..de3b9f0 100644 --- a/NOTES.md +++ b/NOTES.md @@ -12,4 +12,16 @@ Implementation of [CBE guide][cbe-guide] for uniformed Spanish Braille. must be preceded by a numeric prefix `⠼` in the first number only. But this implementation currently precede the numerical prefix before any number. +## Galician - Braille español (Grado 1) + +Uses same implementation as Spanish. + +## Basque - Braille español (Grado 1) + +Uses same implementation as Spanish. + +# Other useful resources + +- [World Braille Usage][world-braille-usage] + [cbe-guide]: https://sid.usal.es/idocs/F8/FDO12069/signografiabasica.pdf diff --git a/README.md b/README.md index 66ca2d9..63a4b32 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,14 @@ text-to-Braille converter. Select a text that you want to convert in Braille, open this extension, choose a locale and press `Apply`. -## Useful resources - -- [World Braille Usage][world-braille-usage] - ## TODO - [x] ~~Spanish Braille conversion for texts not prepared for Braille translation. Add prefixes before numbers and before uppercased letters.~~ -- [ ] Catalán/valenciano ([link](https://www.once.es/servicios-sociales/braille)) -- [ ] Gallego ([link](https://www.once.es/servicios-sociales/braille)) -- [ ] Euskera ([link](https://www.once.es/servicios-sociales/braille)) -- [x] ~~Spanish combinations ([link](https://sid.usal.es/idocs/F8/FDO12069/signografiabasica.pdf))~~ +- [ ] Catalán/valenciano +- [x] ~~Gallego~~ +- [x] ~~Euskera~~ +- [x] ~~Spanish combinations~~ [notes]: https://github.com/mondeja/inkscape-braille-l18n-ext/blob/master/NOTES.md [download-repo]: https://github.com/mondeja/inkscape-braille-l18n-ext/archive/refs/heads/master.zip diff --git a/text_braille_l18n.inx b/text_braille_l18n.inx index efe11ef..ff34e33 100644 --- a/text_braille_l18n.inx +++ b/text_braille_l18n.inx @@ -1,13 +1,15 @@ <_name>Convert to localized Braille - org.inkscape.TextBrailleL18n + text_braille_l18n.py + + diff --git a/text_braille_l18n.py b/text_braille_l18n.py index 9dcd8a3..acf767b 100644 --- a/text_braille_l18n.py +++ b/text_braille_l18n.py @@ -1,8 +1,6 @@ #!/usr/bin/env python # coding=utf-8 -__version__ = "0.0.1" - import inkex def en_char_map(char): @@ -105,6 +103,8 @@ def es_char_map(char): "‰": chr(0x2838) + chr(0x2834) + chr(0x2834), # per mile "©": chr(0x2823) + chr(0x2828) + chr(0x2809) + chr(0x281c), "®": chr(0x2823) + chr(0x2828) + chr(0x2817) + chr(0x281c), + "℗": chr(0x2823) + chr(0x2828) + chr(0x280f) + chr(0x281c), + "🄯": chr(0x2823) + chr(0x2828) + chr(0x2807) + chr(0x281c), "/": chr(0x2820) + chr(0x2802), "\\": chr(0x2810) + chr(0x2804), "<": chr(0x2810) + chr(0x2805), @@ -131,6 +131,8 @@ def es_char_map(char): LOCALE_CHARMAPS = { "en": en_char_map, "es": es_char_map, + "gl": es_char_map, # Galician uses Spanish alphabet + "eu": es_char_map, # Euskera hasn't accent marks, so use Spanish alphabet } class BrailleL18n(inkex.TextExtension):