summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2011.Jason McDonald2011-01-1018-18/+18
| | | | Reviewed-by: Trust Me
* make the dtd reflect realityOswald Buddenhagen2010-11-021-18/+5
|
* I18n: Fix some lupdate warnings.Friedemann Kleint2010-09-141-2/+2
|
* preserve non-standard source referencesOswald Buddenhagen2010-08-301-4/+20
| | | | | | | | | the PO format doc suggests that all references are in filename:linennumber format, but some tools seem to deviate from that. so do our best to preserve such references, even if we can't do anything with them. Task-number: QTBUG-9488
* properly parse ts contexts in obsolete messagesOswald Buddenhagen2010-08-301-0/+2
|
* move the MAGIC_OBSOLETE_REFERENCE hack to the xlf file handlerOswald Buddenhagen2010-08-302-8/+15
| | | | | after all, it is pretty much specific to xlf files, even if the problem majorly concerns converted po files.
* remove spurious empty lines in the linguist tools' outputOswald Buddenhagen2010-06-034-12/+12
| | | | ConversionData::error() does already newline-terminate the strings.
* don't use qWarning() - or even qFatal()! - gratuitously.Oswald Buddenhagen2010-06-032-13/+14
| | | | Task-number: QTBUG-8044
* write PO files without duplicated message idsOswald Buddenhagen2010-06-021-7/+60
| | | | | | | | encoding the qt context as a magic comment was no particularly good idea, as it provided no disambiguation as far as gettext is concerned. so instead encode the context into msgctxt. Task-number: QTBUG-10307
* 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
* Fix compilation on solaris-g++: ctype functions are sometimes macrosThiago Macieira2010-04-011-3/+3
| | | | | | | At least with g++ 3.4 on Solaris, they are. So you can't write ::isalpha because that expands to something invalid. Reviewed-by: Trust Me
* handle qt-format PO flagsOswald Buddenhagen2010-03-311-1/+24
|
* handle encoding of PO filesOswald Buddenhagen2010-03-311-134/+202
|
* make variable naming politically correct :-DOswald Buddenhagen2010-03-311-4/+4
|
* add Plural-Forms header in PO writerOswald Buddenhagen2010-03-315-25/+64
|
* simplify arabic plural ruleOswald Buddenhagen2010-03-311-1/+1
|
* don't mark untranslated messages as fuzzy in PO filesOswald Buddenhagen2010-03-311-2/+2
| | | | ... as this is what gettext processors expect.
* support gettext POT filesOswald Buddenhagen2010-03-311-0/+14
| | | | | these are in fact the same as PO files, only that exporting to one automatically drops translations.
* fix writing of length variant separators in the singular caseOswald Buddenhagen2010-03-311-0/+2
|
* make PO header handling less of a monster hackOswald Buddenhagen2010-03-311-44/+80
| | | | | | instead of doing string editing magic, parse the header properly. don't add a template file comment, either - it's not mandatory, after all.
* fix updating of X-Source-Language PO headerOswald Buddenhagen2010-03-311-0/+3
|
* interpret source language "en" as "POSIX" (more precisely: "none specified")Oswald Buddenhagen2010-03-311-0/+2
| | | | | | | we set it to that value when writing xliff, as the header is mandatory and no better value is possible. it seems unlikely that an unqualified "english" would be used if somebody meant to actually specify a source language, so this hack should be ok.
* optimization: get rid of QString::fromUtf16() usageOswald Buddenhagen2010-02-011-1/+1
| | | | | | | | | | | | QString::fromUtf16() is slow - it does a BOM check and optionally byte swapping, which is utterly pointless when converting internal data structures which are raw utf16 in host byte order anyway. so replace it with QString::fromRawData() (for short-lived strings) or QString(const QChar *, int) (otherwise) if possible. Reviewed-by: axis Reviewed-by: mariusSO Reviewed-by: Bill King
* don't falsely complain about mismatched codecfortrOswald Buddenhagen2010-01-271-0/+1
| | | | normalize the user input first
* unshare pro post-processing codeOswald Buddenhagen2010-01-273-189/+0
| | | | | lrelease needs only the TRANSLATIONS value anyway, so there is hardly anything to share for real
* do not sort the TS filesOswald Buddenhagen2010-01-271-2/+1
| | | | really no point in doing so ...
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-1320-20/+20
|\ | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| * Update copyright year to 2010Jason McDonald2010-01-0620-20/+20
| | | | | | | | 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
* make qph use language attributesOswald Buddenhagen2009-11-251-5/+18
|
* the definition needs xml escaping, tooOswald Buddenhagen2009-11-251-1/+1
|
* don't write context into <definition> fieldOswald Buddenhagen2009-11-251-3/+2
| | | | | | there is really no point in doing so Reviewed-by: hjk
* qph: don't clobber <definition> fieldsOswald Buddenhagen2009-11-251-1/+1
| | | | | | | | | | the translator comment field is not written out, so reading the definition into it is basically discarding it as far as any roundtrips which arrive at qph again are concerned. the message's disambiguation seems most suitable for the task. Reviewed-by: hjk Task-number: QTBUG-4498
* fix class/struct mismatch in the bootstrap magicOswald Buddenhagen2009-11-251-2/+4
| | | | | | qlocale.h includes qobjectdefs.h which forward-declares it as a class. Reviewed-by: aportale
* fix encodings, take NOswald Buddenhagen2009-11-202-5/+11
| | | | | Task-number: QTBUG-4499 Task-number: QTBUG-5276
* don't overwrite explicitly specified CODECFORTR on UTF-16 inputOswald Buddenhagen2009-11-191-1/+1
|
* build lrelease bootstrappedOswald Buddenhagen2009-11-104-0/+49
| | | | | | | | 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-062-36/+100
| | | | | 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-064-27/+25
| | | | preparation work ...
* eliminate TranslatorMessagePtr from the Translator apiOswald Buddenhagen2009-11-063-39/+41
|
* 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-063-11/+11
| | | | replace the one use case with something more efficient
* eliminate Translator::replace()Oswald Buddenhagen2009-11-062-10/+0
|
* do not consider plural source in comparisonsOswald Buddenhagen2009-11-061-4/+0
| | | | | | | | two messages with identical singular but different plural sources simply make no sense. this should be quite a bit faster, as it saves lots of QHash<QString,...> lookups.
* remove unused TranslatorMessage::operator<()Oswald Buddenhagen2009-11-062-12/+0
| | | | it was once needed for QMap, but we don't use that any more
* don't construct a new message for look-up purposes onlyOswald Buddenhagen2009-11-062-10/+0
|