Gavin Smith <[email protected]> writes:

> On Fri, Dec 26, 2025 at 01:54:59PM +0000, Daniel Cerqueira wrote:
>> Hi.
>> 
>> I am making a book with the help of Texinfo.  This book is in European
>> Portuguese (Portuguese of Portugal).
>> 
>> When I compile the book to PDF, instead of having book links that say
>> "Secção X.X.X" (Section X.X.X , on an English translation), my compiled
>> book appears with links that say "Seção X.X.X" (mind the omission of the
>> "c" behind the "ç").  Which makes those links to be in Brazilian
>> Portuguese, instead of Portugal's Portuguese.  And my book is written in
>> Portugal's Portuguese.
>> 
>> I have fetched the source, did a `find` together with an `xargs` and
>> with a `sed`, to replace all occurrences of [Ss]eç with [Ss]ecç . Making
>> this the Portugal's way of writing, and making my book all in Portugal's
>> Portuguese.  The command for this replacement is as follows:
>> 
>> $ find src/ -type f -name \*.bib -or -name \*.cls -or -name \*.dtx -or
>> -name \*.lang -or -name \*.tex -or -name \*.xml | xargs -d '\n' sed -i
>> -e 's/Seç/Secç/g' -e 's/seç/secç/g'
>
> I believe the text is coming from doc/txi-pt.tex:
>
> \gdef\putwordsection{se\,c\~ao}
> \gdef\putwordSection{Se\,c\~ao}
>
> You could edit this to put an extra "c" in:
>
> \gdef\putwordsection{sec\,c\~ao}
> \gdef\putwordSection{Sec\,c\~ao}
>
> This translation was added in August 1999 although I couldn't see any record
> of whether it was Brazilian or Portuguese Portuguese.  See old email below.
> (The archived website of the person who wrote it offers text in "Brasilist
> Portuguese" so presumably it was supposed to be Brazilian -
> <https://web.archive.org/web/20000816000422/http://zope.gf.com.br/lalo>.)
>
> We should try and fix it to be consistent with what texi2any does.  I
> believe this would mean that "@documentlanguage pt" or "@documentlanguage 
> pt_PT"
> would give European Portuguese and "@documentlanguage pt_BR" would give
> Brazilian Poruguese.

I have made the change, and I still get my PDF book compiled with
"Seção".  I use texi2any when compiling my Texinfo files.

Attached is my patch.  My changes are copyrighted to Free Software
Foundation.  You may apply it.

-- 
The pioneers of a warless world are the youth that
refuse military service. ~ Albert Einstein

--- working/doc/txi-pt.tex	2023-08-09 21:10:43.000000000 +0100
+++ latest/doc/txi-pt.tex	2025-12-26 15:50:14.179877137 +0000
@@ -1,6 +1,6 @@
 % txi-pt.tex -- Portuguese translations for texinfo.tex.
 %
-% Copyright 1999, 2007, 2008 Free Software Foundation, Inc.
+% Copyright 1999, 2007, 2008, 2025 Free Software Foundation, Inc.
 %
 % This program is free software; you can redistribute it and/or modify
 % it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
 %
 % Written by Lalo Martins <[email protected]> at 05 August 1999
+% and by Daniel Cerqueira <[email protected]> at 26 December 2025
 
 \txisetlanguage{portuguese}{2}{3}
 
@@ -30,8 +31,8 @@
 \gdef\putwordon{em}
 \gdef\putwordof{de}
 \gdef\putwordpage{P\'agina}
-\gdef\putwordsection{se\,c\~ao}
-\gdef\putwordSection{Se\,c\~ao}
+\gdef\putwordsection{sec\,c\~ao}
+\gdef\putwordSection{Sec\,c\~ao}
 \gdef\putwordsee{veja}
 \gdef\putwordSee{Veja}
 \gdef\putwordShortTOC{Breve Sum\'ario}
@@ -66,6 +67,6 @@
 %% \defvar
 \gdef\putwordDefvar{Vari\'avel}
 %% \defopt
-\gdef\putwordDefopt{Op\,c\~ao de Usu\'ario}
+\gdef\putwordDefopt{Op\,c\~ao de Utilizador}
 %% \deffun
 \gdef\putwordDeffunc{Fun\,c\~ao}

Attachment: signature.asc
Description: PGP signature

Reply via email to