bugGNU roff - Bugs: bug #63921, [tmac] add Spanish language support

 
 

bug #63921: [tmac] add Spanish language support

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 13 Mar 2023 02:21:44 PM UTC
   
 
Category:  Macro - others/general Severity:  1 - Wish
Item Group:  Feature change Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 10 Jul 2023 08:57:14 AM UTC, comment #7: 


commit 3a50e9bd56b55b3b23c95f414153f9b9805ece7c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 14:22:03 2023 -0500

    [tests]: Add Spanish language support (5/5).

    * src/roff/groff/tests/localization_works.sh:
    * tmac/tests/e_ld-works.sh: Test it.

    Fixes <https://savannah.gnu.org/bugs/?63921>.  Thanks to Eloi Montañés.

    Also thanks to Dave Kemper, who has been patiently offering me a tall
    glass labelled "use 'groff -a' to regression-test formatter output" for
    years, and from which I have been slow to drink.

commit eb4ee3b6db0790ecf7c3b91d35651cd0724bcfb2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 13:53:57 2023 -0500

    [docs]: Add Spanish language support (4/5).

    * doc/groff.texi (Manipulating Hyphenation):
    * doc/ms.ms (Language and localization):
    * man/groff_tmac.5.man (Localization files): Document it.

    * NEWS: Add item.

commit 5ed05d221035d4061f0fdb07d8d3ee0711557533
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 13:38:57 2023 -0500

    [tmac]: Add Spanish language support (3/5).

    * tmac/hyphen.es:
    * tmac/es.tmac: Update editor aids.

    It doesn't seem to be necessary to specify the file encoding for these
    files; GNU Emacs and Vim have no trouble figuring it out.  It helps that
    (unlike the French localization files), these use no code points that
    differ between Latin-1 and Latin-9, so an assumption of either encoding
    works out fine.

commit 3c864a418bb9fd166b6b9d7744cf4172c92f21f1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 14:12:09 2023 -0500

    [tmac]: Add Spanish language support (2/5).

    * tmac/es.tmac: Spell weekday and month names in lowercase; every style
      authority I could find online mandates this, and it meshes with my
      half-remembered formal instruction in the language.  Fix groff
      composite special character escape sequences to place the base
      character first.  Replace one Unicode special character escape
      sequence with a composite special character escape sequence, for
      consistency.

commit fa5fcd2fd7b9a0eb65b7f73ace6ecd176e3143d8
Author: Eloi Montañés <em@ilsrv.com>
Date:   Mon Mar 13 12:03:02 2023 +0100

    [tmac]: Add Spanish language support (1/5).

    * tmac/hyphen.es: Add hyphenation patterns (encoded in Latin-9).
    * tmac/es.tmac: Add groff locale for Spanish.
    * tmac/tmac.am (TMACNORMALFILES): Ship new files.
    * doc/groff.texi (Manipulating Hyphenation): Add file/package index
      entry for "es.tmac".
    * LICENSES: Update for CTAN Spanish hyphenation patterns.


G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 08:08:45 PM UTC, comment #6: 

Hi Eloi,

I've pushed these changes to the "post-1.23.0" in groff's Git repository.

https://git.savannah.gnu.org/cgit/groff.git/log/?h=post-1.23.0


G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 08:07:25 PM UTC, comment #5: 


commit 5b99f39d61acd6cacaa7af0ccdff3a7c896209d8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 14:22:03 2023 -0500

    [tests]: Add Spanish language support (5/5).

    * src/roff/groff/tests/localization_works.sh:
    * tmac/tests/e_ld-works.sh: Test it.

    Fixes <https://savannah.gnu.org/bugs/?63921>.  Thanks to Eloi Montañés.

    Also thanks to Dave Kemper, who has been patiently offering me a tall
    glass labelled "use 'groff -a' to regression-test formatter output" for
    years, and from which I have been slow to drink.

commit 22cd72432e578cc498c9bf601ea9e5ed32994da0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 13:53:57 2023 -0500
 (HEAD -> post-1.23.0, origin/post-1.23.0)
    [docs]: Add Spanish language support (4/5).

    * doc/groff.texi (Manipulating Hyphenation):
    * doc/ms.ms (Language and localization):
    * man/groff_tmac.5.man (Localization files):
    * man/groff.7.man (Localization): Document it.

commit b9b0a4a8fb5caf495e8e36ff1c07878b4a13289b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 13:38:57 2023 -0500

    [tmac]: Add Spanish language support (3/5).

    * tmac/hyphen.es:
    * tmac/es.tmac: Update editor aids.

    It doesn't seem to be necessary to specify the file encoding for these
    files; GNU Emacs and Vim have no trouble figuring it out.  It helps that
    (unlike the French localization files), these use no code points that
    differ between Latin-1 and Latin-9, so an assumption of either encoding
    works out fine.

