Unrud / video-downloader

Download videos from websites like YouTube and many others (based on yt-dlp)
GNU General Public License v3.0
751 stars 95 forks source link

Application showing incorrectly in English, when the operating system is set to Hungarian #165

Closed ovari closed 1 year ago

ovari commented 2 years ago

kép

Linux Mint 21 Cinnamon

Unrud commented 1 year ago

Can you provide the output:

flatpak run --command=sh com.github.unrud.VideoDownloader -c 'env | grep "^\(LANGUAGE\|LC_ALL\|LC_MESSAGES\|LANG\)="'
ovari commented 1 year ago
$ flatpak run --command=sh com.github.unrud.VideoDownloader -c 'env | grep "^\(LANGUAGES\|LC_ALL\|LC_MESSAGES\|LANG\)"'
LANGUAGE=hu_HU
LANG=hu_HU.UTF-8
ovari commented 1 year ago

Some elements in Download in progress… are translated.

Download in progress

Items which are not translated in the image above are:

  1. Cancelhttps://github.com/Unrud/video-downloader/blob/master/po/hu.po#L71
  2. Video Downloaderhttps://github.com/Unrud/video-downloader/blob/master/po/hu.po#L25
  3. MB/s → perhaps this need to be added as a string that can be translated?
ovari commented 1 year ago

No elements in Download finished seem to be translated.

Download finished

ovari commented 1 year ago

Could the error be that the hu.po file is incorrect?

Translations are provided by

  1. forking this repository
  2. translating the strings
  3. sending merge request

No special software or commands are used.

ovari commented 1 year ago

Here are the details from the About dialog

OS: GNOME 43 (Flatpak runtime)

Libraries:
    Python 3.10.6
    GLib 2.74.0
    Gtk 4.8.1
    Libadwaita 1.2.0
    video-downloader 0.10.8
    yt-dlp 2022.10.04

Env:
    LANG=hu_HU.UTF-8
Unrud commented 1 year ago

Flatpak uses the locale settings to install only required languages. Maybe something went wrong and the language is not installed.

Try:

flatpak info com.github.unrud.VideoDownloader.Locale

It should report something like:

Subdirectories: /hu
ovari commented 1 year ago

Flatpak uses the locale settings to install only required languages. Maybe something went wrong and the language is not installed.

If the language is not installed, does it seem strange that a string is translated into Hungarian as shown in the image at https://github.com/Unrud/video-downloader/issues/165#issuecomment-1278242280 ?

Try:

$ flatpak info com.github.unrud.VideoDownloader.Locale
   Azonosító: com.github.unrud.VideoDownloader.Locale
  Hivatkozás: runtime/com.github.unrud.VideoDownloader.Locale/x86_64/stable
Architektúra: x86_64
          Ág: stable
      Eredet: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 62,5 kB

      Kommit: 32609ebf66cbd0586ba8d071e6100194cf21351a90ea27bcbee61100aeded885
       Szülő: b27af2758331138ea642afaceb866b9bd75f48bf841143603a2750a0c06f71f2
       Tárgy: Update to 0.10.8 (7263db1c)
       Dátum: 2022-10-13 22:54:44 +0000

It should report something like:

Subdirectories: /hu

The subdirectories or hu reference are not shown.

Perhaps there is a regression somewhere as Video Downloader used to show completely in Hungarian?

ovari commented 1 year ago

Could code pointers from Video Trimmer (Videóvágó) help as it is shown in Hungarian?

Video Trimmer (Videóvágó)

$ flatpak info org.gnome.gitlab.YaLTeR.VideoTrimmer

Videóvágó - Videók gyors vágása

       Azonosító: org.gnome.gitlab.YaLTeR.VideoTrimmer
      Hivatkozás: app/org.gnome.gitlab.YaLTeR.VideoTrimmer/x86_64/stable
    Architektúra: x86_64
              Ág: stable
         Version: 0.8.0
         License: GPL-3.0-or-later
          Eredet: flathub
      Collection: org.flathub.Stable
    Installation: system
       Installed: 4,1 MB
Futtatókörnyezet: org.gnome.Platform/x86_64/43
             Sdk: org.gnome.Sdk/x86_64/43

          Kommit: 3ecc8afd29e64cd9b3e453f80f4009652ea9ee409704c490a4de6a63fdf6d…
           Szülő: 899e2ae36ecee710076d705072984b605de90435788857d8f1c61ec316ac3…
           Tárgy: Update to v0.8.0 (6ef6533c)
           Dátum: 2022-10-14 18:08:00 +0000
Unrud commented 1 year ago

The subdirectories or hu reference are not shown.

I don't know.

Check if the directory exists:

flatpak run --command=sh com.github.unrud.VideoDownloader -c 'ls /app/share/runtime/locale/'

If the hu directory is not displayed, try to install the extension manually:

flatpak update --subpath=hu com.github.unrud.VideoDownloader.Locale

If it still doesn't work, check if the runtime language is installed:

flatpak run --command=sh com.github.unrud.VideoDownloader -c 'ls /usr/share/runtime/locale/'
ovari commented 1 year ago

Check if the directory exists:

$ flatpak run --command=sh com.github.unrud.VideoDownloader -c 'ls /app/share/runtime/locale/'
ca  cs  de  es  fa  fr  hr  hu  it  ja  nl  pt  ru  sk  sv  tr  uz

If the hu directory is not displayed, try to install the extension manually:

Thanks for the command; however, not required as hu is displayed.

If it still doesn't work, check if the runtime language is installed:

$ flatpak run --command=sh com.github.unrud.VideoDownloader -c 'ls /usr/share/runtime/locale/'
hu

Should the language directories and installed runtime languages be added to the About dialog?

Thank you

Unrud commented 1 year ago

Everything seems to be in place, the languages are installed and the environment variables are set.

Try to run the program in the terminal:

flatpak run com.github.unrud.VideoDownloader

Maybe it displays a useful error message.

ovari commented 1 year ago

Try to run the program in the terminal:

flatpak run com.github.unrud.VideoDownloader

No messages show; however, with the latest update Hungarian is showing.

0.10.9 shows the GUI in magyar (Hungarian)

Thank you

Unrud commented 1 year ago

No messages show; however, with the latest update Hungarian is showing.

The update hasn't changed anything regarding the problem. Does it also work when you start the program from the menu (instead of the terminal)?

ovari commented 1 year ago

Does it also work when you start the program from the menu (instead of the terminal)?

Yes, it shows in Hungarian when opening from the menu.