mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Changed: #1193 Added Qt translation files.
This commit is contained in:
parent
51db2e9e5d
commit
5c561fb211
11 changed files with 19783 additions and 66 deletions
|
@ -5,7 +5,7 @@ FILE(GLOB OBJECT_VIEWER_SRC configuration.h entity.h object_viewer.h particle_ed
|
|||
particle_node.h ps_initial_pos.h dup_ps.h vegetable_editor.h vegetable_node.h
|
||||
extension_system/iplugin_spec.h extension_system/plugin_spec.h
|
||||
extension_system/*.cpp *.cpp)
|
||||
|
||||
|
||||
SET(OBJECT_VIEWER_HDR main_window.h graphics_viewport.h animation_dialog.h
|
||||
animation_set_dialog.h settings_dialog.h setup_fog_dialog.h
|
||||
slot_manager_dialog.h particle_control_dialog.h particle_workspace_dialog.h
|
||||
|
@ -40,6 +40,8 @@ SET(OBJECT_VIEWER_UIS animation_form.ui animation_set_form.ui settings_form.ui
|
|||
|
||||
SET(OBJECT_VIEWER_RCS object_viewer_qt.qrc)
|
||||
|
||||
SET(LANGUAGES en fr de ru)
|
||||
|
||||
SET(QT_USE_QTGUI TRUE)
|
||||
SET(QT_USE_QTOPENGL TRUE)
|
||||
|
||||
|
@ -47,11 +49,27 @@ QT4_ADD_RESOURCES( OBJECT_VIEWER_RC_SRCS ${OBJECT_VIEWER_RCS} )
|
|||
QT4_WRAP_CPP( OBJECT_VIEWER_MOC_SRCS ${OBJECT_VIEWER_HDR} )
|
||||
QT4_WRAP_UI( OBJECT_VIEWER_UI_HDRS ${OBJECT_VIEWER_UIS} )
|
||||
|
||||
FOREACH(LANGUAGE ${LANGUAGES})
|
||||
SET (TS ${CMAKE_CURRENT_SOURCE_DIR}/translations/object_viewer_qt_${LANGUAGE}.ts)
|
||||
SET (QM ${CMAKE_CURRENT_SOURCE_DIR}/translations/object_viewer_qt_${LANGUAGE}.qm)
|
||||
SET (TRANSLATIONS ${TRANSLATIONS} ${TS})
|
||||
SET (TRANSLATIONS_BINARY ${TRANSLATIONS_BINARY} ${QM})
|
||||
ADD_CUSTOM_COMMAND (OUTPUT ${QM} COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS} MAIN_DEPENDENCY ${TS})
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_CUSTOM_TARGET (translations COMMAND ${QT_LUPDATE_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} -recursive -ts ${TRANSLATIONS})
|
||||
ADD_CUSTOM_COMMAND (TARGET translations COMMAND ${QT_LRELEASE_EXECUTABLE} ${TRANSLATIONS})
|
||||
|
||||
SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_UIS} ${OBJECT_VIEWER_RCS})
|
||||
SOURCE_GROUP(QtGeneratedUiHdr FILES ${OBJECT_VIEWER_UI_HDRS})
|
||||
SOURCE_GROUP(QtGeneratedMocSrc FILES ${OBJECT_VIEWER_MOC_SRCS})
|
||||
|
||||
ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE ${OBJECT_VIEWER_SRC} ${OBJECT_VIEWER_MOC_SRCS} ${OBJECT_VIEWER_RC_SRCS} ${OBJECT_VIEWER_UI_HDRS})
|
||||
ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE
|
||||
${OBJECT_VIEWER_SRC}
|
||||
${OBJECT_VIEWER_MOC_SRCS}
|
||||
${OBJECT_VIEWER_RC_SRCS}
|
||||
${OBJECT_VIEWER_UI_HDRS}
|
||||
${TRANSLATIONS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(object_viewer_qt
|
||||
nelmisc
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
// Qt includes
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QTranslator>
|
||||
#include <QtCore/QLibraryInfo>
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QApplication>
|
||||
|
@ -102,23 +105,30 @@ sint main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
nlinfo("Welcome to NeL Object Viewer Qt!");
|
||||
|
||||
NLMISC::CPath::remapExtension("tga", "png", true);
|
||||
}
|
||||
|
||||
QApplication app(argc, argv);
|
||||
QSplashScreen *splash = new QSplashScreen();
|
||||
splash->setPixmap(QPixmap(":/images/nel_ide_load.png"));
|
||||
splash->show();
|
||||
|
||||
QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
|
||||
QLatin1String("Ryzom Core"), QLatin1String("ObjectViewerQt"));
|
||||
|
||||
QTranslator translator;
|
||||
QTranslator qtTranslator;
|
||||
QString locale = settings->value("Language", QLocale::system().name()).toString();
|
||||
QString qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
translator.load("object_viewer_qt_" + locale, ":/translations");
|
||||
qtTranslator.load("qt_" + locale, qtTrPath);
|
||||
app.installTranslator(&translator);
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
||||
#if defined(NL_OS_MAC)
|
||||
QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources"));
|
||||
CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString());
|
||||
#endif
|
||||
|
||||
Modules::init();
|
||||
QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
|
||||
QLatin1String("Ryzom Core"), QLatin1String("ObjectViewerQt"));
|
||||
|
||||
Modules::plugMan().setSettings(settings);
|
||||
|
||||
|
|
|
@ -1,61 +1,62 @@
|
|||
<RCC>
|
||||
<qresource>
|
||||
<file>images/nel.png</file>
|
||||
<file>images/open-file.png</file>
|
||||
<file>images/go-down.png</file>
|
||||
<file>images/go-up.png</file>
|
||||
<file>images/list-add.png</file>
|
||||
<file>images/list-remove.png</file>
|
||||
<file>images/play.png</file>
|
||||
<file>images/pause.png</file>
|
||||
<file>images/stop.png</file>
|
||||
<file>images/seek-backward.png</file>
|
||||
<file>images/seek-forward.png</file>
|
||||
<file>images/skip-backward.png</file>
|
||||
<file>images/skip-forward.png</file>
|
||||
<file>images/preferences.png</file>
|
||||
<file>images/time.png</file>
|
||||
<file>images/anim.png</file>
|
||||
<file>images/animset.png</file>
|
||||
<file>images/dqynight.png</file>
|
||||
<file>images/mixer.png</file>
|
||||
<file>images/pqrticles.png</file>
|
||||
<file>images/sound.png</file>
|
||||
<file>images/veget.png</file>
|
||||
<file>images/water.png</file>
|
||||
<file>images/wind.png</file>
|
||||
<file>images/ico_bgcolor.png</file>
|
||||
<file>images/ico_framedelay.png</file>
|
||||
<file>images/ico_skelscale.png</file>
|
||||
<file>images/ico_mrm_mesh.png</file>
|
||||
<file>images/ico_light_group.png</file>
|
||||
<file>images/clear.png</file>
|
||||
<file>images/insert.png</file>
|
||||
<file>images/new.png</file>
|
||||
<file>images/refresh.png</file>
|
||||
<file>images/save-as.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/insert-horizontal.png</file>
|
||||
<file>images/polymode.png</file>
|
||||
<file>images/rmfill.png</file>
|
||||
<file>images/rmline.png</file>
|
||||
<file>images/rmpoints.png</file>
|
||||
<file>images/cam_del.png</file>
|
||||
<file>images/cam_add.png</file>
|
||||
|
||||
<file>images/Emitter.bmp</file>
|
||||
<file>images/Force.bmp</file>
|
||||
|
||||
<file>images/nel_ide_load.png</file>
|
||||
|
||||
<file>images/bad_particle_system_item.png</file>
|
||||
<file>images/particle_system_item.png</file>
|
||||
<file>images/instance_item.png</file>
|
||||
<file>images/light_item.png</file>
|
||||
<file>images/located_item.png</file>
|
||||
<file>images/particle_item.png</file>
|
||||
<file>images/sound_item.png</file>
|
||||
<file>images/workspace_item.png</file>
|
||||
<file>images/collision_zone_item.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file>images/nel.png</file>
|
||||
<file>images/open-file.png</file>
|
||||
<file>images/go-down.png</file>
|
||||
<file>images/go-up.png</file>
|
||||
<file>images/list-add.png</file>
|
||||
<file>images/list-remove.png</file>
|
||||
<file>images/play.png</file>
|
||||
<file>images/pause.png</file>
|
||||
<file>images/stop.png</file>
|
||||
<file>images/seek-backward.png</file>
|
||||
<file>images/seek-forward.png</file>
|
||||
<file>images/skip-backward.png</file>
|
||||
<file>images/skip-forward.png</file>
|
||||
<file>images/preferences.png</file>
|
||||
<file>images/time.png</file>
|
||||
<file>images/anim.png</file>
|
||||
<file>images/animset.png</file>
|
||||
<file>images/dqynight.png</file>
|
||||
<file>images/mixer.png</file>
|
||||
<file>images/pqrticles.png</file>
|
||||
<file>images/sound.png</file>
|
||||
<file>images/veget.png</file>
|
||||
<file>images/water.png</file>
|
||||
<file>images/wind.png</file>
|
||||
<file>images/ico_bgcolor.png</file>
|
||||
<file>images/ico_framedelay.png</file>
|
||||
<file>images/ico_skelscale.png</file>
|
||||
<file>images/ico_mrm_mesh.png</file>
|
||||
<file>images/ico_light_group.png</file>
|
||||
<file>images/clear.png</file>
|
||||
<file>images/insert.png</file>
|
||||
<file>images/new.png</file>
|
||||
<file>images/refresh.png</file>
|
||||
<file>images/save-as.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/insert-horizontal.png</file>
|
||||
<file>images/polymode.png</file>
|
||||
<file>images/rmfill.png</file>
|
||||
<file>images/rmline.png</file>
|
||||
<file>images/rmpoints.png</file>
|
||||
<file>images/cam_del.png</file>
|
||||
<file>images/cam_add.png</file>
|
||||
<file>images/Emitter.bmp</file>
|
||||
<file>images/Force.bmp</file>
|
||||
<file>images/nel_ide_load.png</file>
|
||||
<file>images/bad_particle_system_item.png</file>
|
||||
<file>images/particle_system_item.png</file>
|
||||
<file>images/instance_item.png</file>
|
||||
<file>images/light_item.png</file>
|
||||
<file>images/located_item.png</file>
|
||||
<file>images/particle_item.png</file>
|
||||
<file>images/sound_item.png</file>
|
||||
<file>images/workspace_item.png</file>
|
||||
<file>images/collision_zone_item.png</file>
|
||||
<file>translations/object_viewer_qt_en.qm</file>
|
||||
<file>translations/object_viewer_qt_fr.qm</file>
|
||||
<file>translations/object_viewer_qt_de.qm</file>
|
||||
<file>translations/object_viewer_qt_ru.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue