Skip to content

Commit

Permalink
Add some Spanish signs and implementation notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Sep 1, 2021
1 parent f27c48d commit cb29828
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
15 changes: 15 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Implementation notes

## English - North American Braille ASCII code

Same implementation as the current Inkscape `text_braille` extension.

## Spanish - Braille español (Grado 1)

Implementation of [CBE guide][cbe-guide] for uniformed Spanish Braille.

- According to the guide, numbers with 10 or more digits and telephone numbers
must be preceded by a numeric prefix `` in the first number only. But
this implementation currently precede the numerical prefix before any number.

[cbe-guide]: https://sid.usal.es/idocs/F8/FDO12069/signografiabasica.pdf
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ text-to-Braille converter.
| English | [North American Braille ASCII code][en-wiki] |
| Spanish | [Braille español (Grado 1)][es-cbe-guide] by [CBE][cbe-once] |

> See [`NOTES.md`][notes] to check the limitations of each implementation.
## Installation

1. Download this repository.
1. [Download][download-repo] and extract this repository.
1. Move `text_braille_l18n.inx` and `text_braille_l18n.py` files to your user's
extensions directory. If you don't know its location, open it from `Edit` ->
`Preferences` -> `System` -> `Users extensions`.
Expand All @@ -23,6 +25,10 @@ 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
Expand All @@ -32,6 +38,10 @@ choose a locale and press `Apply`.
- [ ] Euskera ([link](https://www.once.es/servicios-sociales/braille))
- [x] ~~Spanish combinations ([link](https://sid.usal.es/idocs/F8/FDO12069/signografiabasica.pdf))~~

[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

[en-wiki]: https://en.wikipedia.org/wiki/Braille_ASCII
[es-cbe-guide]: https://sid.usal.es/idocs/F8/FDO12069/signografiabasica.pdf
[cbe-once]: https://www.once.es/servicios-sociales/braille/comision-braille-espanola/comision-braille-espanola-cbe
[world-braille-usage]: https://1kru3o1eyt4f2w3qy21ds14w-wpengine.netdna-ssl.com/wp-content/uploads/2021/07/world-braille-usage-third-edition.pdf
5 changes: 4 additions & 1 deletion text_braille_l18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import inkex

def en_char_map(char):
# https://en.wikipedia.org/wiki/Braille_ASCII#Braille_ASCII_values
try:
# https://en.wikipedia.org/wiki/Braille_ASCII#Braille_ASCII_values
mapint = ("A1B'K2L@CIF/MSP\"E3H9O6R^DJG>NTQ,"
"*5<-U8V.%[$+X!&;:4\\0Z7(_?W]#Y)=").index(char.upper())
except ValueError:
Expand Down Expand Up @@ -110,6 +110,9 @@ def es_char_map(char):
"<": chr(0x2810) + chr(0x2805),
">": chr(0x2828) + chr(0x2802),
"|": chr(0x2838) + chr(0x2807),
"{": chr(0x2810) + chr(0x2807),
"}": chr(0x2838) + chr(0x2802),
"—": chr(0x2824) + chr(0x2824),

# currencies
"€": chr(0x2838) + chr(0x2811),
Expand Down

0 comments on commit cb29828

Please sign in to comment.