PDA

View Full Version : lupdate 4.3.0 does not work but 4.2.2 works?!



gri
18th June 2007, 14:52
Hello there,

I changed my Qt version from 4.2.2 to 4.3.0. Now the "lupdate"-command fails with "lupdate error: Cannot save '../../../../../../': No such file or directory" and I can't find why :(

Parts of my project.pro:

TRANSLATIONS = language/project_de.ts \ # German
language/project_en.ts \ # English
language/project_it.ts \ # Italian
language/project_fr.ts \ # French
language/project_sp.ts # Spanish

Commandline output from 4.3.0:

C:\Source\project>lupdate project.pro
Updating 'language/project_de.ts'...
Found 81 source texts (3 new and 78 already existing)
Kept 32 obsolete translations
Removed 5 obsolete untranslated entries
Updating '../../../../../../'...
Found 81 source texts (81 new and 0 already existing)
lupdate error: Cannot save '../../../../../../': No such file or directory

Commandline from 4.2.2:

C:\Source\project>\Qt\4.2.2\bin\lupdate project.pro
Updating 'language/project_de.ts'...
Found 115 source texts (37 new and 78 already existing)
Kept 3 obsolete translations
Removed 0 obsolete untranslated entries
Updating 'language/project_en.ts'...
Found 115 source texts (37 new and 78 already existing)
Kept 0 obsolete translations
Removed 3 obsolete untranslated entries
Updating 'language/project_fr.ts'...
Found 115 source texts (12 new and 103 already existing)
Kept 0 obsolete translations
Removed 4 obsolete untranslated entries
Updating 'language/project_it.ts'...
Found 115 source texts (12 new and 103 already existing)
Kept 0 obsolete translations
Removed 4 obsolete untranslated entries
Updating 'language/project_sp.ts'...
Found 115 source texts (12 new and 103 already existing)
Kept 0 obsolete translations
Removed 4 obsolete untranslated entries

wysota
18th June 2007, 16:58
What shell do you use?

gri
19th June 2007, 07:50
What shell do you use?

As you see I'm on Windows: Command Prompt. ("Visual Studio .NET 2003 Command Prompt")

wysota
19th June 2007, 08:50
So you're not using MSYS... Ok... Could you show us the contents of your .pro file?

gri
19th June 2007, 09:39
So you're not using MSYS... Ok... Could you show us the contents of your .pro file?


# Use application template
TEMPLATE = app

win32 {
LIBS += -lshell32 \
-ladvapi32
}

include(project.pri)


RESOURCES = project.qrc

RC_FILE = project.rc

# The language files which translate the application
TRANSLATIONS = language/project_de.ts \ # German
language/project_en.ts \ # English
language/project_it.ts \ # Italian
language/project_fr.ts \ # French
language/project_sp.ts # Spanish

QTPLUGIN += qjpeg

# Qt libs
QT += network \ # Add networking support
xml

When I switch the order of languages in the TRANSLATIONS line everytime only the first one gets parsed and the second one fails with that stupid message above :(

wysota
19th June 2007, 10:57
What if you remove the comments after "\"? I think they are the ones breaking your .pro file. I think "\" should be the last character in the line if it is to mean to continue reading the next line.

Another thing to try is to put all filenames in one line.

This could be a bug in lupdate but this could also be some kind of a fix. See if any of the above mentioned solutions work. Then you can report the issue to Trolltech asking about the correct behaviour.

gri
19th June 2007, 13:09
I already tried putting them all in one line yesterday ... this changes nothing :(

wysota
19th June 2007, 15:03
Is the behaviour identical if you create an new .pro file containing only TRANSLATIONS lines?

gri
19th June 2007, 15:22
Is the behaviour identical if you create an new .pro file containing only TRANSLATIONS lines?

No.


TRANSLATIONS = test_de.ts \
test_en.ts


C:\test>lupdate test.pro
Updating 'test_de.ts'...
Found 0 source texts (0 new and 0 already existing)
Updating 'test_en.ts'...
Found 0 source texts (0 new and 0 already existing)

wysota
19th June 2007, 17:03
Ok, so this suggests something in the .pro file corrupts the behaviour of lupdate. Maybe some non-printable character or something like that?