lx-s / WinMute

WinMute lets you automatically mute your PC volume on certain events (e. g. Screensaver, Workstation Lock, Shutdown, etc.).
BSD 3-Clause "New" or "Revised" License
168 stars 6 forks source link

Add italian language to GUI #26

Closed bovirus closed 8 months ago

bovirus commented 11 months ago

@lx-s

Could you pelase modify source code to add Italian language?

Could you pelase move all strings usen in 'WinMute.rc' in a separate 'WinMute.resx' file? Then you can translate using 'WinMute.de.resx' for German and 'WinMute.it.resx' for Italian)

I can help translating it in Italian.

Thanks

lx-s commented 11 months ago

Hey there, currently WinMute is not at all prepared for multi language. But I can plan this feature for the next release and start working on it :)

When I have the infrastructure in place, I'll gladly get back to you for the italian translation.

bovirus commented 11 months ago

@lx-s

Thanks for you reply. When the language files will be ready I will create the italian language.

sal0max commented 11 months ago

A great free platform for collaborative translations is the Weblate instance on Codeberg 🙂

https://translate.codeberg.org/

lx-s commented 11 months ago

@bovirus Then I'll get onto it as soon as possible :)

@sal0max thanks for the tip! I'll try if I can export it to a Windows/C++/DLL format thingy I need for Windows.

Until now I was living my c++ life blissfully ignorant in regard to i18n ;)

sal0max commented 11 months ago

👍

I'm sure you find a supported format, suitable for your project 😄 https://docs.weblate.org/en/latest/formats.html

bovirus commented 11 months ago

@lx-s

Weblate it a good iddea. In this way you can separate source code development/changes from language updates.

bovirus commented 11 months ago

@lx-s

Have you any date for the plan to add multilanguage GUI?

lx-s commented 11 months ago

Have you any date for the plan to add multilanguage GUI?

I am currently working on it, whenever I can spare the free-time (work and family life is like pacman munching all my free-time dots ;)). I have already started the work on branch 26_i18n and tag all commits with this Issue, so you can see whenever i push something new. I will try to work on it steadily the next few weeks.

My personal goal is: Somewhere around november.

Sorry for the wait. I appreciate your help!

lx-s commented 10 months ago

To give you a short ping: I finished translating all the strings within the source code and the tray menu. Next step are the dialog ressources.

bovirus commented 10 months ago

@lx-s

Thanks for your job.

lx-s commented 9 months ago

Good news! Everything is now translatable and I have already translated it to german. The translation infrastructure code has now also been merged to the dev-branch. The next few days I'll see how this weblate thingy works and try to integrate it :)

bovirus commented 9 months ago

@lx-s

Thanks. When you will ready plwase post the weblate link to translate your project. When at least one translation will be ready for me you can create an test version to test the programn with translation.

lx-s commented 9 months ago

I added the project, but it's not really recognizing the rc files:

https://translate.codeberg.org/projects/winmute/

I'll try to fight with it a bit more, but if it doesn't work, I'll do it in a different way.

I guess old school Windows development is too crufty for weblate ;)

lx-s commented 9 months ago

If you want to start nonetheless, just copy the Translations/wm_de/ folder to Translations/wm_it/, rename the files accordingly and start editing :)

The english source material is located at Translations\wm_en\wm_en.rc

lx-s commented 9 months ago

Alright, since I can't get this weblate-thing to work, we have to do it the straight forward way.

I added a branch for you (named i18n_italian) to work on. Just give me a Pull Request for this branch, when you are finished!

Thank you :)

lx-s commented 8 months ago

Alright, scratch everything I said.

I thought about it and reworked the whole thing. Now, the translations are done with json files.

What you can do now is:

  1. Download this winmute_beta_i18n.zip
  2. Copy the lang/lang-en.json, rename it to lang/lang-it.json and translate it.
  3. Send me a PR or attach it here.

In the next few days I'll see if I can make weblate recognize that format ;) But even if not, It's a lot easier to deal with the json files instead of the Windows Resource Files, at least for this kind of project.

Edit: Alright, Weblate now recognizes everything: https://translate.codeberg.org/projects/winmute/winmute/ But I've not set it up correctly and won't have the time today to do it correctly, so, for now, you can just work with the json file itself, if that's okay.

bovirus commented 8 months ago

@lx-s

Thanks for the translation option. I completed the Italian tarnslation.

Some proposals about language

Multiperiod strings without . at the end

WLAN is not available or disabled. WLAN muting will be disabled on this computer

Thanks.

lx-s commented 8 months ago

Thank you so much for all the infos!

I made the base english file also editable by translators (seeing as I am not a native speaker, someone might contribute better text) :) I also tried to implement all your suggestions.

