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

Localization #881

Merged
merged 61 commits into from
Nov 30, 2023
Merged

Localization #881

merged 61 commits into from
Nov 30, 2023

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Nov 21, 2023

Problem

Agama already offers a D-Bus interface for localizing both the installer and the target system. But the web UI does not allow to select a keyboard or timezone yet.

Solution

The localization page was redesigned in order to allow changing language, keyboard and timezone for the target system.

The D-Bus API also needed some rework. Now it offers an API adapted to what clients need: listing locales, keymaps and timezones, and also selecting locales, keymap and timezone.

Note: Auto-installation is out of the scope of this PR.

Testing

  • Added new unit tests
  • Tested manually

Screenshots

System in Spanish with GNOME Desktop

gnome-locale-es

UI

localhost_8080_(iPad Mini) (15)

localhost_8080_(iPad Mini) (16)

localhost_8080_(iPad Mini) (17)

localhost_8080_(iPad Mini) (18)

* Additionally, consider as supported all the locales known to systemd.
* Rename LabelsForLocales to ListLocales.
* Include the code, the language and the territory name.
* Use the UILocale for translations.
@coveralls
Copy link

coveralls commented Nov 21, 2023

Coverage Status

coverage: 75.456% (-0.1%) from 75.554%
when pulling acb8aab on localization
into c47fc31 on master.

- One context for installer localization and another for target system
  localization.
@imobachgs imobachgs marked this pull request as ready for review November 29, 2023 07:21
@dgdavid dgdavid mentioned this pull request Nov 29, 2023
6 tasks
doc/dbus/bus/org.opensuse.Agama1.Locale.bus.xml Outdated Show resolved Hide resolved
doc/dbus/org.opensuse.Agama1.Locale.doc.xml Outdated Show resolved Hide resolved
rust/agama-dbus-server/src/locale.rs Outdated Show resolved Hide resolved
rust/agama-dbus-server/src/locale.rs Outdated Show resolved Hide resolved
rust/agama-dbus-server/src/locale.rs Show resolved Hide resolved
rust/agama-dbus-server/src/locale.rs Outdated Show resolved Hide resolved
rust/agama-dbus-server/src/locale/locale.rs Outdated Show resolved Hide resolved
rust/agama-lib/src/proxies.rs Show resolved Hide resolved
Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Folks, I've reviewed the web/ part. It LGTM.

Just a few not blocking notes.

Thanks a lot!

web/src/assets/styles/blocks.scss Outdated Show resolved Hide resolved
padding-top: var(--pf-v5-c-modal-box__body--PaddingTop);
background-color: var(--pf-v5-c-modal-box--BackgroundColor);

[role="search"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE for my self: we should unify the search input (now we have two styles, the one used in Software page and this)

web/src/components/core/ListSearch.jsx Outdated Show resolved Hide resolved
web/src/components/core/ListSearch.jsx Outdated Show resolved Hide resolved
web/src/components/core/ListSearch.test.jsx Show resolved Hide resolved
web/src/utils.js Outdated Show resolved Hide resolved
@joseivanlopez joseivanlopez merged commit 888aa22 into master Nov 30, 2023
6 checks passed
@joseivanlopez joseivanlopez deleted the localization branch November 30, 2023 13:40
@imobachgs imobachgs mentioned this pull request Dec 2, 2023
mvidner added a commit that referenced this pull request Feb 7, 2024
## Problem

In #881 localization was improved and works in the web UI.
This PR adds CLI and autoinstallation

- https://trello.com/c/AvrY5iBP

## Solution

Mimic the structure of the other configuration scopes.

TODO:

- [x] decide where to use `locale` and/or `localization` in the code:
mostly "localization" except the D-Bus proxy which is "locale"

## Testing

- Tested manually
- More unit tests for `KeymapId`


## Screenshots

`agama config show` now works for `localization`:

```console
7e24bb397c23:/checkout # (cd rust/; cargo run --bin agama -- -f yaml config show)
[... Compiling ...]
     Running `target/debug/agama -f yaml config show`
user:
  fullName: ''
  [... etc ...]
localization:
  language: en_US
  keyboard: us
  timezone: Europe/Berlin
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants