422658476 / MPV-EASY-Player

MPV-EASY Player - An easy to use, modern video player based on mpv (一个基于MPV,易于使用,现代化的视频播放器)
http://www.rjno1.com/mpv-easy-player/
GNU General Public License v3.0
1.09k stars 57 forks source link

External language files (like .ts/.qm QT language files) #20

Closed bovirus closed 3 years ago

bovirus commented 3 years ago

@422658476

Hello. Many thanks for your projects. Could be possible to have language files external instead integrate in the program? In this way could be easy add/test new languages (like Italian).

Thanks.

422658476 commented 3 years ago

Sorry, this is something I did not consider. I should add a language folder so that others can add additional language files for testing or use. I will complete this function as soon as possible, thank you very much. I am not familiar with the functions of github, so I may need to know how to use the pull requests function to meet your needs.

422658476 commented 3 years ago
<message>
    <location filename="../qmpv_mainwindow.ui" line="2614"/>
    <source>2倍</source>
    <translation>2 speed</translation>
    <translation>speed 3x</translation>
</message>
<message>
    <location filename="../qmpv_mainwindow.ui" line="2619"/>
    <source>2.5倍</source>
    <translation>2.5 speed</translation>
    <translation>speed 3.5x</translation>

================================== There may be a problem with the new translation, speed 3x => speed 2x speed 3.5x => speed 2.5x

====== Sorry, the pull requirement function may have to be processed after the external language file switching function is completed. I don’t understand this function at all.

bovirus commented 3 years ago

@422658476

Correct.

Now the english language should be OK.

Pelase add in your repository the language fiels to avoid me to the same job a new time.

Then you can majke the changes in source code.

422658476 commented 3 years ago

Now you can start testing Italian. Please download the attachment mpv-easy 20210720-2344.zip It contains the improved exe and language, you only need to overwrite these files. The 2 it.ts you made can be converted into 2 it.qm using qt linguist (using the [Release] function under [Save] in the [File] menu, the one with (R)) One renamed to it-mpveasysettings.qm Rename the other to it-mpveasygui.qm Note that the letters are all lowercase. Put these two files in the language folder to overwrite the existing sample files. Run MpvEasySettings.exe, switch to Italian, and re-run the program to see the interface language change. For the pull you submitted, I need to check the difference tomorrow or more before it can be synchronized to the program. Thank you very much. If you have any questions, please submit an issue again. mpv-easy 20210720-2344.zip

bovirus commented 3 years ago

@422658476

First of all I see thank you for this opportunity. I have a good knledge about QT development, use of QTLinguist, and lrelease/lconvert exe tool. I will do all necessaryu steps.

If you need more help I can do any job about merge/splitting language files.

Note: running the exe asking for some qtxx.dll library (qt 5.xx). I will install QT 5.x and I will check. What version of qt are you using? In Qt with which developing language (MinGW or Visual C++) and platform (32bit or 64bit)?

Thanks again.

422658476 commented 3 years ago

It’s great. It’s great to meet someone who is familiar with qt. Although I have used qt to make a large part of this program, I am still not familiar with many functions of qt. Tomorrow, there is a high probability that I will first clean up the outdated translation code in ts, just like you did, and then compare and synchronize the code you gave.

bovirus commented 3 years ago

For final version I propose to use language file scheme like

mpveasygui_xx.ts (mpveasygui_cn.ts/mpveasygui_en.ts/mpveasygui_it.ts) mpveasysettings_xx.ts (mpveasysettings_cn.ts/mpveasysettings_en.ts/mpveasysettings_it.ts)

bovirus commented 3 years ago

@422658476

I copied from qt 5.12.11 (MS Visual C++ 64bit) the library files

Qt5Gui.dll Qt5Network.dll Qt5Widgets.dll

That progam report me as me as missing. but after that it didn't work. Error 0x0000007b

Please confirm your qt configuration (qt version, language used for develop and platform).

422658476 commented 3 years ago

My consideration is: when there are many language files, use file name sorting: it-mpveasysettings.qm it-mpveasygui.qm 2 files are always displayed together, if used mpveasygui_it.qm mpveasysettings_it.qm Then the two files will be far apart, and it will be difficult to find if one of them is missing.

You only need to use the installation package provided under release. This is a complete program that contains all the required dlls. I am using qt mingw 32bit 5.6.3 So it must be an error. MPV-EASY Player uses 32-bit qt regardless of whether it is 32bit or 64bit, but one of mpv is 32bit and the other is 64bit. Because qt does not officially provide mingw64

bovirus commented 3 years ago

Using only exe in your package get an error message about missing dll.

422658476 commented 3 years ago

Oh, sorry, I thought you have already downloaded and used MPV-EASYPlayer. Download MPV-EASYPlayer from the release, and then use the file in mpv-easy 20210720-2344.zip to overwrite the existing file

bovirus commented 3 years ago

@422658476

I tested 32bit and it seems to work. I installed stable 32bit version and overwrite the exe with 2 new ones. And copy in MPV Easy Player the language fodler. Now Italian language is available in "Language" selection. Great!!! Thanks.

It seems that 64bit stable version didn't work fine in ame configuration. Create an error during running. I will check later.

422658476 commented 3 years ago

