Bug 225938

Summary: [projectwizard]Lokalize incapable to create new projects
Product: [Applications] lokalize Reporter: Marek Laane <qiilaq69>
Component: project managementAssignee: Nick Shaforostoff <shafff>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marek Laane 2010-02-08 18:54:48 UTC
Version:           KDE 4.3.98 (KDE 4.4 RC3) (using KDE 4.4.0)
OS:                Linux
Installed from:    Mandriva RPMs

Creating the new project in Lokalize is almost impossible. I'll describe what I've done:
a) Choose Project->Create new Project
b) Choose GUI translation
c) Choose KDE (though, it's the only choice :-) )
d) Choose Existing and then from file dialog /home/marek/kdestable4/et
e) Click Finish
The project is created and Lokalize tries to read files but the system goes really crazy. Checking with Project->Configure project reveals that base directory is "/"! Also branch and alternatives directories are "/" and templates directory "/templates". All, of course, non-existent and Lokalize tries to read all the file system which drives the system really crazy.

It's not the first time, I marked same behaviour already last year (say, about year ago) but forgot to report. Then I resolved it by re-configuring project with right directories but in this time even that seems to be impossible - if I try it, Lokalize eventually crashes and I couldn't find a trace from new project. Only remedy I could find was to duplicate existing .lokalize file and change in it paths and them load it in Lokalize which worked.
Comment 1 Nick Shaforostoff 2010-02-22 00:04:06 UTC
can you try reproducing this behaviour with the latest newprojectwizard.py?
get it from http://websvn.kde.org/trunk/KDE/kdesdk/lokalize/scripts/ and put it to /usr/share/kde4/apps/lokalize/scripts/newprojectwizard.py
Comment 2 Marek Laane 2010-02-24 16:45:54 UTC
Yes, still the same: base, branch and alternatives directory is still /.
Comment 3 Nick Shaforostoff 2010-05-12 00:12:52 UTC
SVN commit 1125680 by shaforo:

-return the simple way to create project, omitting python script.
CCBUG: 225938

-don't update TM with new translation if the file has non-matching target language.

-react on project id change a bit more better



 M  +1 -1      scripts/newprojectwizard.rc  
 M  +5 -0      src/catalog/catalog.cpp  
 M  +13 -7     src/lokalizemainwindow.cpp  
 M  +1 -0      src/lokalizemainwindow.h  
 M  +1 -1      src/lokalizemainwindowui.rc  
 M  +13 -0     src/prefs/prefs.cpp  
 M  +1 -0      src/prefs/prefs.h  
 M  +9 -0      src/tm/dbfilesmodel.cpp  
 M  +1 -1      src/tm/dbfilesmodel.h  
 M  +1 -1      src/tm/tmview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1125680
Comment 4 Nick Shaforostoff 2015-01-20 02:15:03 UTC
Git commit 95fa50a26b63293698f37632d918ae4726a14437 by Nick Shaforostoff.
Committed on 20/01/2015 at 04:13.
Pushed by shaforo into branch 'master'.

improve gettext translation project creation: make sure a proper tm is created with correct target languagecode set by the user in project settings

M  +10   -6    src/prefs/prefs.cpp
M  +13   -0    src/project/project.cpp
M  +4    -2    src/project/project.h

http://commits.kde.org/lokalize/95fa50a26b63293698f37632d918ae4726a14437