mate-desktop / mate-wayland-session

GNU General Public License v2.0
31 stars 5 forks source link

Add translations-WIP #4

Closed lukefromdc closed 6 months ago

lukefromdc commented 6 months ago

This is the start of translation support. WIP for now as more is needed. We need the translations themselves (for the .desktop file) and a way to copy MATE.desktop.in with the translations included over the untranslated MATE.desktop file which can then be removed from the source files.

I do not know if the gsettings override file needs to be translated.

raveit65 commented 6 months ago

I do not know if the gsettings override file needs to be translated.

I don't think, ihmo. For fedora i created an untranslated override file. https://src.fedoraproject.org/rpms/mate-desktop/blob/rawhide/f/mate-rhel.gschema.override Here only the key name is used, which is untranslated when i open them in dconf-editor.

lukefromdc commented 6 months ago

I was able to install the binary for transifex easily enough, but tx pull doesn't work without an account. An account created from my github account was able to get through the initial steps, but I don't understand enough about it to get tx pull to work. I also see the account is a 15 day trial, I do not have any form of online currency, have no paid accounts anywhere, and that is not about to change. Someone else will have to deal with this unless they can walk me through it before the account expires. Note that I do NOT know what I am doing with all that.

Note that NoScript showed a lot of 3ed party JS including Google that I was not about to authorize. No idea if that played any role in this issue of tx pull requiring a token, which was never passed to the local install

raveit65 commented 6 months ago

I checked this with another github account of mine. I only got this trial account where i can buy an expensive subscription to add a new project with own collaborators 0_o No idea, what's going on with transifex and why old projects like mate-desktop are free. Looks like transifex is a commercial company nowadays.

raveit65 commented 6 months ago

Back in my normal transifex account i saw 2 join request to mate-desktop project wich i did with my new account. grafik So it seems that it is possible to add people with this trial account. I am thinking this is free.

lukefromdc commented 6 months ago

I was unable even to connect to the existing MATE project on Transifex, coming up as mate-2 instead

lukefromdc commented 6 months ago

This is what I got, note that I had to block a number of 3ed party JS providers that are never allowed on any of my machines, notably googletagmanager

Transifex

raveit65 commented 6 months ago

Try this site https://www.transifex.com/solutions/for-translators/ and choose join a project. Than search for mate-desktop and click on Mate button. grafik On next side click on join project. I will add you tomorrow. Now it's very late and i go to bed. Or try it now.

raveit65 commented 6 months ago

Today i had to spend more than 5 hours to fix broken translation strings before releasing. I am complete frustrated about this translation stuff and i will never do it again in life. Should another person takes the hand over Mate at transifex. This is complete out of control and translators do always mistakes. Some languages, ie. jews are currently complete broken in every repo. Honestly, i don't mind........ and if a new updated language breaks building i simply do git restore po/shiti.po :P Not my task any more.

lukefromdc commented 6 months ago

I just managed to join the project, though I will have to wait to be accepted. Hoping this works and I can submit the package for translation

