Translation of strings with specific ids.

12 views
Skip to first unread message

Alexandre Lymberopoulos

unread,
Feb 17, 2026, 11:29:20 PMFeb 17
to PreTeXt support
Dear all,

I'm experimenting with courses here and very happy with its potential. I'm going to teach a course in brazilan portuguese, so I obviously put xml:lang="pt-BR" on <pretext> tag in main.ptx. It works well since the text in the buttons like Previous, Next and Top were translated sucessfully, but some are not ok. Actually I get the following after build:

warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "papersize" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "printing-options" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "hide-hints" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-header" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-footer" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "highlight-workspace" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "papersize" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "printing-options" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-header" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-footer" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "highlight-workspace" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-preview" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "papersize" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "printing-options" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-header" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print-footer" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "first-page" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "running" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "highlight-workspace" into language for code "pt-BR"
warning: * PTX:WARNING: could not translate string with id "print" into language for code "pt-BR"

Basically the same thing for the text in some buttons. Noticed it on the ones related to print, since I'm not using (yet) any Sage cells (for the running button I guess). I helped with some translation a few years ago, and I can do it again, if guided to handle the right files in pretext code. Please let me know how I can help here.

Also the tag <today /> gives the date in English, is it possible to have it in any other language?


Best, Alexandre.
P.S.: should this to be posted on pretext-dev too? 

Oscar Levin

unread,
Feb 17, 2026, 11:58:24 PMFeb 17
to pretext...@googlegroups.com
Hi Alexandre,

These localizations can be put in the file here:  
https://github.com/PreTeXtBook/pretext/blob/master/xsl/localizations/pt-BR.xml 

As we add new features we should add comments to all the localization files so you just need to uncomment them, provide a correct translation, and they can be updated as part of pretext.

A PR with those edits would be great.


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/2ecd0eda-7352-49af-bce5-6329c43482dfn%40googlegroups.com.

Alexandre Lymberopoulos

unread,
Feb 18, 2026, 1:25:44 PMFeb 18
to PreTeXt support
Dear Oscar,

I did the translations both in pt-BR and pt-PT, which use exactly the same terms for this. I'do a PR now. Any tip about the <today /> date format?

Best, Alexandre

Rob Beezer

unread,
Feb 18, 2026, 1:34:49 PMFeb 18
to pretext...@googlegroups.com
Dear Alexandre,

Oscar has given you a good answer - we are always adding new features and rely
on language maintainers to look once in a while for things that need new
translations. Thanks for keeping "pt" up-to-date!

> P.S.: should this to be posted on pretext-dev too?

Its fine here, and duplicating into two groups is probably a bad idea.

Even better would have been to do two posts, since I already forgot about your
#today question and was going to mentally mark this as closed! ;-)

Give me a second to address #today over on -dev and we can continue there.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/2ecd0eda-7352-49af-bce5-6329c43482dfn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/2ecd0eda-7352-49af-
> bce5-6329c43482dfn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Alexandre Lymberopoulos

unread,
Feb 18, 2026, 1:38:48 PMFeb 18
to PreTeXt support
Thanks, Rob.

Just did the PR of both translations files (or I think I did :P).

Best, Alexandre.
Reply all
Reply to author
Forward
0 new messages