commit 29ec9ae1a2b0df02677087e449a86e7c760c95b4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Mar 13 14:12:09 2023 -0500

    [tmac]: Add Spanish language support (2/5).

    * tmac/es.tmac: Spell weekday and month names in lowercase; every style
      authority I could find online mandates this, and it meshes with my
      half-remembered formal instruction in the language.  Fix groff
      composite special character escape sequences to place the base
      character first.  Replace one Unicode special character escape
      sequence with a composite special character escape sequence, for
      consistency.

commit 48337897d956edaaf82899b360eb69fda02d59db
Author: Eloi Montañés <em@ilsrv.com>
Date:   Mon Mar 13 12:03:02 2023 +0100

    [tmac]: Add Spanish language support (1/5).

    * tmac/hyphen.es: Add hyphenation patterns (encoded in Latin-9).
    * tmac/es.tmac: Add groff locale for Spanish.
    * tmac/tmac.am (TMACNORMALFILES): Ship new files.
    * doc/groff.texi (Manipulating Hyphenation): Add file/package index
      entry for "es.tmac".
    * LICENSES: Update for CTAN Spanish hyphenation patterns.


G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 05:40:00 PM UTC, comment #4: 
G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 05:38:08 PM UTC, comment #3: 

comment #2:

> comment #1:
> > One area I had to speculatively reconstruct was the sequence of `hcode` requests in the new "es.tmac" file, since these became a bunch of indistinguishable U+FFFD characters.
>
> Well, your speculations were right, those are the exact same characters in the exact same order I had them.


Excellent!  Thanks for the quick follow-up.

G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 04:47:22 PM UTC, comment #2: 

comment #1:

> Unfortunately the patch was damaged on its way through email; spaces got converted to non-breaking space characters, tabs got converted to sequences of non-breaking space characters, and all non-ASCII graphical characters got replaced with U+FFFD.
> However, I believe I was able to repair the damage.
> One area I had to speculatively reconstruct was the sequence of `hcode` requests in the new "es.tmac" file, since these became a bunch of indistinguishable U+FFFD characters.


Well, your speculations were right, those are the exact same characters in the exact same order I had them.

El <elvirus>
Mon 13 Mar 2023 03:17:32 PM UTC, comment #1: 

Unfortunately the patch was damaged on its way through email; spaces got converted to non-breaking space characters, tabs got converted to sequences of non-breaking space characters, and all non-ASCII graphical characters got replaced with U+FFFD.

However, I believe I was able to repair the damage.

One area I had to speculatively reconstruct was the sequence of `hcode` requests in the new "es.tmac" file, since these became a bunch of indistinguishable U+FFFD characters.

Here's what I went with.


.hcode á á  Á á
.hcode é é  É é
.hcode í í  Í í
.hcode ó ó  Ó ó
.hcode ú ú  Ú ú
.hcode ñ ñ  Ñ ñ
.hcode ü ü  Ü ü


I've had some exposure to the Spanish language although I am not a competent speaker or writer of it.  I know the first 6 are necessary to write standard Spanish, and I'm making a semi-educated guess on the last because it shows up mostly* in proper names like "Carlos Yagüe".  I've never seen the dieresis accent applied to any vowel other than "u", but here my lack of mastery of Spanish leaves me with no confidence.

I do note that no character apart from the first six appears in the hyphenation patterns file, so I am not sure that the `hcode` request for "ü" (or the character this originally was) is doing any work.

I'll probably be pushing these changes to the post-1.23.0 branch soon.

https://git.savannah.gnu.org/cgit/groff.git

[*] as far as I've seen--my working Spanish vocabulary is tiny

G. Branden Robinson <gbranden>
Group administrator
Mon 13 Mar 2023 02:21:44 PM UTC, original submission:  

Eloi Montañés <em@ilsrv.com> sent the attached patch to the groff mailing list.


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54476:  groff-es.diff added by gbranden (54KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by elvirus (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  • -email is unavailable- added by gbranden (original reporter)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-18 gbranden Severity3 - Normal 1 - Wish
    2023-07-10 gbranden StatusReady for Merge Fixed
        Open/ClosedOpen Closed
    2023-03-13 gbranden StatusIn Progress Ready for Merge
        Planned ReleaseNone 1.24.0
    2023-03-13 gbranden StatusNone In Progress
        Assigned toNone gbranden
    2023-03-13 gbranden Attached File- Added groff-es.diff, #54476
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code