basic languages support and italian language added

This commit is contained in:
John Preston 2014-12-20 00:20:30 +03:00
parent d34ab1e1fe
commit 5bcba600e6
26 changed files with 394 additions and 53 deletions

1
.gitignore vendored
View File

@ -21,6 +21,7 @@ ipch/
/Telegram/tdumps/
.DS_Store
._*
.qmake.stash
/Mac/
/Telegram/*.xcodeproj/xcuserdata/

View File

@ -15,7 +15,8 @@ GNU General Public License for more details.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
"lng_maintitle" = "Telegram Desktop";
"lng_language_name" = "English";
"lng_switch_to_this" = "Switch to English";
"lng_menu_contacts" = "Contacts";
"lng_menu_settings" = "Settings";
@ -123,6 +124,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_signup_title" = "Information and photo";
"lng_signup_desc" = "Please enter your name and\nupload a photo.";
"lng_signup_firstname" = "First Name";
"lng_signup_lastname" = "Last Name";
@ -165,10 +167,12 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_settings_show_preview" = "Show message preview";
"lng_settings_sound_notify" = "Play sound";
"lng_notification_title" = "Telegram Desktop";
"lng_notification_preview" = "You have a new message";
"lng_settings_section_general" = "General";
"lng_settings_change_lang" = "Change Language";
"lng_languages" = "Languages";
"lng_sure_save_language" = "Telegram will restart\nin order to change language";
"lng_settings_auto_update" = "Update automatically";
"lng_settings_current_version" = "Version {version}";
"lng_settings_check_now" = "Check for updates";
@ -196,7 +200,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_settings_cats_and_dogs" = "Allow cats and dogs";
"lng_download_path_dont_ask" = "Don't ask download path for each file";
"lng_download_path_label" = "Download path: ";
"lng_download_path_label" = "Download path:";
"lng_download_path_temp" = "temp folder";
"lng_download_path_default" = "default folder";
"lng_download_path_clear" = "Clear All";
@ -237,6 +241,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_connection_password_ph" = "Password";
"lng_connection_save" = "Save";
"lng_settings_reset" = "Terminate other sessions";
"lng_settings_reset_sure" = "Are you sure you want to terminate all other sessions?";
"lng_settings_reset_button" = "Terminate";
"lng_settings_reset_done" = "Other sessions terminated";
"lng_settings_logout" = "Log Out";
"lng_sure_logout" = "Are you sure you want to log out?";

View File

@ -1660,3 +1660,13 @@ usernameCancel: flatButton(btnSelectCancel) {
youtubeIcon: sprite(336px, 221px, 60px, 60px);
vimeoIcon: sprite(336px, 283px, 60px, 60px);
locationSize: size(320, 240);
langsWidth: 220px;
langsPadding: margins(10px, 10px, 10px, 10px);
langPadding: margins(10px, 10px, 10px, 10px);
langButton: flatCheckbox(rbDefFlat) {
width: 200px;
}
langsCloseButton: flatButton(aboutCloseButton) {
width: langsWidth;
}

View File

@ -338,17 +338,57 @@ bool genLang(const QString &lang_in, const QString &lang_out) {
QString lang_cpp = lang_out + ".cpp", lang_h = lang_out + ".h";
QFile f(lang_in);
if (!f.open(QIODevice::ReadOnly)) {
cout << "Could not open styles input file '" << lang_in.toUtf8().constData() << "'!\n";
cout << "Could not open lang input file '" << lang_in.toUtf8().constData() << "'!\n";
QCoreApplication::exit(1);
return false;
}
QByteArray checkCodec = f.read(3);
if (checkCodec.size() < 3) {
cout << "Bad lang input file '" << lang_in.toUtf8().constData() << "'!\n";
QCoreApplication::exit(1);
return false;
}
f.seek(0);
QByteArray blob = f.readAll();
const char *text = blob.constData(), *end = blob.constData() + blob.size();
f.close();
QByteArray data;
int skip = 0;
if ((checkCodec.at(0) == '\xFF' && checkCodec.at(1) == '\xFE') || (checkCodec.at(0) == '\xFE' && checkCodec.at(1) == '\xFF') || (checkCodec.at(1) == 0)) {
QTextStream stream(&f);
stream.setCodec("UTF-16");
QString string = stream.readAll();
if (stream.status() != QTextStream::Ok) {
cout << "Could not read valid UTF-16 file '" << lang_in.toUtf8().constData() << "'!\n";
QCoreApplication::exit(1);
return false;
}
f.close();
data = string.toUtf8();
} else if (checkCodec.at(0) == 0) {
QByteArray tmp = "\xFE\xFF" + f.readAll(); // add fake UTF-16 BOM
f.close();
QTextStream stream(&tmp);
stream.setCodec("UTF-16");
QString string = stream.readAll();
if (stream.status() != QTextStream::Ok) {
cout << "Could not read valid UTF-16 file '" << lang_in.toUtf8().constData() << "'!\n";
QCoreApplication::exit(1);
return false;
}
data = string.toUtf8();
} else {
data = f.readAll();
if (checkCodec.at(0) == '\xEF' && checkCodec.at(1) == '\xBB' && checkCodec.at(2) == '\xBF') {
skip = 3; // skip UTF-8 BOM
}
}
const char *text = data.constData() + skip, *end = text + data.size() - skip;
try {
while (text != end) {
while (text < end) {
readKeyValue(text, end);
}
@ -409,6 +449,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org\n\
th << "};\n\n";
th << "LangString lang(LangKey key);\n\n";
th << "LangString langOriginal(LangKey key);\n\n";
for (int i = 0, l = keysOrder.size(); i < l; ++i) {
QVector<QByteArray> &tagsList(keysTags[keysOrder[i]]);
@ -468,7 +509,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org\n\
}
tcpp << "\t};\n\n";
tcpp << "\tLangString _langValues[lngkeys_cnt];\n\n";
tcpp << "\tLangString _langValues[lngkeys_cnt], _langValuesOriginal[lngkeys_cnt];\n\n";
tcpp << "\tvoid set(LangKey key, const QString &val) {\n";
tcpp << "\t\t_langValues[key] = val;\n";
tcpp << "\t}\n\n";
@ -512,6 +553,10 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org\n\
tcpp << "\treturn (key < 0 || key > lngkeys_cnt) ? QString() : _langValues[key];\n";
tcpp << "}\n\n";
tcpp << "LangString langOriginal(LangKey key) {\n";
tcpp << "\treturn (key < 0 || key > lngkeys_cnt || _langValuesOriginal[key] == qsl(\"{}\")) ? QString() : (_langValuesOriginal[key].isEmpty() ? _langValues[key] : _langValuesOriginal[key]);\n";
tcpp << "}\n\n";
tcpp << "const char *langKeyName(LangKey key) {\n";
tcpp << "\treturn (key < 0 || key > lngkeys_cnt) ? \"\" : _langKeyNames[key];\n";
tcpp << "}\n\n";
@ -674,6 +719,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org\n\
tcpp << "bool LangLoader::feedKeyValue(LangKey key, const QString &value) {\n";
tcpp << "\tif (key < lngkeys_cnt) {\n";
tcpp << "\t\t_found[key] = 1;\n";
tcpp << "\t\tif (_langValuesOriginal[key].isEmpty()) {\n";
tcpp << "\t\t\t_langValuesOriginal[key] = _langValues[key].isEmpty() ? qsl(\"{}\") : _langValues[key];\n";
tcpp << "\t\t}\n";
tcpp << "\t\t_langValues[key] = value;\n";
tcpp << "\t\treturn true;\n";
tcpp << "\t}\n";

View File

@ -1452,6 +1452,7 @@ namespace App {
configStream << quint32(dbiAutoUpdate) << qint32(cAutoUpdate());
configStream << quint32(dbiLastUpdateCheck) << qint32(cLastUpdateCheck());
configStream << quint32(dbiScale) << qint32(cConfigScale());
configStream << quint32(dbiLang) << qint32(cLang());
configStream << quint32(dbiConnectionType) << qint32(cConnectionType());
if (cConnectionType() == dbictHttpProxy || cConnectionType() == dbictTcpProxy) {
@ -1596,6 +1597,14 @@ namespace App {
cSetRealScale(s);
} break;
case dbiLang: {
qint32 v;
configStream >> v;
if (v == langTestlang || (v >= 0 && v < langCount)) {
cSetLang(v);
}
} break;
case dbiWindowPosition: {
TWindowPos pos;
configStream >> pos.x >> pos.y >> pos.w >> pos.h >> pos.moncrc >> pos.maximized;

View File

@ -129,11 +129,25 @@ Application::Application(int &argc, char **argv) : PsApplication(argc, argv),
cSetIntRetinaFactor(int32(cRetinaFactor()));
}
if (!cLangFile().isEmpty() && QFileInfo(cLangFile()).exists()) {
LangLoaderPlain loader(cLangFile());
cSetLangErrors(loader.errors());
if (!cLangErrors().isEmpty()) {
LOG(("Lang load errors: %1").arg(cLangErrors()));
if (cLang() < langTestlang) {
cSetLang(languageId());
}
if (cLang() == langTestlang) {
if (QFileInfo(TestLangFile).exists()) {
LangLoaderPlain loader(TestLangFile);
cSetLangErrors(loader.errors());
if (!cLangErrors().isEmpty()) {
LOG(("Lang load errors: %1").arg(cLangErrors()));
} else if (!loader.warnings().isEmpty()) {
LOG(("Lang load warnings: %1").arg(loader.warnings()));
}
} else {
cSetLang(langEnglish);
}
} else if (cLang() > langEnglish && cLang() < langCount) {
LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[cLang()] + qsl(".strings"));
if (!loader.errors().isEmpty()) {
LOG(("Lang load errors: %1").arg(loader.errors()));
} else if (!loader.warnings().isEmpty()) {
LOG(("Lang load warnings: %1").arg(loader.warnings()));
}
@ -692,7 +706,7 @@ void Application::startApp() {
}
if (!cLangErrors().isEmpty()) {
window->showLayer(new ConfirmBox("Lang failed: " + cLangFile() + "\n\nError: " + cLangErrors(), true, lang(lng_close)));
window->showLayer(new ConfirmBox("Lang failed: " + QLatin1String(TestLangFile) + "\n\nError: " + cLangErrors(), true, lang(lng_close)));
}
}
@ -838,6 +852,16 @@ QString Application::language() {
return lng;
}
int32 Application::languageId() {
QByteArray l = language().toLatin1();
for (int32 i = 0; i < langCount; ++i) {
if (l == LanguageCodes[i]) {
return i;
}
}
return langEnglish;
}
MainWidget *Application::main() {
return mainApp ? mainApp->window->mainWidget() : 0;
}

View File

@ -38,6 +38,7 @@ public:
static Application *app();
static Window *wnd();
static QString language();
static int32 languageId();
static MainWidget *main();
void onAppUpdate(const MTPhelp_AppUpdate &response);

View File

@ -19,6 +19,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "lang.h"
#include "style.h"
#include "app.h"
#include "intro/intro.h"
#include "intro/introsteps.h"
#include "intro/introphone.h"
@ -45,6 +47,7 @@ namespace {
}
IntroWidget::IntroWidget(Window *window) : QWidget(window),
_langChangeTo(0),
cacheForHideInd(0),
cacheForShowInd(0),
wnd(window),
@ -80,6 +83,18 @@ _backFrom(0), _backTo(0) {
_back.move(st::setClosePos.x(), st::setClosePos.y());
}
void IntroWidget::langChangeTo(int32 langId) {
_langChangeTo = langId;
}
void IntroWidget::onChangeLang() {
cSetLang(_langChangeTo);
App::writeConfig();
cSetRestarting(true);
cSetRestartingToSettings(false);
App::quit();
}
void IntroWidget::onParentResize(const QSize &newSize) {
resize(newSize);
}

View File

@ -60,6 +60,7 @@ public:
void finish(const MTPUser &user, const QImage &photo = QImage());
void rpcInvalidate();
void langChangeTo(int32 langId);
~IntroWidget();
@ -69,6 +70,7 @@ public slots:
void onIntroBack();
void onDoneStateChanged(int oldState, ButtonStateChangeSource source);
void onParentResize(const QSize &newSize);
void onChangeLang();
signals:
@ -81,6 +83,8 @@ private:
void prepareMove();
bool createNext();
int32 _langChangeTo;
QPixmap cacheForHide, cacheForShow;
int cacheForHideInd, cacheForShowInd;
anim::ivalue xCoordHide, xCoordShow;

View File

@ -24,17 +24,40 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "intro/introsteps.h"
#include "intro/intro.h"
#include "langloaderplain.h"
IntroSteps::IntroSteps(IntroWidget *parent) : IntroStage(parent),
_intro(this, lang(lng_intro), st::introLabel, st::introLabelTextStyle),
_next(this, lang(lng_start_msgs), st::btnIntroNext) {
_next(this, lang(lng_start_msgs), st::btnIntroNext),
_changeLang(this, QString()) {
_headerWidth = st::introHeaderFont->m.width(lang(lng_maintitle));
_changeLang.hide();
if (cLang() == langEnglish) {
int32 l = App::app()->languageId();
if (l != langEnglish) {
LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[l] + qsl(".strings"), LangLoaderRequest(lng_switch_to_this));
QString text = loader.found().value(lng_switch_to_this);
if (!text.isEmpty()) {
_changeLang.setText(text);
parent->langChangeTo(l);
_changeLang.show();
}
}
} else {
_changeLang.setText(langOriginal(lng_switch_to_this));
parent->langChangeTo(langEnglish);
_changeLang.show();
}
_headerWidth = st::introHeaderFont->m.width(qsl("Telegram Desktop"));
setGeometry(parent->innerRect());
connect(&_next, SIGNAL(stateChanged(int, ButtonStateChangeSource)), parent, SLOT(onDoneStateChanged(int, ButtonStateChangeSource)));
connect(&_next, SIGNAL(clicked()), parent, SLOT(onIntroNext()));
connect(&_changeLang, SIGNAL(clicked()), parent, SLOT(onChangeLang()));
setMouseTracking(true);
}
@ -49,7 +72,7 @@ void IntroSteps::paintEvent(QPaintEvent *e) {
p.setFont(st::introHeaderFont->f);
p.setPen(st::introColor->p);
p.drawText((width() - _headerWidth) / 2, hy, lang(lng_maintitle));
p.drawText((width() - _headerWidth) / 2, hy, qsl("Telegram Desktop"));
p.drawPixmap(QPoint((width() - st::aboutIcon.pxWidth()) / 2, hy - st::introIconSkip - st::aboutIcon.pxHeight()), App::sprite(), st::aboutIcon);
}
@ -58,6 +81,7 @@ void IntroSteps::resizeEvent(QResizeEvent *e) {
if (e->oldSize().width() != width()) {
_next.move((width() - _next.width()) / 2, st::introBtnTop);
_intro.move((width() - _intro.width()) / 2, _next.y() - _intro.height() - st::introSkip);
_changeLang.move((width() - _changeLang.width()) / 2, _next.y() + _next.height() + _changeLang.height());
}
}

View File

@ -38,6 +38,8 @@ private:
FlatLabel _intro;
LinkButton _changeLang;
FlatButton _next;
int32 _headerWidth;
};

View File

@ -17,6 +17,24 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
#pragma once
enum Languages {
langTestlang = -1,
langEnglish = 0,
langItalian,
// langSpanish,
langCount
};
static const char *LanguageCodes[] = {
"en",
"it",
// "es",
};
static const char *TestLangFile = "testlang.strings";
class LangString : public QString {
public:
LangString() {

View File

@ -66,7 +66,7 @@ namespace {
bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
if (!skipJunk(from, end)) return false;
if (*from != '"') throw Exception(QString("Expected quote after key name!"));
if (*from != '"') throw Exception(QString("Expected quote before key name!"));
++from;
const char *nameStart = from;
while (from < end && ((*from >= 'a' && *from <= 'z') || (*from >= 'A' && *from <= 'Z') || *from == '_' || (*from >= '0' && *from <= '9'))) {
@ -85,7 +85,15 @@ bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
if (*from != '"') throw Exception(QString("Expected string after '=' in key '%1'!").arg(QLatin1String(varName)));
LangKey varKey = keyIndex(varName);
if (varKey == lngkeys_cnt) throw Exception(QString("Unknown key '%1'!").arg(QLatin1String(varName)));
bool feedingValue = request.isEmpty();
if (feedingValue) {
if (varKey == lngkeys_cnt) {
warning(QString("Unknown key '%1'!").arg(QLatin1String(varName)));
}
} else if (!request.contains(varKey)) {
varKey = lngkeys_cnt;
}
bool readingValue = (varKey != lngkeys_cnt);
QByteArray varValue;
QMap<ushort, bool> tagsUsed;
@ -97,14 +105,16 @@ bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
if (*from == '\\') {
if (from + 1 >= end) throw Exception(QString("Unexpected end of file in key '%1'!").arg(QLatin1String(varName)));
if (*(from + 1) == '"' || *(from + 1) == '\\' || *(from + 1) == '{') {
if (from > start) varValue.append(start, from - start);
if (readingValue && from > start) varValue.append(start, from - start);
start = ++from;
} else if (*(from + 1) == 'n') {
if (from > start) varValue.append(start, int(from - start));
varValue.append('\n');
if (readingValue) {
if (from > start) varValue.append(start, int(from - start));
varValue.append('\n');
}
start = (++from) + 1;
}
} else if (*from == '{') {
} else if (readingValue && *from == '{') {
if (from > start) varValue.append(start, int(from - start));
const char *tagStart = ++from;
@ -117,9 +127,17 @@ bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
if (from == end || (*from != '}' && *from != ':')) throw Exception(QString("Expected '}' or ':' after tag name in key '%1'!").arg(QLatin1String(varName)));
ushort index = tagIndex(tagName);
if (index == lngtags_cnt) throw Exception(QString("Tag '%1' not found in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (index == lngtags_cnt) {
readingValue = false;
warning(QString("Tag '%1' not found in key '%2', not using value.").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
continue;
}
if (!tagReplaced(varKey, index)) throw Exception(QString("Unexpected tag '%1' in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (!tagReplaced(varKey, index)) {
readingValue = false;
warning(QString("Unexpected tag '%1' in key '%2', not using value.").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
continue;
}
if (tagsUsed.contains(index)) throw Exception(QString("Tag '%1' double used in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
tagsUsed.insert(index, true);
@ -138,7 +156,14 @@ bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
if (*from == '|') {
if (from > start) subvarValue.append(start, int(from - start));
if (countedIndex >= lngtags_max_counted_values) throw Exception(QString("Too many values inside counted tag '%1' in '%2' key!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (!feedKeyValue(subkeyIndex(varKey, index, countedIndex++), QString::fromUtf8(subvarValue))) throw Exception(QString("Tag '%1' is not counted in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (feedingValue) {
LangKey subkey = subkeyIndex(varKey, index, countedIndex++);
if (subkey == lngkeys_cnt) {
readingValue = false;
warning(QString("Unexpected counted tag '%1' in key '%2', not using value.").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
break;
} else if (!feedKeyValue(subkey, QString::fromUtf8(subvarValue))) throw Exception(QString("Tag '%1' is not counted in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
}
subvarValue = QByteArray();
foundtag = false;
start = from + 1;
@ -169,31 +194,46 @@ bool LangLoaderPlain::readKeyValue(const char *&from, const char *end) {
}
++from;
}
if (!readingValue) continue;
if (from >= end) throw Exception(QString("Unexpected end of file inside counted tag '%1' in '%2' key!").arg(QString::fromUtf8(tagName)).arg(QString::fromUtf8(varName)));
if (*from == '"') throw Exception(QString("Unexpected end of string inside counted tag '%1' in '%2' key!").arg(QString::fromUtf8(tagName)).arg(QString::fromUtf8(varName)));
if (from > start) subvarValue.append(start, int(from - start));
if (countedIndex >= lngtags_max_counted_values) throw Exception(QString("Too many values inside counted tag '%1' in '%2' key!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (!feedKeyValue(subkeyIndex(varKey, index, countedIndex++), QString::fromUtf8(subvarValue))) throw Exception(QString("Tag '%1' is not counted in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
if (feedingValue) {
LangKey subkey = subkeyIndex(varKey, index, countedIndex++);
if (subkey == lngkeys_cnt) {
readingValue = false;
warning(QString("Unexpected counted tag '%1' in key '%2', not using value.").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
break;
} else if (!feedKeyValue(subkey, QString::fromUtf8(subvarValue))) throw Exception(QString("Tag '%1' is not counted in key '%2'!").arg(QLatin1String(tagName)).arg(QLatin1String(varName)));
}
}
start = from + 1;
}
++from;
}
if (from >= end) throw Exception(QString("Unexpected end of file in key '%1'!").arg(QLatin1String(varName)));
if (from > start) varValue.append(start, from - start);
if (readingValue && from > start) varValue.append(start, from - start);
if (!skipJunk(++from, end)) throw Exception(QString("Unexpected end of file in key '%1'!").arg(QLatin1String(varName)));
if (*from != ';') throw Exception(QString("';' expected after \"value\" in key '%1'!").arg(QLatin1String(varName)));
skipJunk(++from, end);
if (!feedKeyValue(varKey, QString::fromUtf8(varValue))) throw Exception(QString("Could not write value in key '%1'!").arg(QLatin1String(varName)));
if (readingValue) {
if (feedingValue) {
if (!feedKeyValue(varKey, QString::fromUtf8(varValue))) throw Exception(QString("Could not write value in key '%1'!").arg(QLatin1String(varName)));
} else {
result.insert(varKey, QString::fromUtf8(varValue));
}
}
return true;
}
LangLoaderPlain::LangLoaderPlain(const QString &file) {
LangLoaderPlain::LangLoaderPlain(const QString &file, const LangLoaderRequest &request) : file(file), request(request) {
QFile f(file);
if (!f.open(QIODevice::ReadOnly)) {
error(qsl("Could not open input file!"));
@ -203,13 +243,51 @@ LangLoaderPlain::LangLoaderPlain(const QString &file) {
error(qsl("Too big file: %1").arg(f.size()));
return;
}
QByteArray data = f.readAll();
f.close();
QByteArray checkCodec = f.read(3);
if (checkCodec.size() < 3) {
error(qsl("Bad lang input file: %1").arg(file));
return;
}
f.seek(0);
QByteArray data;
int skip = 0;
if ((checkCodec.at(0) == '\xFF' && checkCodec.at(1) == '\xFE') || (checkCodec.at(0) == '\xFE' && checkCodec.at(1) == '\xFF') || (checkCodec.at(1) == 0)) {
QTextStream stream(&f);
stream.setCodec("UTF-16");
QString string = stream.readAll();
if (stream.status() != QTextStream::Ok) {
error(qsl("Could not read valid UTF-16 file: % 1").arg(file));
return;
}
f.close();
data = string.toUtf8();
} else if (checkCodec.at(0) == 0) {
QByteArray tmp = "\xFE\xFF" + f.readAll(); // add fake UTF-16 BOM
f.close();
QTextStream stream(&tmp);
stream.setCodec("UTF-16");
QString string = stream.readAll();
if (stream.status() != QTextStream::Ok) {
error(qsl("Could not read valid UTF-16 file: % 1").arg(file));
return;
}
data = string.toUtf8();
} else {
data = f.readAll();
if (checkCodec.at(0) == '\xEF' && checkCodec.at(1) == '\xBB' && checkCodec.at(2) == '\xBF') {
skip = 3; // skip UTF-8 BOM
}
}
const char *text = data.constData() + skip, *end = text + data.size() - skip;
try {
const char *from = data.constData(), *end = data.constData() + data.size();
while (true) {
if (!readKeyValue(from, end)) {
if (!readKeyValue(text, end)) {
break;
}
}

View File

@ -19,13 +19,41 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "lang.h"
class LangLoaderRequest : public QMap <LangKey, bool> {
public:
LangLoaderRequest() {
}
LangLoaderRequest(LangKey key1) {
insert(key1, true);
}
LangLoaderRequest(LangKey key1, LangKey key2) {
insert(key1, true);
insert(key2, true);
}
LangLoaderRequest(LangKey key1, LangKey key2, LangKey key3) {
insert(key1, true);
insert(key2, true);
insert(key3, true);
}
};
typedef QMap<LangKey, QString> LangLoaderResult;
class LangLoaderPlain : public LangLoader {
public:
LangLoaderPlain(const QString &file);
LangLoaderPlain(const QString &file, const LangLoaderRequest &request = LangLoaderRequest());
LangLoaderResult found() const {
return result;
}
protected:
QString file;
LangLoaderRequest request;
bool readKeyValue(const char *&from, const char *end);
LangLoaderResult result;
};

View File

@ -518,7 +518,7 @@ void PsMainWindow::psNotifyShown(NotifyWindow *w) {
}
void PsMainWindow::psPlatformNotify(HistoryItem *item) {
QString title = (cNotifyView() <= dbinvShowName) ? item->history()->peer->name : lang(lng_notification_title);
QString title = (cNotifyView() <= dbinvShowName) ? item->history()->peer->name : qsl("Telegram Desktop");
QString subtitle = (cNotifyView() <= dbinvShowName) ? item->notificationHeader() : QString();
QString msg = (cNotifyView() <= dbinvShowPreview) ? item->notificationText() : lang(lng_notification_preview);
_private.showNotify(item->history()->peer->id, title, subtitle, msg, (cNotifyView() <= dbinvShowPreview));

View File

@ -2259,7 +2259,8 @@ void psExecUpdater() {
}
void psExecTelegram() {
QString targs = qsl("-noupdate -tosettings");
QString targs = qsl("-noupdate");
if (cRestartingToSettings()) targs += qsl(" -tosettings");
if (cFromAutoStart()) targs += qsl(" -autostart");
if (cDebug()) targs += qsl(" -debug");
if (cDataFile() != (cTestMode() ? qsl("data_test") : qsl("data"))) targs += qsl(" -key \"") + cDataFile() + '"';

View File

@ -18,6 +18,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "pspecific.h"
#include "settings.h"
#include "lang.h"
bool gTestMode = false;
bool gDebug = false;
@ -45,7 +46,7 @@ DBIWorkMode gWorkMode = dbiwmWindowAndTray;
DBIConnectionType gConnectionType = dbictAuto;
ConnectionProxy gConnectionProxy;
bool gSeenTrayTooltip = false;
bool gRestartingUpdate = false, gRestarting = false, gWriteProtected = false;
bool gRestartingUpdate = false, gRestarting = false, gRestartingToSettings = false, gWriteProtected = false;
int32 gLastUpdateCheck = 0;
bool gNoStartUpdate = false;
bool gStartToSettings = false;
@ -71,7 +72,7 @@ DBIEmojiTab gEmojiTab = dbietRecent;
RecentEmojiPack gRecentEmojis;
RecentEmojiPreload gRecentEmojisPreload;
QString gLangFile = qsl("testlang.strings");
int32 gLang = -2; // auto
bool gRetina = false;
float64 gRetinaFactor = 1.;
@ -127,8 +128,6 @@ void settingsParseArgs(int argc, char *argv[]) {
gNoStartUpdate = true;
} else if (string("-tosettings") == argv[i]) {
gStartToSettings = true;
} else if (string("-lang") == argv[i] && i + 1 < argc) {
gLangFile = QString(argv[++i]);
} else if (string("-sendpath") == argv[i] && i + 1 < argc) {
for (++i; i < argc; ++i) {
gSendPaths.push_back(QString::fromLocal8Bit(argv[i]));

View File

@ -91,6 +91,7 @@ DeclareSetting(ConnectionProxy, ConnectionProxy);
DeclareSetting(bool, SeenTrayTooltip);
DeclareSetting(bool, RestartingUpdate);
DeclareSetting(bool, Restarting);
DeclareSetting(bool, RestartingToSettings);
DeclareSetting(bool, WriteProtected);
DeclareSetting(int32, LastUpdateCheck);
DeclareSetting(bool, NoStartUpdate);
@ -144,7 +145,7 @@ DeclareSetting(RecentEmojiPreload, RecentEmojisPreload);
const RecentEmojiPack &cGetRecentEmojis();
DeclareReadSetting(QString, LangFile);
DeclareSetting(int32, Lang);
DeclareSetting(QStringList, SendPaths);
DeclareSetting(QString, StartUrl);

View File

@ -29,6 +29,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "boxes/confirmbox.h"
#include "boxes/downloadpathbox.h"
#include "boxes/usernamebox.h"
#include "boxes/languagebox.h"
#include "gui/filedialog.h"
#include "localstorage.h"
@ -121,6 +122,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : QWidget(parent),
_soundNotify(this, lang(lng_settings_sound_notify), cSoundNotify()),
// general
_changeLanguage(this, qsl("Change Language")),
_autoUpdate(this, lang(lng_settings_auto_update), cAutoUpdate()),
_checkNow(this, lang(lng_settings_check_now)),
_restartNow(this, lang(lng_settings_update_now)),
@ -147,7 +149,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : QWidget(parent),
_ctrlEnterSend(this, qsl("send_key"), 1, lang((cPlatform() == dbipMac) ? lng_settings_send_cmdenter : lng_settings_send_ctrlenter), cCtrlEnter()),
_dontAskDownloadPath(this, lang(lng_download_path_dont_ask), !cAskDownloadPath()),
_downloadPathWidth(st::linkFont->m.width(lang(lng_download_path_label))),
_downloadPathWidth(st::linkFont->m.width(lang(lng_download_path_label)) + st::linkFont->spacew),
_downloadPathEdit(this, cDownloadPath().isEmpty() ? lang(lng_download_path_default) : ((cDownloadPath() == qsl("tmp")) ? lang(lng_download_path_temp) : st::linkFont->m.elidedText(QDir::toNativeSeparators(cDownloadPath()), Qt::ElideRight, st::setWidth - st::setVersionLeft - _downloadPathWidth))),
_downloadPathClear(this, lang(lng_download_path_clear)),
_tempDirClearingWidth(st::linkFont->m.width(lang(lng_download_path_clearing))),
@ -198,6 +200,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : QWidget(parent),
connect(&_soundNotify, SIGNAL(changed()), this, SLOT(onSoundNotify()));
// general
connect(&_changeLanguage, SIGNAL(clicked()), this, SLOT(onChangeLanguage()));
connect(&_autoUpdate, SIGNAL(changed()), this, SLOT(onAutoUpdate()));
connect(&_checkNow, SIGNAL(clicked()), this, SLOT(onCheckNow()));
connect(&_restartNow, SIGNAL(clicked()), this, SLOT(onRestartNow()));
@ -543,6 +546,7 @@ void SettingsInner::resizeEvent(QResizeEvent *e) {
// general
top += st::setHeaderSkip;
_changeLanguage.move(_left + st::setWidth - _changeLanguage.width(), top - st::setHeaderSkip + st::setHeaderTop + st::setHeaderFont->ascent - st::linkFont->ascent);
_autoUpdate.move(_left, top);
_checkNow.move(_left + st::setWidth - _checkNow.width(), top + st::cbDefFlat.textTop); top += _autoUpdate.height();
_restartNow.move(_left + st::setWidth - _restartNow.width(), top + st::setVersionTop);
@ -746,6 +750,7 @@ void SettingsInner::showAll() {
}
// general
_changeLanguage.show();
_autoUpdate.show();
setUpdatingState(_updatingState, true);
if (cPlatform() == dbipWindows) {
@ -879,6 +884,13 @@ void SettingsInner::onUpdatePhoto() {
}
void SettingsInner::onResetSessions() {
ConfirmBox *box = new ConfirmBox(lang(lng_settings_reset_sure), lang(lng_settings_reset_button));
connect(box, SIGNAL(confirmed()), this, SLOT(onResetSessionsSure()));
App::wnd()->showLayer(box);
}
void SettingsInner::onResetSessionsSure() {
App::wnd()->layerHidden();
MTP::send(MTPauth_ResetAuthorizations(), rpcDone(&SettingsInner::doneResetSessions));
}
@ -890,6 +902,10 @@ void SettingsInner::doneResetSessions(const MTPBool &res) {
}
}
void SettingsInner::onChangeLanguage() {
App::wnd()->showLayer(new LanguageBox());
}
void SettingsInner::onAutoUpdate() {
cSetAutoUpdate(!cAutoUpdate());
App::writeConfig();
@ -922,6 +938,7 @@ void SettingsInner::onRestartNow() {
cSetRestartingUpdate(true);
} else {
cSetRestarting(true);
cSetRestartingToSettings(true);
}
App::quit();
}

View File

@ -136,11 +136,14 @@ public slots:
void onUpdateFailed();
void onResetSessions();
void onResetSessionsSure();
void onPhotoUpdateDone(PeerId peer);
void onPhotoUpdateFail(PeerId peer);
void onPhotoUpdateStart();
void onChangeLanguage();
private:
void doneResetSessions(const MTPBool &res);
@ -174,6 +177,7 @@ private:
FlatCheckbox _desktopNotify, _senderName, _messagePreview, _soundNotify;
// general
LinkButton _changeLanguage;
FlatCheckbox _autoUpdate;
LinkButton _checkNow, _restartNow;
FlatCheckbox _workmodeTray, _workmodeWindow;

View File

@ -141,6 +141,7 @@ void UpdateBtn::onClick() {
cSetRestartingUpdate(true);
} else {
cSetRestarting(true);
cSetRestartingToSettings(false);
}
App::quit();
}

View File

@ -41,4 +41,7 @@
<qresource prefix="/qt">
<file alias="etc/qt.conf">etc/qt_win.conf</file>
</qresource>
<qresource prefix="/langs">
<file alias="lang_it.strings">langs/lang_it.strings</file>
</qresource>
</RCC>

View File

@ -254,6 +254,7 @@ enum DataBlockId {
dbiNotifyView = 28,
dbiSendToMenu = 29,
dbiCompressPastedImage = 30,
dbiLang = 31,
dbiEncryptedWithSalt = 333,
dbiEncrypted = 444,

View File

@ -204,7 +204,7 @@ void NotifyWindow::updateNotifyDisplay() {
history->nameText.drawElided(p, rectForName.left(), rectForName.top(), rectForName.width());
} else {
p.setFont(st::msgNameFont->f);
static QString notifyTitle = st::msgNameFont->m.elidedText(lang(lng_notification_title), Qt::ElideRight, rectForName.width());
static QString notifyTitle = st::msgNameFont->m.elidedText(qsl("Telegram Desktop"), Qt::ElideRight, rectForName.width());
p.drawText(rectForName.left(), rectForName.top() + st::msgNameFont->ascent, notifyTitle);
}
}

View File

@ -262,6 +262,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_languagebox.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_layerwidget.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -482,6 +486,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Deploy\moc_languagebox.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Deploy\moc_layerwidget.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -711,6 +719,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_languagebox.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_layerwidget.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
@ -827,6 +839,7 @@
<ClCompile Include="SourceFiles\boxes\contactsbox.cpp" />
<ClCompile Include="SourceFiles\boxes\downloadpathbox.cpp" />
<ClCompile Include="SourceFiles\boxes\emojibox.cpp" />
<ClCompile Include="SourceFiles\boxes\languagebox.cpp" />
<ClCompile Include="SourceFiles\boxes\newgroupbox.cpp" />
<ClCompile Include="SourceFiles\boxes\photocropbox.cpp" />
<ClCompile Include="SourceFiles\boxes\photosendbox.cpp" />
@ -1137,6 +1150,20 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\libogg-1.3.2\include" "-I.\..\..\Libraries\opus\include" "-I.\..\..\Libraries\opusfile\include" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.3.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.3.1\QtGui"</Command>
</CustomBuild>
<CustomBuild Include="SourceFiles\boxes\languagebox.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">Moc%27ing languagebox.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\libogg-1.3.2\include" "-I.\..\..\Libraries\opus\include" "-I.\..\..\Libraries\opusfile\include" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.3.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.3.1\QtGui"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing languagebox.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\libogg-1.3.2\include" "-I.\..\..\Libraries\opus\include" "-I.\..\..\Libraries\opusfile\include" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.3.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.3.1\QtGui"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing languagebox.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\OpenSSL-Win32\include" "-I.\..\..\Libraries\libogg-1.3.2\include" "-I.\..\..\Libraries\opus\include" "-I.\..\..\Libraries\opusfile\include" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.3.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.3.1\QtGui"</Command>
</CustomBuild>
<ClInclude Include="SourceFiles\config.h" />
<CustomBuild Include="SourceFiles\gui\animation.h">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing animation.h...</Message>
@ -1749,6 +1776,9 @@
<ItemGroup>
<ResourceCompile Include="Telegram.rc" />
</ItemGroup>
<ItemGroup>
<None Include="SourceFiles\langs\lang_it.strings" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -19,11 +19,6 @@
<Filter Include="gui">
<UniqueIdentifier>{93203856-b459-49ec-8097-689d0feda013}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="mtproto">
<UniqueIdentifier>{d01d021a-d92f-4ac3-9155-6d297fffe596}</UniqueIdentifier>
</Filter>
@ -42,6 +37,9 @@
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="langs">
<UniqueIdentifier>{67311646-a8af-4626-976d-0a5733bf90e8}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="SourceFiles\main.cpp">
@ -767,6 +765,18 @@
<ClCompile Include="SourceFiles\lang.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SourceFiles\boxes\languagebox.cpp">
<Filter>boxes</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Deploy\moc_languagebox.cpp">
<Filter>Generated Files\Deploy</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_languagebox.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_languagebox.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="SourceFiles\stdafx.h">
@ -873,9 +883,6 @@
<CustomBuild Include="SourceFiles\gui\flatbutton.h">
<Filter>gui</Filter>
</CustomBuild>
<CustomBuild Include="SourceFiles\telegram.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="Resources\style_classes.txt" />
<CustomBuild Include="Resources\style.txt" />
<CustomBuild Include="SourceFiles\gui\flatinput.h">
@ -1026,6 +1033,10 @@
<Filter>Source Files</Filter>
</CustomBuild>
<CustomBuild Include="Resources\lang.strings" />
<CustomBuild Include="SourceFiles\telegram.qrc" />
<CustomBuild Include="SourceFiles\boxes\languagebox.h">
<Filter>boxes</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Image Include="SourceFiles\art\icon256.ico" />
@ -1033,4 +1044,9 @@
<ItemGroup>
<ResourceCompile Include="Telegram.rc" />
</ItemGroup>
<ItemGroup>
<None Include="SourceFiles\langs\lang_it.strings">
<Filter>langs</Filter>
</None>
</ItemGroup>
</Project>