Skip to content
Snippets Groups Projects
Commit 3275ad15 authored by march230's avatar march230
Browse files

part 3 done

parent c2922026
No related branches found
No related tags found
1 merge request!2part 3 done
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
No preview for this file type
*-main.c*
*.mo
gettext
*.qm
qt-linguist
Makefile.linguist
#############################################################################
# Makefile for building: qt-linguist
# Generated by qmake (2.01a) (Qt 4.8.7) on: ons sep 25 10:45:27 2019
# Project: Linguist.pro
# Template: app
# Command: /usr/lib/x86_64-linux-gnu/qt4/bin/qmake -o Makefile.linguist Linguist.pro
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -m64 -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/x86_64-linux-gnu/qt4/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = linguist-main.cpp \
setuplocale.c \
linguist.cpp
OBJECTS = linguist-main.o \
setuplocale.o \
linguist.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/shared.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
Linguist.pro
QMAKE_TARGET = qt-linguist
DESTDIR =
TARGET = qt-linguist
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
####### Build rules
all: Makefile.linguist $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile.linguist: Linguist.pro /usr/share/qt4/mkspecs/linux-g++-64/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/common/gcc-base.conf \
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
/usr/share/qt4/mkspecs/common/g++-base.conf \
/usr/share/qt4/mkspecs/common/g++-unix.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/shared.prf \
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/x86_64-linux-gnu/libQtGui.prl \
/usr/lib/x86_64-linux-gnu/libQtCore.prl
$(QMAKE) -o Makefile.linguist Linguist.pro
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/common/gcc-base.conf:
/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
/usr/share/qt4/mkspecs/common/g++-base.conf:
/usr/share/qt4/mkspecs/common/g++-unix.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/shared.prf:
/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/x86_64-linux-gnu/libQtGui.prl:
/usr/lib/x86_64-linux-gnu/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile.linguist Linguist.pro
dist:
@$(CHK_DIR_EXISTS) .tmp/qt-linguist1.0.0 || $(MKDIR) .tmp/qt-linguist1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qt-linguist1.0.0/ && $(COPY_FILE) --parents linguist-main.cpp setuplocale.c linguist.cpp .tmp/qt-linguist1.0.0/ && $(COPY_FILE) --parents example_sv.ts .tmp/qt-linguist1.0.0/ && (cd `dirname .tmp/qt-linguist1.0.0` && $(TAR) qt-linguist1.0.0.tar qt-linguist1.0.0 && $(COMPRESS) qt-linguist1.0.0.tar) && $(MOVE) `dirname .tmp/qt-linguist1.0.0`/qt-linguist1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qt-linguist1.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile.linguist
check: first
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean:
####### Compile
linguist-main.o: linguist-main.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o linguist-main.o linguist-main.cpp
setuplocale.o: setuplocale.c
$(CC) -c $(CFLAGS) $(INCPATH) -o setuplocale.o setuplocale.c
linguist.o: linguist.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o linguist.o linguist.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
File added
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="sv_SE">
<context>
<name>QObject</name>
<message>
<location filename="linguist-main.cpp" line="30"/>
<source>The current language is the default (C/POSIX)
</source>
<translation type="unfinished">Hejhejhej</translation>
</message>
<message>
<location filename="linguist-main.cpp" line="31"/>
<source>The horse can run.
</source>
<translation type="unfinished">DÄÄÄÄCK</translation>
</message>
<message>
<location filename="linguist-main.cpp" line="34"/>
<source>How fast can the horse run?
</source>
<translation type="unfinished">KAMIGANG</translation>
</message>
<message>
<location filename="linguist-main.cpp" line="35"/>
<source>It typically runs at speed of less than 50 km/h.
</source>
<translation type="unfinished">BREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEV</translation>
</message>
</context>
</TS>
File added
#include <stdio.h>
#define _(String) gettext (String)
#if __cplusplus
extern "C" void setuplocale();
#else
void setup();
void setuplocale();
#endif
int main(int argc, char** argv)
{
setuplocale();
#if __cplusplus
/* For Qt: Your code here as it is more convenient than a separate function in C++.
* Setup a QCoreApplication (an application without GUI) and install a translator.
*/
#else
setup();
#endif
/* You need to update this code to output translated strings
* Note that you should make gettext-main.c linguist-main.c and modify
* those files rather than base.c
*/
puts(_("The current language is the default (C/POSIX)\n"));
puts(_("The horse can run.\n"));
puts(_("How fast can the horse run?\n"));
puts(_("It typically runs at speed of less than 50 km/h.\n"));
return 0;
}
#include <libintl.h>
#include <locale.h>
void setup()
{
/* Your code here. Setup a domain for gettext. */
setlocale (LC_ALL, "sv_SE.UTF8");
bindtextdomain ("messages", "locale");
bind_textdomain_codeset("messages", "UTF8");
textdomain ("messages");
}
#include <stdio.h>
#include <QApplication>
#include <QTranslator>
#include <QString>
#include <QObject>
#if __cplusplus
extern "C" void setuplocale();
#else
void setup();
void setuplocale();
#endif
int main(int argc, char** argv)
{
setuplocale();
#if __cplusplus
/* For Qt: Your code here as it is more convenient than a separate function in C++.
* Setup a QCoreApplication (an application without GUI) and install a translator.
*/
QApplication app(argc, argv);
QTranslator my_translator;
my_translator.load("example_sv");
app.installTranslator(&my_translator);
#else
setup();
#endif
/* You need to update this code to output translated strings
* Note that you should make gettext-main.c linguist-main.c and modify
* those files rather than base.c
*/
QString string1 = QObject::tr("The current language is the default (C/POSIX)\n");
QString string2 = QObject::tr("The horse can run.\n");
QString string3 = QObject::tr("How fast can the horse run?\n");
QString string4 = QObject::tr("It typically runs at speed of less than 50 km/h.\n");
puts(string1.toUtf8().constData());
puts(string2.toUtf8().constData());
puts(string3.toUtf8().constData());
puts(string4.toUtf8().constData());
return 0;
}
File added
File added
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-25 11:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. You need to update this code to output translated strings
#. * Note that you should make gettext-main.c linguist-main.c and modify
#. * those files rather than base.c
#.
#: gettext-main.c:24
msgid "The current language is the default (C/POSIX)\n"
msgstr "Heejheej\n"
#: gettext-main.c:25
msgid "The horse can run.\n"
msgstr "Häääääst\n"
#: gettext-main.c:26
msgid "How fast can the horse run?\n"
msgstr "DIRAAAAJ\n"
#: gettext-main.c:27
msgid "It typically runs at speed of less than 50 km/h.\n"
msgstr "DÄÄÄÄÄCK\n"
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment