diff --git a/NEWS b/NEWS index 32d4503f83..bcdf09540f 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ liblouis NEWS -- history of user-visible changes. -*- org -*- Boyer. - Emphasized words should now be contracted consistently thanks to John Boyer. + - Fixed several problems with back-translation. A slash within a + number and strings such as 5-inch-diameter and 25-year-old-man + should now back-translate correctly. Thanks to John Boyer. + ** Braille Table Improvements - fr-bfu-comp8.utb: corrections, zero was wrongly displayed in some @@ -14,8 +18,13 @@ liblouis NEWS -- history of user-visible changes. -*- org -*- thanks to Ken Perry. - en-us-g2.ctb: Fix for backtranslation of things like http://address.com, thanks to Ken Perry. - - Further corrections and testcases to the Hungarian tables thanks to Hammer - Attila + - Further corrections and testcases to the Hungarian tables thanks + to Hammer Attila + - UEB chardefs - correct title and fixed a long standing bug where + dots 46 was inserted between letters (especialy for web + addresses). Thanks to Joseph Lee. + - UEB-g1: corrected the at sign dot combination. Thanks to Joseph + Lee. ** Backwards incompatible changes - Delete the table chardefs-ueb.cti as these rules are now diff --git a/liblouis/lou_backTranslateString.c b/liblouis/lou_backTranslateString.c index 0981ae30c9..14c54b0054 100644 --- a/liblouis/lou_backTranslateString.c +++ b/liblouis/lou_backTranslateString.c @@ -1,3 +1,4 @@ + /* liblouis Braille Translation and Back-Translation Library @@ -665,7 +666,7 @@ back_selectRule () case CTO_LargeSign: return; case CTO_WholeWord: - if (itsALetter) + if (itsALetter || itsANumber) break; case CTO_Contraction: if ((beforeAttributes & (CTC_Space | CTC_Punctuation)) @@ -1042,7 +1043,6 @@ backTranslateString () switch (currentOpcode) { case CTO_Hyphen: - if (isEndWord ()) itsANumber = 0; break; case CTO_LargeSign: diff --git a/tables/en-ueb-g1.ctb b/tables/en-ueb-g1.ctb index f8540a2da7..795c67bfd1 100644 --- a/tables/en-ueb-g1.ctb +++ b/tables/en-ueb-g1.ctb @@ -32,6 +32,9 @@ include en-ueb-chardefs.uti UEB specific char defs. # Braille indicators numsign 3456 number sign, just a dots operand +letsign 56 +noletsignafter . +noletsignafter ' capsign 6 begcaps 6-6 # Todo: Find a way to insert capsection 6-6-6 rule. @@ -289,7 +292,7 @@ sign ⊵ 456-456-345 Is not normal subgroup or equal # special character sequences context "\e"$a * -always \\_ 56 letter sign before Roman page numbers +noback always \\_ 56 letter sign before Roman page numbers pass2 @56-56 @56 pass2 @3-56 @3 diff --git a/tables/en-us-g1.ctb b/tables/en-us-g1.ctb index 4a8c48754d..f06fcad3f8 100644 --- a/tables/en-us-g1.ctb +++ b/tables/en-us-g1.ctb @@ -32,6 +32,9 @@ include chardefs.cti All character definition opcodes # Braille indicators numsign 3456 number sign, just a dots operand +letsign 56 +noletsignafter . +noletsignafter ' capsign 6 begcaps 6-6 endcaps 6-3 diff --git a/tables/en-us-g2.ctb b/tables/en-us-g2.ctb index 552d8a61d9..d7bb271096 100644 --- a/tables/en-us-g2.ctb +++ b/tables/en-us-g2.ctb @@ -31,9 +31,6 @@ include en-us-g1.ctb # Braille indicators specific to Grade 2 -letsign 56 -noletsignafter . -noletsignafter ' multind 56-6 letsign capsign # Contractions beginning with the letter a