Skip to content

Commit

Permalink
Fix for number backtranslations on fr-fr-g1 and vi-g1 tables
Browse files Browse the repository at this point in the history
This commit adds the litdigit definition for the french and vietnamese
grade 1 tables. These tables included the digit definition from
digits6DotsPlusDot6.uti but did not include a definition for litdigits,
which would provide the correct translations only for computer braille.
Previously, backtranslations for cells starting with the number sign
would behave differently from the forward translations by returning
space for 0 or ignoring the number sign for other digits (e.g. a with
circumflex for 3456-16 instead of 1).
  • Loading branch information
vsmontalvao committed Feb 28, 2017
1 parent 475c821 commit 2dcf998
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions tables/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ table_files = \
latinLetterDef6Dots.uti \
latinLetterDef8Dots.uti \
litdigits6Dots.uti \
litdigits6DotsPlusDot6.uti \
loweredDigits6Dots.uti \
loweredDigits8Dots.uti \
lt.ctb \
Expand Down
2 changes: 2 additions & 0 deletions tables/fr-fr-g1.utb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ sign # 3456 dièse
# override zero
digit 0 3456
include digits6DotsPlusDot6.uti
litdigit 0 3456
include litdigits6DotsPlusDot6.uti

sign \x00A8 46 diaeresis sign
math \x00F7 6-256 divisé par
Expand Down
30 changes: 30 additions & 0 deletions tables/litdigits6DotsPlusDot6.uti
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# liblouis: sub table for literary digits, 6 dots with dot 6 added
#
# Copyright (C) 2017 Victor Montalvao <[email protected]>
#
# This file is part of liblouis.
#
# liblouis 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.
#
# liblouis 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 liblouis. If not, see
# <http://www.gnu.org/licenses/>.

litdigit 0 346
litdigit 1 16
litdigit 2 126
litdigit 3 146
litdigit 4 1456
litdigit 5 156
litdigit 6 1246
litdigit 7 12456
litdigit 8 1256
litdigit 9 246
2 changes: 2 additions & 0 deletions tables/vi-g1.ctb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ sign # 3456 dièse
# override zero
digit 0 3456
include digits6DotsPlusDot6.uti
litdigit 0 3456
include litdigits6DotsPlusDot6.uti

sign \x00A8 46 diaeresis sign
math \x00F7 6-256 divisé par
Expand Down
21 changes: 21 additions & 0 deletions tests/yaml/fr-fr-g1_backward.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tables: [tables/unicode.dis, tables/fr-fr-g1.utb]
flags: {testmode: backward}
tests:
# Backward translations
# Digits
- [⠼⠼, 0]
- [⠼⠡, 1]
- [⠼⠣, 2]
- [⠼⠩, 3]
- [⠼⠹, 4]
- [⠼⠱, 5]
- [⠼⠫, 6]
- [⠼⠻, 7]
- [⠼⠳, 8]
- [⠼⠪, 9]
- [⠼⠡⠼, 10]
- [⠼⠡⠡, 11]
- [⠼⠡⠣, 12]
- [⠼⠪⠪, 99]
- [⠼⠡⠼⠼, 100]
- [⠼⠡⠼⠼⠼, 1000]
21 changes: 21 additions & 0 deletions tests/yaml/fr-fr-g1_harness.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tables: [tables/unicode.dis, tables/fr-fr-g1.utb]
flags: {testmode: forward}
tests:
# Forward translations
# Digits
- [0, ⠼⠼]
- [1, ⠼⠡]
- [2, ⠼⠣]
- [3, ⠼⠩]
- [4, ⠼⠹]
- [5, ⠼⠱]
- [6, ⠼⠫]
- [7, ⠼⠻]
- [8, ⠼⠳]
- [9, ⠼⠪]
- [10, ⠼⠡⠼]
- [11, ⠼⠡⠡]
- [12, ⠼⠡⠣]
- [99, ⠼⠪⠪]
- [100, ⠼⠡⠼⠼]
- [1000, ⠼⠡⠼⠼⠼]
21 changes: 21 additions & 0 deletions tests/yaml/vi-g1_backward.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tables: [tables/unicode.dis, tables/vi-g1.ctb]
flags: {testmode: backward}
tests:
# Backward translations
# Digits
- [⠼⠼, 0]
- [⠼⠡, 1]
- [⠼⠣, 2]
- [⠼⠩, 3]
- [⠼⠹, 4]
- [⠼⠱, 5]
- [⠼⠫, 6]
- [⠼⠻, 7]
- [⠼⠳, 8]
- [⠼⠪, 9]
- [⠼⠡⠼, 10]
- [⠼⠡⠡, 11]
- [⠼⠡⠣, 12]
- [⠼⠪⠪, 99]
- [⠼⠡⠼⠼, 100]
- [⠼⠡⠼⠼⠼, 1000]
21 changes: 21 additions & 0 deletions tests/yaml/vi-g1_harness.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
tables: [tables/unicode.dis, tables/vi-g1.ctb]
flags: {testmode: forward}
tests:
# Forward translations
# Digits
- [0, ⠼⠼]
- [1, ⠼⠡]
- [2, ⠼⠣]
- [3, ⠼⠩]
- [4, ⠼⠹]
- [5, ⠼⠱]
- [6, ⠼⠫]
- [7, ⠼⠻]
- [8, ⠼⠳]
- [9, ⠼⠪]
- [10, ⠼⠡⠼]
- [11, ⠼⠡⠡]
- [12, ⠼⠡⠣]
- [99, ⠼⠪⠪]
- [100, ⠼⠡⠼⠼]
- [1000, ⠼⠡⠼⠼⠼]

0 comments on commit 2dcf998

Please sign in to comment.