Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern descriptions are not translated #859

Closed
lslezak opened this issue Nov 13, 2023 · 4 comments
Closed

Pattern descriptions are not translated #859

lslezak opened this issue Nov 13, 2023 · 4 comments
Labels
bug Something isn't working translations Translation related problem

Comments

@lslezak
Copy link
Contributor

lslezak commented Nov 13, 2023

Problem

After switching the display language to Spanish the pattern descriptions are still displayed in English.

pattern-selector-spanish

Details

Libzypp loads the translations for the current language when the repository is refreshed. The translations are located in the repo/*-susedata.<lang>.xml.gz files. See examples in https://download.opensuse.org/tumbleweed/repo/oss/repodata/.

Libzypp loads only a single file with the current language, the rest is ignored to save time and the network bandwidth.

Proposed Solution

Because the language might be switched after loading the initial repository we need to refresh the repositories again with the new language.

See related #875.

Note: For really using the new translations we probably also need to reload the libzypp pool from scratch. That means we need to restore also the selected products/patterns/packages back.

@lslezak lslezak added bug Something isn't working translations Translation related problem labels Nov 13, 2023
@ShatilKhan
Copy link

I can take this one @lslezak
Please assign me

@dgdavid
Copy link
Contributor

dgdavid commented Nov 16, 2023

Hi @ShatilKhan,

Sorry, but I think this one is rather difficult and should be fixed by the team. So, unless @lslezak has another view, I'd encourage you to pick another one if you want contribute.

Thanks anyway for your willing to help here.

@lslezak
Copy link
Contributor Author

lslezak commented Nov 23, 2023

I agree, this is not a trivial task, this needs a libzypp and yast-pkg-bindings expert. I'd recommend to start with something easier...

lslezak added a commit that referenced this issue Jan 11, 2024
## Problem

- After changing the language the pattern descriptions are not
translated (actually they keep the previous locale setting)
- #859 

## Solution

- After changing the language refresh the repositories and reload the
data to get the pattern descriptions in the new language.
- The selected packages need to be restored after the reload, the
current selection is lost.

## Notes

The pattern groups (e.g. "Graphical Environments", "Base Technologies")
are not translated but they come from libzypp as well. But as they are
not translated also in YaST I guess there is some serious problem, maybe
there is missing translation support for that... I'll check the details
later.

## Testing

- Tested manually

## Screenshots

Switching from English to Spanish, the previously selected patterns are
kept.

The Gnome pattern description is not translated, probably missing
translation or they updated the original text and was not re-translated.
But at least the name is translated.


[patterns.webm](https://github.com/openSUSE/agama/assets/907998/e02569df-4280-40a0-bd73-f9dc2273d201)
@lslezak
Copy link
Contributor Author

lslezak commented Jan 30, 2024

Implemented in PR #991, closing.

@lslezak lslezak closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working translations Translation related problem
Projects
None yet
Development

No branches or pull requests

3 participants