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

Translation for status bar not being used #3620

Open
scootergrisen opened this issue Oct 20, 2023 · 12 comments
Open

Translation for status bar not being used #3620

scootergrisen opened this issue Oct 20, 2023 · 12 comments

Comments

@scootergrisen
Copy link
Contributor

Seems like the translation for the string in the status bar is not being using in Geany 2.0.
billede

#: ../src/ui_utils.c:62
msgid ""
"line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mEOL: %M      encoding: "
"%e      filetype: %f      scope: %S"
msgstr ""
"linje: %l / %L\t kolonne: %c\t markeret: %s\t %w      %t      %mlinjeafslutning: %M      kodning: "
"%e      filtype: %f      område: %S"

geany/src/ui_utils.c

Lines 62 to 69 in 0fd68e4

"line: %l / %L\t " \
"col: %c\t " \
"sel: %s\t " \
"%w %t %m" \
"EOL: %M " \
"encoding: %e " \
"filetype: %f " \
"scope: %S")

Windows 7.
Geany 2.0.
"Pryce"
(bygget Oct 19 2023 eller efter)
Med afviklingsbibliotekerne GTK+ v3.24.34 og GLib v2.72.3

@b4n
Copy link
Member

b4n commented Oct 20, 2023

It works for me, but note that this is the default value for a preference, so it won't ever be updated on an existing installation. Try with geany -c /tmp/nonexistant, you should see the translation.

@b4n
Copy link
Member

b4n commented Oct 20, 2023

Hum, scratch that, doesn't seem to work for Danish…

@b4n
Copy link
Member

b4n commented Oct 20, 2023

OK no, it works fine here, I just had a stale da.gmo in my local directory, but the content of the tarball is OK. @eht16 is it possible you didn't build the Windows binaries from a fresh clone, and had a stale thing as well?

@eht16
Copy link
Member

eht16 commented Oct 20, 2023

Unfortunately, this is possible and after some testing even likely.

But this raises more questions :(.
First I deleted po/da.gmo, expecting that make or make install will regenerate it. But they didn't. Instead make install raised an error:

/usr/bin/install: cannot stat './da.gmo': No such file or directory
installing ./da.gmo as /home/enrico/build/build_geany/share/locale/da/LC_MESSAGES/geany.mo

but it continued to install everything else.

After studying po/Makefile a bit, I noticed there is a target update-gmo which regenerates the *.gmo' files. This target is only indirectly by update-po`.
This would explain why @b4n and me had some old files laying around and why we probably have distributed outdated language files on Windows already since a long time.

I wonder if this is normal behavior or something uncommon in our use.

If it is meant like this, I will update the Windows build process to enforce regenerating the gmo files (probably use a clean build clone).

@techee might be the macOS builds affected by this as well?

@scootergrisen if you want, you can try the attached geany.mo file and copy it to C:\Program Files\Geany\share\locale\da\LC_MESSAGES (or whereever you have Geany installed).
geany_gmo_da.zip

@eht16
Copy link
Member

eht16 commented Oct 20, 2023

Ah funny, G-P behaves differently. There is no update-gmo target and the files seem to have been updated yesterday when building.

This reminds me of the change to autopoint (#2938) which we did not yet do for G-P and so maybe the stale *.gmo problem is rather new.

I think I will update the Geany Windows installer with the updated gmo files.

@techee
Copy link
Member

techee commented Oct 20, 2023

@techee might be the macOS builds affected by this as well?

I used meson for Geany itself (not usre if it suffers from the same problem) and autotools for plugins. In any case I made a completely clean build from release tarballs so I hope it's alright.

@eht16
Copy link
Member

eht16 commented Oct 20, 2023

I should have done as well.

@eht16
Copy link
Member

eht16 commented Oct 20, 2023

The Geany Windows installer has been replaced with updated translation files (binaries are untouched).

@scootergrisen could you test the installer again?

@scootergrisen
Copy link
Contributor Author

I downloaded and installed https://download.geany.org/geany-2.0_setup.exe again and that fixes missing translations like #3621 but the status bar is still partly in english.

line: %l / %L col: %c sel: %s %w %t %mEOL: %M encoding: %e filetype: %f scope: %S

@b4n
Copy link
Member

b4n commented Oct 21, 2023

@scootergrisen did you use a fresh configuration? C.f.

It works for me, but note that this is the default value for a preference, so it won't ever be updated on an existing installation. Try with geany -c /tmp/nonexistant, you should see the translation.

You should also be able to make the pref empty to use the default (it's in the various prefs)

@scootergrisen
Copy link
Contributor Author

No but i tried with -c now and then i get the translated string.
But does they mean that all users have to manually figure out how to get a fresh configuration when changes are made to the translation?

Then if i switch between languages like if i want to test Geany in danish and afterwards in english it seems im going to see the same string in the status bar instead of different languages.
I dont think i like that.
The status bar string/language should change not stay the same.

I noticed this in preferences.
Maybe not a good idea to have text that are meant to be translated be part of a preference like that which is keept when the software/translation are updates and language is changed.
billede

@elextr
Copy link
Member

elextr commented Oct 21, 2023

The problem with the status bar is that it is freeform text, the user can type anything in it, so there is no way to translate 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

No branches or pull requests

5 participants