OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Localization: Translations Portuguese "pt-PT" not working.

Open XpandIT-RFID opened this issue 2 years ago • 9 comments

Hi, I am currently trying to use the "pt-PT" translation from the crowdin but they don't seems to work, but when I try the Brazilian ones "pt-BR" or "fr" they work.

How I am testing:

  • Added the "pt" and "pt-BR" folder to my root project in the Localization Folder
  • Enabled "Localization" Feature
  • Add "?culture=pt" to the Url. (None of the translations in the .po files work)
  • Change to "?culture=pt-PT" (Still doesn't work)
  • Change to "?culture=pt-BR" (Works)

Also tested with "fr" and worked. There seems to be a problem with the "pt / pt-PT" translations. image

cc: @deanmarcussen / @Skrypt

Can anyone else test this? I am currently working on a project that needs pt-PT translations working.

Cheers

XpandIT-RFID avatar Aug 20 '21 13:08 XpandIT-RFID

Did you added 'pt-PT` as a supported culture from Admin/Cultures?

hishamco avatar Aug 20 '21 15:08 hishamco

Did you added 'pt-PT` as a supported culture from Admin/Cultures?

Yeah, still makes no difference since I could do pt-BR without adding it to the supported cultures using the query string "?culture=pt-BR"

XpandIT-RFID avatar Aug 20 '21 15:08 XpandIT-RFID

Ya it should work if you add the queystring. I presume the pt-PT should fallback to pt. Could you please share a minimal repo so I can figure out what's going on? Before that let us know what version are you using?

hishamco avatar Aug 20 '21 17:08 hishamco

Hi, I am currently working on a private project so I can't share, but I will do a little one once I have a chance. I am using the OC version 1.0.0

XpandIT-RFID avatar Aug 27 '21 15:08 XpandIT-RFID

Assuming pt-PT falls back to pt as expected, it might be that the pt language is not fully translated:

image

This would explain why it "seems" to work with BR and not PT. Otherwise can you be more precise about what "doesn't work" is it all in English still, or only a few strings are in Portuguese? Can you check with a screen that is translated in pt directly?

However I can see that pt is almost fully translated for the Setup screen though nothing is displayed. So an issue might be that we are not linking to the pt translation file. Can you try to add a custom reference to the pt nuget package?

<PackageReference Include="OrchardCore.Translations.pt" Version="1.0.0" />

...

and after looking at the nuget packages, I confirm that we did forgot to reference the pt package:

https://www.nuget.org/packages/OrchardCore.Translations.All/

sebastienros avatar Sep 02 '21 17:09 sebastienros

@XpandIT-RFID this by design, we exclude the Portugese from all cultures package (which is referenced by default in OC) beacuse there was less 50% translations at the time of we publish the meta package,

For now you can reference the OrchardCore.Translations.pt package as Seb said

hishamco avatar Sep 02 '21 19:09 hishamco

Maybe we should include parent cultures if we include a child one. The child might contains a superset of the parent one.

sebastienros avatar Sep 02 '21 20:09 sebastienros

I was thinking about that, but the issue is, if the culture doesn't have transaltions or have few, the expectation from customer perspective may different because they don't it's a lack of the translation itself not in OC

hishamco avatar Sep 02 '21 20:09 hishamco

@XpandIT-RFID is this still happen?

hishamco avatar Jul 15 '22 14:07 hishamco

Closing this while there's no reply from the author

hishamco avatar Oct 27 '22 08:10 hishamco