File: translate.cpp

package info (click to toggle)
mediainfo 20.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,732 kB
  • sloc: cpp: 15,682; objc: 2,760; sh: 1,343; xml: 926; python: 259; perl: 207; makefile: 173
file content (22 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*  Copyright (c) MediaArea.net SARL. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license that can
 *  be found in the License.html file in the root of the source tree.
 */

#include "translate.h"
#include <QtCore/QStringList>

QString Tr(const char* string, const char * disambiguation, int n) {
    QStringList text = QString(string).split(" ");
    /* TODO
    for(int i=0;i<text.size();i++) {
        if(text[i]=="%n")
            text[i] = QString::number(n);
        else if((qrand()%3==0)&&(!text[i].contains(QRegExp("[\,|\.|\(|\)|\{|\}]")))) {
            text[i] = text[i].toUpper();
        }
    }
    */
    return text.join(" ");
}