I'm very sorry, I found a serious bug, please use the mpv-easy player 20210721-0152.zip provided below to overwrite the same file and debug it. Fixed bug: After selecting Italian in the setting interface, after re-running MpvEasySettings.exe, the interface will not be displayed in Italian mpv-easy player 20210721-0152.zip

bovirus commented 3 years ago

@422658476

Thanks for the fix. Now it works.

If you want to encourage other tramslators to make a new tramslation probably could be better to have as source language English (now is Chinese). Now I see a lot of messages in chinese because is not available the same message in Italian.

422658476 commented 3 years ago

I know, but it’s too late. Everything was designed in Chinese at the beginning. I broke this principle and found out that it was too late. I am not going to change it to English again because my English is not very good. Well, if I use English as the most basic interface language, then many times I will not understand what the above is.

422658476 commented 3 years ago

If the information on the github page you said is based in Chinese and should be written in English, the same problem is that English is not my native language. It is a nightmare to translate these into English to write. I have experienced this nightmare once, that is Translate mpv-easy player into English, hahahaha

422658476 commented 3 years ago

Hello, I have compared the changes of pull, and it is completely possible, except that speed 0.2 (1/5) is not translated into speed 0.2x, which I have manually changed, and I have updated it to the program. The language file of MpvEasySettings removes two parts that do not need to be translated. Now I have updated all the language files on github, I don’t know if this will cause you trouble.

bovirus commented 3 years ago

@422658476

language.zip

This is the first step of italian language files. EasyGUI 100% translated. Easy Settings is not 100% translated but most of them. Optimized fiels after a long test about GUI in place. Please rename them (github repository need anotehr langaueg file name then application), load in your system and run lupdate to align this file to yoiur source.

What's the meaning of "[Cycle]" in translation?

Thanks.

422658476 commented 3 years ago

Does the language file let me see the current state, and then I don’t need to do anything or do ? ? ? [Cycle] means to continuously switch between two states, such as cycle pause, then playback pause, cycle pause again, playback continues, cycle pause again, playback pause。 I can't believe it. You finished the translation in 12 hours. It's too fast. Do you really don't need to sleep? Hahaha

422658476 commented 3 years ago

in the MpvEasyGui English language file :Loop playlist and shuffle: forever ===> oop playlist and shuffle: enable The English translation changes of the MpvEasySettings menu part have been synchronized with the MpvEasyGui menu

bovirus commented 3 years ago

@422658476

No that there are many langauges (italian included) could you plaese make a new build to test the new language? Thanks.

422658476 commented 3 years ago

Now I have updated the language files on github. Whether this meets your requirements, I updated github according to my understanding. If you want to help add more other languages, this is no problem, very welcome, I can give you the improved exe file as before. You only need to provide me with 2 things through text Italian ==》 it.ts

language ==> ??.ts

I need to know the type of language [language] and the file name of the language [??.ts], so that I can add and make into the program, the program also knows which language files to load, and then I will still provide 2 improvements The exe file for you, you can load the corresponding language file for translation and debugging.

bovirus commented 3 years ago

@422658476

For this moment no need to add other languages. Language file format is .TS.

I asked to released a new official build and put it here

https://github.com/422658476/MPV-EASY-Player/releases

that add for all users the italian languages.

Then anyone that download it can use Italian language.

Please also update mpv core program (01.08.2021).

Please also think is is not better to distribute two separate zip (not exe) with

32bit mpv easy player + 32bit mpv core 64bit mpv easy player + 64bit mpv core

Now you distributed and exe that when your run (by default set 32bit - for me should be 64bit) create a portable 32bit or 64bit folder.

If you use 32bit zip / 64bit zip it's easier to manage.

I create a .reg key that enable in Windows to open with a right click the file with MPV Easy Player.

The MPV Easy Player exe should be store not under Program Fiels folder because exe didn't work there. I copied all files in C:\MPC_EASY Player folder

Thanks.

422658476 commented 3 years ago

Okay, there may be some errors in my understanding or the online translator I use. The next version will be released this week or next week. I thought you might also update the language file, so I didn't release it immediately. Except for the last one: use zip At present, the installation package with the exe suffix is actually a compressed file, because it only has compression and decompression functions. By using the lzma compression method, it can provide users with a smaller program package, which is actually the same as zip.

bovirus commented 3 years ago

@422658476

For me the same exe that has two option: 32bit (default) or 64bit coiuld be quite complex for most users (and most of them don't install 64bit). Could be probably better to have two exe files: one for 32bit and one for 64bit.

Please when you will update language files, advise me in advance, before to release a new version program version, to enable me to update italian language files, and release trhe new program with italian language updated.

422658476 commented 3 years ago

Okay, next time there is a change in the language, I will notify you as much as possible so that the Italian language files can be synchronized before the new version of the program is released. The program with both 32-bit and 64-bit versions will remain the same in this respect. It cannot be as you wish. I'm sorry for that. Since this is a portable software, a program contains 2 versions. After you download it, you can easily switch between the 32-bit and 64-bit versions, because you only need to delete the folder where the program is located. I will close this issue now. If there are any problems, please open the issue. Thank you very much for all your hard work in the previous 2 weeks, thank you very much.

bovirus commented 3 years ago

@422658476

I agree with you. Please close this issue.