mpv.net icon indicating copy to clipboard operation
mpv.net copied to clipboard

Localization progress and contribution methods

Open dyphire opened this issue 2 years ago • 11 comments

I noticed that mpv.net started adding localized extension support after migrating to .NET 6, but it seems to be still in the initialization stage. Open a question here to focus on localization progress and subsequent contribution methods.

dyphire avatar Nov 04 '23 15:11 dyphire

I agree now that it's important, and I really want to do it, but it's certainly difficult to do, because of that I don't know when is the right time to start.

stax76 avatar Nov 04 '23 18:11 stax76

Mainly the configuration editor and input editor need to be localized. We can add the language option in the settings, and this option can take effect after the app is restarted

zhongfly avatar Nov 05 '23 02:11 zhongfly

~~Using transifex don't look like a good idea because it isn't free or cheap.~~ Ok, I found transifex offer free service for the open source project.

zhongfly avatar Nov 30 '23 04:11 zhongfly

Yes, it's free for open source projects. It's apparently used for the translation of mkvtoolnix, I found it by looking at how mkvtoolnix is translated.

I first translate the menu and bindings and learn how transifex works, it seems to be complex and slow and feature rich. After translating the menu and bindings and learning how things work, I invite translators to translate the menu and bindings.

I want to rewrite/improve the conf editor, it's probably better not to translate it before doing the rewrite, because of that the conf editor isn't yet integrated in the translation powershell script. Both the rewrite and translation of the conf editor will be difficult, so I don't have a schedule for it.

stax76 avatar Nov 30 '23 06:11 stax76

@dyphire I saw your request on transifex, I'll need a couple of days until everything is ready, my main concern is data loss, which is more likely in the case of working with a new and unfamiliar system.

stax76 avatar Nov 30 '23 07:11 stax76

@dyphire I saw your request on transifex, I'll need a couple of days until everything is ready, my main concern is data loss, which is more likely in the case of working with a new and unfamiliar system.

OK, I will wait for it.

dyphire avatar Nov 30 '23 07:11 dyphire

You should now be able to translate the menu. There are 145 words or sentences. I hope the AI translation works well in Chinese, it worked well in German.

It took me a while to understand everything and put it together. I use now the transifex CLI client to push and pull the data.

stax76 avatar Dec 08 '23 07:12 stax76

You should now be able to translate the menu. There are 145 words or sentences. I hope the AI translation works well in Chinese, it worked well in German.

The Chinese (zh_CN) translation has been completed. The results of AI translation are good, with only a small amount requiring correction and embellishment.

dyphire avatar Dec 08 '23 13:12 dyphire

Awesome, thanks for contributing! I committed a fix that enables the Chinese translation. There is a script located at lang\create-mo-files.ps1, it needs to run.

stax76 avatar Dec 08 '23 20:12 stax76

Hello, stax76. Thank you for responding to my request in Japanese translation and your work. The following strings are needed in Transifex.

#menu: Open > Recent (and Clear List) #menu: Audio > Cycle/Next #menu: Subtitle > Cycle/Next #menu: View > Move > Left (?) #menu: View > Move > Right (?) #menu: View > Move > Top #menu: View > Move > Bottom #menu: View > Move > Center (?) #menu: View > Show Media Info #menu: View > Show Media Info Advanced #menu: View > Show Recent seek to the previous subtitle seek to the next subtitle

tsubasanouta avatar Jan 08 '24 01:01 tsubasanouta

Hello tsubasanouta,

thanks for working on the Japanese translation. Please be aware about changes between mpv.net v6 and v7:

Before version v7 all bindings and the context menu definition were defined in the input.conf file, which mpv.net created in case it didn't exist. This had the disadvantage that mpv.net lost control over all default bindings and context menu defaults. This was unfortunate, v7 introduces a new bindings and context menu design fixing it.

In v7 no input.conf file is created, the default bindings and context menu is defined internally. input.conf only contains what is different from the internally defined defaults, so it works the same as it works in mpv.

For backward compatibility the old input.conf context menu format with the menu definition using #menu: is still supported. The new design also allows for a menu customization, in a sub section called Custom. In input.conf it can be defined like so:

Ctrl+a show-text Test #custom-menu: Test > Test

Users that have their bindings and context menu customized before v7 can easily migrate to the new design by deleting bindings they don't use and remember the shortcut and remove #menu: everywhere, it's important to remove #menu: everywhere in order to enable the new mode/design.

I added 'Clear List' to the text to be translated, but didn't yet push it to transifex.

You can find an auto build with enabled Japanese translation here:

https://github.com/mpvnet-player/mpv.net/actions/runs/7443282122/artifacts/1153192401

stax76 avatar Jan 08 '24 04:01 stax76