Please check that multiperiod string have each period on separate line. Check thath multiperiod string end with ".". There is a multiperiod string without "." at the end.

What do you mean by that?

Add a note for "English" string that is the language name and should replace with specific language name.

I added a note in the explanation field - is that what you meant or is there a better way to do it in weblate?

bovirus commented 8 months ago

@lx-s

I translated "English" in Italian but after I undeerstood that is the specfic language name. Then it's important that someone started a new translation this is the language name.

Question: in which path/file are saved WinMute settings?

lx-s commented 8 months ago

I translated "English" in Italian but after I undeerstood that is the specfic language name. Then it's important that someone started a new translation this is the language name.

Yeah, I understand - I added the explanation to the two meta fields. They appear in the right sidebar of weblate. Hopefully that helps :)

Question: in which path/file are saved WinMute settings?

WinMute saves its settings into the Registry: https://github.com/lx-s/WinMute/blob/dev/WinMute/WMSettings.cpp#L39

bovirus commented 8 months ago

@lx-s

WLAN is not available or disabled. WLAN muting will be disabled on this computer.

add new line

WLAN is not available or disabled. WLAN muting will be disabled on this computer.

These string for uniformity hould have same starting letter (uppercase or lowercase9 and not point at the end because are menu option or settings

... Computer is locked ... Screen turns off

bovirus commented 8 months ago

Please this GUI issues

Now image Proposal image

Now image Proposal image

bovirus commented 8 months ago

@lx-s

"Mute on (no volume restore)"

should be

"Mute on (no volume restore) when..."

bovirus commented 8 months ago

@lx-s

Endpoint = Device?

To respect uppercase/lowercase and no "." at the end of menu or setting explanation please change in english language

... Computer is locked. -> ... computer is locked ... Screen turns off. -> ... screen turns off ... Shutdown -> the computer shuts down ... the computer is locked. -> ... the computer is locked ... the screen turns off. -> ... the screen turns off ... the computer shuts down. -> ... the computer shuts down ... the computer goes into sleep/hibernate. -> ... the computer goes into sleep/hibernate ... the user logs out. -> ... the user logs out ... when WinMute is started within a RDP session. -> ... WinMute is started within a RDP session

Thanks.

lx-s commented 8 months ago

Done, done and done. We are getting there bit by bit ;)

GUI work I have to do a bit later - but i'll definitely check with all the languages

lx-s commented 8 months ago

Changed dialog spacings

winmute_beta_i18n.zip

lx-s commented 8 months ago

Alright, Weblate is now setup so I can comfortly pull and push the new language strings.

Sorry for any intermittent locks of the translation repo.

bovirus commented 8 months ago

@lx-s

Thanks for new beta

Please check UI proposal (increase sue of GUI space)

lx-s commented 8 months ago
  • Now image

The problem with moving the checkbox up is that it might work for the italian language, but would not work for the german language. I'm thinking about moving the second checkbox under the list, but currently the spacing is there to space it right for english, german and italian.

I am not really satisfied with it myself

lx-s commented 8 months ago

How I intend to solve it (WIP)

grafik grafik

bovirus commented 8 months ago

@lx-s

For me are ok. But it's better move a few button grpup on right and have some empty space on left/right the buttons

image

lx-s commented 8 months ago

Small Update for you winmute_beta_i18n.zip

Since the translation infrastructure is now complete, I'll start working on those other tickets for the 3.0 release :)

bovirus commented 8 months ago

@lx-s Thanks. last questiuon: when you talk "endpoint" does it mean "audio device"?

Note: in Settings -> Bluetoth if no audio Bluetooth found setting panel is empty.

lx-s commented 8 months ago

Thanks. last questiuon: when you talk "endpoint" does it mean "audio device"?

Ah yes, I haven't found a good term yet. In Windows terminology, all (actual or virtual) audio devices have one or more audio endpoints. Each audio endpoint is managed by WinMute. So the precise word, in terms of Windows software mixer is "endpoint". For the user "device" might be clearer.

Note: in Settings -> Bluetoth if no audio Bluetooth found setting panel is empty.

Thanks! Fixed!

bovirus commented 8 months ago

@lx-s

I think that if you use "device" or "audio device" instead "endpoint" for most users will be better.

lx-s commented 8 months ago

I think that if you use "device" or "audio device" instead "endpoint" for most users will be better.

Changed it. Also some new strings were added because of a new update check feature. I'll close this issue, since the main thing "add italian language" is now done :). If you happen to stumble further layout problems or have suggestions for the wording please open another ticket for that specific problem.

Thanks again for all your help!