summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared/translator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* optimization: avoid creating unnecessary temporariesOswald Buddenhagen2011-06-011-35/+29
| | | | | erase messages instead of building a new list of non-dropped ones. modify messages instead of replacing them with modified copies.
* add hash-based indexing to Translator for fast find()Oswald Buddenhagen2011-06-011-26/+71
|
* remove Translator::translatedMessages()Oswald Buddenhagen2011-06-011-9/+0
| | | | | it's inefficient to construct a new list. on top of that, the only user actually checks the message state again.
* remove Translator::contains()Oswald Buddenhagen2011-06-011-8/+0
| | | | it's redundant with find() now, as the latter is cheap now
* optimization: make the Translator::find() api index-basedOswald Buddenhagen2011-06-011-8/+8
|
* nuke Translator::release(), make saveQM() non-static insteadOswald Buddenhagen2011-06-011-10/+0
| | | | this "factory" served only to obfuscate the code
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* remove spurious empty lines in the linguist tools' outputOswald Buddenhagen2010-06-031-1/+1
| | | | ConversionData::error() does already newline-terminate the strings.
* don't use qWarning() - or even qFatal()! - gratuitously.Oswald Buddenhagen2010-06-031-10/+11
| | | | Task-number: QTBUG-8044
* Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too.Thiago Macieira2010-04-101-0/+4
| | | | | | | Ossi is right: on WinCE, _setmode is different from regular Windows and the docs... Reviewed-by: ossi
* the _setmode() prototype is different on win ceOswald Buddenhagen2010-04-091-0/+4
| | | | | | ... both from windows and the wince doc ... Reviewed-by: joerg
* fcntl.h doesn't seem to exist, either - contrary to an example on msdnOswald Buddenhagen2010-04-091-2/+2
|
* fix compile on winceOswald Buddenhagen2010-04-091-2/+7
| | | | Reviewed-by: joerg
* add Plural-Forms header in PO writerOswald Buddenhagen2010-03-311-1/+1
|
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-131-1/+1
|\ | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | QFile cannot deal with crlf-translated stdio, so use binary modeOswald Buddenhagen2010-01-121-0/+12
|/ | | | | | | of course, this will break if somebody actually pipes in windows files. oh, well. Suggested-by: joao
* fix encodings, take NOswald Buddenhagen2009-11-201-3/+8
| | | | | Task-number: QTBUG-4499 Task-number: QTBUG-5276
* build lrelease bootstrappedOswald Buddenhagen2009-11-101-0/+10
| | | | | | | | needed for build-time qm generation in qt itself. the downsides are a) that the other bootstrapped tools grow by ~12kB (on x86) due to qdatastream being pulled in by qbytearray and qstring and b) that lrelease isn't l10n'd itself anymore (the latter could be fixed by building a non-qobject qtranslator).
* record id-based messages even if they have an empty sourceOswald Buddenhagen2009-11-061-2/+2
| | | | | | this makes sense if one uses lupdate only for validation purposes, i.e. to find out if the code uses only ids which are defined in some external specification.
* handle messages with ids (more) correctlyOswald Buddenhagen2009-11-061-35/+99
| | | | | when comparing two messages which both have ids, compare only the ids. this affects finding/reporting duplicates and merging.
* kill TranslatorMessage::operator==() and qHash(TranslatorMessage)Oswald Buddenhagen2009-11-061-4/+24
| | | | preparation work ...
* eliminate TranslatorMessagePtr from the Translator apiOswald Buddenhagen2009-11-061-10/+37
|
* improve ordered message insertionOswald Buddenhagen2009-11-061-1/+1
| | | | | | | | | in a ts file, the top level categorization are the contexts, so it makes no sense to make messages adjoint by file when the context is different. a more clever algorithm which tries to order the entire contexts is conceivable. that would be advantageous for files which use multiple contexts subsequentially if each context appears in only one file.
* eliminate Translator::contains()Oswald Buddenhagen2009-11-061-7/+0
| | | | replace the one use case with something more efficient
* eliminate Translator::replace()Oswald Buddenhagen2009-11-061-9/+0
|
* don't construct a new message for look-up purposes onlyOswald Buddenhagen2009-11-061-8/+0
|
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'origin/4.5'Oswald Buddenhagen2009-07-201-15/+27
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp src/3rdparty/webkit/WebCore/page/DOMWindow.idl src/corelib/io/qdiriterator.cpp src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h tests/auto/qxmlquery/tst_qxmlquery.cpp tools/linguist/lconvert/main.cpp
| * reorganize numerus form count normalizationOswald Buddenhagen2009-07-171-15/+27
| | | | | | | | | | | | replace implicit normalization of individual messages on file writeout with global normalization which is called by the command line tools. this should a) be faster and b) cover the most critical case: lrelease.
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-3/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
| * remove unused includesOswald Buddenhagen2009-06-151-1/+0
| |
* | implement --no-ui-lines option (complementing lupdate)Oswald Buddenhagen2009-05-251-0/+20
|/
* duplicate message handling improvementsOswald Buddenhagen2009-04-021-43/+36
| | | | | | | | | | | | | | | - lrelease will not abort on duplicates any more - lconvert now gets noisy, but only if messages within one file are duplicated (combining files with identical messages is ok) - lupdate stays silent, but will eliminate duplicates again - consolidate handling of dual-encoded and duplicate messages - for performance - instead of the format loader, now the app is responsible for calling the duplicate handler. this allows for the fine-grained control necessary for optimal performance. Task-number: 247738
* optimize duplicate resolutionOswald Buddenhagen2009-04-021-5/+26
| | | | use pointers in the index hash to avoid needless allocs and copies
* properly deal with messages which appear in multiple encodingsOswald Buddenhagen2009-03-271-0/+26
| | | | | | | | | | | | | in ts 1.1 and qm files, messages appear in their native encoding. that means that a message can appear multiple times - once in utf8 and once in the codecForTr. however, in ts 2.0 files, everything is utf8 and messages can have a utf8 flag for the later transformation into qm. unfortunately, there was no flag to mark that the message is needed in *both* encodings, and the respective case was completely ignored when reading ts 1.1 and qm files (causing error messages). Task-number: 249022 AutoTest: 322690
* avoid empty codec nameOswald Buddenhagen2009-03-271-1/+1
|
* beautify / micro-optimizeOswald Buddenhagen2009-03-271-3/+4
|
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+559