Version: (using KDE 4.1.3) OS: Linux Installed from: Mandriva RPMs In the programm poedit , when on quit ( or save ) it creates the .mo file Is this possible with Lokalize ?
it can be implemented using kross script. i'll do it for KDE 4.3
(In reply to comment #1) > it can be implemented using kross script. i'll do it for KDE 4.3 > Thank you very much ! Dimitris
I implemented msgfmt script specific to KDE, and placed it in http://websvn.kde.org/trunk/l10n-kde4/scripts/lokalize/ (see README). creating of .mo files for other projects may be done by modifying that script. I'll also add some hints to the documentation.
but integrate this feature on the menu of lokalize?
Yes would be nice to have it in the menu Now i see it but it is grey. I downloaded the script in ~/.kde4/share/apps/lokalize/scripts and the rc file in ~/.kde4/share/apps/lokalize/ but it is still grey. I read the help and it says that we have to put the script in the folder "PROJECTDIR/lokalize-scripts" but i dont know what is the PROJECTDIR. I think that is not easy to use it in that way as a script because eg: for me it is still impossible to use it as i did nt find the way how to use this.
Go to Project -> Configure project. Look up a directory of your current project. Open it in Dolphin, create lokalize-scripts folder in it, then put both .rc and .py files in it. restart lokalize
it's not user friendly this things. i think that like in poedit when save the file generate the mo, simple and more useful.
Unfortunately i could nt make it work I placed the script in the place where the project is in a folder 'lokalize-scripts' but the menu is always grey, even after restarted lokalize The problem is that i have different projects, i need to place the scripts in each folder? I thought that a script would be in a place like in the /usr/share/lokalize for all projects and/or if there is no any project created. It is not possible to use it with unique po files ? I have to agree with Mte90 that this is not a user friendly way for this. Why not include it in lokalize definitely.
I will include it for 4.11. can you post a konsole output of the lokalize? Maybe you don't have krosspython installed. also, what distribution are you using? in http://packages.debian.org/experimental/lokalize i see that krosspython is not a hard dependency, but a recommended one.
I have Mageia. The package is the kross-interpreters-python which it was nt installed. I installed it but i dont find where is the mo file. in terminal i have this: Kross: "PythonScript::execute" Kross: "PythonScript::execute result=None" Maybe i dont have any output ?
did you look at ~/.kde/share/locale/<YOUR_LANG>/LC_MESSAGES ? or ~/.kde4/share/locale/<YOUR_LANG>/LC_MESSAGES
(In reply to comment #11) > did you look at ~/.kde/share/locale/<YOUR_LANG>/LC_MESSAGES ? > or ~/.kde4/share/locale/<YOUR_LANG>/LC_MESSAGES Yes it is there. :) Thanks
any news for this feature?
Created attachment 84834 [details] Export to mo script with kdialog I added a kdialog menu to the script so you can choose to export the mo file to the default or a custom path Please test it i am not developer.
Created attachment 84843 [details] with 'ts' export to 'qm' support
Doesn't work to me, i get only: ``` lokalize(11765)/lokalize (TM) TM::ScanJob::run: ScanJob: done 96 lokalize(11765)/lokalize (TM) TM::ScanJob::~ScanJob: KUrl("file://pathchangedbyme/file.po") Kross: "PythonScript::execute" Kross: "PythonScript::execute result=None" ```
I think that the files are created in the local folder see comment 11 If you want to control the output, download the two files msgfmt-po+ts.py msgfmt-po+ts.rc from here: http://websvn.kde.org/trunk/l10n-kde4/el/lokalize-scripts/ and copy them to: ~/.kde4/share/apps/lokalize/scripts or ~/.kde/share/apps/lokalize/scripts depending your system then you will have this dialogue when you want to export: http://img13.imageshack.us/img13/2175/hco2.png
This script works but not alert from error like that (is in italian): languages/promote-mdn-it_IT.po:180: definizione del messaggio duplicata... languages/promote-mdn-it_IT.po:145: ...questa รจ la posizione della prima definizione msgfmt: trovato 1 errore fatale Kross: "PythonScript::execute result=None" Also will be useful to support to default the same folder of the po file as output path. I give a look to the script :-) thanks for the help!
Okay new version of this script with: - Alert for wrong extension - Same path of the po/ts file option - Better check for existing file https://paste.kde.org/peummsmtk
(In reply to Daniele Scasciafratte from comment #19) > Okay new version of this script with: > - Alert for wrong extension > - Same path of the po/ts file option > - Better check for existing file > > https://paste.kde.org/peummsmtk Great ! @Nick: what about include this script in lokalize installation ?
This missing feature is blocking me to switch from PoEdit to Lokalize... (there is also the scanning for the pot but I can survive without it on lokalize). Also the script is not anymroe available...
(In reply to Daniele Scasciafratte from comment #21) > Also the script is not anymroe available... What do you mean 'the script is no more available' ?
That the same script shared by me on https://paste.kde.org/peummsmtk years ago is not available anymore. And I forgot it to done it a patched version...
Created attachment 105611 [details] Lokalize script to compile and export po and ts files
(In reply to Daniele Scasciafratte from comment #23) > That the same script shared by me on https://paste.kde.org/peummsmtk years > ago is not available anymore. And I forgot it to done it a patched version... Ok i uploaded the version with your update
Thank you so much! I modified based on my new needs and I shared on https://github.com/Mte90/Script/tree/master/lokalize Actually is not running on save of the po file but is better now than before without this script. Also I saw on debian that the folder inside my home folder is not reconize but only the root one on Debian.
Ok great, is better in github, You mean that you removed the ts support because it doesn't work ? For me it works the po and ts version without any problem.
the script is working very good only that today I need only the po support. I want also that will be execute on save of the po file (the .rc file) but actually this not happen.