pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

Italian translation not displaying on book page #1260

Closed MichSpieler closed 3 weeks ago

MichSpieler commented 1 month ago

Description

A network manager who has contributed extensively to the Italian localization on Transifex has reported that translations are not showing up as expected. For example, when a book's language is set to Italian, the strings on the book's webpage still appear in English:

image

"All Rights Reserved" and "Read Book" should appear in Italian.

The translation is present in McLuhan / pressbooks-book on Transifex:

image image

It is also present in pressbooks-book/languages/it_IT.po:

image image

100% of McLuhan is translated to Italian. 46% of Pressbooks is translated to Italian.

I have compared this to what happens when setting the book language to Spanish (works as expected) and to German (does not display translation) as well.

I found the "Leer el libro" string in three .po files:

image

For German I found "Buch lesen" only in 2 files:

image image

For Italian I found "Leggi il libro" only in 1 file:

image
cmurtagh commented 1 month ago

Hey team! Please add your planning poker estimate with Zenhub @arzola @fdalcin @ho-man-chan @richard015ar @tw77

frankjmueller commented 1 month ago

Thank you for adding this. German works for me. Weird.

SteelWagstaff commented 1 month ago

I believe this is happening because there is no it_IT.mo file in the languages folder. WordPress needs the machine readable translation files. We typically generate a .po file for the translation, but I suspect that the automation we've built to handle translation updates doesn't commit new .mo files the first time they're created. The Italian language .po file was added in July 2024, but the action that was supposed to update the .mo file failed: https://github.com/pressbooks/pressbooks-book/actions/runs/9666155056.

It failed because it's pointing to update-mo.yml@dev but there is only a main branch for that repo: https://github.com/pressbooks/reusable-workflows/branches

SteelWagstaff commented 1 month ago

This PR should fix the workflow? https://github.com/pressbooks/pressbooks-book/pull/1262

cmurtagh commented 1 month ago

These PRs seem to have resolve this issue.

SteelWagstaff commented 1 month ago

Did we test and confirm on the dev networks? I was going to wait for autodeploy before testing ...

SteelWagstaff commented 1 month ago

Works as expected on dev.pressbooks.network: Screenshot from 2024-09-30 10-44-43

frankjmueller commented 1 month ago

Awesome. Thank you!

SteelWagstaff commented 1 month ago

@frankjmueller this should be included in our next release of the McLuhan theme. You can follow the release notes here, or we can let you know when it's been deployed to your production network.

frankjmueller commented 1 month ago

Will this thread be updated (automatically) if it is released? Then I am fine. :)

fdalcin commented 1 month ago

@frankjmueller the ticket is not automatically updated. The fix should be included in the v2.26.5 release of McLuhan theme which was released today.

frankjmueller commented 1 month ago

Hi, thank you. I have checked and in the themes section McLuhan is shown as 2.26.5.

I still get the "Please contact your system administrator if you would like them to install extended Italian language support for the Pressbooks interface." notice when I try to activate italian in the language settings. (I tried to switch to English and back to Italian.

grafik

Is there something I can check? Best wishes Frank J.

cmurtagh commented 1 month ago

I'll ask our devs about this.

SteelWagstaff commented 1 month ago

hi @frankjmueller -- if you change the book language to Italian in book information, the publicly displayed information on the book's home page will in fact display the available strings in Italian. You can see this on this book, for example: https://university.pressbooks.pub/french102/.

I just checked the All Means All network and also see both the authoring interface and the book metadata on your book: https://book.all-means-all.education/ama-2025-it/ appearing in Italian. Are you ok with us closing this issue as resolved?

SteelWagstaff commented 1 month ago

You can safely ignore the "Please contact your system administrator if you would like them to install extended Italian language support for the Pressbooks interface." notice at the top of the page -- that is being displayed simply because the full Italian language pack for WordPress is not installed for your network. Our enterprise networks are installed with English/French as the available administrative languages, as these are the primary working languages used by our enterprise clients, but I believe that additional languages can be installed upon request. Generally these are only needed if a user would like to change their administrative interface to ALWAYS display available text in that language even if the book is set to use a different language.

As currently configured, when a user changes the Book Language to something other than the default, all of the available strings in the book admin interface and the homepage of the book are set to display in that language, UNLESS the user has set the language settings in their user profile to a preferred language (i.e. English or French). The default user profile setting is 'Site Default'. Screenshot from 2024-10-16 16-02-44

This can be a little confusing, but these guide chapters might help: https://guide.pressbooks.com/chapter/support-multilingual-publications/ + https://guide.pressbooks.com/chapter/update-your-user-profile/#language

frankjmueller commented 3 weeks ago

Hi, it works now. Thank you!