Skip to content

Russian translation#525

Merged
xytovl merged 9 commits intoWiVRn:masterfrom
aomiki:feat/locale-ru
Oct 13, 2025
Merged

Russian translation#525
xytovl merged 9 commits intoWiVRn:masterfrom
aomiki:feat/locale-ru

Conversation

@aomiki
Copy link
Contributor

@aomiki aomiki commented Oct 10, 2025

Added Russian translation, goes well with Half-Life: Alyx (every can and bottle there has a Russian label!).

It's not ready to merge yet, I still want to test everything.
But I'm stuck with the dashboard - it doesn't want to use new locale file. (Client app is fine)

If I set locale through env variables like that:

export LANG='ru_RU.UTF-8' && export LC_ALL='ru_RU.UTF-8' && export LANGUAGE='ru'

And open dashboard, only buttons on the Settings page, at the bottom, are translated (which I guess qt does automatically?)

If I locale-gen Japanese and set it in env, everything gets translated:

export LANG='ja_JP.UTF-8' && export LC_ALL='ja_JP.UTF-8' && export LANGUAGE='ja'

Also tried French, works as expected.

Any ideas how I can launch it with new locale?

@xytovl
Copy link
Collaborator

xytovl commented Oct 10, 2025

For the dashboard, it will load translations from the system installation.
When I want to test translations, I do it through the flatpak, in order to do so:
tools/gen_flatpak_manifest.py --dir generates the flatpak manifest from the template file, it will need python toml and aiohttp packages. It generates files in the directory it is executed.
flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir io.github.wivrn.wivrn.yml builds and install the flatpak.

@xytovl
Copy link
Collaborator

xytovl commented Oct 10, 2025

You should also be able to enable "Actions" on your github fork, and this will include the flatpak build.

If you are using Arch or Gentoo, it is easy to modify the PKGBUILD/ebuild to install from your fork instead of the official repo.

There may be some Qt environment variable to use translations from the build directory, but I don't know how to do so.

@aomiki
Copy link
Contributor Author

aomiki commented Oct 11, 2025

@xytovl Thank you for detailed explanation!

There may be some Qt environment variable to use translations from the build directory

Tried searching for them, didn't find anything either.

I do it through the flatpak

I really wanted to do this, but got stuck with the following error (on flatpak-builder command):

Details

Downloading sources
Fetching git repo https://github.com/crosstool-ng/crosstool-ng.git, ref refs/tags/crosstool-ng-1.27.0
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1/1), 685 bytes | 685.00 KiB/s, done.
git-lfs/3.7.0 (GitHub; linux amd64; go 1.24.5)
Running git lfs fetch
1 object found, done.
Fetching all references...
Fetching git repo https://github.com/RsyncProject/rsync.git, ref refs/tags/v3.4.1
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1/1), 823 bytes | 823.00 KiB/s, done.
Running git lfs fetch
1 object found, done.
Fetching all references...
Failed to download sources: module toolchain: Can't find file at ct-ng-x86_64.config

Among other errors that preceded it, that I managed to fix, all from missing dependencies and configurations.

Ended up doing the simplest thing, putting the file where app expects it to be:

sudo ln -vs $(pwd)/build-dashboard/dashboard/share/locale/ru/LC_MESSAGES/wivrn-dashboard.mo /usr/share/locale/ru/LC_MESSAGES/

I actually kinda like how it just works now.
I'll play around with both apps and write back when I'm happy with the translation.

@xytovl
Copy link
Collaborator

xytovl commented Oct 11, 2025

The flatpak issue seems to be that the command only works from the flatpak directory itself, it references files that are there.

Just a heads up, i'm going to add a new dashboard message shortly, to toggle system checks (firewall and cap_sys_nice)

@aomiki
Copy link
Contributor Author

aomiki commented Oct 11, 2025

The flatpak issue seems to be that the command only works from the flatpak directory itself, it references files that are there.

Ahh I see that makes sense.

Just a heads up, i'm going to add a new dashboard message

Thanks, I'll merge it when it becomes available.

@xytovl
Copy link
Collaborator

xytovl commented Oct 11, 2025

The additional message was added, when you consider your translations ready, just post here and I'll merge.

And I see that I forgot to mention, thank you for your contribution!

@aomiki
Copy link
Contributor Author

aomiki commented Oct 13, 2025

Alright I think everything looks very good now, it's fine to merge.

@xytovl xytovl merged commit e3f35aa into WiVRn:master Oct 13, 2025
21 checks passed
@xytovl
Copy link
Collaborator

xytovl commented Oct 13, 2025

Thank you for the translation, I have merged it.

When translations become out of date, CI will automatically raise an issue with "localisation" label, named "[ru] Missing translations".
The issue will automatically get closed and reopened depending on the status on master. I'll ping you the first time it happens so you can subscribe to the issue and be able to track it.

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.

2 participants