mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 01:55:19 -04:00
added smplayer_plugin
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@986 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fb01f61bb2
commit
e36aee2663
445 changed files with 267987 additions and 154107 deletions
|
@ -0,0 +1,30 @@
|
|||
#include <QFile>
|
||||
#include <QRegExp>
|
||||
#include <stdio.h>
|
||||
|
||||
int main( int argc, char ** argv )
|
||||
{
|
||||
QFile file("list.txt");
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return -1;
|
||||
|
||||
QRegExp rx("^([a-zA-Z]+) ([a-zA-Z\\-]+)");
|
||||
|
||||
QString line;
|
||||
while (!file.atEnd()) {
|
||||
line = QString(file.readLine()).simplified();
|
||||
if (!line.isEmpty()) {
|
||||
//qDebug("%s", line.toLatin1().constData());
|
||||
if (rx.indexIn(line) > -1) {
|
||||
QString s1 = rx.cap(1);
|
||||
QString s2 = rx.cap(2);
|
||||
//qDebug("code: %s, language: %s", s1.toLatin1().constData(), s2.toLatin1().constData());
|
||||
printf("\tl[\"%s\"] = tr(\"%s\");\n", s1.toLatin1().constData(), s2.toLatin1().constData());
|
||||
}
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue