Commit 92ae4a0f authored by Rico Tzschichholz's avatar Rico Tzschichholz

Imported Upstream version 2.0.1

parent c6e82103
Version 1.6 20130623
Version 2.0.1 20131205
......@@ -3,7 +3,7 @@
==========================================================================
This file is part of ffDiaporama
ffDiaporama is a tools to make diaporama as video
Copyright (C) 2011-2013 Dominique Levray <levray.dominique@bbox.fr>
Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -32,8 +32,8 @@
<Device_4 ImageSize="3" DeviceIndex="4" DeviceName="Generic portable PAL DVD/DIVX Player" FileFormat="1" Standard="0" DeviceType="1" VideoBitrate="1500000" VideoCodec="2" DeviceSubtype="1" AudioBitrate="128000" AudioCodec="1"/>
<Device_5 ImageSize="3" DeviceIndex="5" DeviceName="Generic portable NTSC DVD/DIVX Player" FileFormat="1" Standard="1" DeviceType="1" VideoBitrate="1500000" VideoCodec="2" DeviceSubtype="1" AudioBitrate="128000" AudioCodec="1"/>
<Device_6 ImageSize="3" DeviceIndex="6" DeviceName="Generic multimedia hard drive or gateway-SD/DVD" FileFormat="1" Standard="0" DeviceType="2" VideoBitrate="2000000" VideoCodec="2" DeviceSubtype="0" AudioBitrate="128000" AudioCodec="1"/>
<Device_7 ImageSize="6" DeviceIndex="7" DeviceName="Generic multimedia hard drive or gateway-HD 720p" FileFormat="4" Standard="0" DeviceType="2" VideoBitrate="6000000" VideoCodec="3" DeviceSubtype="0" AudioBitrate="160000" AudioCodec="2"/>
<Device_8 ImageSize="7" DeviceIndex="8" DeviceName="Generic multimedia hard drive or gateway-HD1080p" FileFormat="4" Standard="0" DeviceType="2" VideoBitrate="8000000" VideoCodec="3" DeviceSubtype="0" AudioBitrate="160000" AudioCodec="2"/>
<Device_7 ImageSize="6" DeviceIndex="7" DeviceName="Generic multimedia hard drive or gateway-HD 720p" FileFormat="4" Standard="0" DeviceType="2" VideoBitrate="5000000" VideoCodec="3" DeviceSubtype="0" AudioBitrate="160000" AudioCodec="2"/>
<Device_8 ImageSize="7" DeviceIndex="8" DeviceName="Generic multimedia hard drive or gateway-HD1080p" FileFormat="4" Standard="0" DeviceType="2" VideoBitrate="6000000" VideoCodec="3" DeviceSubtype="0" AudioBitrate="160000" AudioCodec="2"/>
<Device_9 ImageSize="3" DeviceIndex="9" DeviceName="Generic PAL DVD/DIVX Player" FileFormat="1" Standard="0" DeviceType="2" VideoBitrate="2000000" VideoCodec="2" DeviceSubtype="1" AudioBitrate="128000" AudioCodec="1"/>
<Device_10 ImageSize="3" DeviceIndex="10" DeviceName="Generic NTSC DVD/DIVX Player" FileFormat="1" Standard="1" DeviceType="2" VideoBitrate="2000000" VideoCodec="2" DeviceSubtype="1" AudioBitrate="128000" AudioCodec="1"/>
<Device_11 ImageSize="3" DeviceIndex="11" DeviceName="France-Boitier TV générique de Box ADSL-SD/DVD" FileFormat="1" Standard="0" DeviceType="2" VideoBitrate="2000000" VideoCodec="2" DeviceSubtype="2" AudioBitrate="128000" AudioCodec="1"/>
......
@ECHO OFF
REM ======================================================================
REM This file is part of ffDiaporama
REM ffDiaporama is a tools to make diaporama as video
REM Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; either version 2 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License along
REM with this program; if not, write to the Free Software Foundation, Inc.,
REM 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
REM ====================================================================== */
echo "Prepare for language: %1"
WikiMakeBin make=%1
cd %1
rd wiki_img
mklink /J wiki_img ..\wiki_img
rd img
mklink /J img ..\..\img
copy ..\wiki.css wiki.css
qhelpgenerator -c "wiki_%1.qhp" -o "wiki_%1.qch"
qcollectiongenerator "wiki_%1.qhcp" -o "wiki_%1.qhc"
move "wiki_%1.qhc" ../../locale
move "wiki_%1.qch" ../../locale
cd ..
#!/bin/bash
# ======================================================================
# This file is part of ffDiaporama
# ffDiaporama is a tools to make diaporama as video
# Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# ====================================================================== */
PREPLANGUAGE() {
echo "Prepare for language: "$1
./WikiMakeBin make=$1
cd $1
rm wiki_img
ln -s ../wiki_img wiki_img
rm img
ln -s ../../img img
cp ../wiki.css wiki.css
qhelpgenerator -c "wiki_"$1".qhp" -o "wiki_"$1".qch"
qcollectiongenerator "wiki_"$1".qhcp" -o "wiki_"$1".qhc"
mv "wiki_"$1".qhc" ../../locale
mv "wiki_"$1".qch" ../../locale
cd ..
}
cd fake
/usr/lib/x86_64-linux-gnu/qt5/bin/lrelease fake.pro
cd ..
PREPLANGUAGE "en"
PREPLANGUAGE "fr"
PREPLANGUAGE "es"
PREPLANGUAGE "pt"
PREPLANGUAGE "ru"
PREPLANGUAGE "it"
PREPLANGUAGE "el"
PREPLANGUAGE "de"
rem @ECHO OFF
REM ======================================================================
REM This file is part of ffDiaporama
REM ffDiaporama is a tools to make diaporama as video
REM Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; either version 2 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License along
REM with this program; if not, write to the Free Software Foundation, Inc.,
REM 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
REM ====================================================================== */
REM This script must be launch from console with administrator privileges
REM Change the path below to the QT binary folder
SET PATH=%PATH%;C:\Qt\Qt5.1.0-32bits\5.1.0\msvc2012\bin
cd fake
lrelease fake.pro
cd ..
call PREPLANGUAGE "en"
call PREPLANGUAGE "fr"
call PREPLANGUAGE "es"
call PREPLANGUAGE "pt"
call PREPLANGUAGE "ru"
call PREPLANGUAGE "it"
call PREPLANGUAGE "el"
call PREPLANGUAGE "de"
#!/bin/bash
# ======================================================================
# This file is part of ffDiaporama
# ffDiaporama is a tools to make diaporama as video
# Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# ====================================================================== */
./WikiMakeBin fake
retval=$?
if [ "${retval}" -eq 0 ]; then
cd fake
/usr/lib/x86_64-linux-gnu/qt5/bin/lupdate -no-obsolete fake.pro
cd ..
fi
@ECHO OFF
REM ======================================================================
REM This file is part of ffDiaporama
REM ffDiaporama is a tools to make diaporama as video
REM Copyright (C) 2011-2013 Dominique Levray <domledom@laposte.net>
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; either version 2 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License along
REM with this program; if not, write to the Free Software Foundation, Inc.,
REM 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
REM ====================================================================== */
REM Change the path below to the QT binary folder
SET PATH=%PATH%;C:\Qt\Qt5.1.0-32bits\5.1.0\msvc2012\bin
WikiMakeBin fake
cd fake
lupdate -no-obsolete fake.pro
cd ..
This source diff could not be displayed because it is too large. You can view the blob instead.
void Append();
#-------------------------------------------------
#
# Project created by QtCreator 2013-08-23T07:02:04
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = fake
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp\
fake.cpp
HEADERS += fake.h
TRANSLATIONS += ../wikifake_fr.ts \
../wikifake_it.ts \
../wikifake_de.ts \
# ../wikifake_nl.ts \
../wikifake_es.ts \
../wikifake_pt.ts \
../wikifake_ru.ts \
../wikifake_el.ts
#include <QCoreApplication>
#include <fake.h>
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
return a.exec();
}
Readme file for ffDiaporama WIKI
In this file you can find explanations on how is built the ffDiaporama's WIKI and how are made ​​and managed translations of this WIKI.
1. Functional principle
The ffDiaporama's WIKI is constructed as a standard QT documentation.
It is based on the QT Assistant software (see: http://qt-project.org/doc/qt-5.0/qtassistant/assistant-details.html)
The WIKI is composed of a couple of file:
- wiki_[language].qch -> contain the WIKI
- wiki_[language].qhc -> contain the collection definition for qtassistant
Those two files are localised, that is defined for each language.
For examples:
- wiki_en.qch and wiki_en.qhc for English
- wiki_fr.qch and wiki_fr.qhc for French
- and so on
These files are stored in the locale ffDiaporama's sub-directory and are used by ffDiaporama as follows:
- When ffDiaporama needs to display a help page, it launches QT Assistant
- If a couple of file using the same local as the interface is present in the locale sub-subdirectory:
then it asks QT Assistant to open that file
otherwise it asks QT Assistant to open the en files version (English)
- It asks QT Assistant to open the corresponding page
2. Composition of the WIKI
The WIKI is, in fact, a Full WEB site.
It consists of html pages and an index definition file. This index is used by QT Assistant to display the tree in the Component tab.
To avoid having to translate the name of the Web pages, all pages are numbered.
WIKI, in all languages​​, use the same page name : the same page number.
That is why the WIKI Web site looks like this:
main.html -> This is the main page of the WIKI, which appears when you click on the Help button in the main window
xxxx.html -> These are the help pages of the WIKI
wiki_[language].qhcp -> Source file of collection definition for qtassistant
wiki_[language].qhp -> WIKI index source file
These files are compiled (make) to generate couple of file used by QT Assistant, using :
qhelpgenerator to produce QCH files
qcollectiongenerator to produce QHC files
In addition to these files, the WIKI also includes:
img -> a symlink to the ffDiaporama's img folder.
This folder contains all the images and icons used by make to produce ffDiaporama ressource file.
This makes sure to use the same images in the help in the application.
wiki_img -> a sub-directory containing images used only by the wiki (like screenshots)
3. Construction and management of the WIKI
The WIKI is composed of a single web site. This Web site is written in English only.
We use a programe called WikiMake to translate this Web site.
WikiMake is developed specifically for the ffDiaporama's Wiki. It is part of the ffDiaporama source code.
(WikiMake source code is available in the ffDiaporama .tar.gz file and is store in the src/WikiMake subdirectory)
Linux users have to compile WikiMake. To do this, enter the following commands:
qmake wikimake.pro
make
make install
For Windows users, a 32 bit .exe version is included in the .tar.gz
Note that if your computer is not equip with Qt 5 but with Qt 4, you have to use the command "qmake-qt4 wikimake.pro" instead of "qmake wikimake.pro"
Note that the "make install" command must be use without "sudo". You must launch it as a user because it install the binary file in the source directory
of the ffdiaporama's wiki and not in a system directory.
In addition to WikiMake, we also use:
lupdate -> A tools from the standard QT Linguist package used to produce .ts files
lrelease -> A tools from the standard QT Linguist package used to produce .qm files
UpdateTSFiles.bash -> A "Linux bash" script developped for ffDiaporama and used to produce .ts files
UpdateQMFiles.bash -> A "Linux bash" script developped for ffDiaporama and used to produce localized version of the WIKI
UpdateTSFiles.cmd -> A "Windows command" script developped for ffDiaporama and used to produce .ts files
UpdateQMFiles.cmd -> A "Windows command" script developped for ffDiaporama and used to produce localized version of the WIKI
PREPLANGUAGE.cmd -> A "Windows command" sub-script developped for ffDiaporama and used to produce localized version of the WIKI
The principle is as follows:
Launch UpdateTSFiles script to produce the .ts files
Contributors translate .ts files
Launch UpdateQMFiles script to produce localized version of the WIKI Web site based on .ts file and compile couple of files .QCH and .QHC
How UpdateTSFiles works?
UpdateTSFiles use WikiMake in fake mode to produce a fake.cpp file and then use lupdate to create and update .ts files.
The fake.cpp file is stored into the fake project.
This project is used only with lupdate to produce .ts files and must not be compiled.
The file fake.pro contains the list of .ts files to produce.
.ts files are stored into the Wiki sub-folder
Remark: To add a new language, simply add a line corresponding to this language in this fake.pro file.
The fake.cpp file produce by UpdateTSFiles contains sentences to translate :
- WikiMake scan all html and qch files to identify text.
- WikiMake ignore some html tags that were included in sentences (<a> tag and format tags like <b>, <i>, <u>, etc...)
Because WikiMake is a small tools, it's necessary html files used only simple html syntaxe : no script and less as possible span and div
UpdateQMFiles works?
UpdateQMFiles use lrelease to release each .ts file to corresponding .qm files.
Then, for each language :
- it launch WikiMake in make mode to produce localized version of the Web site :
- a folder named with the language name is create
- each html file from the en folder are translated into this localized folder
- .qhcp and .qhp files from en folder are translated into this localized folder
- it launch qhelpgenerator to produce QCH files and qcollectiongenerator to produce QHC files