The session should be identifiable without being translated, we are dealing with only one file here. The name "MATE" stays the same in the x11 session's .desktop file for every language using the same or similar alphabets English does. If this doesn't work, I propose to leave this open for someone else to deal with (it's a draft after all) and we then have the option of releasing the session untranslated as it will still work and is considered experimental at this time.

If a release is untenable I can bump the version number and be done with that for the moment.

raveit65 commented 6 months ago

Congratulation, you're member of language team en_US. I send you an invitation to become an administrator of "MATE Desktop Environment " team with full rights.

I can add mate-wayland-session for to transifex because it needs some work here at github repo and on transifex website. Ok, i see you added the tx folder already.

But first the command make pot needs to be working inside po folder.

Workflow how translations do work with transifex: make pot creates the source file for translations --> mate-wayland-session.pot. After creation this file needs to be commited and pushed to github. At transifex we can add an automaticly monitoring rule for this file to upload every new change to transifex. When a language is translated we can pull the translation with the tx pull -af command. Then the new language needs to add to LINGUAS file, commit and push to github. Last step enables the new language during compiling.

lukefromdc commented 6 months ago

how do I get make pot to work? It comes up "no rule to make" on every project I just tested.

Also, not knowing about that I tried to get tx pull -af to work, it accepted the token but crashed on not being able to get the terminal width for a progress bar (go language it seems). Same in both MATE and gnome terminal, hoping that one is wayland-only

lukefromdc commented 6 months ago

I managed to create the .pot file by hand

lukefromdc commented 6 months ago

With the last change here, the result of running tx pull -af is this, noting that at least it doesn't crash:

# Getting info about resources

MATE.master--mate-wayland-session - Resource MATE.master--mate-wayland-session does not exist
[##############################] (1 / 1)
luke@ubuntu:~/Desktop/Development/MATE_Development_Work/AA_Master/mate-wayland-session$  
raveit65 commented 6 months ago

./autogen.sh && ./makepot just creates mate-session-wayland.pot and move it to top dir, same as in other packages. But the naming of the package is really confusing. In configure.ac it called AC_INIT([mate-session-wayland],. But the repo called mate-wayland-session. I am thinking this is one reason why `distcheck doesn't work in other PR. IHMO, you should rename the repository or renaming in configure and where ever it is writen.

When this is done and PR is merged i can the package to transifex.

lukefromdc commented 6 months ago

I will rename the package in configure.ac and anywhere else it is wrong

lukefromdc commented 6 months ago

Package name should now be consistant everywhere

raveit65 commented 6 months ago

After renaming everything to mate-wayland-session you can drop mate-session-wayland.pot. Then you can create the source file again with ./autogen.sh && ./makepot

lukefromdc commented 6 months ago

tx pull still got

MATE.master--mate-wayland-session - Resource MATE.master--mate-wayland-session does not exist
[##############################] (1 / 1)
luke@ubuntu:~/Desktop/mate-wayland-session$ 

possibly as this is not on master

raveit65 commented 6 months ago

tx pull still got

MATE.master--mate-wayland-session - Resource MATE.master--mate-wayland-session does not exist
[##############################] (1 / 1)
luke@ubuntu:~/Desktop/mate-wayland-session$ 

possibly as this is not on master

Yes, .......did you add the package to transifex on their website?

raveit65 commented 6 months ago

Did you you check if the pngs in Potfiles.skip are needed? I never saw that in other packages, eg. mate-sensor-applet which ships graphics too.

lukefromdc commented 6 months ago

I would not know how to determine if they are needed or not, will remove them at your suggestion though, assuming if not listed in other packages not needed here

lukefromdc commented 6 months ago

I don't think it would be possible to add the project to transifex without first merging this PR (so they would not be stuck on the branch), but I really don't know and so far have yet to find the interface for doing so.

Not sure what to do from here. Note that nothing in this PR breaks building with autotools or meson in either way, so if we need to merge to master to get the project into transifex that should be no problem. Also note that tomorrow I will be out most of the day

lukefromdc commented 6 months ago

Image files removed from POTFILES.skip at your suggestion

raveit65 commented 6 months ago

I don't think it would be possible to add the project to transifex without first merging this PR (so they would not be stuck on the branch), but I really don't know and so far have yet to find the interface for doing so.

Of course fist it needs to be in master. I only asked because it wasn't clear for me, after you ask for the tx pull -af command. I will change PR from draft to review.

raveit65 commented 6 months ago

I think this is OK for now. We need some translated strings from transifex for further testing.

offtopic on distcheck fails on this branch because of missing PNGs in distcheck

mkdir -p /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-wayland-session-dist/mate-wayland-session-1.27.0/_inst/share/firedecor/button-styles/mate/
cp close.png /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-wayland-session-dist/mate-wayland-session-1.27.0/_inst/share/firedecor/button-styles/mate/close.png
cp: cannot stat 'close.png': No such file or directory
make[4]: *** [Makefile:437: install-data-local] Error 1

offtopic off

raveit65 commented 6 months ago

I added the repository to transifex and tx pull -af works like a charm.

<cut>
MATE.master--mate-wayland-session [yo] - Minimum translation completion threshold not satisfied, skipping
MATE.master--mate-wayland-session [zh] - Minimum translation completion threshold not satisfied, skipping
MATE.master--mate-wayland-session [zh-Hans] - Minimum translation completion threshold not satisfied, skipping
MATE.master--mate-wayland-session [zh_CN] - Done
MATE.master--mate-wayland-session [zh_HK] - Minimum translation completion threshold not satisfied, skipping
MATE.master--mate-wayland-session [zh_TW] - Done
MATE.master--mate-wayland-session [zu] - Minimum translation completion threshold not satisfied, skipping
[##############################] (176 / 176)
[rave@mother mate-wayland-session]$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
(use "git add <file>..." to include in what will be committed)
po/ca.po
po/cs.po
po/da.po
po/de.po
po/en_GB.po
po/es.po
po/fr.po
po/gl.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/lt.po
po/ms.po
po/nb.po
po/nl.po
po/oc.po
po/pl.po
po/pt.po
po/pt_BR.po
po/ru.po
po/sl.po
po/sr.po
po/tr.po
po/uk.po
po/zh_CN.po
po/zh_TW.po

nothing added to commit but untracked files present (use "git add" to track)
[rave@mother mate-wayland-session]$

After you did this for yourself add those po files with git add ...... , add them to LINGUAS and commit.

raveit65 commented 6 months ago

I did not translate the keywords Keywords=launch;MATE;desktop;session; in German language, because i do not understand how this works and if this really needs to be translated.

lukefromdc commented 6 months ago

Done, we now have the translations in master. Thanks! Now if we can get distcheck working it will be releasable

raveit65 commented 6 months ago

Not done, something is missing ;-) I wrote it already here

After you did this for yourself add those po files with git add ...... , add them to LINGUAS and commit.

Without this important step, *.po files will never used during compiling. The day will come that you have to do this without my help....

lukefromdc commented 6 months ago

I can get on that one now, thanks

lukefromdc commented 6 months ago

https://github.com/mate-desktop/mate-wayland-session/commit/7b9a86abe28523272cb11c6d01328b28bf9b66ec added the .po files but didn't add them to Linguas, so last push https://github.com/mate-desktop/mate-wayland-session/commit/aaaa431f9cf3457465f500d3611a5a591de66527 hopefully fixed that

raveit65 commented 6 months ago

Thanks, you got it. This is important do when a new language comes in with a pull from transifex

lukefromdc commented 6 months ago

One remaining problem: https://github.com/mate-desktop/mate-wayland-session/issues/8 translations not built with meson. I should be able to use another packages po/meson.build as a template to fix that